BEAM BLOCKAGE
beamblockage.c File Reference

Beam-blockage analysis. More...

#include "beamblockage.h"
#include "beamblockagemap.h"
#include "rave_debug.h"
#include "rave_alloc.h"
#include "math.h"
#include <string.h>
#include "config.h"
#include "hlhdf.h"
#include "odim_io_utilities.h"
#include "lazy_nodelist_reader.h"

Classes

struct  _BeamBlockage_t
 Represents the beam blockage algorithm. More...
 

Macros

#define RAD2DEG(rad)
 Converts a radian to a degree.
 

Functions

int BeamBlockage_setTopo30Directory (BeamBlockage_t *self, const char *topodirectory)
 Sets the topo30 directory.
 
const char * BeamBlockage_getTopo30Directory (BeamBlockage_t *self)
 Returns the topo30 directory.
 
int BeamBlockage_setCacheDirectory (BeamBlockage_t *self, const char *cachedir)
 Sets the cache directory.
 
const char * BeamBlockage_getCacheDirectory (BeamBlockage_t *self)
 Returns the cache directory.
 
void BeamBlockage_setRewriteCache (BeamBlockage_t *self, int recreateCache)
 Sets if the cache should be recreated all the time.
 
int BeamBlockage_getRewriteCache (BeamBlockage_t *self)
 Returns if the cache is recreated each time.
 
RaveField_t * BeamBlockage_getBlockage (BeamBlockage_t *self, PolarScan_t *scan, double dBlim)
 Gets the blockage for the provided scan.
 
int BeamBlockage_restore (PolarScan_t *scan, RaveField_t *blockage, const char *quantity, double threshold)
 When you have retrieved the beam blockage field you can restore the specified parameter for the scan.
 

Variables

RaveCoreObjectType BeamBlockage_TYPE
 Type definition to use when creating a rave object.
 

Detailed Description

Beam-blockage analysis.

Author
Lars Norin (Swedish Meteorological and Hydrological Institute, SMHI)
Anders Henja (SMHI, refactored to work together with rave)
Date
2011-11-10
Author
Ulf E. Nordh (SMHI, removal of bugs in fkns computeGroundRange and restore)
Date
2019-05-22

Macro Definition Documentation

◆ RAD2DEG

#define RAD2DEG ( rad)
Value:
(rad*180.0/M_PI)

Converts a radian to a degree.

Parameters
[in]rad- input value expressed in radians

Function Documentation

◆ BeamBlockage_getBlockage()

RaveField_t * BeamBlockage_getBlockage ( BeamBlockage_t * self,
PolarScan_t * scan,
double dBlim )

Gets the blockage for the provided scan.

Parameters
[in]self- self
[in]scan- the scan to check blockage
[in]dBlim- Limit of Gaussian approximation of main lobe
Returns
the beam blockage field

◆ BeamBlockage_getCacheDirectory()

const char * BeamBlockage_getCacheDirectory ( BeamBlockage_t * self)

Returns the cache directory.

Default is the value specified in the internal config.h file. If NULL is returned it means that caching is disabled.

Parameters
[in]self- self
Returns
the cache directory or NULL

◆ BeamBlockage_getRewriteCache()

int BeamBlockage_getRewriteCache ( BeamBlockage_t * self)

Returns if the cache is recreated each time.

Parameters
[in]self- self
Returns
if cache is recreated or not. Defaults to 0 which is no

◆ BeamBlockage_getTopo30Directory()

const char * BeamBlockage_getTopo30Directory ( BeamBlockage_t * self)

Returns the topo30 directory.

Parameters
[in]self- self
Returns
the topo30 directory

◆ BeamBlockage_restore()

int BeamBlockage_restore ( PolarScan_t * scan,
RaveField_t * blockage,
const char * quantity,
double threshold )

When you have retrieved the beam blockage field you can restore the specified parameter for the scan.

Parameters
[in]scan- the scan that was provided to the getBlockage function
[in]blockage- the result from the call to getBlockage
[in]quantity- the parameter to be restored. If NULL, it defaults to DBZH
[in]threshold- the percentage threshold

◆ BeamBlockage_setCacheDirectory()

int BeamBlockage_setCacheDirectory ( BeamBlockage_t * self,
const char * cachedir )

Sets the cache directory.

Default is the value specified in the internal config.h file. If set to NULL, then caching is disabled.

Parameters
[in]self- self
[in]cachedir- the cache directory
Returns
1 on success otherwise 0

◆ BeamBlockage_setRewriteCache()

void BeamBlockage_setRewriteCache ( BeamBlockage_t * self,
int recreateCache )

Sets if the cache should be recreated all the time.

(Default 0)

Parameters
[in]self- self
[in]recreateCache- if cache should be recreated, defaults to 0 which is no

◆ BeamBlockage_setTopo30Directory()

int BeamBlockage_setTopo30Directory ( BeamBlockage_t * self,
const char * topodirectory )

Sets the topo30 directory.

Parameters
[in]self- self
[in]topodirectory- the topo directory
Returns
1 on success otherwise 0

Variable Documentation

◆ BeamBlockage_TYPE

RaveCoreObjectType BeamBlockage_TYPE
Initial value:
= {
"BeamBlockage",
sizeof(BeamBlockage_t),
BeamBlockage_constructor,
BeamBlockage_destructor,
BeamBlockage_copyconstructor
}
struct _BeamBlockage_t BeamBlockage_t
Defines a beam blockage object.
Definition beamblockage.h:36

Type definition to use when creating a rave object.