[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[netCDF #DTZ-193910]: putting integer value in netCDF
- Subject: [netCDF #DTZ-193910]: putting integer value in netCDF
- Date: Fri, 06 Jun 2008 21:09:05 -0600
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