|
Rack is a command-line program for processing weather radar data. It uses raw measurement data as input and generates Meteorological products as well as Cartesian conversions and composites . Rack also provides methods for Anomaly Detection and Removal (AnDRe) . Quality information is supported throughout the processing chain. Rack also supports Image processing , like applying colors and transparency.
Rack is based on code developed at the Finnish Meteorological Institute since 2001. Part of the development work has been supported by the BALTRAD project (2009-2014), see http://www.baltrad.eu . The program can be downloaded from https://github.com/fmidev/rack .
As input, Rack accepts azimuthal scans - volumes or separate sweeps - in HDF5 files using OPERA Information Model (ODIM, http://www.eumetnet.eu/opera).
After loading a volume file, a typical operation is to compute a single-radar product. The computation is carried out in polar coordinates. The result can be mapped to a Cartesian products. The projections are calculated using the Proj4 library (http://trac.osgeo.org/proj/). Output files can be written in HDF5 files, PNG image files or geo-referenced GeoTIFF files. In addition, metadata, resampled grid data and vertical profiles can be output as plain text files.
The overall data flow is illustrated below.
A typical invocation of Rack looks like:
The native format for data is HDF5, but data and be read or written partially using image and text format. See File input and output for details.
Specifically, Rack accepts three kinds of command line arguments:
–help
–outputFile
product.h5
volume.h5
, serving as shorthand for –inputFile
<file>
.The options are prefixed with double hyphen, "--". Some options have also a single hyphen "-", single-letter shorthand. (This argument syntax differs from POSIX and GNU conventions, e.g. -x
-y
cannot be grouped to -xy
. ) All the arguments are handled in order; they can be thought as commands to be executed sequentially.
Usage info and a list of commands is dumped if –help
or -h
or no arguments are supplied:
The list of commands is also listed in Section General commands.
Help is also available for invidual commands:
The version of the program is displayed with –version
.
Other useful general commands are –verbose
<level>
and –status
, which give debugging information of data flow and memory.
Generation of a single-radar product is explained in section Meteorological products. The products are generated in polar coordinates, that is, in radar's native coordinate system.
A product may contain additional data arrays, typically quality indices or height information. As processing and using Doppler data involves special aspects, it is handled in it own section, Basic Doppler products.
A product can be further converted to Cartesian coordinate system, explained next.
Data in polar coordinates can be mapped to a Cartesian product with –cCreate
(abbreviated -c
). The simplest possible command is
which converts the first dataset (sweep) in volume.h5 to a Cartesian product. The default projection is azimuthal equidistant, centered at the radar. The projection can be changed with –cProj
which uses Proj.4 syntax (http://trac.osgeo.org/proj/). The default size (bins x bins) can be changed with –cSize
.
The above image contains some anomalies that can be detected and removed. See Anomaly Detection and Removal (AnDRe) for details.
Inside Rack , a single-radar Cartesian product is technically similar to a radar composite – it is a single-radar "composite". The related commands are prefixed with 'c'
. Composite generation, projections, methods, and other options are explained in further detail in section Cartesian conversions and composites .
This command determines the data to be applied in subsequent input read or product generation commands.
In Rack, many operations implictly select a subset of available data instead of using it all. For example, in computing a Pseudo CAPPI image, DBZH
data from single-PRF sweeps is used by default.
Synopsis
Remarks on the options:
path
argument defines a path segment to be matched, with desired index ranges (example: dataset2:4/data3
:8 )path
argument, a leading slash fixes the matching to the root (example: /dataset
:/data: ), otherwise the tail part is matchedquantity
argument accepts a list of strings separated by semicolon ':'quantity
argument list can be a literal string like DBZH
or a regular experession like ^DBZ[HV]?$
See example sets below!
This option is useful in selecting data for:
The following command lines illustrate usage of –select
in product generation and image output.
The following examples are less realistic than those above, but are used in unit testing of the program code.
Most commands apply implicit input data selection criteria, typically involving data paths, quantities and/or elevation angles.
Like in general in Rack, the parameters of –select
are positional (ordered), meaning that they can be issued as a comma-separated string without explicit names (keywords), as long as they are given in order. The parameters are:
path
is a string of path elements, separated by slash '/' and consisting of:what
, where
, how
- ie. the groups containing attributes dataset{min}:{max}
, data{min}:{max}
, quality{min}:{max}
- indexed groups containing subgroups for actual data and attributesdata
- unindexed groups containing actual data arrayswhat|where|dataset1:3
data:
equals data1:65535
; further the colon ':' can be omitted for dataset
and quality
(but not for data:
, to bypass naming conflict inherent in ODIM )data{index}
equals data{index}:{index}
(ie. exact match)data{index}:
equals data{index}:65535
data:{index}
equals data1:{index}
what|data|quality1:5
matches what
, data1:5
and quality1:5
what|where|dataset1:3/what|data1:8
– index ranges can vary on different levels, ie. in slash-separated elementsquantity
is a regular expression^DBZH$
, accepting DBZH
only(DBZH|TH)
accepts DBZH
and TH
, but also DBZHC
and WIDTH
...elangle
defines the range of antenna elevations accepted, range limits includedelangle={angle}
abbreviates elangle={angle}:90
(not elangle={angle}:{angle}
)count=1
to pick a single one within a rangecount
is the upper limit of accepted indices of dataset
; typically used with elangle
order
defines criteria
(DATA|TIME|ELANGLE) and operation
(MIN|MAX) in selecting data, applied with count
. Note that the lowest elevations can be measured the latest, appearing as dataset
's with highest indices.dualPRF
determines if sweeps using dual pulse repetition frequency is required (1), accepted like single one (0), or excluded (-1).The selection functionality is best explained with examples.
Note that escaping special characters like '|' is often required on command line.
Often, the first data array matching the criteria are used.
One can explicitly change the criteria with –select
(-s
) command . For example, in data conversions one may wish to focus on certain quantity – like DBZH
or VRAD
– not all the data.
The selection command can be applied the most commands processing data. In computing meteorological products (Product generation) an compositing, it affects the following product only. In case of anomaly detectors (Anomaly Detection and Removal (AnDRe)), it applies to all subsequent operators.
Note that some processing commands may not support explicit data selection. Set selection criteria strictly to one quantity
. Selecting quantities only is frequently needed, so there is a dedicated command –selectQuantity
(-Q
) which accepts comma-separated simple patterns (with * and ?) instead of regular expressions. For example, -Q
DBZH*
,QIND is equal to –select
quantity='^
(DBZH.*|QIND)$' .
The desired output storage type, scaling, and encoding can be set with –encoding
command. Depending on the following command, a varying set of properties will be supported. The general form of –encoding
command is
and for polar products and conversions, the extended form is:
One may set one or more properties by giving only N first ones. Also key=value
forms are supported.
The typical choices for storage type are 'C' (unsigned char), 'S' (unsigned short int) and 'd' (double precision float). The next parameters gain
and offset
define the mapping between bit values and the physical quantity: f = gain
* x + offset
.
In ODIM standard, undetect
marks the data where a measurement value falls under a sensitivity limit and nodata
marks areas where no measurement at all is available. Also grid geometry (nbins
, nrays
and rscale
) can be set when applicable. For example, producing a polar product (here 500m CAPPI, see Meteorological products) with some desired properties is given by:
Rack provides default encodings for some quantities. The configuration can be listed and changed with –quantityConf
command.
As to hierarchical structure of resulting products, the default location of computed meteorological products and Composites is /dataset1/data1
. Any previous results are overwritten. This can be changed by means of –append
command: one can combine several products in same dataset
group, adding a new data
group, or append a new dataset
group.
For modifying existing data, see Modifying data .
Measurement parameters in radar have a varying scale. For example, DBZH is typically between -32dBZ and 50dBZ whereas RHOHV ranges between 0.0 and 1.0. Further, different storage types can be used, and the resulting value range should be compatible with the encoding. In some cases, like in creating radar image composites, Rack can use predefined storage types and encoding. The following examples illustrate the usage
The arguments can be named explicitly, as in the case of –select
and –encoding
. The encoding of a given quantity is displayed if the quantity is issued without type specifier character. A quantity can be also assigned zero
, a "virtual" physical small value to be applied instead of undetect
marker.
yelding
where asterisk *
marks the current default storage type and scaling.
The full list of predefined quantity encodings are listed with
One may freely add encodings simply by setting them with –quantityConf