>  Docs Center  >  Libraries  >  Motley  >  MGHNCSEQUENCE__DEFINE

MGHNCSEQUENCE__DEFINE

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.
###########################################################################
  Copyright (c) 1999-2012 NIWA:
  http://www.niwa.co.nz/
  Licensed under the MIT open source license:
  http://www.opensource.org/licenses/mit-license.php
###########################################################################

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.
  Mark Hadfield, 2009-10:
    Removed calls to widget_event(/NOWAIT).
  Mark Hadfield, 2010-09:
    I achieved a *major* speed-up in MGHncSequence::VarGet for sequences
    containing a large number of files (~1000 or more) by removing a call to
    MGHncSequence::VarInfo from inside the files loop to outside the loop.
  Mark Hadfield, 2010-11:
    Fixed bug introduced by IDL 8.0: the datatype name returned for
    short-integer netCDF variables changed from "SHORT" to "INT', breaking
    the data-unpacking code.



© 2019 Harris Geospatial Solutions, Inc. |  Legal
My Account    |    Store    |    Contact Us