[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: The significance of trailing blanks in attributes...



Hi ROland:

Blanks should now be trimmed for convention parsing in 2.2.12. If you get a 
chance to test this, I would appreciate it.

John
Roland Schweitzer wrote:
Hi Folks,

I have some code based the the Java netCDF library (tested against netcdfUI-2.2.10.jar). It depends on the interpretation of files conforming to COARDS and CF-1.0. When a file contains attributes that are significant to the convention, but have trailing blanks, the "grids" are not recognized. E.g.

nxt:long_name = "longitude                                  " ;
nxt:short_name = "lon                                   " ;
nxt:units = "degrees_east                       " ;


Apparently some users have used trailing blanks to pad the netCDF header so they can change attributes without rewriting the entire file. This trick means that the netCDF Java library can't interpret the conventions correctly.

Is it reasonable that the convention attributes be interpreted with the trailing blanks and null bytes removed? Would that sort of change show up in a revised library soon?

If not I will try to attack this problem in myself.

Roland