[netcdfgroup] Should NetCDF character attributes be null-terminated

Dave Allured dave.allured at noaa.gov
Fri May 9 15:45:08 MDT 2008


Katja Petzoldt wrote:
 >
 > Should NetCDF character attributes be null-terminated

In general, no.  Character attributes are specified and written by 
length, not with a terminator byte.

Netcdf Best Practices:

http://www.unidata.ucar.edu/software/netcdf/docs/BestPractices.html#Strings%20and%20Variables%20of%20type%20char

String guidelines for specific languages:

http://www.unidata.ucar.edu/software/netcdf/docs/netcdf-c/Strings.html
http://www.unidata.ucar.edu/software/netcdf/docs/netcdf-f77/Reading-and-Writing-Character-String-Values.html
http://www.unidata.ucar.edu/software/netcdf/docs/netcdf-f90/Reading-and-Writing-Character-String-Values.html

Dave Allured
CU/CIRES Climate Diagnostics Center (CDC)
http://cires.colorado.edu/science/centers/cdc/
NOAA/ESRL/PSD, Climate Analysis Branch (CAB)
http://www.cdc.noaa.gov/



More information about the netcdfgroup mailing list