MI - Fimex
Classes | Typedefs | Enumerations | Functions
MetNoFimex Namespace Reference

Classes

class  AlbersConicalEqualAreaProjection
 
class  AltitudeConverterToHeightConverter
 
class  AltitudeStandardToPressureConverter
 
class  AtmosphereSigma
 Sigma pressure vertical coordinate. More...
 
class  AzimuthalEquidistantProjection
 
class  C_CDMReader
 
class  CachedInterpolation
 
class  CachedInterpolationInterface
 
class  CachedVectorReprojection
 
class  CDM
 Data structure of the Common Data Model. More...
 
class  CDMAttribute
 
class  CDMBorderSmoothing
 
class  CDMBorderSmoothing_Linear
 
class  CDMBorderSmoothing_LinearFactory
 
class  CDMDimension
 
class  CDMException
 
class  CDMExtractor
 
class  CDMFileReaderFactory
 
class  CDMInterpolator
 
class  CDMMerger
 
struct  CDMNameCompare
 
class  CDMNamedEntity
 
class  CDMNameEqual
 
class  CDMNameEqualPtr
 
class  CDMOverlay
 
class  CDMPressureConversions
 
class  CDMProcessor
 
class  CDMQualityExtractor
 Extract data with defined quality status. More...
 
class  CDMReader
 Basic interface for CDM reading and manipulation classes. More...
 
class  CDMReaderWriter
 
class  CDMTimeInterpolator
 
class  CDMVariable
 
class  CDMVerticalInterpolator
 Interpolation of vertical layers. More...
 
class  CDMWriter
 
class  ChangeMissingValue
 
struct  CompleteCoordinateSystemForComparator
 
class  CoordinateAxis
 
class  CoordinateSystem
 
class  CoordinateSystemSliceBuilder
 
class  CrossSectionDefinition
 
class  Data
 
class  DataIndex
 
class  DataTypeChanger
 
class  FillWriter
 
class  FimexTime
 
class  GeopotentialToAltitudeConverter
 
class  GribApiCDMWriter
 
class  GribCDMReader
 
class  GribFileIndex
 
class  GribFileMessage
 
class  GribFileMessageEqualLevelTime
 Functor to find messages with equal level and time. More...
 
class  GribFileMessageEqualTime
 Functor to find Messages with equal time. More...
 
class  GridDefinition
 
class  Height
 
class  HeightConverterToAltitudeConverter
 
class  HybridSigmaApToPressureConverter
 
class  HybridSigmaPressure1
 Hybrid sigma pressure vertical coordinate, expressed with ap and b. More...
 
class  HybridSigmaPressure2
 Hybrid sigma pressure vertical coordinate, expressed with a and b. More...
 
class  HybridSigmaToPressureConverter
 
class  Identity4DToVLevelConverter
 
class  IdentityToVLevelConverter
 
class  IndexedData
 
class  InterpolatorCreepFill2d
 
class  InterpolatorCreepFillVal2d
 
class  InterpolatorFill2d
 
class  InterpolatorProcess2d
 
class  LambertAzimuthalEqualAreaProjection
 
class  LambertConformalConicProjection
 
class  LambertCylindricalEqualAreaProjection
 
class  LatitudeLongitudeProjection
 
class  LnPressure
 Hybrid sigma pressure vertical coordinate, expressed with ap andb. More...
 
class  LnPressureToPressureConverter
 
class  Logger
 
class  LoggerClass
 
class  LoggerImpl
 
class  MercatorProjection
 
class  MetGmCDMReader
 
class  MetGmCDMWriter
 
class  NcmlCDMReader
 
class  NetCDF_CDMReader
 
class  NetCDF_CDMWriter
 
class  Null_CDMWriter
 
struct  null_deleter
 
class  OceanSCoordinateGToDepthConverter
 
class  OceanSG1
 
class  OceanSG2
 
class  OrthographicProjection
 
class  PolarStereographicProjection
 
class  Pressure
 Pressure class for vertical transformation. More...
 
class  PressureIntegrationToAltitudeConverter
 
class  PressureToStandardAltitudeConverter
 
class  Projection
 
class  ProjectionImpl
 
struct  ReducedInterpolationDomain
 
class  ReplaceStringObject
 
class  ReplaceStringTemplateObject
 
class  ReplaceStringTimeObject
 
class  RotatedLatitudeLongitudeProjection
 
