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, LONG_NAME=LONG_NAME, STANDARD_NAME=STANDARD_NAME, DOUBLE=1 or 0, _extra=_extra
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.
LONG_NAME
Set this keyword to a named variable in which the value of
long_name is returned. Return empty string if this attribute
does not exist.
STANDARD_NAME
Set this keyword to a named variable in which the value of
standard_name (CF convention) is returned. Return empty string
if this attribute does not exist.
DOUBLE
type: 1 or 0
default: 0
activate to force double-precision floating-point value of
add_offset and scale_factor
_extra
defined only to be able to call ncdf_getatt with the _extra keyword
Examples
IDL> ncdf_getatt, cdfid, 'sst', add_offset = add_offset, scale_factor = scale_factor, units = units
Version history
Version
$Id: ncdf_getatt.pro 344 2008-04-15 11:05:43Z smasson $
History
August 2007: Sebastien Masson (smasson@lodyc.jussieu.fr)
Produced by IDLdoc 2.0.