- pyart.io.read_grid_mdv(filename, field_names=None, additional_metadata=None, file_field_names=False, exclude_fields=None, delay_field_loading=False, **kwargs)[source]¶
Read a MDV file to a Grid Object.
filename (str) – Name of MDV file to read or file-like object pointing to the beginning of such a file.
field_names (dict, optional) – Dictionary mapping MDV data type names to radar field names. If a data type found in the file does not appear in this dictionary or has a value of None it will not be placed in the radar.fields dictionary. A value of None, the default, will use the mapping defined in the Py-ART configuration file.
additional_metadata (dict of dicts, optional) – Dictionary of dictionaries to retrieve metadata from during this read. This metadata is not used during any successive file reads unless explicitly included. A value of None, the default, will not introduct any addition metadata and the file specific or default metadata as specified by the Py-ART configuration file will be used.
file_field_names (bool, optional) – True to use the MDV data type names for the field names. If this case the field_names parameter is ignored. The field dictionary will likely only have a ‘data’ key, unless the fields are defined in additional_metadata.
exclude_fields (list or None, optional) – List of fields to exclude from the grid object. This is applied after the file_field_names and field_names parameters.
delay_field_loading (bool) – True to delay loading of field data from the file until the ‘data’ key in a particular field dictionary is accessed. In this case the field attribute of the returned Radar object will contain LazyLoadDict objects not dict objects.
grid (Grid) – Grid object containing data from MDV file.
This function can only read cartesian MDV files with fields compressed with gzip or zlib. For polar files see
MDV files and Grid object are not fully interchangeable. Specific limitation include:
All fields must have the same shape and dimensions.
All fields must have the same projection.
Vlevels types must not vary.
Projection must not be PROJ_POLAR_RADAR (9) or PROJ_RHI_RADAR (13).
Correct unit in the Z axis are just availible for ‘vlevel_type’ equal to VERT_TYPE_Z(4), VERT_TYPE_ELEV(9), VERT_TYPE_AZ(17), VERT_TYPE_PRESSURE(3) and VERT_TYPE_THETA(7).
The behavior in cases of 2D data is unknown but most likely will not fail.