class  ScaleValue
 
class  ScaleValueUnits
 
struct  SharedArrayConstCastDeleter
 
class  SigmaToPressureConverter
 
class  SliceBuilder
 
class  SpatialAxisSpec
 
struct  staticCast
 
class  StereographicProjection
 
class  TimeSpec
 
class  TimeUnit
 
class  ToVLevelConverter
 
class  TransverseMercatorProjection
 
class  UnitException
 
class  Units
 
class  UnitsConverter
 
class  UnknownToFgdcProjection
 
struct  Varargs
 
class  VerticalPerspectiveProjection
 
class  VerticalTransformation
 
class  WdbCDMReader
 
class  XMLDoc
 
class  XMLInput
 
class  XMLInputDoc
 
class  XMLInputFile
 
class  XMLInputString
 
class  XMLInputURL
 

Typedefs

typedef boost::shared_ptr< CDMBorderSmoothingCDMBorderSmoothingPtr
 
typedef boost::shared_ptr< CDMMergerCDMMergerPtr
 
typedef boost::shared_ptr< CDMOverlayCDMOverlayPtr
 
typedef boost::shared_ptr< DataDataPtr
 
typedef boost::shared_ptr< LoggerLoggerPtr
 
typedef long epoch_seconds
 
typedef boost::shared_ptr< xmlXPathObjectXPathObjPtr
 

Enumerations

enum  CDMDataType {
  CDM_NAT = 0, CDM_CHAR, CDM_SHORT, CDM_INT,
  CDM_FLOAT, CDM_DOUBLE, CDM_STRING, CDM_UCHAR,
  CDM_USHORT, CDM_UINT, CDM_INT64, CDM_UINT64,
  CDM_STRINGS
}
 

Functions

 MIFI_DEPRECATED (std::vector< CDMAttribute > projStringToAttributes(std::string projStr))
 convert a proj4 string to a list of CDMAttributes usable for CF-1.0 projection variable More...
 
 MIFI_DEPRECATED (std::string attributesToProjString(const std::vector< CDMAttribute > &attrs))
 convert attributes of a projection-variable to a projString More...
 
CDMDataType string2datatype (const std::string &s)
 translate float/string/... to the appropriate CDMDataType More...
 
std::string datatype2string (CDMDataType type)
 
boost::shared_array< float > data2InterpolationArray (const DataPtr &inData, double badValue)
 
DataPtr interpolationArray2Data (CDMDataType newType, boost::shared_array< float > iData, size_t size, double badValue)
 
boost::posix_time::ptime getUniqueForecastReferenceTime (boost::shared_ptr< CDMReader > reader)
 
std::vector< double > getDataSliceInUnit (const boost::shared_ptr< CDMReader > &reader, const std::string &var, const std::string &unit, int unLimDimPos)
 
std::size_t estimateCDMDataSize (const CDM &cdm)
 
bool compareCDMVarShapes (const CDM &cdm1, const std::string &varName1, const CDM &cdm2, const std::string &varName2)
 
std::string findUniqueDimVarName (const CDM &cdm, std::string baseVar)
 
void generateProjectionCoordinates (boost::shared_ptr< CDMReader > &reader)
 
std::ostreamoperator<< (std::ostream &out, CoordinateAxis ca)
 
std::ostreamoperator<< (std::ostream &out, CoordinateAxis::AxisType t)
 
std::ostreamoperator<< (std::ostream &out, const CoordinateSystem &p)
 
std::vector< boost::shared_ptr< const CoordinateSystem > > listCoordinateSystems (boost::shared_ptr< CDMReader > reader)
 
void enhanceVectorProperties (boost::shared_ptr< CDMReader > reader)
 
 MIFI_DEPRECATED (std::vector< boost::shared_ptr< const CoordinateSystem > > listCoordinateSystems(CDM &cdm))
 
 MIFI_DEPRECATED (std::vector< boost::shared_ptr< const CoordinateSystem > > listCoordinateSystems(const CDM &cdm))
 
int findBestHorizontalCoordinateSystems (bool withProjection, boost::shared_ptr< CDMReader > reader, std::map< std::string, boost::shared_ptr< const CoordinateSystem > > &systems, std::map< std::string, std::string > &variables, std::vector< std::string > &incompatibleVariables)
 
std::ostreamoperator<< (std::ostream &out, const Projection &proj)
 
std::string replaceProj4Earthfigure (const std::string &proj4, const std::string &newEarthfigure)
 
std::ostreamoperator<< (std::ostream &out, const VerticalTransformation &vt)
 
DataPtr createData (CDMDataType datatype, size_t length, double val=0)
 create a Data-pointer of the datatype More...
 
DataPtr createData (size_t length, boost::shared_array< double > array)
 create a Data-pointer of type CDM_DOUBLE More...
 
DataPtr createData (size_t length, boost::shared_array< float > array)
 create a Data-pointer of type CDM_FLOAT More...
 
DataPtr createData (size_t length, boost::shared_array< int > array)
 create a Data-pointer of type CDM_INT More...
 
DataPtr createData (size_t length, boost::shared_array< short > array)
 create a Data-pointer of type CDM_SHORT More...
 
DataPtr createData (size_t length, boost::shared_array< char > array)
 create a Data-pointer of type CDM_CHAR More...
 
DataPtr createData (size_t length, boost::shared_array< unsigned int > array)
 create a Data-pointer of type CDM_UINT More...
 
DataPtr createData (size_t length, boost::shared_array< long long > array)
 create a Data-pointer of type CDM_INT64 More...
 
DataPtr createData (size_t length, boost::shared_array< unsigned long long > array)
 create a Data-pointer of type CDM_UINT64 More...
 
DataPtr createData (size_t length, boost::shared_array< unsigned short > array)
 create a Data-pointer of type CDM_USHORT More...
 
DataPtr createData (size_t length, boost::shared_array< unsigned char > array)
 create a Data-pointer of type CDM_UCHAR More...
 
DataPtr createData (size_t length, boost::shared_array< std::string > array)
 create a Data-pointer of type CDM_STRINGS More...
 
template<class InputIterator >
DataPtr createData (CDMDataType datatype, InputIterator first, InputIterator last)
 create a Data-pointer of the datatype and fill with the data from the iterator More...
 
DataPtr createDataSlice (CDMDataType datatype, const Data &data, size_t dataStartPos, size_t dataSize)
 create a one-dimensional dataslice from another Data object More...
 
std::ostreamoperator<< (std::ostream &os, const GribFileMessage &gfm)
 outputstream for a GribFileMessage More...
 
std::ostreamoperator<< (std::ostream &os, const GribFileIndex &gfm)
 outputstream for a GribFileIndex More...
 
GridDefinition::Orientation gribGetGridOrientation (boost::shared_ptr< grib_handle > gh)
 
unsigned long gribStepUnits2seconds (const std::string &stepUnits)
 
std::string gribSeconds2stepUnits (unsigned long seconds)
 
Logger::LogLevel defaultLogLevel ()
 
void defaultLogLevel (Logger::LogLevel)
 
LoggerPtr getLogger (const std::string &className)
 
std::ostreamoperator<< (std::ostream &os, const SliceBuilder &sb)
 
std::ostreamoperator<< (std::ostream &out, const FimexTime &fTime)
 minimum FimexTime More...
 
FimexTime string2FimexTime (const std::string &str) throw (CDMException)
 
void handleUdUnitError (int unitErrCode, const std::string &message="") throw (UnitException)
 
int round (double num)
 
std::string trim (const std::string &str)
 
template<class InputIterator >
std::string join (InputIterator start, InputIterator end, std::string delim=",")
 
template<typename InputIterator >
std::pair< typename std::iterator_traits< InputIterator >::difference_type, typename std::iterator_traits< InputIterator >::difference_type > find_closest_distinct_elements (InputIterator start, InputIterator end, double x)
 
template<typename InputIterator >
std::pair< typename std::iterator_traits< InputIterator >::difference_type, typename std::iterator_traits< InputIterator >::difference_type > find_closest_neighbor_distinct_elements (InputIterator start, InputIterator end, double x)
 
template<class InputIterator >
std::string joinPtr (InputIterator start, InputIterator end, std::string delim=",")
 
std::vector< std::stringtokenize (const std::string &str, const std::string &delimiters=" ")
 
std::string string2lowerCase (const std::string &str)
 
template<typename T >
std::string type2string (T in)
 
template<>
std::string type2string< double > (double in)
 
template<typename T >
string2type (std::string s)
 
template<typename T >
normalizeLongitude180 (T in)
 
epoch_seconds posixTime2epochTime (const boost::posix_time::ptime &time)
 
template<typename T >
std::vector< T > tokenizeDotted (const std::string &str, const std::string &delimiter=",") throw (CDMException)
 
template<typename C >
int mifi_isnan (C x)
 
void scanFiles (std::vector< std::string > &files, const std::string &dir, int depth, const boost::regex &regexp, bool matchFileOnly)
 
void globFiles (std::vector< std::string > &files, const std::string &glob)
 
template<typename T >
boost::shared_array< const T > makeSharedArrayConst (const boost::shared_array< T > &sa)
 
std::string getXmlProp (const xmlNodePtr node, const std::string &attrName)
 
std::string getXmlName (const xmlNodePtr node)
 
std::string getXmlContent (const xmlNodePtr node)
 get all text-contents of the node or underlying nodes More...
 

Typedef Documentation

typedef boost::shared_ptr<CDMMerger> MetNoFimex::CDMMergerPtr
typedef boost::shared_ptr<CDMOverlay> MetNoFimex::CDMOverlayPtr
typedef boost::shared_ptr<Data> MetNoFimex::DataPtr

Pointer to Data, this is the preferred way to access Data

typedef boost::shared_ptr<Logger> MetNoFimex::LoggerPtr
typedef boost::shared_ptr<xmlXPathObject> MetNoFimex::XPathObjPtr

Enumeration Type Documentation

Be aware that the CDM_CHAR datatype maps to NC_BYTE, while the CDM_STRING maps to NC_CHAR

Enumerator
CDM_NAT 
CDM_CHAR 
CDM_SHORT 
CDM_INT 
CDM_FLOAT 
CDM_DOUBLE 
CDM_STRING 
CDM_UCHAR 
CDM_USHORT 
CDM_UINT 
CDM_INT64 
CDM_UINT64 
CDM_STRINGS 

Function Documentation

bool MetNoFimex::compareCDMVarShapes ( const CDM cdm1,
const std::string varName1,
const CDM cdm2,
const std::string varName2 
)

check if the shapes of two variables (eventually belonging to two different CDMs) have the same sizes. Dimensions of size 1 are ignored.

Parameters
cdm1first CDM
varName1first variable-name
cdm2second CDM
varName2second variable-name
Returns

Referenced by MetNoFimex::null_deleter::operator()().

DataPtr MetNoFimex::createData ( CDMDataType  datatype,
size_t  length,
double  val = 0 
)

create a Data-pointer of the datatype

Parameters
datatype
lengthof the data array
valdefault value for data elements, 0 by default
Returns
Base-Class ptr of the DataImpl belonging to the datatype
Examples:
parallelRead.cpp.

Referenced by createData().

DataPtr MetNoFimex::createData ( size_t  length,
boost::shared_array< double >  array 
)

create a Data-pointer of type CDM_DOUBLE

Parameters
lengthof the data array
arraythe data array
Returns
Base-Class ptr of the DataImpl belonging to the datatype
DataPtr MetNoFimex::createData ( size_t  length,
boost::shared_array< float >  array 
)

create a Data-pointer of type CDM_FLOAT

Parameters
lengthof the data array
arraythe data array
Returns
Base-Class ptr of the DataImpl belonging to the datatype
DataPtr MetNoFimex::createData ( size_t  length,
boost::shared_array< int >  array 
)

create a Data-pointer of type CDM_INT

Parameters
lengthof the data array
arraythe data array
Returns
Base-Class ptr of the DataImpl belonging to the datatype
DataPtr MetNoFimex::createData ( size_t  length,
boost::shared_array< short >  array 
)

create a Data-pointer of type CDM_SHORT

Parameters
lengthof the data array
arraythe data array
Returns
Base-Class ptr of the DataImpl belonging to the datatype
DataPtr MetNoFimex::createData ( size_t  length,
boost::shared_array< char >  array 
)

create a Data-pointer of type CDM_CHAR

Parameters
lengthof the data array
arraythe data array
Returns
Base-Class ptr of the DataImpl belonging to the datatype
DataPtr MetNoFimex::createData ( size_t  length,
boost::shared_array< unsigned int >  array 
)

create a Data-pointer of type CDM_UINT

Parameters
lengthof the data array
arraythe data array
Returns
Base-Class ptr of the DataImpl belonging to the datatype
DataPtr MetNoFimex::createData ( size_t  length,
boost::shared_array< long long >  array 
)

create a Data-pointer of type CDM_INT64

Parameters
lengthof the data array
arraythe data array
Returns
Base-Class ptr of the DataImpl belonging to the datatype
DataPtr MetNoFimex::createData ( size_t  length,
boost::shared_array< unsigned long long >  array 
)

create a Data-pointer of type CDM_UINT64

Parameters
lengthof the data array
arraythe data array
Returns
Base-Class ptr of the DataImpl belonging to the datatype
DataPtr MetNoFimex::createData ( size_t  length,
boost::shared_array< unsigned short >  array 
)

create a Data-pointer of type CDM_USHORT

Parameters
lengthof the data array
arraythe data array
Returns
Base-Class ptr of the DataImpl belonging to the datatype
DataPtr MetNoFimex::createData ( size_t  length,
boost::shared_array< unsigned char >  array 
)

create a Data-pointer of type CDM_UCHAR

Parameters
lengthof the data array
arraythe data array
Returns
Base-Class ptr of the DataImpl belonging to the datatype
DataPtr MetNoFimex::createData ( size_t  length,
boost::shared_array< std::string array 
)

create a Data-pointer of type CDM_STRINGS

Parameters
lengthof the data array
arraythe data array
Returns
Base-Class ptr of the DataImpl belonging to the datatype
template<class InputIterator >
DataPtr MetNoFimex::createData ( CDMDataType  datatype,
InputIterator  first,
InputIterator  last 
)

create a Data-pointer of the datatype and fill with the data from the iterator

Parameters
datatype
firststart of container containing the data to fill the array with
lastend (excluded) of the container containing the data to fill the array with
Returns
Base-Class ptr of the DataImpl belonging to the datatype

References CDM_CHAR, CDM_DOUBLE, CDM_FLOAT, CDM_INT, CDM_INT64, CDM_NAT, CDM_SHORT, CDM_UCHAR, CDM_UINT, CDM_UINT64, CDM_USHORT, std::copy(), createData(), and std::distance().

DataPtr MetNoFimex::createDataSlice ( CDMDataType  datatype,
const Data data,
size_t  dataStartPos,
size_t  dataSize 
)

create a one-dimensional dataslice from another Data object

Parameters
datatypeof the return-data
datathe data to read the values from, should be convertible data-format
dataStartPosthe first element of data to fetch
dataSizethe size of the data
boost::shared_array<float> MetNoFimex::data2InterpolationArray ( const DataPtr inData,
double  badValue 
)

convert the data inplace to an array useful for interpolation (i.e. badValue->nan)

Parameters
inData
badValue
Returns
std::string MetNoFimex::datatype2string ( CDMDataType  type)
Logger::LogLevel MetNoFimex::defaultLogLevel ( )

the defaultLogLevel can be used by the implemented logger to determine the minimum LogLevel. This value might be ignored/overwritten by a configuration within the implementation. It should be initialized in the main class.

void MetNoFimex::defaultLogLevel ( Logger::LogLevel  )
void MetNoFimex::enhanceVectorProperties ( boost::shared_ptr< CDMReader reader)

set spatial-vector properties according to convention won't overwrite any existing spatial vector properties

Parameters
reader

Referenced by MetNoFimex::CoordinateSystem::~CoordinateSystem().

std::size_t MetNoFimex::estimateCDMDataSize ( const CDM cdm)

return estimated size of CDM-data in bytes

Referenced by MetNoFimex::null_deleter::operator()().

template<typename InputIterator >
std::pair<typename std::iterator_traits<InputIterator>::difference_type, typename std::iterator_traits<InputIterator>::difference_type> MetNoFimex::find_closest_distinct_elements ( InputIterator  start,
InputIterator  end,
double  x 
)

Find closest distinct elements in an unordered list. The order of elements is not defined.

Except for the case where all elements are equal, it is always ensured that the neighbors are distinct.

Parameters
start
end
x
Returns
pair of the positions of a and b, with a closer than b

References distance().

Referenced by find_closest_neighbor_distinct_elements().

template<typename InputIterator >
std::pair<typename std::iterator_traits<InputIterator>::difference_type, typename std::iterator_traits<InputIterator>::difference_type> MetNoFimex::find_closest_neighbor_distinct_elements ( InputIterator  start,
InputIterator  end,
double  x 
)

Find closest distinct neighbor elements in an unordered list, with a <= x < b It might extrapolate if x is smaller than all elements (or x > all elements) and fall back to find_closest_distinct_elements()

Except for the case where all elements are equal, it is always ensured that the neighbors are distinct.

Parameters
start
end
x
Returns
pair of the positions of a and b, with a closer than b

References distance(), find_closest_distinct_elements(), and std::numeric_limits< _Tp >::max().

int MetNoFimex::findBestHorizontalCoordinateSystems ( bool  withProjection,
boost::shared_ptr< CDMReader reader,
std::map< std::string, boost::shared_ptr< const CoordinateSystem > > &  systems,
std::map< std::string, std::string > &  variables,
std::vector< std::string > &  incompatibleVariables 
)

find all horizontal coordinate systems, either with or without projections, list the variables belonging to the coordinate systems and mention all incompatible variables with a coordinate system

Parameters
withProjectionselect only horizontal coordinatesystems either with (true) or without (false) projection
readerthe CDMReader to search coordinate systems in, comparable to listCoordinateSystems()
systemsOutput of coordinateSystems (horizontalId -> system)
variablesOutput with all variables having a horizontal coordinate system
incompatibleVariablesOutput with a all variables which have a partial horizontal coordinate system which might interfere when changing dimensions
Returns
number of horizontal coordinate systems found, i.e. systems.size()

Referenced by MetNoFimex::CoordinateSystem::~CoordinateSystem().

std::string MetNoFimex::findUniqueDimVarName ( const CDM cdm,
std::string  baseVar 
)

find a unique variable and dimension name, starting with baseVar

Parameters
cdm
baseVarthe basic variable name
Returns
a st

Referenced by MetNoFimex::null_deleter::operator()().

void MetNoFimex::generateProjectionCoordinates ( boost::shared_ptr< CDMReader > &  reader)

generate projection coordinates if they don't exist for a coordinate system

Referenced by MetNoFimex::null_deleter::operator()().

std::vector<double> MetNoFimex::getDataSliceInUnit ( const boost::shared_ptr< CDMReader > &  reader,
const std::string var,
const std::string unit,
int  unLimDimPos 
)

This is the same function as CDMReader::getScaledDataSliceInUnit, but it converts the data to a vector<double>.

Parameters
reader
var
unit
unLimDimPos
Returns

Referenced by MetNoFimex::null_deleter::operator()().

LoggerPtr MetNoFimex::getLogger ( const std::string className)

Retrieve a logger for Fimex. It will use loggers in the following order, skipping to the next one if the current one is not available: 1) log4cxx 2) no/dummy logger

boost::posix_time::ptime MetNoFimex::getUniqueForecastReferenceTime ( boost::shared_ptr< CDMReader reader)

Try to find the forecast reference time of the reader. This has currently only be implemented for CF-1.x.

Parameters
readerthe CDMReader to check for the reference time
Returns
the reference time
Exceptions
CDMExceptionif eithern no reference time has been found, or if more than 1 different reference times have been found

Referenced by MetNoFimex::null_deleter::operator()().

std::string MetNoFimex::getXmlContent ( const xmlNodePtr  node)

get all text-contents of the node or underlying nodes

Parameters
nodethe xmlNodePtr or xmlNodePtr as list
Returns
string with text-content, or ""
Exceptions
CDMException
std::string MetNoFimex::getXmlName ( const xmlNodePtr  node)

a memory-save form of xmlGetName

Returns
a string of the attribute, "" if attribute doesn't exist
std::string MetNoFimex::getXmlProp ( const xmlNodePtr  node,
const std::string attrName 
)

a memory-save form of xmlGetProp

Returns
a string of the attribute, "" if attribute doesn't exist
void MetNoFimex::globFiles ( std::vector< std::string > &  files,
const std::string glob 
)

Similar to scanFiles, but uses glob instead, with * matches everything within a file or directory-name, ? matches exactly one character (not /), and ** match everything even across multiple directories.

Parameters
filesoutput list of files
globthe file/directory glob to match, glob-wildcards are *, ** and ?

Referenced by mifi_isnan().

GridDefinition::Orientation MetNoFimex::gribGetGridOrientation ( boost::shared_ptr< grib_handle >  gh)

get the orientation of the data

Parameters
ghgrib-handle
std::string MetNoFimex::gribSeconds2stepUnits ( unsigned long  seconds)

find the largest unit covering the seconds, i.e. the opposite of gribStepUnits2seconds()

unsigned long MetNoFimex::gribStepUnits2seconds ( const std::string stepUnits)

convert the stepUnits to seconds, i.e. D (day) = 60*60*24

Warning
this method is not highly accurate for stepUnits >= month due to missing calendar support (month = 30days, year = 365 days)
void MetNoFimex::handleUdUnitError ( int  unitErrCode,
const std::string message = "" 
)
throw (UnitException
)
DataPtr MetNoFimex::interpolationArray2Data ( CDMDataType  newType,
boost::shared_array< float >  iData,
size_t  size,
double  badValue 
)

convert the data from an interpolation-array (with NaNs) to one used as DataPtr, e.g. correct datatype and badvalue/fillvalue

Parameters
newType
iData
size
badValue
Returns
template<class InputIterator >
std::string MetNoFimex::join ( InputIterator  start,
InputIterator  end,
std::string  delim = "," 
)

Join values from an iterator to a string, using delimiter as separator.

Parameters
start
end
delimseparator, default to ","

References std::basic_ostringstream< _CharT, _Traits, _Alloc >::str().

template<class InputIterator >
std::string MetNoFimex::joinPtr ( InputIterator  start,
InputIterator  end,
std::string  delim = "," 
)

Join values from an iterator of pointers to a string, using delimiter as separator.

Parameters
start
end
delimseparator, default to ","

References std::basic_ostringstream< _CharT, _Traits, _Alloc >::str(), string2lowerCase(), and tokenize().

std::vector<boost::shared_ptr<const CoordinateSystem> > MetNoFimex::listCoordinateSystems ( boost::shared_ptr< CDMReader reader)

fetch all coordinate system from a MetNoFimex::CDMReader

Parameters
readerthe data-source. Depending on the internal structure of the datasource, the source might be manipulated, i.e. the WRF-system is missing several variables.
Warning
since this function might change the CDM of the reader, it is usually a good idea to run this function before copying the readers CDM, e.g.
vector<boost::shared_ptr<const CoordinateSystem> > css = listCoordinateSystems(reader);
CDM cdm = reader.getCDM();
Examples:
coordinateSystem.cpp.

Referenced by mifi_cdm_reader::mifi_cdm_reader(), and MetNoFimex::CoordinateSystem::~CoordinateSystem().

template<typename T >
boost::shared_array<const T> MetNoFimex::makeSharedArrayConst ( const boost::shared_array< T > &  sa)

convert a shared_array<T> to a shared_array<const T> (which will be automatically possilbe in boost::shared_array 1.47)

MetNoFimex::MIFI_DEPRECATED ( std::vector< CDMAttribute >   projStringToAttributesstd::string projStr)

convert a proj4 string to a list of CDMAttributes usable for CF-1.0 projection variable

currently, projStrings of the form +proj=[stere] +lat_0=? +lon_0=? +lat_ts=?

Deprecated:
use Projection::createByProj4() and Projection::getParameters()

Referenced by MetNoFimex::CDMAttribute::getDataType(), and MetNoFimex::CoordinateSystem::~CoordinateSystem().

MetNoFimex::MIFI_DEPRECATED ( std::string   attributesToProjStringconst std::vector< CDMAttribute > &attrs)

convert attributes of a projection-variable to a projString

Deprecated:
use Projection::create() with Projection::getProj4String() instead
Parameters
attrsattributes of the projection variable
Returns
proj4 string
MetNoFimex::MIFI_DEPRECATED ( std::vector< boost::shared_ptr< const CoordinateSystem > >   listCoordinateSystemsCDM &cdm)
MetNoFimex::MIFI_DEPRECATED ( std::vector< boost::shared_ptr< const CoordinateSystem > >   listCoordinateSystemsconst CDM &cdm)
template<typename C >
int MetNoFimex::mifi_isnan ( x)

template to declare isnan function in c++

Parameters
x
Returns
same as C99 isnan pragma

References globFiles(), and scanFiles().

Referenced by MetNoFimex::ChangeMissingValue< IN, OUT >::operator()().

template<typename T >
T MetNoFimex::normalizeLongitude180 ( in)

normalize Longitude to be within [-180:180]

Parameters
inlongitude in degree
Returns
longitude in degree within [-180:180]
std::ostream& MetNoFimex::operator<< ( std::ostream out,
CoordinateAxis  ca 
)
std::ostream& MetNoFimex::operator<< ( std::ostream out,
CoordinateAxis::AxisType  t 
)
std::ostream& MetNoFimex::operator<< ( std::ostream out,
const Projection proj 
)

output-stream for projections, implemented using toString()

std::ostream& MetNoFimex::operator<< ( std::ostream out,
const FimexTime fTime 
)

minimum FimexTime

std::ostream& MetNoFimex::operator<< ( std::ostream os,
const SliceBuilder sb 
)
std::ostream& MetNoFimex::operator<< ( std::ostream out,
const VerticalTransformation vt 
)
std::ostream& MetNoFimex::operator<< ( std::ostream out,
const CoordinateSystem p 
)

output operator

std::ostream& MetNoFimex::operator<< ( std::ostream os,
const GribFileMessage gfm 
)

outputstream for a GribFileMessage

std::ostream& MetNoFimex::operator<< ( std::ostream os,
const GribFileIndex gfm 
)

outputstream for a GribFileIndex

epoch_seconds MetNoFimex::posixTime2epochTime ( const boost::posix_time::ptime &  time)

convert a posixTime to seconds sinc 1970-01-01

Parameters
timetime to convert
std::string MetNoFimex::replaceProj4Earthfigure ( const std::string proj4,
const std::string newEarthfigure 
)

helper function to replace the earth figure of the given proj4 string with a new earth-figure

Parameters
proj4original proj-string
newEarthfigureearth-figure in proj-format, e.g. +ellps=sphere +R=6371000 +towgs84=0,0,0

Referenced by MetNoFimex::Projection::Projection().

int MetNoFimex::round ( double  num)

Round a double to integer.

void MetNoFimex::scanFiles ( std::vector< std::string > &  files,
const std::string dir,
int  depth,
const boost::regex &  regexp,
bool  matchFileOnly 
)

Scan the filesystem for files matching the regexp. Can be used similar to 'glob' or 'find' commands. The files will be sorted alphabetically.

Parameters
filesoutput list of files
dirthe input directory
depththe maximum number of directories to search (-1 is indefinite)
regexpthe regular expression to match the file or complete path
matchFileOnlyif true, the regexp will match the file-part only, if false, the complete path (behind dir) will be matched.

Referenced by mifi_isnan().

CDMDataType MetNoFimex::string2datatype ( const std::string s)

translate float/string/... to the appropriate CDMDataType

FimexTime MetNoFimex::string2FimexTime ( const std::string str)
throw (CDMException
)
std::string MetNoFimex::string2lowerCase ( const std::string str)

convert a string to lowercase

Referenced by joinPtr().

template<typename T >
T MetNoFimex::string2type ( std::string  s)
std::vector<std::string> MetNoFimex::tokenize ( const std::string str,
const std::string delimiters = " " 
)

Tokenize a string by a delimiter. This function will automaticall remove empty strings at the beginning or anywhere inside the string.

This function has been derived from http://www.oopweb.com/CPP/Documents/CPPHOWTO/Volume/C++Programming-HOWTO-7.html

Parameters
strthe string to tokenize
delimitersthe delimiters between the tokens. That can be multiple delimiters, i.e. whitespace is " \t\n\r"
Returns
vector of tokens

Referenced by joinPtr(), and tokenizeDotted().

template<typename T >
std::vector<T> MetNoFimex::tokenizeDotted ( const std::string str,
const std::string delimiter = "," 
)
throw (CDMException
)

convert a string with dots to a vector with type T

Parameters
strf.e. 3.5,4.5,...,17.5
delimiteroptional delimiter, defaults to ,

References std::vector< _Tp, _Alloc >::begin(), std::vector< _Tp, _Alloc >::end(), std::vector< _Tp, _Alloc >::push_back(), std::vector< _Tp, _Alloc >::size(), tokenize(), trim(), and type2string().

std::string MetNoFimex::trim ( const std::string str)

Remove leading and trailing spaces.

Parameters
strstring to trim

Referenced by tokenizeDotted().

template<typename T >
std::string MetNoFimex::type2string ( in)

convert a type (i.e. int, float) to string representation

References std::basic_ostringstream< _CharT, _Traits, _Alloc >::str(), and type2string< double >().

Referenced by tokenizeDotted().

template<>
std::string MetNoFimex::type2string< double > ( double  in)

specialization for high prececision

Referenced by type2string().