RAVE
cartesian_cf_io.c File Reference

Cartesian CF convention handler. More...

#include "cartesian_cf_io.h"
#include "rave_debug.h"
#include "rave_alloc.h"
#include "raveobject_hashtable.h"
#include "odim_io_utilities.h"
#include "cartesiancomposite.h"
#include "proj_wkt_helper.h"
#include "projection_pipeline.h"
#include <time.h>
#include <string.h>

Classes

struct  QuantityNodataUndetectMapping
 
struct  _CartesianCfIO_t
 Represents the adaptor. More...
 

Macros

#define __USE_XOPEN   1
 
#define _XOPEN_SOURCE   700
 
#define UNITS   "units"
 
#define LONG_NAME   "long_name"
 
#define STANDARD_NAME   "standard_name"
 
#define POSITIVE   "positive"
 
#define DESCRIPTION   "description"
 
#define UNIT_METERS   "m"
 
#define UNIT_DEGREE_EAST   "degree_east"
 
#define UNIT_DEGREE_NORTH   "degree_north"
 
#define UNIT_SECONDS_SINCE_19700101   "seconds since 1970-01-01 00:00:00 +00:00"
 
#define UNITS_DBZ   "dBZ"
 
#define HEIGHT_DESCRIPTION   "height above sea level"
 
#define TEXT_UP   "up"
 
#define TEXT_HEIGHT   "height"
 
#define TEXT_LONGITUDE   "longitude"
 
#define TEXT_LATITUDE   "latitude"
 
#define TEXT_TIME   "time"
 

Typedefs

typedef struct QuantityNodataUndetectMapping QuantityNodataUndetectMapping
 

Functions

int CartesianCfIOInternal_writeCartesian (CartesianCfIO_t *self, int ncid, Cartesian_t *cartesian)
 Writes the cartesian product.
 
int CartesianCfIO_setDeflateLevel (CartesianCfIO_t *self, int level)
 Sets the level of compression.
 
int CartesianCfIO_getDeflateLevel (CartesianCfIO_t *self)
 Returns the level of compression.
 
RaveCoreObjectCartesianOdimIO_read (CartesianCfIO_t *self, const char *filename)
 
int CartesianCfIO_write (CartesianCfIO_t *self, const char *filename, RaveCoreObject *obj)
 Writes a netcdf file in CF convention format.
 

Variables

QuantityNodataUndetectMapping qmapping []
 
RaveCoreObjectType CartesianCfIO_TYPE
 Type definition to use when creating a rave object.
 

Detailed Description

Cartesian CF convention handler.

Author
Anders Henja (Swedish Meteorological and Hydrological Institute, SMHI)
Date
2017-11-24

Function Documentation

◆ CartesianCfIO_getDeflateLevel()

int CartesianCfIO_getDeflateLevel ( CartesianCfIO_t * self)

Returns the level of compression.

Parameters
[in]self- self
Returns
level of compression where 0 means no compression and 9 is highest compression

◆ CartesianCfIO_setDeflateLevel()

int CartesianCfIO_setDeflateLevel ( CartesianCfIO_t * self,
int level )

Sets the level of compression.

0 which is default means no compression. 1-9 is the level of compression where 1 is lowest level and 9 is highest.

Parameters
[in]self- self
[in]level- level of compression
Returns
1 if level was within 0 - 9 otherwise false

◆ CartesianCfIO_write()

int CartesianCfIO_write ( CartesianCfIO_t * self,
const char * filename,
RaveCoreObject * obj )

Writes a netcdf file in CF convention format.

Parameters
[in]self- self
[in]constchar* - the netcdf filename
[in]obj- the object to be written
Returns
1 on success otherwise 0

◆ CartesianCfIOInternal_writeCartesian()

int CartesianCfIOInternal_writeCartesian ( CartesianCfIO_t * self,
int ncid,
Cartesian_t * cartesian )

Writes the cartesian product.

Parameters
[in]self- self
[in]ncid- the netcdf file id
[in]cartesian- the cartesian product beeing written
Returns
1 on success otherwise 0

Variable Documentation

◆ CartesianCfIO_TYPE

RaveCoreObjectType CartesianCfIO_TYPE
Initial value:
= {
"CartesianCfIO",
sizeof(CartesianCfIO_t),
CartesianCfIO_constructor,
CartesianCfIO_destructor,
CartesianCfIO_copyconstructor
}
struct _CartesianCfIO_t CartesianCfIO_t
Defines the cf conventions h5 adaptor for cartesian products.
Definition cartesian_cf_io.h:36

Type definition to use when creating a rave object.

◆ qmapping

Initial value:
= {
{"DBZH", -34.0, -32.0, UNITS_DBZ, "equivalent_reflectivity_factor_h"},
{NULL, 0.0, 0.0, NULL, NULL}
}