Weather radar offer the ability to probe large regions of the atmosphere using electromagnetic pulses.
Typically used to detect precipitation as well as track and anticipate severe weather and tornadoes.
Other uses of weather radar include studies on clouds and atmospheric systems as well as providing long-term climatological parameters.
import urllib
handle = urllib.urlopen(
'ftp://tgftp.nws.noaa.gov/SL.us008001/DF.of/'
'DC.radar/DS.p19r0/SI.kewx/sn.last')
radar = pyart.io.read_nexrad_level3(handle)
display = pyart.graph.RadarMapDisplay(radar)
display.plot_ppi_map(
'reflectivity', vmin=-32, vmax=80, cmap='pyart_NWSRef',
resolution='c', embelish=False)
display.basemap.drawcounties()
display.basemap.plot([-97.75], [30.25], 'k*', ms=15, latlon=True)
[<matplotlib.lines.Line2D at 0x10cf10f10>]
NEXRAD is a network of S-band weather radars.
Operated by the NSW, FAA and the Air Force.
Each radar provides 5-10 minute volumes
Up to 460 km radius.
History
Files contain a single, reduced resolution sweep of a single radar moment or product.
Post-processed products such as accumulated rainfall and hydrometeor classification are also provided.
NIDS formatted file which can provide data as radial images as well as other representation. Py-ART only supports radial image files.
These files are small (10's of kb). Excellent for visualization but not well suited for detailed analysis.
Near-real time and data from the last 24 hours is provided by the NWS through an anonymous FTP site: ftp://tgftp.nws.noaa.gov.
Historical data can be ordered from NOAA's National Centers for Environmental Information (NCEI), formerly the NCDC.
import pyart
radar = pyart.io.read('sample_files/KLOT_SDUS53_N0QLOT_201506151541')
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: float32 and shape: (360,)> 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: float32 and shape: (360,)> 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: reflectivity: data: <ndarray of type: float32 and shape: (360, 460)> _FillValue: -9999.0 coordinates: elevation azimuth range long_name: Reflectivity standard_name: equivalent_reflectivity_factor units: dBZ fixed_angle: data: <ndarray of type: float32 and shape: (1,)> units: degrees long_name: Target angle for sweep standard_name: target_fixed_angle instrument_parameters: None 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: 1 ngates: 460 nrays: 360 radar_calibration: None range: data: <ndarray of type: float32 and shape: (460,)> 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: 0.0 meters_between_gates: 999.0 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: (1,)> units: count long_name: Index of last ray in sweep, 0-based sweep_mode: data: <ndarray of type: |S20 and shape: (1,)> 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: (1,)> units: count long_name: Sweep number standard_name: sweep_number sweep_start_ray_index: data: <ndarray of type: int32 and shape: (1,)> units: count long_name: Index of first ray in sweep, 0-based target_scan_rate: None time: data: <ndarray of type: float64 and shape: (360,)> 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 2015-06-15T15:41:57Z calendar: gregorian metadata: comment: title: Conventions: CF/Radial instrument_parameters source: version: 1.3 references: instrument_name: original_container: NEXRAD Level 3 institution: history:
display = pyart.graph.RadarDisplay(radar)
display.plot('reflectivity', vmin=-32, vmax=64)
radar = pyart.io.read('sample_files/KLOT_SDUS33_N1PLOT_201506151541')
display = pyart.graph.RadarMapDisplay(radar)
display.plot_ppi_map('radar_estimated_rain_rate', vmin=0, vmax=0.75,
resolution='i')
Level II files contain all moments in full resolution from a complete volume consisting of 9-20 sweeps.
Provides a three-dimensional view of the atmosphere.
These are the base radar moments with little or no correction or quality control.
Larger files, ~5-25 MB. Good for detailed analysis.
Several universities and research organization make Level II data from the past few hours to days available.
Historical data can be ordered from NOAA's National Centers for Environmental Information (NCEI), formerly the NCDC.
radar = pyart.io.read('sample_files/KLOT20150615_154157_V06.gz')
display = pyart.graph.RadarDisplay(radar)
display.plot('reflectivity', vmin=-32, vmax=80, cmap='pyart_NWSRef')
radar.info('compact')
altitude: <ndarray of type: float64 and shape: (1,)> altitude_agl: None antenna_transition: None azimuth: <ndarray of type: float64 and shape: (9720,)> elevation: <ndarray of type: float32 and shape: (9720,)> fields: differential_phase: <ndarray of type: float32 and shape: (9720, 1832)> cross_correlation_ratio: <ndarray of type: float32 and shape: (9720, 1832)> spectrum_width: <ndarray of type: float32 and shape: (9720, 1832)> reflectivity: <ndarray of type: float32 and shape: (9720, 1832)> differential_reflectivity: <ndarray of type: float32 and shape: (9720, 1832)> velocity: <ndarray of type: float32 and shape: (9720, 1832)> fixed_angle: <ndarray of type: float32 and shape: (19,)> instrument_parameters: unambiguous_range: <ndarray of type: float32 and shape: (9720,)> nyquist_velocity: <ndarray of type: float32 and shape: (9720,)> latitude: <ndarray of type: float64 and shape: (1,)> longitude: <ndarray of type: float64 and shape: (1,)> nsweeps: 19 ngates: 1832 nrays: 9720 radar_calibration: None range: <ndarray of type: int64 and shape: (1832,)> scan_rate: None scan_type: ppi sweep_end_ray_index: <ndarray of type: int32 and shape: (19,)> sweep_mode: <ndarray of type: |S20 and shape: (19,)> sweep_number: <ndarray of type: int32 and shape: (19,)> sweep_start_ray_index: <ndarray of type: int32 and shape: (19,)> target_scan_rate: None time: <ndarray of type: float64 and shape: (9720,)> metadata: comment: title: Conventions: CF/Radial instrument_parameters source: version: 1.3 references: instrument_name: original_container: NEXRAD Level II institution: history:
display.plot('reflectivity', sweep=8, vmin=-32, vmax=64,
cmap='pyart_NWSRef')
display.plot('velocity', sweep=1, vmin=-32, vmax=32,
cmap='pyart_NWSVel')
Coverage in the US is sporatic.
Level III data is available available near real-time from the NWS's anonymous FTP site or historically from NCEI.
# This takes a few minutes to execute, do NOT run it in the presentation
import glob
import matplotlib.pyplot as plt
from matplotlib import animation
files = sorted(glob.glob('tdwr_files/TR1/*'))
def animate(nframe):
plt.clf()
radar = pyart.io.read(files[nframe])
display = pyart.graph.RadarDisplay(radar)
display.plot('reflectivity', vmin=-32, vmax=80, cmap='pyart_NWSRef',
title=display.time_begin.isoformat(), axislabels_flag=False)
fig = plt.figure(figsize=(10,8))
anim = animation.FuncAnimation(fig, animate, frames=len(f iles))
anim.save('tdwr_animation.gif', writer='imagemagick', fps=20)
ARM is a DOE program which provides in situ and remote sensing observatories.
Mission to improve the understanding and modeling of climate and earth system models.
All data from ARM's instruments available to the public free of charge.
Operates a number of scanning weather radars.
Data available at the ARM Data Archive.
Register and order data through a web interface.
Data staged to a FTP site.
NetCDF files provided which follow the Cf/Radial convention.
The arm_archive module provides a Python and CLI interface.
radar = pyart.io.read('sample_files/110635.mdv')
display = pyart.graph.RadarDisplay(radar)
display.plot('reflectivity', sweep=1, vmin=-32, vmax=64)
display.plot('normalized_coherent_power', sweep=1, vmin=0, vmax=1)
radar = pyart.io.read('sample_files/tmpkasacrawrhiM1.a1.20140812.071634.nc',
delay_field_loading=True)
fig = plt.figure(figsize=(16, 6))
display = pyart.graph.RadarDisplay(radar)
display.plot('reflectivity', vmin=-60, vmax=25)
radar1 = pyart.io.read('sample_files/XSE110520064117.RAW7HE4')
display = pyart.graph.RadarDisplay(radar1)
display.plot('reflectivity', vmin=0, vmax=48)
radar2 = pyart.io.read('sample_files/XSW110520064208.RAW7HE5')
display = pyart.graph.RadarDisplay(radar2)
display.plot('reflectivity', vmin=0, vmax=48)
grid = pyart.map.grid_from_radars(
(radar1, radar2), gridding_algo='map_gates_to_grid',
grid_shape=(1, 201, 201),
grid_limits=((1000, 1000), (-50000.0, 50000.0), (-60000.0, 40000.0)),
grid_origin = (36.57861, -97.363611),
fields=['reflectivity'],
refl_field='reflectivity',
max_refl=100.)
plt.imshow(grid.fields['reflectivity']['data'][0], origin='lower',
extent=(-60, 40, -50, 40), vmin=0, vmax=48)
<matplotlib.image.AxesImage at 0x111f64d10>
Contributors to Py-ART
Anderson Gama, Kirk North, Joe Hardin, Steve Nesbitt, and others
Additional open source weather radar software
This presentation has been created by UChicago Argonne, LLC, Operator of Argonne National Laboratory (โArgonneโ). Argonne, a U.S. Department of Energy Office of Science laboratory, is operated under Contract No. DE-AC02-06CH11357. This research was supported by the Office of Biological and Environmental Research of the U.S. Department of Energy as part of the Atmospheric Radiation Measurement Climate Research Facility. |