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

Interpolation of vertical layers. More...

#include <fimex/CDMVerticalInterpolator.h>

Inheritance diagram for MetNoFimex::CDMVerticalInterpolator:
MetNoFimex::CDMReader

Public Member Functions

 CDMVerticalInterpolator (boost::shared_ptr< CDMReader > dataReader, const std::string &verticalType, const std::string &verticalInterpolationMethod, const std::vector< double > &level1, const std::vector< double > &level2)
 
virtual ~CDMVerticalInterpolator ()
 
virtual DataPtr getDataSlice (const std::string &varName, size_t unLimDimPos=0)
 
- 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 getDataSlice (const std::string &varName, const SliceBuilder &sb)
 data-reading function to be called from the CDMWriter 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

Interpolation of vertical layers.

The CDMVerticalInterpolator can be used to interpolate vertical levels.

Warning
CDMVerticalInterpolator requires a valid coordinate-system. In addition, the vertical axis may not be the unlimited dimension. Furthermore, the vertical layer may not depend or more dimensions than x,y and time. The order of dimensions must be time, k, y, x.
The routine does not handle invalid values, except float/double nans

Constructor & Destructor Documentation

MetNoFimex::CDMVerticalInterpolator::CDMVerticalInterpolator ( boost::shared_ptr< CDMReader dataReader,
const std::string verticalType,
const std::string verticalInterpolationMethod,
const std::vector< double > &  level1,
const std::vector< double > &  level2 
)

Initialize a vertical interpolator.

Parameters
dataReaderthe data-source
verticalTypemust be 'pressure' (hPa), 'height' (m) or 'depth' (m)
verticalInterpolationMethodone of 'linear', 'log', 'loglog'
level1the new vertical levels, for 'pressure', that is pressure in hPa
level2only required for hybrid levels, not yet supported
virtual MetNoFimex::CDMVerticalInterpolator::~CDMVerticalInterpolator ( )
virtual

Member Function Documentation

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

retrieve data from the underlying dataReader and interpolate the values to the new vertical levels

Implements MetNoFimex::CDMReader.


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