MI - Fimex
|
#include <fimex/CDMMerger.h>
Public Member Functions | |
CDMMerger (boost::shared_ptr< CDMReader > inner, boost::shared_ptr< CDMReader > outer) | |
void | setSmoothing (CDMBorderSmoothing::SmoothingFactoryPtr smoothingFactory) |
void | setUseOuterIfInnerUndefined (bool useOuter) |
void | setKeepOuterVariables (bool keepOuterVariabes) |
void | setGridInterpolationMethod (int method) |
void | setTargetGrid (const std::string &proj, const std::string &tx_axis, const std::string &ty_axis, const std::string &tx_unit, const std::string &ty_unit, const std::string &tx_type, const std::string &ty_type) |
void | setTargetGrid (const std::string &proj, const std::vector< double > &tx, const std::vector< double > &ty, const std::string &tx_unit, const std::string &ty_unit, const CDMDataType &tx_type, const CDMDataType &ty_type) |
void | setTargetGridFromInner () |
virtual boost::shared_ptr< Data > | getDataSlice (const std::string &varName, std::size_t unLimDimPos) |
![]() | |
CDMReader () | |
virtual | ~CDMReader () |
virtual const CDM & | getCDM () const |
virtual CDM & | getInternalCDM () |
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, size_t unLimDimPos)=0 |
data-reading function to be called from the CDMWriter 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 | |
![]() | |
virtual DataPtr | getDataSliceFromMemory (const CDMVariable &variable, size_t unLimDimPos=0) |
void | getScaleAndOffsetOf (const std::string &varName, double &scale, double &offset) const |
![]() | |
boost::shared_ptr< CDM > | cdm_ |
Allows merging data from an inner, "fine" grid onto data from an outer, "rough" grid.
The resulting grid can either be an automatic extension of the inner grid, or defined manually. A smoothing function is applied at the outer border of the inner grid, by default a linear transition.
Present limitations:
MetNoFimex::CDMMerger::CDMMerger | ( | boost::shared_ptr< CDMReader > | inner, |
boost::shared_ptr< CDMReader > | outer | ||
) |
Merge data from inner grid onto refined outer grid.
|
virtual |
void MetNoFimex::CDMMerger::setGridInterpolationMethod | ( | int | method | ) |
Set grid interpolation method. Must be called before setting target grid. method one of MIFI_INTERPOL_*
void MetNoFimex::CDMMerger::setKeepOuterVariables | ( | bool | keepOuterVariabes | ) |
Keep outer variables, even if no inner variable with the same name exists. Default: false. Forwarded to CDMOverlay-constructor, so needs to set before setTargetGrid.
void MetNoFimex::CDMMerger::setSmoothing | ( | CDMBorderSmoothing::SmoothingFactoryPtr | smoothingFactory | ) |
Set the smooting function factory to be used. Must be called before setting target grid. smoothingFactory a factory for smoothing functors
void MetNoFimex::CDMMerger::setTargetGrid | ( | const std::string & | proj, |
const std::string & | tx_axis, | ||
const std::string & | ty_axis, | ||
const std::string & | tx_unit, | ||
const std::string & | ty_unit, | ||
const std::string & | tx_type, | ||
const std::string & | ty_type | ||
) |
Set target grid from string values, same as in CDMInterpolator. Units must be either "m" (not "km", "cm", or so) or degrees.
void MetNoFimex::CDMMerger::setTargetGrid | ( | const std::string & | proj, |
const std::vector< double > & | tx, | ||
const std::vector< double > & | ty, | ||
const std::string & | tx_unit, | ||
const std::string & | ty_unit, | ||
const CDMDataType & | tx_type, | ||
const CDMDataType & | ty_type | ||
) |
Set target grid from values, same as in CDMInterpolator. Units must be either "m" (not "km", "cm", or so) or degrees.
void MetNoFimex::CDMMerger::setTargetGridFromInner | ( | ) |
Set target grid as inner grid expanded to cover outer grid.
The resulting grid will be an extension of the first simple spatial grid found in the inner reader. It is constructed by extending the inner grid until it covers the outer grid.
void MetNoFimex::CDMMerger::setUseOuterIfInnerUndefined | ( | bool | useOuter | ) |
Decide if the outer value shall be used if the inner value is undefined. Default: true. Forwarded to CDMOverlay::setUseOuterIfInnerUndefined