ToBeReviewed/LECTURE/
read_ncdf.pro
Reading function for the file net_cdf.
This program is less universal than ncdf_lec (it appeal to declared
variables in common.pro) but it is very easier to be used. It considerate
the declaration of the different zooms which have been defined
(ixminmesh...premierx...), the declaration of the variable key_shift...
To put it in a nutshell, the result of read_ncdf can be directly used in plt...
This is also this program which is used by default in our reading widgets.
read_ncdf
Reading
result = read_ncdf(name, beginning, ending[, compatibility], BOXZOOM=BOXZOOM, FILENAME=string, PARENTIN=PARENTIN, TIMESTEP=scalar: 0 or 1, TIMEVAR=string, TOUT=scalar: 0 or 1, NOSTRUCT=scalar: 0 or 1, CONT_NOFILL=CONT_NOFILL, INIT=scalar: 0 or 1, GRID=GRID, CALLITSELF=scalar: 0 or 1, ZETAFILENAME=string, ZETAZERO=scalar: 0 or 1, _EXTRA=_EXTRA)
Return value
Structure readable by litchamp or an array if NOSTRUCT is activated.
Parameters
name
in
required
type: string
It define the field to be read.
beginning
in
required
Relative with the time axis.
These can be
- 2 date of the type yyyymmdd and in this case, we select dates
which are included between these two dates.
- 2 indexes which define between which and which time step we have
to extract the temporal dimension.
ending
in
required
Relative with the time axis.
See BEGINNING.
compatibility
in
optional
Useless, defined for compatibility
Keywords
BOXZOOM
Contain the boxzoom on which we have to do the reading
FILENAME
required
type: string
It contains he file's name.
PARENTIN
TIMESTEP
type: scalar: 0 or 1
default: 0
Specify that BEGINNING and ENDING refer to indexes of the time axis and not to dates
TIMEVAR
type: string
It define the name of the variable that
contains the time axis. This keyword can be useful if there
is no unlimited dimension or if the time axis selected by default
(the first 1D array with unlimited dimension) is not the good one.
TOUT
type: scalar: 0 or 1
default: 0
We activate it if we want to read the file on the whole domain without
considerate the sub-domain defined by the boxzoom or
lon1,lon2,lat1,lat2,vert1,vert2.
NOSTRUCT
type: scalar: 0 or 1
default: 0
We activate it if we do not want that read_ncdf send back a structure
but only the array referring to the field.
CONT_NOFILL
INIT
type: scalar: 0 or 1
default: 0
To call automatically initncdf, filename and thus
redefine all the grid parameters
GRID
='[UTVWF]' to specify the type of grid. Default is (1)
based on the name of the file if the file ends by
GRID[._][TUVFW].NC (not case sensible) or (2) T if case (1)
is not found.
CALLITSELF
type: scalar: 0 or 1
default: 0
For ROMS outputs. Use by read_ncdf itself to access auxilliary data (h and zeta).
ZETAFILENAME
type: string
default: FILENAME
For ROMS outputs. The filename of the file where zeta variable should be read
ZETAZERO
type: scalar: 0 or 1
default: 0
For ROMS outputs. To define zeta to 0. instead of reading it
_EXTRA
Used to pass keywords
Version history
Version
$Id: read_ncdf.pro 240 2007-03-28 12:17:24Z pinsard $
History
Sebastien Masson (smasson@lodyc.jussieu.fr)
15/10/1999
Known issues
Restrictions
The field must have a temporal dimension.
Other attributes
Uses routines
common.pro
Produced by IDLdoc 2.0.