RAVE
vp_odim_io.h File Reference

Adaptor for VP ODIM H5 files. More...

#include "rave_object.h"
#include "hlhdf.h"
#include "vertical_profile.h"
#include "lazy_nodelist_reader.h"

Go to the source code of this file.

Typedefs

typedef struct _VpOdimIO_t VpOdimIO_t
 Defines the odim h5 adaptor for vp products.
 

Functions

void VpOdimIO_setVersion (VpOdimIO_t *self, RaveIO_ODIM_Version version)
 Sets the version that this io class should handle.
 
RaveIO_ODIM_Version VpOdimIO_getVersion (VpOdimIO_t *self)
 Returns the version that this io class handles.
 
void VpOdimIO_setStrict (VpOdimIO_t *self, int strict)
 If writing should be done strictly.
 
int VpOdimIO_isStrict (VpOdimIO_t *self)
 If writing should be done strictly.
 
const char * VpOdimIO_getErrorMessage (VpOdimIO_t *self)
 If an error occurs during writing, you might get an indication for why by checking the error message.
 
int VpOdimIO_read (VpOdimIO_t *self, LazyNodeListReader_t *lazyReader, VerticalProfile_t *vp)
 Reads a vp from the nodelist and sets the data in the vp.
 
int VpOdimIO_fill (VpOdimIO_t *self, VerticalProfile_t *vp, HL_NodeList *nodelist)
 Fills a nodelist with information about a vertical profile.
 
int VpOdimIO_validateVpHowAttributes (VpOdimIO_t *self, VerticalProfile_t *vp)
 Validates a vertical profile according to strictness and version in order to verify if it contains necessary information.
 

Variables

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

Detailed Description

Adaptor for VP ODIM H5 files.

This object supports RAVE_OBJECT_CLONE.

Author
Anders Henja (Swedish Meteorological and Hydrological Institute, SMHI)
Date
2012-08-30

Typedef Documentation

◆ VpOdimIO_t

typedef struct _VpOdimIO_t VpOdimIO_t

Defines the odim h5 adaptor for vp products.

Function Documentation

◆ VpOdimIO_fill()

int VpOdimIO_fill ( VpOdimIO_t * self,
VerticalProfile_t * vp,
HL_NodeList * nodelist )

Fills a nodelist with information about a vertical profile.

Parameters
[in]self- self
[in]vp- the vertical profile
[in]nodelist- the hlhdf nodelist to fill
Returns
1 on success otherwise 0

◆ VpOdimIO_getErrorMessage()

const char * VpOdimIO_getErrorMessage ( VpOdimIO_t * self)

If an error occurs during writing, you might get an indication for why by checking the error message.

Parameters
[in]self- self
Returns
the error message (will be an empty string if nothing to report).

◆ VpOdimIO_getVersion()

RaveIO_ODIM_Version VpOdimIO_getVersion ( VpOdimIO_t * self)

Returns the version that this io class handles.

Parameters
[in]self- self
Returns
- the odim version

◆ VpOdimIO_isStrict()

int VpOdimIO_isStrict ( VpOdimIO_t * self)

If writing should be done strictly.

From ODIM H5 2.4 several how-attributes are mandatory. If any of these are missing and strict is set to true, then the writing will fail.

Parameters
[in]self- self
Returns
if writing should be performed strictly or not

◆ VpOdimIO_read()

int VpOdimIO_read ( VpOdimIO_t * self,
LazyNodeListReader_t * lazyReader,
VerticalProfile_t * vp )

Reads a vp from the nodelist and sets the data in the vp.

Parameters
[in]self- self
[in]nodelist- the hdf5 node list
[in]vp- the vertical profile that should get the attribute and data set
Returns
1 on success otherwise 0

◆ VpOdimIO_setStrict()

void VpOdimIO_setStrict ( VpOdimIO_t * self,
int strict )

If writing should be done strictly.

From ODIM H5 2.4 several how-attributes are mandatory. If any of these are missing and strict is set to true, then the writing will fail.

Parameters
[in]self- self
[in]strict- if writing should be performed strictly or not

◆ VpOdimIO_setVersion()

void VpOdimIO_setVersion ( VpOdimIO_t * self,
RaveIO_ODIM_Version version )

Sets the version that this io class should handle.

Parameters
[in]self- self
[in]version- the odim version

◆ VpOdimIO_validateVpHowAttributes()

int VpOdimIO_validateVpHowAttributes ( VpOdimIO_t * self,
VerticalProfile_t * vp )

Validates a vertical profile according to strictness and version in order to verify if it contains necessary information.

Parameters
[in]self- self
[in]vp- the vertical profile to validate
Returns
1 if valid otherwise 0

Variable Documentation

◆ VpOdimIO_TYPE

RaveCoreObjectType VpOdimIO_TYPE
extern

Type definition to use when creating a rave object.