ReadWrite/
ncdf_getatt.pro
Get variable attibutes from a NetCDF file
ncdf_getatt
Read NetCDF file
ncdf_getatt, fileid, varid, add_offset=add_offset, scale_factor=scale_factor, missing_value=missing_value, units=units, calendar=calendar
Parameters
fileid
in
required
type: salar string or long
if fileid is a scalar string then it is the name of the file (with
the full path) to be opened (in that case, the file will be opened
and closed within ncdf_getatt).
if fileid is a scalar long then it is the id of the file return by a call
to ncdf_open outside of ncdf_getatt (in that case, the file will
NOT be opened and closed within ncdf_getatt)
varid
in
required
type: salar string or long
The netCDF variable ID, returned from a previous call to NCDF_VARDEF
or NCDF_VARID, or the name of the variable.
Keywords
add_offset
Set this keyword to a named variable in which the value of
add_offset attribute is returned. Return 0. if this attribute
doesn't exist.
scale_factor
Set this keyword to a named variable in which the value of
scale_factor attribute is returned. Return 0. if this attribute
doesn't exist.
missing_value
Set this keyword to a named variable in which the value of
missing_value or _fillvalue attribute is returned. Return the scalar
'no' if this attribute doesn't exist.
units
Set this keyword to a named variable in which the value of
units attribute is returned. Return the empty string '' if this attribute
doesn't exist.
calendar
Set this keyword to a named variable in which the value of
calendar attribute is returned. Return the string 'greg' if this attribute
doesn't exist.
Examples
IDL> ncdf_getatt, cdfid, 'sst', add_offset = add_offset, scale_factor = scale_factor, units = units
Version history
Version
$Id: ncdf_getatt.pro 272 2007-08-30 12:51:26Z smasson $
History
August 2007: Sebastien Masson (smasson@lodyc.jussieu.fr)
Produced by IDLdoc 2.0.