RAVE
Lib.rave_h5rad Namespace Reference

Functions

 Root (tag='h5rad', attrib={"version":H5RAD_VERSION})
 
 Dataset (tag="data", attrib={"type":"dataset"}, prefix='image', set=1)
 
 DatasetGroup (prefix='image', set=1, **args)
 
 DatasetArray (xsize=None, ysize=None, typecode='B', initval=None)
 
 TopLevelWhat (tag='what', **args)
 
 DatasetWhat (tag='what', **args)
 
 Where (tag='where', **args)
 

Detailed Description

rave_h5rad.py - Functions for initializing new RAVE objects, organized
                according to the H5rad information model.

The information model followed when representing data and products is that
developed in COST 717 for use with HDF5. References to the tables in the
information model specification are made throughout this module.

Michelson D.B., Holleman I., Hohti H., and Salomonsen M., 2002: HDF5
information model and implementation specification for weather radar data.
COST 717 Working Document WDF_02_200204_1.
Available at http://www.smhi.se/cost717/doc/WDF_02_200204_1.pdf

Function Documentation

◆ Dataset()

Lib.rave_h5rad.Dataset ( tag = "data",
attrib = {"type":"dataset"},
prefix = 'image',
set = 1 )
Simple dataset representation in INFO.

Arguments:
  string tag: Should always be "data".
  dict attrib: Should always be of type "dataset" for datasets.
  string prefix: Can be any of: "image", "scan", "profile"
  int set: Denotes the index of the dataset among other datasets.

Returns:
  an Element instance denoting the presence of a dataset, eg.
  <data type="dataset">image1</data>

◆ DatasetArray()

Lib.rave_h5rad.DatasetArray ( xsize = None,
ysize = None,
typecode = 'B',
initval = None )
Creates an empty numpy array, containing zeros, based on the
input arguments.
Can be appended to a RAVE object's "data" dictionary.

Arguments:
  int xsize: the number of columns in the array (horizontal dimension)
  int ysize: the number of rows in the array (vertical dimension)
  string typecode: the typecode of the array. Can be any of those
                   supported in numpy, although B,s,i,l,f,d are safest.
  int or float initval: value with which to initialize the whole array

Returns: a numpy array

◆ DatasetGroup()

Lib.rave_h5rad.DatasetGroup ( prefix = 'image',
set = 1,
** args )
A complete Group representing a dataset.
Contains the dataset together with corresponding "what" attributes.
Additional metadata must be added seperately.

Arguments:
  string prefix: Can be any of: "image", "scan", "profile"
  int set: Denotes the index of the dataset among other datasets.
  Additional agruments:
    Any attributes in dataset-specific "what" can be specified here.
    They will otherwise be initialized to "n/a".
    These can be any of the following, specified in Table 13:
      string product: Table 14
      float prodpar: Product parameter
      string quantity: Table 15
      string startdate: YYYYMMDD
      string starttime: HHmmss
      string enddate: YYYYMMDD
      string endtime: HHmmss
      float gain: Coefficient 'a' in y=ax+b used to convert int to float
      float offset: Coefficient 'b' in y=ax+b used to convert int to float
      float nodata: Raw value used to denote areas void of data
      float undetect: Raw value used to denote areas below the measurement
                      detection threshold (radiated but nothing detected).

Returns: An Element containing a complete dataset Group including metadata
         structures.

◆ DatasetWhat()

Lib.rave_h5rad.DatasetWhat ( tag = 'what',
** args )
Dataset-specific "what" attributes.

Arguments:
  string tag: Should always be "what".
  Additional arguments:
    Any arguments in dataset-specific "what" can be specified here.
    They will otherwise be initialized to "n/a".
    These can be any of the following, specified in Table 13:
      string product: Table 14
      float prodpar: Product parameter
      string quantity: Table 15
      string startdate: YYYYMMDD
      string starttime: HHmmss
      string enddate: YYYYMMDD
      string endtime: HHmmss
      float gain: Coefficient 'a' in y=ax+b used to convert int to float
      float offset: Coefficient 'b' in y=ax+b used to convert int to float
      float nodata: Raw value used to denote areas void of data
      float undetect: Raw value used to denote areas below the measurement
                      detection threshold (radiated but nothing detected).

