RAVE
rave.c File Reference

Python wrapper for the rave product generation framework. More...

#include <pyravecompat.h>
#include <arrayobject.h>
#include <limits.h>
#include <math.h>
#include <stdio.h>
#include <string.h>
#include "rave_object.h"
#include "raveutil.h"
#include "rave.h"
#include "rave_types.h"
#include "rave_io.h"
#include "pypolarvolume.h"
#include "pytransform.h"
#include "pyraveio.h"
#include "pypolarscan.h"
#include "pycartesian.h"
#include "pycartesianparam.h"
#include "pyprojection.h"
#include "rave_debug.h"
#include "rave_alloc.h"
#include "rave_utilities.h"
#include "pyrave_debug.h"
#include "rave_datetime.h"
#include "proj_wkt_helper.h"

Macros

#define NPY_NO_DEPRECATED_API   NPY_1_7_API_VERSION
 
#define raiseException_gotoTag(tag, type, msg)
 Sets python exception and goto tag.
 
#define raiseException_returnNULL(type, msg)
 Sets python exception string and returns NULL.
 

Functions

 PYRAVE_DEBUG_MODULE ("_rave")
 This modules name.
 
 PyDoc_STRVAR (_rave_module_doc, "The _rave module provides some utility functions when running the rave software, like setting debug level, provide constants, creating objects and check if some features are enabled.\n" "Since the actual functions describes their usage the various constants are first going to be described below:\n" "Data types are used when creating data fields or querying data fields.\n" " + RaveDataType_UNDEFINED - If data has not been initialized yet\n" " + RaveDataType_CHAR - If data is defined as char (8-bit)\n" " + RaveDataType_UCHAR - If data is defined as unsigned char (8-bit)\n" " + RaveDataType_SHORT - If data is defined as short integer (16-bit)\n" " + RaveDataType_USHORT - If data is defined as unsigned short integer (16-bit)\n" " + RaveDataType_INT - If data is defined as integer (32-bit)\n" " + RaveDataType_UINT - If data is defined as unsigned integer (32-bit)\n" " + RaveDataType_LONG - If data is defined as long integer (64-bit)\n" " + RaveDataType_ULONG - If data is defined as unsigned long integer (64-bit)\n" " + RaveDataType_FLOAT - If data is defined as float value (32-bit)\n" " + RaveDataType_DOUBLE - If data is defined as double float value (64-bit)\n" "\n" "Most values used in rave can be of 3 different types:\n" " + RaveValueType_UNDEFINED - If value type haven't been defined yet or can't be determined.\n" " + RaveValueType_UNDETECT - There is a value but it doesn't exist any data (like no rain, ...)\n" " + RaveValueType_NODATA - There is no coverage at the location and hence no data found\n" " + RaveValueType_DATA - We have data at the location\n" "\n" "Object type can be found in for example raveio for giving information on what type of object that has been read. More information about the various types can be found in the ODIM H5 specification.\n" " + Rave_ObjectType_UNDEFINED - Object read can not be defined (most likely because it couldn't be read).\n" " + Rave_ObjectType_PVOL - Polar Volume\n" " + Rave_ObjectType_CVOL - Cartesian volume\n" " + Rave_ObjectType_SCAN - Polar scan\n" " + Rave_ObjectType_RAY - Single polar ray\n" " + Rave_ObjectType_AZIM - Azimuthal object\n" " + Rave_ObjectType_IMAGE - 2-D cartesian image\n" " + Rave_ObjectType_COMP - Cartesian composite image(s)\n" " + Rave_ObjectType_XSEC - 2-D vertical cross section(s)\n" " + Rave_ObjectType_VP - 1-D vertical profile\n" " + Rave_ObjectType_PIC - Embedded graphical image\n" "\n" "Product types that defines the various products. Usually defined in what/product, More information about the various types can be found in the ODIM H5 specification.\n" " + Rave_ProductType_UNDEFINED - Undefined product type.\n" " + Rave_ProductType_SCAN - A scan of polar data\n" " + Rave_ProductType_PPI - Plan position indicator\n" " + Rave_ProductType_CAPPI - Constant altitude PPI\n" " + Rave_ProductType_PCAPPI - Pseudo-CAPPI\n" " + Rave_ProductType_ETOP - Echo top\n" " + Rave_ProductType_MAX - Maximum\n" " + Rave_ProductType_RR - Accumulation\n" " + Rave_ProductType_VIL - Vertically integrated liquid water\n" " + Rave_ProductType_COMP - Composite\n" " + Rave_ProductType_VP - Vertical profile\n" " + Rave_ProductType_RHI - Range height indicator\n" " + Rave_ProductType_XSEC - Arbitrary vertical slice\n" " + Rave_ProductType_VSP - Vertical side panel\n" " + Rave_ProductType_HSP - Horizontal side panel\n" " + Rave_ProductType_RAY - Ray\n" " + Rave_ProductType_AZIM - Azimuthal type product\n" " + Rave_ProductType_QUAL - Quality metric\n" " + Rave_ProductType_PMAX - Pseudo-MAX\n" " + Rave_ProductType_SURF - Surface type\n" "\n" "There are also a number of different version strings that can occur in an ODIM H5 file.\n" " + RaveIO_ODIM_Version_UNDEFINED - Undefined ODIM version\n" " + RaveIO_ODIM_Version_2_0 - ODIM H5 2.0\n" " + RaveIO_ODIM_Version_2_1 - ODIM H5 2.1\n" " + RaveIO_ODIM_Version_2_2 - ODIM H5 2.2\n" "and\n" " + RaveIO_ODIM_H5rad_Version_UNDEFINED - Undefined ODIM version\n" " + RaveIO_ODIM_H5rad_Version_2_0 - ODIM H5rad 2.0\n" " + RaveIO_ODIM_H5rad_Version_2_1 - ODIM H5rad 2.1\n" " + RaveIO_ODIM_H5rad_Version_2_2 - ODIM H5rad 2.2\n" "\n" "The logging within the rave c-modules are done to stderr and due to that, the logging is turned off as default behaviour.\n" "In some cases it might be necessary to get some information on what happens and why errors occurs. In those cases it is possible\n" "to turn on the debugging with setDebugLevel and specify one of the below levels:\n" " + Debug_RAVE_SPEWDEBUG - This provides a lot of debuginformation, most which probably is not interesting\n" " + Debug_RAVE_DEBUG - Basic debug information\n" " + Debug_RAVE_DEPRECATED - Print information from deprecated functions\n" " + Debug_RAVE_INFO - Information\n" " + Debug_RAVE_WARNING - Warnings\n" " + Debug_RAVE_ERROR - Errors\n" " + Debug_RAVE_CRITICAL - Critical errors, typically if this occur, it probably ends with a crash\n" " + Debug_RAVE_SILENT - Don't display anything\n" " Logging can be turned on with:\n" " import _rave\n" " _rave.setDebugLevel(_rave.Debug_RAVE_DEBUG)\n" "\n")
 
 MOD_INIT (_rave)
 Initializes _rave.
 

Detailed Description

Python wrapper for the rave product generation framework.

Author
Anders Henja (Swedish Meteorological and Hydrological Institute, SMHI)
Date
2009-10-14

Macro Definition Documentation

◆ raiseException_gotoTag

#define raiseException_gotoTag ( tag,
type,
msg )
Value:
{PyErr_SetString(type, msg); goto tag;}

Sets python exception and goto tag.

◆ raiseException_returnNULL

#define raiseException_returnNULL ( type,
msg )
Value:
{PyErr_SetString(type, msg); return NULL;}

Sets python exception string and returns NULL.

Function Documentation

◆ MOD_INIT()

MOD_INIT ( _rave )

Initializes _rave.

◆ PYRAVE_DEBUG_MODULE()

PYRAVE_DEBUG_MODULE ( "_rave" )

This modules name.