MI - Fimex
Macros | Enumerations
mifi_constants.h File Reference
#include <math.h>
#include <stddef.h>

Go to the source code of this file.

Macros

#define MIFI_PI   3.1415926535897932384626433832795
 
#define MIFI_VECTOR_KEEP_SIZE   0
 vector projection flag More...
 
#define MIFI_VECTOR_RESIZE   1
 vector projection flag More...
 
#define MIFI_VINT_PRESSURE   0
 vertical interpolation type More...
 
#define MIFI_VINT_HEIGHT   1
 vertical interpolation type More...
 
#define MIFI_VINT_DEPTH   2
 vertical interpolation type More...
 
#define MIFI_VINT_SIGMA   3
 vertical interpolation type More...
 
#define MIFI_VINT_ALTITUDE   4
 vertical interpolation type More...
 
#define MIFI_EARTH_GRAVITY   9.80665
 
#define MIFI_MOLAR_MASS_DRY_AIR   0.0289644
 
#define MIFI_GAS_CONSTANT   8.31432
 
#define MIFI_T0   273.15
 
#define MIFI_UNDEFINED_F   (nanf(""))
 undefined value for floats More...
 
#define MIFI_UNDEFINED_D   (nan(""))
 undefined value for doubles More...
 
#define MIFI_ERROR   -1
 return code, error More...
 
#define MIFI_OK   1
 return code, ok More...
 
#define MIFI_PROJ_AXIS   0
 projection axis in m-equivalent More...
 
#define MIFI_LONGITUDE   1
 longitude projection axis in degrees More...
 
#define MIFI_LATITUDE   2
 latitude projection axis in degrees More...
 
#define MIFI_DEBUG   0
 debug flag More...
 

Enumerations

enum  mifi_interpol_method {
  MIFI_INTERPOL_UNKNOWN = -1, MIFI_INTERPOL_NEAREST_NEIGHBOR = 0, MIFI_INTERPOL_BILINEAR, MIFI_INTERPOL_BICUBIC,
  MIFI_INTERPOL_COORD_NN, MIFI_INTERPOL_COORD_NN_KD, MIFI_INTERPOL_FORWARD_SUM, MIFI_INTERPOL_FORWARD_MEAN,
  MIFI_INTERPOL_FORWARD_MEDIAN, MIFI_INTERPOL_FORWARD_MAX, MIFI_INTERPOL_FORWARD_MIN, MIFI_INTERPOL_FORWARD_UNDEF_SUM,
  MIFI_INTERPOL_FORWARD_UNDEF_MEAN, MIFI_INTERPOL_FORWARD_UNDEF_MEDIAN, MIFI_INTERPOL_FORWARD_UNDEF_MAX, MIFI_INTERPOL_FORWARD_UNDEF_MIN
}
 interpolation method More...
 
enum  mifi_vertical_interpol_method {
  MIFI_VINT_METHOD_LIN =0, MIFI_VINT_METHOD_LOG =1, MIFI_VINT_METHOD_LOGLOG =2, MIFI_VINT_METHOD_NN =3,
  MIFI_VINT_METHOD_LIN_WEAK_EXTRA =4, MIFI_VINT_METHOD_LIN_NO_EXTRA =5, MIFI_VINT_METHOD_LIN_CONST_EXTRA =6
}
 vertical interpolation method More...
 

Macro Definition Documentation

#define MIFI_DEBUG   0

debug flag

#define MIFI_EARTH_GRAVITY   9.80665

An earth gravitational accelaration value, 9.80665 m/s**2.

#define MIFI_ERROR   -1

return code, error

#define MIFI_GAS_CONSTANT   8.31432

Gas constant R, 8.31432 J / (mol*K)

#define MIFI_LATITUDE   2

latitude projection axis in degrees

#define MIFI_LONGITUDE   1

longitude projection axis in degrees

#define MIFI_MOLAR_MASS_DRY_AIR   0.0289644

Molar mass dry air, 0.0289644 kg / mol

#define MIFI_OK   1

return code, ok

#define MIFI_PI   3.1415926535897932384626433832795

M_PI is no longer part of C99, so it needs to be declared for fimex

#define MIFI_PROJ_AXIS   0

projection axis in m-equivalent

#define MIFI_T0   273.15

0-deg C in K

#define MIFI_UNDEFINED_D   (nan(""))

undefined value for doubles

#define MIFI_UNDEFINED_F   (nanf(""))

undefined value for floats

Examples:
parallelRead.cpp.
#define MIFI_VECTOR_KEEP_SIZE   0

vector projection flag

new size will be like old size

#define MIFI_VECTOR_RESIZE   1

vector projection flag

vector might change size with projection

#define MIFI_VINT_ALTITUDE   4

vertical interpolation type

vertical interpolation to height above mean sea levels in m

#define MIFI_VINT_DEPTH   2

vertical interpolation type

vertical interpolation to depth below sea-level in m

Referenced by MetNoFimex::OceanSG1::getPreferredVerticalType().

#define MIFI_VINT_HEIGHT   1

vertical interpolation type

vertical interpolation to height above ground levels in m

Referenced by MetNoFimex::Height::getPreferredVerticalType().

#define MIFI_VINT_PRESSURE   0
#define MIFI_VINT_SIGMA   3

vertical interpolation type

vertical interpolation to sigma dimensionless vertical coordinate

Enumeration Type Documentation

interpolation method

Flag for nearest neighbor interpolation. This requires, that the original data comes with a properly defined projection, i.e. implicit as latlon or explicit with projection-string

Enumerator
MIFI_INTERPOL_UNKNOWN 

Error-flag for unknown interpolation-method

MIFI_INTERPOL_NEAREST_NEIGHBOR 

Flag for bilinear interpolation. This requires, that the original data comes with a properly defined projection, i.e. implicit as latlon or explicit with projection-string

MIFI_INTERPOL_BILINEAR 

Flag for bicubic interpolation. This requires, that the original data comes with a properly defined projection, i.e. implicit as latlon or explicit with projection-string

MIFI_INTERPOL_BICUBIC 

Flag for bicubic interpolation. This requires, that the original data comes with a properly defined projection, i.e. implicit as latlon or explicit with projection-string

MIFI_INTERPOL_COORD_NN 

Flag for nearest neighbor interpolation using lon/lat coordinates rather than the input projection. This is largely a brute force method which may take long time.

Vector projection is not implemented (not defined?)

Warning
this works only from CDMInterpolator
MIFI_INTERPOL_COORD_NN_KD 

Flag for nearest neighbor interpolation using coordinates with KD-tree. This works as nearest neighbor in the output-projection and has therefore numerical problems in some points, i.e. near southpole when using northpole-polarstereographic.

It doesn't work with output projections in degree, i.e. rotated latitude longitude, since distances are calculated as outX^2*outY^2

Vector projection is not implemented (not defined?)

Warning
this works only from CDMInterpolator
MIFI_INTERPOL_FORWARD_SUM 

forward interpolation, summing over all matching input-cells

MIFI_INTERPOL_FORWARD_MEAN 

forward interpolation, averaging (mean) over all matching defined input-cells

MIFI_INTERPOL_FORWARD_MEDIAN 

forward interpolation, median over all matching defined input-cells

MIFI_INTERPOL_FORWARD_MAX 

forward interpolation, max over all matching defined input-cells

MIFI_INTERPOL_FORWARD_MIN 

forward interpolation, min over all matching defined input-cells

MIFI_INTERPOL_FORWARD_UNDEF_SUM 

forward interpolation, summing over all input-cells, thus propagating undefined values, i.e. value+undef=undef

MIFI_INTERPOL_FORWARD_UNDEF_MEAN 

forward interpolation, averaging (mean) over all input-cells, thus propagating undefined values, i.e. value+undef=undef

MIFI_INTERPOL_FORWARD_UNDEF_MEDIAN 

forward interpolation, median over all input-cells, thus propagating undefined values, i.e. value+undef=undef

MIFI_INTERPOL_FORWARD_UNDEF_MAX 

forward interpolation, max over all input-cells, thus propagating undefined values, i.e. value+undef=undef

MIFI_INTERPOL_FORWARD_UNDEF_MIN 

forward interpolation, min over all input-cells, thus propagating undefined values, i.e. value+undef=undef

vertical interpolation method

Flag for vertical interpolation.

Enumerator
MIFI_VINT_METHOD_LIN 

linear interpolation, e.g. mifi_get_values_linear_f(), extrapolating

MIFI_VINT_METHOD_LOG 

logarithmic interpolation, e.g. mifi_get_values_log_f()

MIFI_VINT_METHOD_LOGLOG 

double logarithmic interpolation, e.g. mifi_get_values_log_f()

MIFI_VINT_METHOD_NN 

nearest neighbor "interpolation", e.g. mifi_get_values_f()

MIFI_VINT_METHOD_LIN_WEAK_EXTRA 

linear interpolation, e.g. mifi_get_values_linear_weak_extrapol_f(), extrapolating one distance of the closest values.

MIFI_VINT_METHOD_LIN_NO_EXTRA 

linear interpolation, e.g. mifi_get_values_linear_no_extrapol_f(), no extrapolation

MIFI_VINT_METHOD_LIN_CONST_EXTRA 

linear interpolation, e.g. mifi_get_values_linear_const_extrapol_f(), constant extrapolation