MI - Fimex
Public Member Functions | List of all members
MetNoFimex::NcmlCDMReader Class Reference

#include <NcmlCDMReader.h>

Inheritance diagram for MetNoFimex::NcmlCDMReader:
MetNoFimex::CDMReader

Public Member Functions

 NcmlCDMReader (const XMLInput &configXML)
 
 NcmlCDMReader (const boost::shared_ptr< CDMReader > dataReader, const XMLInput &configXML)
 
virtual ~NcmlCDMReader ()
 
virtual DataPtr getDataSlice (const std::string &varName, size_t unLimDimPos=0)
 
virtual DataPtr getDataSlice (const std::string &varName, const SliceBuilder &sb)
 
- Public Member Functions inherited from MetNoFimex::CDMReader
 CDMReader ()
 
virtual ~CDMReader ()
 
virtual const CDMgetCDM () const
 
virtual CDMgetInternalCDM ()
 
virtual std::vector< std::size_t > getDims (std::string varName)
 Read the sizes of the dimensions belonging to a variable. More...
 
virtual std::vector< std::size_t > getDimsSlice (std::string varName)
 Read the sizes of the dimensions belonging to a variable slice. More...
 
virtual DataPtr getData (const std::string &varName)
 data-reading function to be called from the CDMWriter More...
 
virtual DataPtr getScaledDataSlice (const std::string &varName, size_t unLimDimPos)
 read and scale a dataslice More...
 
virtual DataPtr getScaledDataSliceInUnit (const std::string &varName, const std::string &unit, size_t unLimDimPos)
 read and scale a dataslice to a known unit More...
 
virtual DataPtr getScaledDataSlice (const std::string &varName, const SliceBuilder &sb)
 read and scale a dataslice More...
 
virtual DataPtr getScaledDataSliceInUnit (const std::string &varName, const std::string &unit, const SliceBuilder &sb)
 read and scale a dataslice to a set unit More...
 
virtual DataPtr getScaledData (const std::string &varName)
 read and scale the complete data More...
 
virtual DataPtr getScaledDataInUnit (const std::string &varName, const std::string &unit)
 read and scale the complete data to a set unit More...
 

Additional Inherited Members

- Protected Member Functions inherited from MetNoFimex::CDMReader
virtual DataPtr getDataSliceFromMemory (const CDMVariable &variable, size_t unLimDimPos=0)
 
void getScaleAndOffsetOf (const std::string &varName, double &scale, double &offset) const
 
- Protected Attributes inherited from MetNoFimex::CDMReader
boost::shared_ptr< CDMcdm_
 

Detailed Description

The NcmlCDMReader can be used as both standard reader of a data and as a manipulator for an existing CDM provided by a CDMReader.

In the case of a real reader, the ncml-configuration file needs to have the 'location' field set, which must point to a file readable by CDMReader

The configuration file must be a standard ncml-file (versionn 2.2) as defined by http://www.unidata.ucar.edu/software/netcdf/ncml/. The following changes have been made to the unidata-version to improve operability with the file-types supported by fimex:

Examples:

<aggregation type="joinExisting">
<scan location="." regExp="\w{3}\.nc" />
</aggregation>
<aggregation type="union">
<netcdf location="cldc.mean.nc"/>
<netcdf location="lflx.mean.nc"/>
</aggregation>
Warning
Aggregation keep all files open. Don't try to aggregate more that your OS limit on open files per process, e.g. 1024 as default for Ubuntu 12.04.

Constructor & Destructor Documentation

MetNoFimex::NcmlCDMReader::NcmlCDMReader ( const XMLInput configXML)
Parameters
configXMLncml-file with location set
Exceptions
CDMException
MetNoFimex::NcmlCDMReader::NcmlCDMReader ( const boost::shared_ptr< CDMReader dataReader,
const XMLInput configXML 
)
Parameters
dataReadera file reader opened elsewhere
configXMLncml-file with location set
Exceptions
CDMException
virtual MetNoFimex::NcmlCDMReader::~NcmlCDMReader ( )
virtual

Member Function Documentation

virtual DataPtr MetNoFimex::NcmlCDMReader::getDataSlice ( const std::string varName,
size_t  unLimDimPos = 0 
)
virtual

reading the data from the required source

Implements MetNoFimex::CDMReader.

virtual DataPtr MetNoFimex::NcmlCDMReader::getDataSlice ( const std::string varName,
const SliceBuilder sb 
)
virtual

reading the data from the required source with SliceBuilder

Reimplemented from MetNoFimex::CDMReader.


The documentation for this class was generated from the following file: