RAVE
compositeenginefunctions.h File Reference

Useful functions when working with the composite engine. More...

#include "cartesian.h"
#include "cartesianvolume.h"
#include "compositearguments.h"
#include "compositeengine.h"
#include "rave_object.h"
#include "rave_types.h"
#include "rave_value.h"
#include <strings.h>

Go to the source code of this file.

Macros

#define DEFAULT_ZR_A   200.0
 The Marshall - Palmer A in the ZR-relationship.
 
#define DEFAULT_ZR_B   1.6
 The Marshall - Palmer b in the ZR-relationship.
 

Functions

int CompositeEngineFunctions_prepareRATE (CompositeEngine_t *engine, CompositeArguments_t *arguments, CompositeEngineObjectBinding_t *bindings, int nbindings)
 Prepares the binding with the RATE coefficients so that they can be used when generating the product.
 
double CompositeEngineFunction_convertDbzToRate (CompositeEngineObjectBinding_t *binding, RaveValueType valuetype, double value, double default_zr_a, double default_zr_b)
 Each binding has got a member called value which is of type RaveValue_t.
 
int CompositeEngineFunctions_getRATEValueAtPosition (CompositeEngine_t *engine, void *extradata, CompositeArguments_t *arguments, CompositeEngineObjectBinding_t *binding, const char *quantity, PolarNavigationInfo *navinfo, const char *qiFieldName, RaveValueType *otype, double *ovalue, double *qivalue)
 Gets the DBZH (quantity) value at the position and converts it to rain rate if possible which is returned in ovalue.
 

Detailed Description

Useful functions when working with the composite engine.

Author
Anders Henja (Swedish Meteorological and Hydrological Institute, SMHI)
Date
2025-02-26

Macro Definition Documentation

◆ DEFAULT_ZR_A

#define DEFAULT_ZR_A   200.0

The Marshall - Palmer A in the ZR-relationship.

◆ DEFAULT_ZR_B

#define DEFAULT_ZR_B   1.6

The Marshall - Palmer b in the ZR-relationship.

Function Documentation

◆ CompositeEngineFunction_convertDbzToRate()

double CompositeEngineFunction_convertDbzToRate ( CompositeEngineObjectBinding_t * binding,
RaveValueType valuetype,
double value,
double default_zr_a,
double default_zr_b )

Each binding has got a member called value which is of type RaveValue_t.

This contains a zr-relationship for RATE products.

Parameters
[in]binding- the binding where the value contains the individual ZR coefficients
[in]valuetype- the type of value (basically, if it is RaveValueType_DATA, the returned value will be the RR )
[in]value- the dbz
[in]default_zr_a- the ZR A coefficient (will only be used if there is no binding value ZR coefficients)
[in]default_zr_b- the ZR b coefficient (will only be used if there is no binding value ZR coefficients)
Returns
the rain rate or the original value

◆ CompositeEngineFunctions_getRATEValueAtPosition()

int CompositeEngineFunctions_getRATEValueAtPosition ( CompositeEngine_t * engine,
void * extradata,
CompositeArguments_t * arguments,
CompositeEngineObjectBinding_t * binding,
const char * quantity,
PolarNavigationInfo * navinfo,
const char * qiFieldName,
RaveValueType * otype,
double * ovalue,
double * qivalue )

Gets the DBZH (quantity) value at the position and converts it to rain rate if possible which is returned in ovalue.

Parameters
[in]engine- the engine
[in]extradata- NOT USED
[in]arguments- compositing arguments
[in]binding- the polar object binding
[in]quantity- NOT USED, it will always assume DBZH
[in]navinfo- the navigation for data from where to pick the value const char* qiFieldName, RaveValueType* otype, double* ovalue, double* qivalue);
[in]qiFieldName- The quality field value if a qi value also should be returned
[out]otype- the type of data at specified position
[out]ovalue- the rate
[out]qivalue- the qi value if requested
Returns
1 on succeess otherwise 0

◆ CompositeEngineFunctions_prepareRATE()

int CompositeEngineFunctions_prepareRATE ( CompositeEngine_t * engine,
CompositeArguments_t * arguments,
CompositeEngineObjectBinding_t * bindings,
int nbindings )

Prepares the binding with the RATE coefficients so that they can be used when generating the product.

Parameters
[in]engine- the engine associated with these bindings
[in]arguments- the compositing arguments
[in]bindings- the bindings
[in]nbindings- number of bindings
Returns
1 on success otherwise 0