The significance of trailing blanks in attributes...

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


  • 2005 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the netcdf-java archives: