ToBeReviewed/INIT/
initncdf.pro
Initfile for Netcdf file. define all the grid parameters through
an appropriate call to computegid
initncdf
Grid
initncdf, ncfilein, XAXISNAME=scalar string, YAXISNAME=scalar string, ZAXISNAME=scalar string, MASKNAME=string, INVMASK=scalar: 0 or 1, USEASMASK=scalar string, MISSING_VALUE=scalar, START1=scalar: 0 or 1, XYINDEX=scalar: 0 or 1, ZINDEX=scalar: 0 or 1, _EXTRA=_EXTRA
Parameters
ncfilein
in
required
type: scalar string
A string giving the name of the NetCdf file
Keywords
XAXISNAME
type: scalar string
default: 'x', 'longitude', 'nav_lon', 'lon', 'lon_rho' or 'NbLongitudes'
A string giving the name of the variable in the file
that contains the [xyz]axis.
YAXISNAME
type: scalar string
default: 'y', 'latitude', 'nav_lat','lat', 'lat_rho' or 'NbLatitudes'
A string giving the name of the variable in the file
that contains the [xyz]axis.
ZAXISNAME
type: scalar string
default: 'z', 'level', 'lev', 'depth...'
A string giving the name of the variable in the file
that contains the [xyz]axis.
MASKNAME
type: string
A string giving the name of the variable in the file
that contains the land/sea mask
INVMASK
type: scalar: 0 or 1
default: 0
Inverse the land/sea mask (that should have 0/1 values for land/sea): mask = 1-mask
USEASMASK
type: scalar string
A string giving the name of the variable in the file
that will be used to build the land/sea mask. In this case the
mask is based on the first record (if record dimension
exists). The mask is build according to :
1 the keyword missing_value if existing
2 the attribute 'missing_value' if existing
3 NaN values if existing
MISSING_VALUE
type: scalar
To define (or redefine if the attribute is
already existing) the missing values used with USEASMASK
keyword
START1
type: scalar: 0 or 1
default: 0
Index the axis from 1 instead of 0 when using
/xyindex and/or zindex
XYINDEX
type: scalar: 0 or 1
default: 0
To define the x/y axis with index instead of using
the values contained in X/YAXISNAME.
x/yaxis = keyword_set(start1) + findgen(jpi/jpj)
this forces key_onearth = 0
ZINDEX
type: scalar: 0 or 1
default: 0
To define the z axis with index instead of using
the values contained in ZAXISNAME.
zaxis = keyword_set(start1) + findgen(jpk)
_EXTRA
Used to pass keywords to computegrid
Examples
IDL> initncdf,'toto.nc',glam=[-180,180]
Version history
Version
$Id: initncdf.pro 172 2006-09-11 07:11:26Z smasson $
History
Sebastien Masson (smasson@lodyc.jussieu.fr)
8 May 2002
Known issues
Restrictions
Change the grid parameters (see computegrid)
the file must contain an x and an y axis. (1 ou 2 dimentional array)
Other attributes
Uses routines
common.pro
Produced by IDLdoc 2.0 on Wed Sep 13 16:32:39 2006.