This archive contains answers to questions sent to Unidata support through mid-2025. Note that the archive is no longer being updated. We provide the archive for reference; many of the answers presented here remain technically correct, even if somewhat outdated. For the most up-to-date information on the use of NSF Unidata software and data services, please consult the Software Documentation first.
Sujata, > Instead of a floating point number, suppose I want to put an integer, > (Suppose, 200), then what should I specify? I'll assume you are still asking about a global attribute named NX and using the netCDF-2 Fortran-77 interface. In that case, you could use something like: call ncapt(cdfid, ncglobal, 'DX', NCLONG, 1, 200 , rcode) as documented here, for the old version 2 F77 interface, when integers were referred to as "longs": http://www.unidata.ucar.edu/software/netcdf/guide_10.html#SEC77 If you used the current netCDF-3 Fortran interface, you could use something like this: rcode = nf_put_att_int(cdfid, NF_GLOBAL, 'DX', NF_INT, 1, 200) as documented in the netCDF-3 Fortran-77 Users Guide under NF_PUT_ATT_type --Russ http://www.unidata.ucar.edu/software/netcdf/docs/netcdf-f77.html Russ Rew UCAR Unidata Program address@hidden http://www.unidata.ucar.edu Ticket Details =================== Ticket ID: DTZ-193910 Department: Support netCDF Priority: Normal Status: Closed