One of Py-ART most useful features is the ability to read in radar data from a number of formats.
As of version 1.5.0, Py-ART has full support for reading the following formats:
NetCDF files formatted to meet the CfRadial conventions.
Sigmet/IRIS, for example raw files from the ARM XSAPR radars.
MDV, for example raw files from the ARM CSAPR radars.
Universal Format (UF) files.
NEXRAD level 2 and 3 files available from NCDC.
NEXRAD level 2 files converted using Unidata's NetCDF-Java library.
Files from the CSU-CHILL radar.
Any format supported by NASA's TRMM RSL library.
Additionally Py-ART has partial support for reading the following formats:
HDF5 files following the WMO's ODIM_H5 standard.
HDF5 produced by GAMIC radars.
NetCDF files from:
Any format supported by or RadX.
Py-ART is continually being improved with support to read in additional format. If your favorite format is missing, talk to us, we might be able to help you add support for it.
Import matplotlib and Py-ART
%matplotlib inline
import matplotlib
matplotlib.rcParams['figure.figsize'] = [12.0, 9.0]
import pyart
Lets read in some radar files. First an MDV file from an ARM XSAPR radar in the Southern Great Plains
radar = pyart.io.read_mdv('data/110635.mdv')
Plotting the reflectivity data.
display = pyart.graph.RadarDisplay(radar)
display.plot('reflectivity', vmin=-16, vmax=80, cmap='pyart_NWSRef')
Similarly a Sigmet/IRIS file from the ARM XSAPR radar in the SGP can be read.
radar = pyart.io.read_sigmet('data/XSW110520113537.RAW7HHL')
display = pyart.graph.RadarDisplay(radar)
display.plot('reflectivity', vmin=-32, vmax=80, cmap='pyart_NWSRef')
And the same for a NEXRAD Level 2 file from the radar in Upton, NY. Notice that the file is compressed using GZip. Py-ART will uncompress file transparently during the read.
radar = pyart.io.read_nexrad_archive('data/KOKX20110828_072107_V03.gz')
display = pyart.graph.RadarDisplay(radar)
display.plot('reflectivity', vmin=0, vmax=80, cmap='pyart_NWSRef')
Py-ART has partial support for reading files from ARM's KAZR radar. Since the support is partial use the function in the pyart.aux_io namespace.
radar = pyart.aux_io.read_kazr('data/sgpkazrhiC1.a1.20110503.000001.cdf')
display = pyart.graph.RadarDisplay(radar)
display.plot('reflectivity_xpol', vmin=-70, vmax=0)
Remembering to use the correct pyart.io.read_filetype
function for the file you are reading can be hard, so Py-ART provides the pyart.io.read
function that will examine the file, guess the type and call the correct read function.
radar = pyart.io.read('data/110635.mdv')
# try the pyart.io.read function with othe other files used thus far..
The read
function will not read data from file which Py-ART only partially supports. To read these files you must use the pyart.aux_io.read_filetype
functions.
All of these read functions return a Radar instance, which will be discussed in detail in the next notebook.
As we saw in the last notebook the info
method of the Radar class can provide details on the data stored in the object.
radar.info()
altitude: data: <ndarray of type: float64 and shape: (1,)> units: meters long_name: Altitude standard_name: Altitude positive: up altitude_agl: None antenna_transition: None azimuth: data: <ndarray of type: float64 and shape: (6120,)> comment: Azimuth of antenna relative to true north long_name: azimuth_angle_from_true_north standard_name: beam_azimuth_angle units: degrees axis: radial_azimuth_coordinate elevation: data: <ndarray of type: float64 and shape: (6120,)> comment: Elevation of antenna relative to the horizontal plane long_name: elevation_angle_from_horizontal_plane standard_name: beam_elevation_angle units: degrees axis: radial_elevation_coordinate fields: differential_phase: data: <ndarray of type: float32 and shape: (6120, 983)> long_name: Differential phase (PhiDP) valid_min: -180.0 _FillValue: -9999.0 units: degrees valid_max: 180.0 standard_name: differential_phase_hv coordinates: elevation azimuth range cross_correlation_ratio: data: <ndarray of type: float32 and shape: (6120, 983)> long_name: Cross correlation ratio (RHOHV) valid_min: 0.0 _FillValue: -9999.0 units: ratio valid_max: 1.0 standard_name: cross_correlation_ratio_hv coordinates: elevation azimuth range normalized_coherent_power: data: <ndarray of type: float32 and shape: (6120, 983)> comment: Also know as signal quality index (SQI) long_name: Normalized coherent power valid_min: 0.0 _FillValue: -9999.0 units: ratio valid_max: 1.0 standard_name: normalized_coherent_power coordinates: elevation azimuth range spectrum_width: data: <ndarray of type: float32 and shape: (6120, 983)> _FillValue: -9999.0 coordinates: elevation azimuth range long_name: Doppler spectrum width standard_name: doppler_spectrum_width units: meters_per_second reflectivity: data: <ndarray of type: float32 and shape: (6120, 983)> _FillValue: -9999.0 coordinates: elevation azimuth range long_name: Reflectivity standard_name: equivalent_reflectivity_factor units: dBZ differential_reflectivity: data: <ndarray of type: float32 and shape: (6120, 983)> _FillValue: -9999.0 coordinates: elevation azimuth range long_name: Differential reflectivity standard_name: log_differential_reflectivity_hv units: dB specific_differential_phase: data: <ndarray of type: float32 and shape: (6120, 983)> _FillValue: -9999.0 coordinates: elevation azimuth range long_name: Specific differential phase (KDP) standard_name: specific_differential_phase_hv units: degrees/km velocity: data: <ndarray of type: float32 and shape: (6120, 983)> _FillValue: -9999.0 coordinates: elevation azimuth range long_name: Mean dopper velocity standard_name: radial_velocity_of_scatterers_away_from_instrument units: meters_per_second fixed_angle: data: <ndarray of type: float32 and shape: (17,)> units: degrees long_name: Target angle for sweep standard_name: target_fixed_angle instrument_parameters: radar_beam_width_h: data: <ndarray of type: float32 and shape: (1,)> units: degrees meta_group: radar_parameters long_name: Antenna beam width H polarization unambiguous_range: data: <ndarray of type: float32 and shape: (6120,)> units: meters meta_group: instrument_parameters comments: Unambiguous range long_name: Unambiguous range prt: data: <ndarray of type: float32 and shape: (6120,)> units: seconds meta_group: instrument_parameters comments: Pulse repetition time. For staggered prt, also see prt_ratio. long_name: Pulse repetition time nyquist_velocity: data: <ndarray of type: float32 and shape: (6120,)> units: meters_per_second meta_group: instrument_parameters comments: Unambiguous velocity long_name: Nyquist velocity prt_mode: data: <ndarray of type: |S5 and shape: (17,)> units: unitless meta_group: instrument_parameters comments: Pulsing mode Options are: "fixed", "staggered", "dual". Assumed "fixed" if missing. long_name: Pulsing mode radar_beam_width_v: data: <ndarray of type: float32 and shape: (1,)> units: degrees meta_group: radar_parameters long_name: Antenna beam width V polarization latitude: data: <ndarray of type: float64 and shape: (1,)> units: degrees_north long_name: Latitude standard_name: Latitude longitude: data: <ndarray of type: float64 and shape: (1,)> units: degrees_east long_name: Longitude standard_name: Longitude nsweeps: 17 ngates: 983 nrays: 6120 radar_calibration: None range: data: <ndarray of type: float32 and shape: (983,)> comment: Coordinate variable for range. Range to center of each bin. long_name: range_to_measurement_volume standard_name: projection_range_coordinate meters_to_center_of_first_gate: 117.878 meters_between_gates: 119.917 units: meters spacing_is_constant: true axis: radial_range_coordinate scan_rate: None scan_type: ppi sweep_end_ray_index: data: <ndarray of type: int32 and shape: (17,)> units: count long_name: Index of last ray in sweep, 0-based sweep_mode: data: <ndarray of type: |S20 and shape: (17,)> units: unitless long_name: Sweep mode standard_name: sweep_mode comment: Options are: "sector", "coplane", "rhi", "vertical_pointing", "idle", "azimuth_surveillance", "elevation_surveillance", "sunscan", "pointing", "manual_ppi", "manual_rhi" sweep_number: data: <ndarray of type: int32 and shape: (17,)> units: count long_name: Sweep number standard_name: sweep_number sweep_start_ray_index: data: <ndarray of type: int32 and shape: (17,)> units: count long_name: Index of first ray in sweep, 0-based target_scan_rate: None time: data: <ndarray of type: float64 and shape: (6120,)> comment: Coordinate variable for time. Time at the center of each ray, in fractional seconds since the global variable time_coverage_start long_name: time_in_seconds_since_volume_start standard_name: time units: seconds since 2011-05-20T11:01:00Z calendar: gregorian metadata: comment: title: Conventions: CF/Radial instrument_parameters source: MDV radar volume file created by Dsr2Vol. version: 1.3 references: instrument_name: ARM SGP C-SAPR institution: history:
This feature is very useful to quickly detemine what data is contained in a file. For this reason the command line program, radar_info, will also provide this information.
# ! indicate that a command will be execute from a shell not Juypter
# The results are printed here.
!radar_info -s data/110635.mdv
altitude: data: <ndarray of type: float64 and shape: (1,)> units: meters long_name: Altitude standard_name: Altitude positive: up altitude_agl: None antenna_transition: None azimuth: data: <ndarray of type: float64 and shape: (6120,)> comment: Azimuth of antenna relative to true north long_name: azimuth_angle_from_true_north standard_name: beam_azimuth_angle units: degrees axis: radial_azimuth_coordinate elevation: data: <ndarray of type: float64 and shape: (6120,)> comment: Elevation of antenna relative to the horizontal plane long_name: elevation_angle_from_horizontal_plane standard_name: beam_elevation_angle units: degrees axis: radial_elevation_coordinate fields: differential_phase: data: <ndarray of type: float32 and shape: (6120, 983)> long_name: Differential phase (PhiDP) valid_min: -180.0 _FillValue: -9999.0 units: degrees valid_max: 180.0 standard_name: differential_phase_hv coordinates: elevation azimuth range cross_correlation_ratio: data: <ndarray of type: float32 and shape: (6120, 983)> long_name: Cross correlation ratio (RHOHV) valid_min: 0.0 _FillValue: -9999.0 units: ratio valid_max: 1.0 standard_name: cross_correlation_ratio_hv coordinates: elevation azimuth range normalized_coherent_power: data: <ndarray of type: float32 and shape: (6120, 983)> comment: Also know as signal quality index (SQI) long_name: Normalized coherent power valid_min: 0.0 _FillValue: -9999.0 units: ratio valid_max: 1.0 standard_name: normalized_coherent_power coordinates: elevation azimuth range spectrum_width: data: <ndarray of type: float32 and shape: (6120, 983)> _FillValue: -9999.0 coordinates: elevation azimuth range long_name: Doppler spectrum width standard_name: doppler_spectrum_width units: meters_per_second reflectivity: data: <ndarray of type: float32 and shape: (6120, 983)> _FillValue: -9999.0 coordinates: elevation azimuth range long_name: Reflectivity standard_name: equivalent_reflectivity_factor units: dBZ differential_reflectivity: data: <ndarray of type: float32 and shape: (6120, 983)> _FillValue: -9999.0 coordinates: elevation azimuth range long_name: Differential reflectivity standard_name: log_differential_reflectivity_hv units: dB specific_differential_phase: data: <ndarray of type: float32 and shape: (6120, 983)> _FillValue: -9999.0 coordinates: elevation azimuth range long_name: Specific differential phase (KDP) standard_name: specific_differential_phase_hv units: degrees/km velocity: data: <ndarray of type: float32 and shape: (6120, 983)> _FillValue: -9999.0 coordinates: elevation azimuth range long_name: Mean dopper velocity standard_name: radial_velocity_of_scatterers_away_from_instrument units: meters_per_second fixed_angle: data: <ndarray of type: float32 and shape: (17,)> units: degrees long_name: Target angle for sweep standard_name: target_fixed_angle instrument_parameters: radar_beam_width_h: data: <ndarray of type: float32 and shape: (1,)> units: degrees meta_group: radar_parameters long_name: Antenna beam width H polarization unambiguous_range: data: <ndarray of type: float32 and shape: (6120,)> units: meters meta_group: instrument_parameters comments: Unambiguous range long_name: Unambiguous range prt: data: <ndarray of type: float32 and shape: (6120,)> units: seconds meta_group: instrument_parameters comments: Pulse repetition time. For staggered prt, also see prt_ratio. long_name: Pulse repetition time nyquist_velocity: data: <ndarray of type: float32 and shape: (6120,)> units: meters_per_second meta_group: instrument_parameters comments: Unambiguous velocity long_name: Nyquist velocity prt_mode: data: <ndarray of type: |S5 and shape: (17,)> units: unitless meta_group: instrument_parameters comments: Pulsing mode Options are: "fixed", "staggered", "dual". Assumed "fixed" if missing. long_name: Pulsing mode radar_beam_width_v: data: <ndarray of type: float32 and shape: (1,)> units: degrees meta_group: radar_parameters long_name: Antenna beam width V polarization latitude: data: <ndarray of type: float64 and shape: (1,)> units: degrees_north long_name: Latitude standard_name: Latitude longitude: data: <ndarray of type: float64 and shape: (1,)> units: degrees_east long_name: Longitude standard_name: Longitude nsweeps: 17 ngates: 983 nrays: 6120 radar_calibration: None range: data: <ndarray of type: float32 and shape: (983,)> comment: Coordinate variable for range. Range to center of each bin. long_name: range_to_measurement_volume standard_name: projection_range_coordinate meters_to_center_of_first_gate: 117.878 meters_between_gates: 119.917 units: meters spacing_is_constant: true axis: radial_range_coordinate scan_rate: None scan_type: ppi sweep_end_ray_index: data: <ndarray of type: int32 and shape: (17,)> units: count long_name: Index of last ray in sweep, 0-based sweep_mode: data: <ndarray of type: |S20 and shape: (17,)> units: unitless long_name: Sweep mode standard_name: sweep_mode comment: Options are: "sector", "coplane", "rhi", "vertical_pointing", "idle", "azimuth_surveillance", "elevation_surveillance", "sunscan", "pointing", "manual_ppi", "manual_rhi" sweep_number: data: <ndarray of type: int32 and shape: (17,)> units: count long_name: Sweep number standard_name: sweep_number sweep_start_ray_index: data: <ndarray of type: int32 and shape: (17,)> units: count long_name: Index of first ray in sweep, 0-based target_scan_rate: None time: data: <ndarray of type: float64 and shape: (6120,)> comment: Coordinate variable for time. Time at the center of each ray, in fractional seconds since the global variable time_coverage_start long_name: time_in_seconds_since_volume_start standard_name: time units: seconds since 2011-05-20T11:01:00Z calendar: gregorian metadata: comment: title: Conventions: CF/Radial instrument_parameters source: MDV radar volume file created by Dsr2Vol. version: 1.3 references: instrument_name: ARM SGP C-SAPR institution: history:
Optional arguments provided to the read
function allow control over what and how data is read from the file. Details on these parameters are outline the the documenation of the pyart.io.read function.
A text version of this documenation can be access in Jupyter by addding a '?' to the function
pyart.io.read?
Many of the parameters of this function control how the fields are named. By default Py-ART uses settings in a configuration file to map between the fields in the raw file and a standard set of names. This can be controlled at many levels.
The file_field_names parameter is useful to completely disable this mapping.
radar = pyart.io.read('data/XSW110520113537.RAW7HHL', file_field_names=False)
for field_name in radar.fields.keys():
print field_name
radar_echo_classification corrected_reflectivity differential_phase cross_correlation_ratio normalized_coherent_power spectrum_width total_power reflectivity differential_reflectivity specific_differential_phase velocity corrected_differential_reflectivity
radar = pyart.io.read('data/XSW110520113537.RAW7HHL', file_field_names=True)
for field_name in radar.fields.keys():
print field_name
ZDRC2 SQI2 DBZ2 WIDTH2 KDP2 DBT2 RHOHV2 DBZC2 ZDR2 HCLASS2 PHIDP2 VEL2
The field_names parameter can be used to provide a custom mapping from the fields in the file to custom field names.
custom_mapping = {
'DBZ2': 'refl',
'VEL2': 'vel',
'WIDTH2': 'width',
'SQI2': 'sqi',
'PHIDP2': None,
}
radar = pyart.io.read('data/XSW110520113537.RAW7HHL', field_names=custom_mapping)
for field_name in radar.fields.keys():
print field_name
width sqi vel refl
To override the default name mappings and other configuartion options for an entire session use the pyart.load_config function at the top of a Python script/session. Setting the PYART_CONFIG environmental variable to a configuration file will load this configuration everytime Py-ART is imported.
The exclude_fields parameter will prevent the specified fields from being read.
radar = pyart.io.read('data/XSW110520113537.RAW7HHL')
for field_name in radar.fields.keys():
print field_name
radar_echo_classification corrected_reflectivity differential_phase cross_correlation_ratio normalized_coherent_power spectrum_width total_power reflectivity differential_reflectivity specific_differential_phase velocity corrected_differential_reflectivity
radar = pyart.io.read('data/XSW110520113537.RAW7HHL',
exclude_fields=['normalized_coherent_power'])
for field_name in radar.fields.keys():
print field_name
radar_echo_classification corrected_reflectivity differential_phase cross_correlation_ratio spectrum_width total_power reflectivity differential_reflectivity specific_differential_phase velocity corrected_differential_reflectivity
custom_mapping = {
'DBZ2': 'refl',
'VEL2': 'vel',
'WIDTH2': 'width',
'SQI2': 'sqi',
'PHIDP2': None,
}
radar = pyart.io.read('data/XSW110520113537.RAW7HHL',
field_names=custom_mapping, exclude_fields=['sqi'])
for field_name in radar.fields.keys():
print field_name
width vel refl
Setting the delay_field_loading argument to True
will delay the loading of all field data from the file. For certain file formats this can significantly reduce memory usage and the time required to read a file. Not all formats support this parameter and will issue a warning.
radar = pyart.io.read('data/sgpwsacrcwrhiC1.a1.20120820.204016.nc', delay_field_loading=True)
radar = pyart.io.read('data/XSW110520113537.RAW7HHL', delay_field_loading=True)
/Users/jhelmus/anaconda/envs/ams_course/lib/python2.7/site-packages/pyart/io/common.py:106: UserWarning: Unexpected arguments: ['delay_field_loading'] warnings.warn('Unexpected arguments: %s' % dic.keys())
Py-ART can write out as NetCDF files which follow the Cf/Radial convention using the pyart.io.write_cfradial
function.
radar = pyart.io.read('data/XSW110520113537.RAW7HHL')
pyart.io.write_cfradial('converted_sigmet_file.nc', radar)
!ncdump -h converted_sigmet_file.nc
netcdf converted_sigmet_file { dimensions: time = UNLIMITED ; // (4278 currently) range = 534 ; sweep = 6 ; string_length = 32 ; variables: double time(time) ; time:long_name = "time_in_seconds_since_volume_start" ; time:units = "seconds since 2011-05-20T11:35:37Z" ; time:comment = "Coordinate variable for time. Time at the center of each ray, in fractional seconds since the global variable time_coverage_start" ; time:standard_name = "time" ; time:calendar = "gregorian" ; float range(range) ; range:long_name = "range_to_measurement_volume" ; range:units = "meters" ; range:comment = "Coordinate variable for range. Range to center of each bin." ; range:standard_name = "projection_range_coordinate" ; range:meters_to_center_of_first_gate = 0.f ; range:meters_between_gates = 75.f ; range:spacing_is_constant = "true" ; range:axis = "radial_range_coordinate" ; float azimuth(time) ; azimuth:long_name = "azimuth_angle_from_true_north" ; azimuth:units = "degrees" ; azimuth:comment = "Azimuth of antenna relative to true north" ; azimuth:standard_name = "beam_azimuth_angle" ; azimuth:axis = "radial_azimuth_coordinate" ; float elevation(time) ; elevation:long_name = "elevation_angle_from_horizontal_plane" ; elevation:units = "degrees" ; elevation:comment = "Elevation of antenna relative to the horizontal plane" ; elevation:standard_name = "beam_elevation_angle" ; elevation:axis = "radial_elevation_coordinate" ; float radar_echo_classification(time, range) ; radar_echo_classification:long_name = "Radar Echo classification" ; radar_echo_classification:units = "legend" ; radar_echo_classification:_FillValue = -9999.f ; radar_echo_classification:coordinates = "elevation azimuth range" ; radar_echo_classification:standard_name = "radar_echo_classification" ; float corrected_reflectivity(time, range) ; corrected_reflectivity:long_name = "Corrected reflectivity" ; corrected_reflectivity:units = "dBZ" ; corrected_reflectivity:_FillValue = -9999.f ; corrected_reflectivity:coordinates = "elevation azimuth range" ; corrected_reflectivity:standard_name = "corrected_equivalent_reflectivity_factor" ; float differential_phase(time, range) ; differential_phase:long_name = "Differential phase (PhiDP)" ; differential_phase:units = "degrees" ; differential_phase:_FillValue = -9999.f ; differential_phase:valid_min = -180. ; differential_phase:valid_max = 180. ; differential_phase:standard_name = "differential_phase_hv" ; differential_phase:coordinates = "elevation azimuth range" ; float cross_correlation_ratio(time, range) ; cross_correlation_ratio:long_name = "Cross correlation ratio (RHOHV)" ; cross_correlation_ratio:units = "ratio" ; cross_correlation_ratio:_FillValue = -9999.f ; cross_correlation_ratio:valid_min = 0. ; cross_correlation_ratio:valid_max = 1. ; cross_correlation_ratio:standard_name = "cross_correlation_ratio_hv" ; cross_correlation_ratio:coordinates = "elevation azimuth range" ; float normalized_coherent_power(time, range) ; normalized_coherent_power:long_name = "Normalized coherent power" ; normalized_coherent_power:units = "ratio" ; normalized_coherent_power:_FillValue = -9999.f ; normalized_coherent_power:comment = "Also know as signal quality index (SQI)" ; normalized_coherent_power:valid_min = 0. ; normalized_coherent_power:valid_max = 1. ; normalized_coherent_power:standard_name = "normalized_coherent_power" ; normalized_coherent_power:coordinates = "elevation azimuth range" ; float spectrum_width(time, range) ; spectrum_width:long_name = "Doppler spectrum width" ; spectrum_width:units = "meters_per_second" ; spectrum_width:_FillValue = -9999.f ; spectrum_width:coordinates = "elevation azimuth range" ; spectrum_width:standard_name = "doppler_spectrum_width" ; float total_power(time, range) ; total_power:long_name = "Total power" ; total_power:units = "dBZ" ; total_power:_FillValue = -9999.f ; total_power:coordinates = "elevation azimuth range" ; total_power:standard_name = "equivalent_reflectivity_factor" ; float reflectivity(time, range) ; reflectivity:long_name = "Reflectivity" ; reflectivity:units = "dBZ" ; reflectivity:_FillValue = -9999.f ; reflectivity:coordinates = "elevation azimuth range" ; reflectivity:standard_name = "equivalent_reflectivity_factor" ; float differential_reflectivity(time, range) ; differential_reflectivity:long_name = "Differential reflectivity" ; differential_reflectivity:units = "dB" ; differential_reflectivity:_FillValue = -9999.f ; differential_reflectivity:coordinates = "elevation azimuth range" ; differential_reflectivity:standard_name = "log_differential_reflectivity_hv" ; float specific_differential_phase(time, range) ; specific_differential_phase:long_name = "Specific differential phase (KDP)" ; specific_differential_phase:units = "degrees/km" ; specific_differential_phase:_FillValue = -9999.f ; specific_differential_phase:coordinates = "elevation azimuth range" ; specific_differential_phase:standard_name = "specific_differential_phase_hv" ; float velocity(time, range) ; velocity:long_name = "Mean dopper velocity" ; velocity:units = "meters_per_second" ; velocity:_FillValue = -9999.f ; velocity:coordinates = "elevation azimuth range" ; velocity:standard_name = "radial_velocity_of_scatterers_away_from_instrument" ; float corrected_differential_reflectivity(time, range) ; corrected_differential_reflectivity:long_name = "Corrected differential reflectivity" ; corrected_differential_reflectivity:units = "dB" ; corrected_differential_reflectivity:_FillValue = -9999.f ; corrected_differential_reflectivity:coordinates = "elevation azimuth range" ; corrected_differential_reflectivity:standard_name = "corrected_log_differential_reflectivity_hv" ; int sweep_number(sweep) ; sweep_number:long_name = "Sweep number" ; sweep_number:units = "count" ; sweep_number:standard_name = "sweep_number" ; float fixed_angle(sweep) ; fixed_angle:long_name = "Target angle for sweep" ; fixed_angle:units = "degrees" ; fixed_angle:standard_name = "target_fixed_angle" ; int sweep_start_ray_index(sweep) ; sweep_start_ray_index:long_name = "Index of first ray in sweep, 0-based" ; sweep_start_ray_index:units = "count" ; int sweep_end_ray_index(sweep) ; sweep_end_ray_index:long_name = "Index of last ray in sweep, 0-based" ; sweep_end_ray_index:units = "count" ; char sweep_mode(sweep, string_length) ; sweep_mode:long_name = "Sweep mode" ; sweep_mode:units = "unitless" ; sweep_mode:standard_name = "sweep_mode" ; sweep_mode:comment = "Options are: \"sector\", \"coplane\", \"rhi\", \"vertical_pointing\", \"idle\", \"azimuth_surveillance\", \"elevation_surveillance\", \"sunscan\", \"pointing\", \"manual_ppi\", \"manual_rhi\"" ; char prt_mode(sweep, string_length) ; prt_mode:long_name = "Pulsing mode" ; prt_mode:units = "unitless" ; prt_mode:meta_group = "instrument_parameters" ; prt_mode:comments = "Pulsing mode Options are: \"fixed\", \"staggered\", \"dual\". Assumed \"fixed\" if missing." ; float unambiguous_range(time) ; unambiguous_range:long_name = "Unambiguous range" ; unambiguous_range:units = "meters" ; unambiguous_range:meta_group = "instrument_parameters" ; unambiguous_range:comments = "Unambiguous range" ; float pulse_width(time) ; pulse_width:long_name = "Pulse width" ; pulse_width:units = "seconds" ; pulse_width:meta_group = "instrument_parameters" ; pulse_width:comments = "Pulse width" ; float prt(time) ; prt:long_name = "Pulse repetition time" ; prt:units = "seconds" ; prt:meta_group = "instrument_parameters" ; prt:comments = "Pulse repetition time. For staggered prt, also see prt_ratio." ; float nyquist_velocity(time) ; nyquist_velocity:long_name = "Nyquist velocity" ; nyquist_velocity:units = "meters_per_second" ; nyquist_velocity:meta_group = "instrument_parameters" ; nyquist_velocity:comments = "Unambiguous velocity" ; float radar_beam_width_h ; radar_beam_width_h:long_name = "Antenna beam width H polarization" ; radar_beam_width_h:units = "degrees" ; radar_beam_width_h:meta_group = "radar_parameters" ; float radar_beam_width_v ; radar_beam_width_v:long_name = "Antenna beam width V polarization" ; radar_beam_width_v:units = "degrees" ; radar_beam_width_v:meta_group = "radar_parameters" ; double latitude ; latitude:long_name = "Latitude" ; latitude:units = "degrees_north" ; latitude:standard_name = "Latitude" ; double longitude ; longitude:long_name = "Longitude" ; longitude:units = "degrees_east" ; longitude:standard_name = "Longitude" ; double altitude ; altitude:long_name = "Altitude" ; altitude:units = "meters" ; altitude:standard_name = "Altitude" ; altitude:positive = "up" ; char time_coverage_start(string_length) ; time_coverage_start:long_name = "UTC time of first ray in the file" ; time_coverage_start:units = "unitless" ; char time_coverage_end(string_length) ; time_coverage_end:long_name = "UTC time of last ray in the file" ; time_coverage_end:units = "unitless" ; char time_reference(string_length) ; time_reference:long_name = "UTC time reference" ; time_reference:units = "unitless" ; int volume_number ; volume_number:long_name = "Volume number" ; volume_number:units = "unitless" ; // global attributes: :comment = "" ; :sigmet_task_name = "MC3E_CLD_RHI" ; :title = "" ; :sigmet_extended_header = "false" ; :Conventions = "CF/Radial instrument_parameters" ; :source = "" ; :version = "1.3" ; :references = "" ; :time_ordered = "none" ; :instrument_name = "xsapr-sgpr2" ; :rays_missing = 0L ; :institution = "" ; :original_container = "sigmet" ; :field_names = "radar_echo_classification, corrected_reflectivity, differential_phase, cross_correlation_ratio, normalized_coherent_power, spectrum_width, total_power, reflectivity, differential_reflectivity, specific_differential_phase, velocity, corrected_differential_reflectivity" ; :history = "" ; }
A command line tool to perform this conversion is also included with Py-ART.
!anytocfradial data/110635.mdv converted_mdv_file.nc
!ncdump -h converted_mdv_file.nc
netcdf converted_mdv_file { dimensions: time = UNLIMITED ; // (6120 currently) range = 983 ; sweep = 17 ; string_length = 32 ; variables: double time(time) ; time:long_name = "time_in_seconds_since_volume_start" ; time:units = "seconds since 2011-05-20T11:01:00Z" ; time:comment = "Coordinate variable for time. Time at the center of each ray, in fractional seconds since the global variable time_coverage_start" ; time:standard_name = "time" ; time:calendar = "gregorian" ; float range(range) ; range:long_name = "range_to_measurement_volume" ; range:units = "meters" ; range:comment = "Coordinate variable for range. Range to center of each bin." ; range:standard_name = "projection_range_coordinate" ; range:meters_to_center_of_first_gate = 117.8784f ; range:meters_between_gates = 119.917f ; range:spacing_is_constant = "true" ; range:axis = "radial_range_coordinate" ; double azimuth(time) ; azimuth:long_name = "azimuth_angle_from_true_north" ; azimuth:units = "degrees" ; azimuth:comment = "Azimuth of antenna relative to true north" ; azimuth:standard_name = "beam_azimuth_angle" ; azimuth:axis = "radial_azimuth_coordinate" ; double elevation(time) ; elevation:long_name = "elevation_angle_from_horizontal_plane" ; elevation:units = "degrees" ; elevation:comment = "Elevation of antenna relative to the horizontal plane" ; elevation:standard_name = "beam_elevation_angle" ; elevation:axis = "radial_elevation_coordinate" ; float differential_phase(time, range) ; differential_phase:long_name = "Differential phase (PhiDP)" ; differential_phase:units = "degrees" ; differential_phase:_FillValue = -9999.f ; differential_phase:valid_min = -180. ; differential_phase:valid_max = 180. ; differential_phase:standard_name = "differential_phase_hv" ; differential_phase:coordinates = "elevation azimuth range" ; float cross_correlation_ratio(time, range) ; cross_correlation_ratio:long_name = "Cross correlation ratio (RHOHV)" ; cross_correlation_ratio:units = "ratio" ; cross_correlation_ratio:_FillValue = -9999.f ; cross_correlation_ratio:valid_min = 0. ; cross_correlation_ratio:valid_max = 1. ; cross_correlation_ratio:standard_name = "cross_correlation_ratio_hv" ; cross_correlation_ratio:coordinates = "elevation azimuth range" ; float normalized_coherent_power(time, range) ; normalized_coherent_power:long_name = "Normalized coherent power" ; normalized_coherent_power:units = "ratio" ; normalized_coherent_power:_FillValue = -9999.f ; normalized_coherent_power:comment = "Also know as signal quality index (SQI)" ; normalized_coherent_power:valid_min = 0. ; normalized_coherent_power:valid_max = 1. ; normalized_coherent_power:standard_name = "normalized_coherent_power" ; normalized_coherent_power:coordinates = "elevation azimuth range" ; float spectrum_width(time, range) ; spectrum_width:long_name = "Doppler spectrum width" ; spectrum_width:units = "meters_per_second" ; spectrum_width:_FillValue = -9999.f ; spectrum_width:coordinates = "elevation azimuth range" ; spectrum_width:standard_name = "doppler_spectrum_width" ; float reflectivity(time, range) ; reflectivity:long_name = "Reflectivity" ; reflectivity:units = "dBZ" ; reflectivity:_FillValue = -9999.f ; reflectivity:coordinates = "elevation azimuth range" ; reflectivity:standard_name = "equivalent_reflectivity_factor" ; float differential_reflectivity(time, range) ; differential_reflectivity:long_name = "Differential reflectivity" ; differential_reflectivity:units = "dB" ; differential_reflectivity:_FillValue = -9999.f ; differential_reflectivity:coordinates = "elevation azimuth range" ; differential_reflectivity:standard_name = "log_differential_reflectivity_hv" ; float specific_differential_phase(time, range) ; specific_differential_phase:long_name = "Specific differential phase (KDP)" ; specific_differential_phase:units = "degrees/km" ; specific_differential_phase:_FillValue = -9999.f ; specific_differential_phase:coordinates = "elevation azimuth range" ; specific_differential_phase:standard_name = "specific_differential_phase_hv" ; float velocity(time, range) ; velocity:long_name = "Mean dopper velocity" ; velocity:units = "meters_per_second" ; velocity:_FillValue = -9999.f ; velocity:coordinates = "elevation azimuth range" ; velocity:standard_name = "radial_velocity_of_scatterers_away_from_instrument" ; int sweep_number(sweep) ; sweep_number:long_name = "Sweep number" ; sweep_number:units = "count" ; sweep_number:standard_name = "sweep_number" ; float fixed_angle(sweep) ; fixed_angle:long_name = "Target angle for sweep" ; fixed_angle:units = "degrees" ; fixed_angle:standard_name = "target_fixed_angle" ; int sweep_start_ray_index(sweep) ; sweep_start_ray_index:long_name = "Index of first ray in sweep, 0-based" ; sweep_start_ray_index:units = "count" ; int sweep_end_ray_index(sweep) ; sweep_end_ray_index:long_name = "Index of last ray in sweep, 0-based" ; sweep_end_ray_index:units = "count" ; char sweep_mode(sweep, string_length) ; sweep_mode:long_name = "Sweep mode" ; sweep_mode:units = "unitless" ; sweep_mode:standard_name = "sweep_mode" ; sweep_mode:comment = "Options are: \"sector\", \"coplane\", \"rhi\", \"vertical_pointing\", \"idle\", \"azimuth_surveillance\", \"elevation_surveillance\", \"sunscan\", \"pointing\", \"manual_ppi\", \"manual_rhi\"" ; float radar_beam_width_h ; radar_beam_width_h:long_name = "Antenna beam width H polarization" ; radar_beam_width_h:units = "degrees" ; radar_beam_width_h:meta_group = "radar_parameters" ; float unambiguous_range(time) ; unambiguous_range:long_name = "Unambiguous range" ; unambiguous_range:units = "meters" ; unambiguous_range:meta_group = "instrument_parameters" ; unambiguous_range:comments = "Unambiguous range" ; float prt(time) ; prt:long_name = "Pulse repetition time" ; prt:units = "seconds" ; prt:meta_group = "instrument_parameters" ; prt:comments = "Pulse repetition time. For staggered prt, also see prt_ratio." ; float nyquist_velocity(time) ; nyquist_velocity:long_name = "Nyquist velocity" ; nyquist_velocity:units = "meters_per_second" ; nyquist_velocity:meta_group = "instrument_parameters" ; nyquist_velocity:comments = "Unambiguous velocity" ; char prt_mode(sweep, string_length) ; prt_mode:long_name = "Pulsing mode" ; prt_mode:units = "unitless" ; prt_mode:meta_group = "instrument_parameters" ; prt_mode:comments = "Pulsing mode Options are: \"fixed\", \"staggered\", \"dual\". Assumed \"fixed\" if missing." ; float radar_beam_width_v ; radar_beam_width_v:long_name = "Antenna beam width V polarization" ; radar_beam_width_v:units = "degrees" ; radar_beam_width_v:meta_group = "radar_parameters" ; double latitude ; latitude:long_name = "Latitude" ; latitude:units = "degrees_north" ; latitude:standard_name = "Latitude" ; double longitude ; longitude:long_name = "Longitude" ; longitude:units = "degrees_east" ; longitude:standard_name = "Longitude" ; double altitude ; altitude:long_name = "Altitude" ; altitude:units = "meters" ; altitude:standard_name = "Altitude" ; altitude:positive = "up" ; char time_coverage_start(string_length) ; time_coverage_start:long_name = "UTC time of first ray in the file" ; time_coverage_start:units = "unitless" ; char time_coverage_end(string_length) ; time_coverage_end:long_name = "UTC time of last ray in the file" ; time_coverage_end:units = "unitless" ; int volume_number ; volume_number:long_name = "Volume number" ; volume_number:units = "unitless" ; // global attributes: :comment = "" ; :title = "" ; :Conventions = "CF/Radial instrument_parameters" ; string :source = "MDV radar volume file created by Dsr2Vol." ; :version = "1.3" ; :references = "" ; string :instrument_name = "ARM SGP C-SAPR" ; :institution = "" ; :field_names = "differential_phase, cross_correlation_ratio, normalized_coherent_power, spectrum_width, reflectivity, differential_reflectivity, specific_differential_phase, velocity" ; :history = "" ; }