MGHNCSEQUENCE__DEFINE Name
Class MGHncSequence Purpose
This class allows read-only access to a sequence of netCDF
files. A virtual unlimited dimension is constructed so that the
sequence of files can be treated as a single netCDF file. (See
documentation below, especially the ENSEMBLE and UNLIMITED
properties.) It was inspired by the NCO operators ncrcat and
ncecat, see:
http://nco.sourceforge.net/nco.html#ncecat-netCDF-Ensemble-Concatenator
http://nco.sourceforge.net/nco.html#ncrcat-netCDF-Record-Concatenator
Properties
ENSEMBLE (Init, Get)
Set this property to 1 to indicate that the files in the
sequence are to be treated as an ensemble in the sense used in
the NCO documentation, i.e. a synthetic unlimited dimension is
constructed, with each netCDF file object corresponding to one
record. If this property is 0 (the default) then the files are
concatenated along a dimension that they all share. See
UNLIMITED property.
FILE_N_RECORDS (Get)
An integer array with dimension N_FILES giving the number of
records in each of the netCDF files in the sequence
FILE_NAME (Init, Get)
A string array with dimension N_FILES giving the name of each of
the netCDF files in the sequence. If a single-element string is
passed to the Init method, then an attempt is made to expand it
using findfile.
FILE_OFFSET (Get)
An integer array with dimension N_FILES giving the position, for
each of the netCDF files, of the file's first record in the
sequence of records formed by all the files.
NAME (Init, Get, Set)
An identifying string. Default is the empty string.
N_FILES (Get)
The number of MGHncReadFile objects in the sequence.
N_RECORDS (Get)
The total number of records
TMP (Init)
This property is passed to all MGHncReadFile objects created
during initialisation. If it is set, then a temporary copy is
made of each of the netCDF files.
UNLIMITED (Init, Get)
This property is the name of the sequence's unlimited
dimension. Its value depends on the value of the ENSEMBLE
property:
ENSEMBLE=0: The sequence's unlimited dimension must be shared
by all the files in the sequence. By default it is determined
from the unlimited dimension of of the first file added to the
sequence, but it can also be specified when the sequence is
initialised. The MGHncSequence object also supports the
special case where no unlimited dimension is specified and a
single netCDF file with no unlimited dimension is added; in
this case the sequence has no unlimited dimension.
ENSEMBLE=1: The sequence's unlimited dimension is a synthetic
dimension corresponding to file number. The default value is
'record' but any other name can be specified.
###########################################################################
This software is provided subject to the following conditions:
1. NIWA makes no representations or warranties regarding the
accuracy of the software, the use to which the software may
be put or the results to be obtained from the use of the
software. Accordingly NIWA accepts no liability for any loss
or damage (whether direct of indirect) incurred by any person
through the use of or reliance on the software.
2. NIWA is to be acknowledged as the original author of the
software where the software is used or presented in any form.
###########################################################################
Modification History
Mark Hadfield, 1999-05:
Written.
Mark Hadfield, 2001-06:
* Updated for IDL 5.5.
* Added support for ensemble-type sequences.
Mark Hadfield, 2001-11:
Major overhaul of interface along with MGHncFile and MGHncReadFile.
Mark Hadfield, 2002-03:
* Added TMP keyword.
* Added support for wrapping a single file with no unlimited
dimension. This makes subclasses like MGHromsHistory more
versatile.