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

ReadWrite/

ncdf_gettime.pro

get the time axis from a netcdf_file and transforms it in Julian days of IDL.

topncdf_gettime Read NetCDF file

result = ncdf_gettime(filename[, cdfid], CALTYPE=CALTYPE, TIMEVAR=string, CALLER=string, ERR=ERR, _EXTRA=_EXTRA)

Return value

a double 1D array of IDL Julian days In case of error return -1 if the time dimension was not found or return -jpt if it as been found that the time dimension size is jpt

Parameters

filename        in required type: scalar string

the name of the ncdf_file

cdfid        in optional type: scalar

the ID of the ncdf_file, if the file is already open. if not provided, ncdf_gettime open the file defined by filename

Keywords

CALTYPE       

Used to specify (or orverwrite) the type of calendar that should be used. We accept only 'noleap', '360d', 'greg' and 'gregorian'. By default, we use the type of calendar defied in the attibute calendar. if not, we define it as gregorian.

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.

CALLER        required type: string

Used to specify the error messages. Give the name of the calling procedure. It can be only 'read_ncdf' or 'scanfile'.

ERR       

Set this keyword to a named variable in which the value of the error message will be returned

_EXTRA       

_EXTRA to be able to call ncdf_getmask with _extra keyword

Version history

Version

$Id: ncdf_gettime.pro 401 2009-07-23 08:48:16Z smasson $

History

August 2007: Sebastien Masson (smasson@lodyc.jussieu.fr)

Known issues

Restrictions

the calendar variable must have the units attribute following the syntax below: time_counter:units = "seconds since 0001-01-01 00:00:00" ; time_counter:units = "hours since 0001-01-01 00:00:00" ; time_counter:units = "days since 1979-01-01 00:00:00" ; time_counter:units = "months since 1979-01-01 00:00:00" ; time_counter:units = "years since 1979-01-01 00:00:00" ;

Statistics

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