Unidata - To provide the data services, tools, and cyberinfrastructure leadership that advance Earth system science, enhance educational opportunities, and broaden participation. Unidata
         
  advanced  
 

Re: [netcdfgroup] Should NetCDF character attributes be null-terminated

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/


 
 
  Contact Us     Site Map     Search     Terms and Conditions     Privacy Policy     Participation Policy
 
National Science Foundation (NSF) UCAR Community Programs   Unidata is a member of the UCAR Community Programs, is managed by the University Corporation for Atmospheric Research, and is sponsored by the National Science Foundation.
P.O. Box 3000     Boulder, CO 80307-3000 USA     Tel: 303-497-8643     Fax: 303-497-8690