Due to the current gap in continued funding from the U.S. National Science Foundation (NSF), the NSF Unidata Program Center has temporarily paused most operations. See NSF Unidata Pause in Most Operations for details.

Fortran and Attribute Strings

I've seen traffic on null-termination of strings + Fortran + netCDF, and
have read the section in the manual regarding this issue.  BUT, I thought I
understood this to mean that attribute strings would not be terminated by a
null.  

The files I am reading are written by a python-netCDF processor, and the
strings I get from attributes using the Fortran interface (netCDF version
3.4) are null terminated and the length I get back from nf_inq_attlen
includes the null.  If this is the standard, expected behavior, I can
simply look for and remove null characters any time I read an attribute
string.  I would rather, however, that something a bit lower down in the
library chain deal with this for me.  Am I missing something?

Jim
*-------------------*-------------------------------*
| Jim Secan         | Northwest Research Assoc, Inc |
| (jim@xxxxxxxx)    | 9040 S Rita Road, Suite 2214  |
| (520) 663-3570    | Tucson, Arizona 85747         |
|                   | http://www.nwra.com/          |
*-------------------*-------------------------------*

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