pyart.core.RadarSpectra

class pyart.core.RadarSpectra(time, _range, fields, metadata, scan_type, latitude, longitude, altitude, sweep_number, sweep_mode, fixed_angle, sweep_start_ray_index, sweep_end_ray_index, azimuth, elevation, npulses_max, velocity_bins, altitude_agl=None, target_scan_rate=None, rays_are_indexed=None, ray_angle_res=None, scan_rate=None, antenna_transition=None, instrument_parameters=None, radar_calibration=None, georefs_applied=None)[source]

A class for storing antenna coordinate radar spectra data. The structure of the Radar class is based on the CF/Radial Data file format. Global attributes and variables (section 4.1 and 4.3) are represented as a dictionary in the metadata attribute. Other required and optional variables are represented as dictionaries in a attribute with the same name as the variable in the CF/Radial standard. When a optional attribute not present the attribute has a value of None. The data for a given variable is stored in the dictionary under the ‘data’ key. Moment field data is stored as a dictionary of dictionaries in the fields attribute. Sub-convention variables are stored as a dictionary of dictionaries under the meta_group attribute.

Refer to the attribute section for information on the parameters.

Variables
  • ~RadarSpectra.time (dict) – Time at the center of each ray.

  • ~RadarSpectra.range (dict) – Range to the center of each gate (bin).

  • ~RadarSpectra.fields (dict of dicts) – Spectra fields.

  • ~RadarSpectra.metadata (dict) – Metadata describing the instrument and data.

  • ~RadarSpectra.scan_type (str) – Type of scan, one of ‘ppi’, ‘rhi’, ‘sector’ or ‘other’. If the scan volume contains multiple sweep modes this should be ‘other’.

  • ~RadarSpectra.latitude (dict) – Latitude of the instrument.

  • ~RadarSpectra.longitude (dict) – Longitude of the instrument.

  • ~RadarSpectra.altitude (dict) – Altitude of the instrument, above sea level.

  • ~RadarSpectra.altitude_agl (dict or None) – Altitude of the instrument above ground level. If not provided this attribute is set to None, indicating this parameter not available.

  • ~RadarSpectra.sweep_number (dict) – The number of the sweep in the volume scan, 0-based.

  • ~RadarSpectra.sweep_mode (dict) – Sweep mode for each mode in the volume scan.

  • ~RadarSpectra.fixed_angle (dict) – Target angle for thr sweep. Azimuth angle in RHI modes, elevation angle in all other modes.

  • ~RadarSpectra.sweep_start_ray_index (dict) – Index of the first ray in each sweep relative to the start of the volume, 0-based.

  • ~RadarSpectra.sweep_end_ray_index (dict) – Index of the last ray in each sweep relative to the start of the volume, 0-based.

  • ~RadarSpectra.rays_per_sweep (LazyLoadDict) – Number of rays in each sweep. The data key of this attribute is create upon first access from the data in the sweep_start_ray_index and sweep_end_ray_index attributes. If the sweep locations needs to be modified, do this prior to accessing this attribute or use init_rays_per_sweep() to reset the attribute.

  • ~RadarSpectra.target_scan_rate (dict or None) – Intended scan rate for each sweep. If not provided this attribute is set to None, indicating this parameter is not available.

  • ~RadarSpectra.rays_are_indexed (dict or None) – Indication of whether ray angles are indexed to a regular grid in each sweep. If not provided this attribute is set to None, indicating ray angle spacing is not determined.

  • ~RadarSpectra.ray_angle_res (dict or None) – If rays_are_indexed is not None, this provides the angular resolution of the grid. If not provided or available this attribute is set to None.

  • ~RadarSpectra.azimuth (dict) – Azimuth of antenna, relative to true North. Azimuth angles are recommended to be expressed in the range of [0, 360], but other representations are not forbidden.

  • ~RadarSpectra.elevation (dict) – Elevation of antenna, relative to the horizontal plane. Elevation angles are recommended to be expressed in the range of [-180, 180], but other representations are not forbidden.

  • gate_z (gate_x, gate_y,) – Location of each gate in a Cartesian coordinate system assuming a standard atmosphere with a 4/3 Earth’s radius model. The data keys of these attributes are create upon first access from the data in the range, azimuth and elevation attributes. If these attributes are changed use init_gate_x_y_z() to reset.

  • gate_latitude (gate_longitude,) – Geographic location of each gate. The projection parameter(s) defined in the projection attribute are used to perform an inverse map projection from the Cartesian gate locations relative to the radar location to longitudes and latitudes. If these attributes are changed use init_gate_longitude_latitude() to reset the attributes.

  • ~RadarSpectra.projection (dic or str) – Projection parameters defining the map projection used to transform from Cartesian to geographic coordinates. The default dictionary sets the ‘proj’ key to ‘pyart_aeqd’ indicating that the native Py-ART azimuthal equidistant projection is used. This can be modified to specify a valid pyproj.Proj projparams dictionary or string. The special key ‘_include_lon_0_lat_0’ is removed when interpreting this dictionary. If this key is present and set to True, which is required when proj=’pyart_aeqd’, then the radar longitude and latitude will be added to the dictionary as ‘lon_0’ and ‘lat_0’.

  • ~RadarSpectra.gate_altitude (LazyLoadDict) – The altitude of each radar gate as calculated from the altitude of the radar and the Cartesian z location of each gate. If this attribute is changed use init_gate_altitude() to reset the attribute.

  • ~RadarSpectra.scan_rate (dict or None) – Actual antenna scan rate. If not provided this attribute is set to None, indicating this parameter is not available.

  • ~RadarSpectra.antenna_transition (dict or None) – Flag indicating if the antenna is in transition, 1 = yes, 0 = no. If not provided this attribute is set to None, indicating this parameter is not available.

  • ~RadarSpectra.rotation (dict or None) – The rotation angle of the antenna. The angle about the aircraft longitudinal axis for a vertically scanning radar.

  • ~RadarSpectra.tilt (dict or None) – The tilt angle with respect to the plane orthogonal (Z-axis) to aircraft longitudinal axis.

  • ~RadarSpectra.roll (dict or None) – The roll angle of platform, for aircraft right wing down is positive.

  • ~RadarSpectra.drift (dict or None) – Drift angle of antenna, the angle between heading and track.

  • ~RadarSpectra.heading (dict or None) – Heading (compass) angle, clockwise from north.

  • ~RadarSpectra.pitch (dict or None) – Pitch angle of antenna, for aircraft nose up is positive.

  • ~RadarSpectra.georefs_applied (dict or None) – Indicates whether the variables have had georeference calculation applied. Leading to Earth-centric azimuth and elevation angles.

  • ~RadarSpectra.instrument_parameters (dict of dicts or None) – Instrument parameters, if not provided this attribute is set to None, indicating these parameters are not avaiable. This dictionary also includes variables in the radar_parameters CF/Radial subconvention.

  • ~RadarSpectra.radar_calibration (dict of dicts or None) – Instrument calibration parameters. If not provided this attribute is set to None, indicating these parameters are not available

  • ~RadarSpectra.ngates (int) – Number of gates (bins) in a ray.

  • ~RadarSpectra.nrays (int) – Number of rays in the volume.

  • ~RadarSpectra.nsweeps (int) – Number of sweep in the volume.

