Modifies metadata (data attributes).
Modifying data arrays and metadata
Adding and changing ODIM metadata
Metadata attributes in an HDF5 structure can be changed with –setODIM
command.
For convenience, this special command has also a shorthand – a direct assignment appended to –
, for example /dataset1/where
:rscale=500 .
--setODIM <assignment> (section: general)
Set data properties (ODIM). Works also directly: --/<path>:<key>[=<value>]. See --completeODIM
assignment= [/<path>:<key>[=<value>]]
- Parameters
-
assignment | - source path consisting of group path, attribute key and value |
A full path consist of a slash-separated group path elements followed by an attribute key separated by colon.
Examples:
# Set beam resolution
rack volume.h5 --/dataset1/where:rscale=500 -o volume-modified.h5
# Set date and time (note string format)
rack volume.h5 --/what:date=
"20140827" --/what:time=
"093000" -o volume-modified.h5
# Set freezing level
rack volume.h5 --/how:freeze=2.10 -o volume-modified.h5
# Set radar location
rack volume.h5 --/where:lat=64.7749 --/where:lon=26.3189 -o volume-modified.h5
Definition: DataSelector.cpp:44
- See also
- rack::CmdSetODIM (code)
-
CompleteODIM
Ensuring ODIM metadata
Ensure correct ODIM types after setting attributes. The OPERA data information model (ODIM) defines conventions for weather radar data. Some important ODIM attributes can be added automatically with –completeODIM
command, which sets nbins
, nrays
, xsize
, and ysize
equal to data dimensions, if already loaded as image.
Synopsis
- See also
- rack::CmdSetODIM (code)
-
CmdSetODIM
-
CmdSetODIM
-
rack::CmdCompleteODIM (code)
Deleting data
The h5 structure can be pruned with –delete
command which uses selector arguments similar to that of –select
(see Selecting data).
Remove parts of a hierarchical data structure.
- Parameters
-
selection | - desired parts to be deleted (syntax explained in Selecting data) |
Synopsis
Examples
# Delete dataset[i] groups 2...10
rack volume.h5 --
delete dataset2:10 -o volume-modified.h5
# Delete data[i] groups 3...20
rack volume.h5 --
delete data3:20 -o volume-modified.h5
# Delete data[i] groups 3...20, in dataset[i] groups 2...10
rack volume.h5 --
delete dataset2:10/data3:20 -o volume-modified.h5
# Delete independently dataset[i] and data[i] groups with two commands
rack volume.h5 --
delete dataset2:6 --
delete data2:5 -o volume-modified.h5
# Delete data[i] groups containing VRAD
rack volume.h5 --
delete quantity=VRAD -o volume-modified.h5
# Delete data[i] groups containing VRAD in 1.0 degree sweeps and above
rack volume.h5 --
delete elangle=1.0:90,quantity=VRAD -o volume-modified.h5
# Delete dual-PRF measurement data - leaving dataset groups
rack volume.h5 --
delete prf=DOUBLE -o volume-modified.h5
# Delete dual-PRF measurement data - also dataset groups
rack volume.h5 --
delete dataset:,prf=DOUBLE -o volume-modified.h5
# Delete actual data arrays
rack volume.h5 --
delete data -o volume-modified.h5
# Delete quality[i] groups
rack volume.h5 --
delete quality: -o volume-modified.h5
Notice that –elangle
applies to volume data only, and essentially selects dataset
groups. Similarly, quantity
selects data
(and quality
) groups. If selection parameters of both levels are issued in the same command, implicit AND
function applies in selection.
- See also
- CmdKeep
-
modifypage
-
rack::CmdDelete (code)
Keeping data
One may use –keep
to save part of the data, making the rest to be deleted. Technically, this is a "complement" of –delete
command.
Remove parts of a hierarchical data structure.
- Parameters
-
selection | - desired parts to be kept (syntax explained in Selecting data) |
Metadata groups (what
, where
, how
) are preserved or deleted together with their parent groups.
Synopsis
Examples:
# Keep data[i] groups containg DBZH
rack volume.h5 --keep quantity=DBZH -o volume-modified.h5
# Keep dataset[i] groups containing (at least) VRAD
rack volume.h5 --keep quantity=VRAD -o volume-modified.h5
# Keep dataset[i] group with elangle 5.0 degrees, at lowest
rack volume.h5 --keep elangle=5.0:90.0 -o volume-modified.h5
# Keep three dataset[i] groups with lowest elangle
rack volume.h5 --keep elangle=-90.0:90.0,count=3 -o volume-modified.h5
# Keep quality groups only
rack volume.h5 --keep quality -o volume-modified.h5
# Keep quality1 and quality2 groups
rack volume.h5 --keep quality1:2 -o volume-modified.h5
# Keep data specific quality groups
rack volume.h5 --keep data:/quality -o volume-modified.h5
# Keep dataset[] specific quality groups
rack volume.h5 --keep dataset:/quality -o volume-modified.h5
- See also
- CmdDelete
-
modifypage
-
rack::CmdKeep (code)
Renaming and moving paths and attributes
One can rename existing paths (hdf5 group names) and attributes with –move
command.
Rename or move data groups and attributes.
- Parameters
-
src | - source path consisting at least of the group path |
dst | - full destination path or only ':' followed by attribute key |
A full path consist of a slash-separated group path elements followed by an attribute key separated by colon. For example: /dataset1/data2/what
:gain .
Examples:
# Move group
rack volume.h5 --move dataset1/quality1,dataset1/data2/quality3 -o volume-modified.h5
# Rename only the attribute key
rack volume.h5 --move dataset1/how:task,:newtask -o volume-modified.h5
# Move attribute in hierarchy
rack volume.h5 --move dataset1/how:task,what -o volume-modified.h5
# Move and rename attribute
rack volume.h5 --move dataset1/where:nrays,dataset1/how:imageheight -o volume-modified.h5
- See also
- CmdDelete
-
CmdKeep
-
modifypage
-
rack::CmdMove (code)
Data conversions
Convert data with desired encoding. Volume data can be converted to desired scale and encoding with –encoding
followed by –convert
. If the input file contains several quantities, the target quantity can be selected with –select
(-s
) command:
rack volume-
double.h5 -Q DBZH --encoding C,0.5,-32 --convert -o volume-
new.h5
rack volume-uint16.h5 -Q DBZH --encoding d --convert -Q VRAD --encoding C,0.025,-7.65506,0,255 --convert -o volume-
new.h5
- See also
- rack::CmdEncoding (code)
-
rack::CmdSetODIM (code)
-
rack::CmdConvert (code)
-
CmdDelete
-
CmdMove