Returns: An Element containing dataset-specific "what" attributes.

◆ Root()

Lib.rave_h5rad.Root ( tag = 'h5rad',
attrib = {"version":H5RAD_VERSION} )
This is the root element: an INFO object with the right version
attribute.

Arguments:
  string tag: should always be "h5rad"
  dict attrib: should always be the h5rad version

Returns:
  an INFO object

◆ TopLevelWhat()

Lib.rave_h5rad.TopLevelWhat ( tag = 'what',
** args )
Representation of top-level "what" Group.

Arguments:
  string tag: Should always be "what".
  Additional arguments:
    Any attributes in top-level "what" can be specified here.
    They will otherwise be initialized to "n/a".
    They can be any of the following:
      string object: Table 2
      int sets: The number of datasets in this file.
      string version: Presently "H5rad 1.2".
      string date: YYYYMMDD
      string time: HHmmss

Returns: An Element containing top-level "what" attributes.

◆ Where()

Lib.rave_h5rad.Where ( tag = 'where',
** args )
Top-level "where" attributes for all object types.

Arguments:
  string tag: Should always be "where".
  string object: Table 2
  Additional arguments (Tables 4-7):
    Any arguments in dataset-specific "what" can be specified here.
    They will otherwise be initialized to "n/a".
    They can be any of the following (this can be a bit messy...):
      For "scan" and "pvol" objects:
        int xsize: The number of range bins along a ray.
        int ysize: The number of azimuth gates in a sweep/scan.
        float lon: The radar's longitude, using decimal degrees.
        float lat: The radar's latitude, using decimal degrees.
        float height: The radar's height in m a s l.
        float angle: The elevation angle in degrees.
        float xscale: The range bin spacing in meters.
      For "image" and "comp" objects:
        int xsize: The number of pixels in the horizontal (E-W) direction.
        int ysize: The number of pixels in the vertical (N-S) direction.
        float xscale: Horizontal resolution in meters in the E-W direction.
        float yscale: Horizontal resolution in meters in the N-S direction.
        float LL_lon: Longitude of the lower-left image corner.
        float LL_lat: Latitude of the lower-left image corner.
        float UR_lon: Longitude of the upper-right image corner.
        float LR_lat: Latitude of the upper-right image corner.
      For "xsect" objects:
        Common attributes:
          int xsize: pixels in horizontal dimension.
          int ysize: pixels in vertical dimension.
          float xscale: horisontal resolution in meters.
          float yscale: vertical resolution in meters.
        RHI-specific:
          float lon: Longitude of radar antenna (degrees).
          float lat: Latitude of radar antenna (degrees).
          float az_angle: Azimuth angle (degrees).
          float range: Maximum range in km.
        Cross section and side-panel specific:
          float start_lon: Start position's longitude.
          float start_lat: Start position's latitude.
          float stop_lon: Stop position's longitude.
          float stop_lat: Stop position's latitude.
      For "vp" objects:
        float lon: Longitude of radar antenna (degrees).
        float lat: Latitude of radar antenna (degrees).
        float height: Height of the feed horn with antenna at the horizon
                      in m a s l.
        int levels: Number of points in the profile.
        float interval: Vertical distance (m) between height intervals,
                        or 0.0 if unavailable.
      For "THVP" objects:
        float lon: Longitude of radar antenna (degrees).
        float lat: Latitude of radar antenna (degrees).
        float height: Height of the feed horn with antenna at the horizon
                      in m a s l.
        int xsize: Number of pixels on the time axis.
        int ysize: Number of pixels in the vertical dimension.
        float xscale: Time resolution in seconds.
        float yscale: Vertical resolution in meters.
        float xoffset: Time (UTC) of the first profile in seconds after
                       00:00 UTC on the day defined by the "date"
                       Attribute in the "what" Group.
        float yoffset: Height of the first level of profile in meters.
        
Returns: An Element containing top-level "where" for the given object.