pyrad.io.get_data#

pyrad.io.get_data(voltime, datatypesdescr, cfg)[source]#

Reads pyrad input data.

Parameters:
  • voltime (datetime object) – volume scan time

  • datatypesdescr (list) – list of radar field types to read. Format : [radarnr]:[datagroup]:[datatype],[dataset],[product] ‘dataset’ is only specified for data groups ‘ODIM’, ‘CFRADIAL’, ‘CFRADIAL2’, ‘CF1’, ‘ODIMPYRAD’ ‘PYRADGRID’ and ‘NETCDFSPECTRA’. ‘product’ is only specified for data groups ‘CFRADIAL’, ‘ODIMPYRAD’, ‘PYRADGRID’ and ‘NETCDFSPECTRA’ The data group specifies the type file from which data is extracted. It can be:

    ‘RAINBOW’: Propietary Leonardo format ‘COSMO’: COSMO model data saved in Rainbow file format ‘DEM’: Visibility data saved in Rainbow file format ‘PSR’: Reads PSR data file to extract range gate information

    (Noise and transmitted power)

    ‘RAD4ALP’: METRANET format used for the operational MeteoSwiss

    data. To find out which datatype to use to match a particular METRANET field name check the function ‘get_datatype_metranet’ in pyrad/io/io_aux.py

    ‘RAD4ALPCOSMO’: COSMO model data saved in a binary file format.

    Used by operational MeteoSwiss radars

    ‘RAD4ALPDEM’: Visibility data saved in a binary format used by

    operational MeteoSwiss radars

    ‘RAD4ALPHYDRO’: Used to read the MeteoSwiss operational

    hydrometeor classification

    ‘RAD4ALPDOPPLER’: Used to read the MeteoSwiss operational

    dealiased Doppler velocity

    ‘ODIM’: Generic ODIM file format. For such types ‘dataset’

    specifies the directory and file name date convention. Example: ODIM:dBZ,D{%Y-%m-%d}-F{%Y%m%d%H%M%S}. To find out which datatype to use to match a particular ODIM field name check the function ‘get_datatype_odim’ in pyrad/io/io_aux.py

    ‘ODIMBIRDS’: Output of vol2bird algorithm in ODIM convention

    format.For such types ‘dataset’ specifies the directory and file name date convention. Example: ODIM:dBZ,D{%Y-%m-%d}-F{%Y%m%d%H%M%S}. To find out which datatype to use to match a particular ODIM field name check the function ‘get_datatype_odim’ in pyrad/io/io_aux.py

    ‘GAMIC’: Gamic files.

    ‘NEXRADII’: Nexrad-level II file format.

    ‘CFRADIAL2’: CFRADIAL2 file format. For such types ‘dataset’

    specifies the directory and file name date convention. Example: ODIM:dBZ,D{%Y-%m-%d}-F{%Y%m%d%H%M%S}. To find out which datatype to use to match a particular ODIM field name check the function ‘get_datatype_odim’ in pyrad/io/io_aux.py

    ‘CFRADIAL’: CFRADIAL file format. For such types ‘dataset’

    specifies the directory and file name date convention. Example: CFRADIAL:dBZ,D{%Y-%m-%d}-F{%Y%m%d%H%M%S}.

    ‘SKYECHO’: SKYECHO netcdf file format. For such types ‘dataset’

    specifies the directory and file name date convention. Example: SKYECHO:dBZ,D{%Y-%m-%d}-F{%Y%m%d%H%M%S}.

    ‘CF1’: CF1 file format. For such types ‘dataset’

    specifies the directory and file name date convention. Example: ODIM:dBZ,D{%Y-%m-%d}-F{%Y%m%d%H%M%S}. To find out which datatype to use to match a particular ODIM field name check the function ‘get_datatype_odim’ in pyrad/io/io_aux.py

    ‘MXPOL’: MXPOL (EPFL) data written in a netcdf file

    ‘MFCFRADIAL’: radar data from MeteoFrance written in CFRadial

    ‘CFRADIALPYRAD’: CFRadial format with the naming convention and

    directory structure in which Pyrad saves the data. For such datatypes ‘dataset’ specifies the directory where the dataset is stored and ‘product’ specifies the directory where the product is stored. Example: CFRADIALPYRAD:dBZc,Att_ZPhi,SAVEVOL_dBZc

    ‘CFRADIALCOSMO’: COSMO data in radar coordinates in a CFRadial

    file format.

    ‘ODIMPYRAD’: ODIM file format with the naming convention and

    directory structure in which Pyrad saves the data. For such datatypes ‘dataset’ specifies the directory where the dataset is stored and ‘product’ specifies the directroy where the product is stored. Example: ODIMPYRAD:dBZc,Att_ZPhi,SAVEVOL_dBZc

    ‘RAD4ALPGRID’: METRANET format used for the operational MeteoSwiss

    Cartesian products.

    ‘RAD4ALPGIF’: Format used for operational MeteoSwiss Cartesian

    products stored as gif files

    ‘RAD4ALPBIN’: Format used for operational MeteoSwiss Cartesian

    products stored as binary files

    ‘PYRADGRID’: Pyrad generated Cartesian grid products stored in a

    netcdf file. For such datatypes ‘dataset’ specifies the directory where the dataset is stored and ‘product’ specifies the directory where the product is stored. Example: PYRADGRID:RR,RZC,SAVEVOL

    ‘ODIMPYRADGRID’: Pyrad generated Cartesian grid products in an

    ODIM HDF5 file. For such datatypes ‘dataset’ specifies the directory where the dataset is stored and ‘product’ specifies the directory where the product is stored. Example: ODIMPYRADGRID:RR,RZC,SAVEVOL

    ‘ODIMGRID’: Gridded data in ODIM format. For such types ‘dataset’

    specifies the directory and file name date convention. Example: ODIMGRID:dBZ,D{%Y-%m-%d}-F{%Y%m%d%H%M%S}.

    ‘KNMIH5GRID’: KNMI gridded data in an H5 file. For such types

    ‘dataset’ specifies the directory and file name date convention.

    ‘SATGRID’: CF Netcdf from used for the MeteoSat satellite data

    in the CCS4 (Radar composite) grid.

    ‘MFBIN’: Format used by some MeteoFrance products stored as binary

    files

    ‘MFPNG’: Format used by some MeteoFrance products stored as binary

    files

    ‘MFGRIB’: Format used by some MeteoFrance products stored as GRIB

    files

    ‘MFDAT’: Format used by some MeteoFrance products stored as DAT

    (text) files

    ‘MFCF’: Format used by some MeteoFrance products stored as netcdf

    CF files

    ‘PSRSPECTRA’: Format used to store Rainbow power spectra

    recordings.

    ‘NETCDFSPECTRA’: Format analogous to CFRadial and used to store

    Doppler spectral

    ‘RAD4ALPIQ’: Format used to store rad4alp IQ data

    ‘RAINBOW’, ‘RAD4ALP’, ‘ODIM’ ‘ODIMBIRDS’ CFRADIAL2’, ‘CF1’ ‘MFCFRADIAL’ ‘GAMIC’ and ‘MXPOL’ are primary data file sources and they cannot be mixed for the same radar. It is also the case for their complementary data files, i.e. ‘COSMO’ and ‘RAD4ALPCOSMO’, etc. ‘CFRADIALPYRAD’ and ‘ODIMPYRAD’ are secondary data file sources and they can be combined with any other datagroup type. For a list of accepted datatypes and how they map to the Py-ART name convention check function ‘get_field_name_pyart’ in pyrad/io/io_aux.py

  • cfg (dictionary of dictionaries) – configuration info to figure out where the data is

Returns:

radar (Radar) – radar object