[netcdfgroup] Fortran appending a file as a global attribute

Tim Hoar thoar at ucar.edu
Wed May 14 17:23:35 MDT 2008


I am fairly well-versed with the F90 interface to netCDF, but the  
following problem
has me stumped.

My Fortran program has an input namelist (usually less than 100  
lines) that I would
like to insert into a netCDF file as a global attribute.

Any ideas?

At the risk of steering the discussion ...
The NetCDF Fortran 90 Interface Guide has a statement in Section 5.2  
"Attribute Conventions":

history
A global attribute for an audit trail. This is a character array with  
a line for each invocation of a program that has modified the  
dataset. Well-behaved generic netCDF applications should append a  
line containing: date, time of day, user name, program name and  
command arguments.

the key word being 'append' ...

Any ideas (short of "NF90_GET_ATT, NF90_DEL_ATT, [append],  
NF90_PUT_ATT" for each line in the file)
would be appreciated.

Tim Hoar, Associate Scientist
National Center for Atmospheric Research
thoar at ucar.edu
303 497 1708




More information about the netcdfgroup mailing list