<<prev file | next file >>    view single page | view frames    summary: fields | routine    details: routine

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.

topread_ncdf Reading

result = read_ncdf(name, beginning, ending[, compatibility], BOXZOOM=BOXZOOM, FILENAME=string, PARENTIN=PARENTIN, TIMESTEP=scalar: 0 or 1, ADDSCL_BEFORE=scalar: 0 or 1, 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, DIREC=DIREC, ZETAFILENAME=string, ZETAZERO=scalar: 0 or 1, ZINVAR=named variable, _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 the 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

ADDSCL_BEFORE        type: scalar: 0 or 1 default: 0

put 1 to apply add_offset ad scale factor on data before looking for missing values

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 with filename as input argument 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).

DIREC       

a string used to specify the direction along which we want to make spatial and/or temporal mean. It could be: 'x' 'y' 'z' 't' 'xy' 'xz' 'yz' 'xyz' 'xt' 'yt' 'zt' 'xyt' 'xzt' 'yzt' or 'xyzt'

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

ZINVAR        type: named variable

Set this keyword to a named variable in which 1 is returned if a vertical dimension is found in the variable. Returns 0 otherwise

_EXTRA       

Used to pass keywords to isafile, initncdf, ncdf_gettime, ncdf_getatt and domdef

Version history

Version

$Id: read_ncdf.pro 337 2008-03-20 22:04:33Z smasson $

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

Statistics

McCabe cyclic 101
McCabe essential 1
McCabe modular design 1
Produced by IDLdoc 2.0.