ReadWrite/
ncdf_getaxis.pro
get the x/y dimension Id and x/y axes from a netcdf file
ncdf_getaxis
Reading
ncdf_getaxis, cdfid, dimidx, dimidy, xaxis, yaxis, XAXISNAME=scalar string, YAXISNAME=scalar string, XDIMNAME=scalar string, YDIMNAME=scalar string, XYINDEX=scalar: 0 or 1, START1=scalar: 0 or 1, ROMSGRID=variable, _EXTRA=_EXTRA
Parameters
cdfid
in
required
type: scalar
the id of the netcdf file
dimidx
out
type: scalar (long)
id of the x dimension
dimidy
out
type: scalar (long)
id of the y dimension
xaxis
out
type: 1D or 2D array
the x axis
yaxis
out
type: 1D or 2D array
the y axis
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.
XDIMNAME
type: scalar string
default: 'longitude', 'lon', 'x', 'longitude*', 'lon*', 'x*', '*longitude*', '*lon*' or '*x*'
A string giving the name of the x dimension
YDIMNAME
type: scalar string
default: 'latitude', 'lat', 'y', 'latitude*', 'lat*', 'y*', 'eta_*', '*latitude*', '*lat*', '*y*'
A string giving the name of the y dimension
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)
START1
type: scalar: 0 or 1
default: 0
Index the axis from 1 instead of 0 when using /xyindex
ROMSGRID
out
type: scalar: 0 or 1
gives back if we are using a ROMS grid (1) or not (0)
_EXTRA
Used to be able to call ncdf_getaxis with _extra
Version history
Version
$Id: ncdf_getaxis.pro 232 2007-03-20 16:59:36Z pinsard $
History
March 2007: Sebastien Masson (smasson@locean-ipsl.upmc.fr)
Produced by IDLdoc 2.0.