pyart.aux_io.write_odim_h5#

pyart.aux_io.write_odim_h5(filename, radar, field_names=None, physical=True, compression='gzip', compression_opts=6, undefined_value=None, odim_convention='ODIM_H5/V2_2')[source]#

Write a Radar object to a EUMETNET OPERA compliant HDF5 file.

The files produced by this routine follow the EUMETNET OPERA information model: https://www.eumetnet.eu/wp-content/uploads/2021/07/ODIM_H5_v2.4.pdf

Supported features:
  • Writing PPIs: PVOL and SCAN objects - Different sweeps are saved in different dataset groups

  • Writing sectorized PPIs and SCANs: AZIM objects

  • Writing RHIs: ELEV objects

Not yet supported:
  • Single ray data (e.g. from fixed staring mode)

  • Profiles

Parameters:
  • filename (str) – Filename of file to create.

  • radar (Radar) – Radar object to process.

  • field_names (list of str) – The list of fields from the radar object to save. If none all fields in the radar object will be saved.

  • physical (Bool) – If true the physical values are stored. nodata parameter is equal to the _FillValue parameter in the field metadata or the default Py-ART fill value. If false the data is converted into binary values using a linear conversion. The gain and offset are either specified in the metadata of the field with keywords ‘scale_factor’ and ‘add_offset’ or calculated on the fly. keyword ‘_Write_as_dtype’ specifies the datatype. It can be either ‘uint8’ or ‘uint16’. The default datatype is uint8. The ‘undetect’ parameter is not used

  • compression (str) – The type of compression for the datasets. Typical are “gzip” and “lzf”.

  • compression_opts (any) – The compression options. In the case of gzip is the level between 0 to 9 (recomended 1 to 6). In the case of lzf there are not options.

  • undefined_value (float) – If an attribute is not defined in the data it will be replaced by this value (for example undetect, gain, offset…) If it is set to None, the attribute will NOT be written in the ODIM file

  • odim_convention (str) – Which ODIM convention is used, default is ODIM_H5/V2_2, but MeteoSwiss uses ODIM_H5/V2_3