check_field_exists(field_name)

Check that a field exists in the fields dictionary.

get_end(sweep)

Return the ending ray for a given sweep.

get_slice(sweep)

Return a slice for selecting rays for a given sweep.

get_start(sweep)

Return the starting ray index for a given sweep.

get_start_end(sweep)

Return the starting and ending ray for a given sweep.

init_gate_altitude()

Initialize the gate_altitude attribute.

init_gate_longitude_latitude()

Initialize or reset the gate_longitude and gate_latitude attributes.

init_gate_x_y_z()

Initialize or reset the gate_{x, y, z} attributes.

init_rays_per_sweep()

Initialize or reset the rays_per_sweep attribute.

iter_azimuth()

Return an iterator which returns sweep azimuth data.

iter_elevation()

Return an iterator which returns sweep elevation data.

iter_end()

Return an iterator over the sweep end indices.

iter_field(field_name)

Return an iterator which returns sweep field data.

iter_slice()

Return an iterator which returns sweep slice objects.

iter_start()

Return an iterator over the sweep start indices.

iter_start_end()

Return an iterator over the sweep start and end indices.

to_vpt()

Returns a simple Radar object in VPT scan type with spectra moments such as reflectivity and mean velocity.

altitude

azimuth

elevation

fields

fixed_angle

gate_altitude

gate_latitude

gate_longitude

gate_x

gate_y

gate_z

latitude

longitude

ngates

npulses_max

nrays

nsweeps

projection

range

rays_per_sweep

scan_type

sweep_end_ray_index

sweep_mode

sweep_number

sweep_start_ray_index

time

velocity_bins