pyart.io.read_nexrad_archive#

pyart.io.read_nexrad_archive(filename, field_names=None, additional_metadata=None, file_field_names=False, exclude_fields=None, include_fields=None, delay_field_loading=False, station=None, scans=None, linear_interp=True, storage_options={'anon': True}, **kwargs)[source]#

Read a NEXRAD Level 2 Archive file.

Parameters:
  • filename (str) – Filename of NEXRAD Level 2 Archive file. The files hosted by at the NOAA National Climate Data Center [1] as well as on the UCAR THREDDS Data Server [2] have been tested. Other NEXRAD Level 2 Archive files may or may not work. Message type 1 file and message type 31 files are supported.

  • field_names (dict, optional) – Dictionary mapping NEXRAD moments 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 metadata 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 metadata configuration file will be used.

  • file_field_names (bool, optional) – True to use the NEXRAD field 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 radar object. This is applied after the file_field_names and field_names parameters. Set to None to include all fields specified by include_fields.

  • include_fields (list or None, optional) – List of fields to include from the radar object. This is applied after the file_field_names and field_names parameters. Set to None to include all fields not specified by exclude_fields.

  • delay_field_loading (bool, optional) – 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.

  • station (str or None, optional) – Four letter ICAO name of the NEXRAD station used to determine the location in the returned radar object. This parameter is only used when the location is not contained in the file, which occur in older NEXRAD message 1 files.

  • scans (list or None, optional) – Read only specified scans from the file. None (the default) will read all scans.

  • linear_interp (bool, optional) – True (the default) to perform linear interpolation between valid pairs of gates in low resolution rays in files mixed resolution rays. False will perform a nearest neighbor interpolation. This parameter is not used if the resolution of all rays in the file or requested sweeps is constant.

  • storage_options (dict, optional) – Parameters passed to the backend file-system such as Google Cloud Storage, Amazon Web Service S3.

  • **kwargs – Additional keyword arguments to pass to fsspec to open the dataset

Returns:

radar (Radar) – Radar object containing all moments and sweeps/cuts in the volume. Gates not collected are masked in the field data.

References