ReadWrite/
ncdf_gettime.pro
get the time axis from a netcdf_file and transforms it in
Julian days of IDL.
ncdf_gettime
Read NetCDF file
result = ncdf_gettime(filename, cdfid, TIMEVAR=string, CALLER=scalar, 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
required
type: scalar
the ID of the ncdf_file, which is already open
Keywords
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: scalar
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 358 2008-04-28 09:41:14Z pinsard $
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" ;
Produced by IDLdoc 2.0.