Clutter detection by using space-born cloud images#
[1]:
import numpy as np
import xarray as xr
import xradar as xd
import wradlib as wrl
import matplotlib.pyplot as plt
from osgeo import osr
try:
get_ipython().run_line_magic("matplotlib inline")
except:
plt.ion()
[ ]:
Read the radar data into DataTree#
[2]:
# read the radar volume scan
filename = "hdf5/20130429043000.rad.bewid.pvol.dbzh.scan1.hdf"
filename = wrl.util.get_wradlib_data_file(filename)
pvol = xd.io.open_odim_datatree(filename)
display(pvol)
Downloading file 'hdf5/20130429043000.rad.bewid.pvol.dbzh.scan1.hdf' from 'https://github.com/wradlib/wradlib-data/raw/pooch/data/hdf5/20130429043000.rad.bewid.pvol.dbzh.scan1.hdf' to '/home/runner/work/wradlib/wradlib/wradlib-data'.
<xarray.DatasetView> Dimensions: () Data variables: volume_number int64 0 platform_type <U5 'fixed' instrument_type <U5 'radar' time_coverage_start <U20 '2013-04-29T04:30:00Z' time_coverage_end <U20 '2013-04-29T04:31:39Z' longitude float64 5.506 altitude float64 592.0 latitude float64 49.91 Attributes: Conventions: ODIM_H5/V2_1 version: None title: None institution: None references: None source: None history: None comment: im/exported using xradar instrument_name: None
datatree.DataTree
- azimuth: 360
- range: 960
- elevation(azimuth)float32...
- standard_name :
- ray_elevation_angle
- long_name :
- elevation_angle_from_horizontal_plane
- units :
- degrees
- axis :
- radial_elevation_coordinate
[360 values with dtype=float32]
- time(azimuth)datetime64[ns]2013-04-29T04:30:00.027777792 .....
- standard_name :
- time
array(['2013-04-29T04:30:00.027777792', '2013-04-29T04:30:00.083333376', '2013-04-29T04:30:00.138888960', ..., '2013-04-29T04:30:19.861120512', '2013-04-29T04:30:19.916676096', '2013-04-29T04:30:19.972231680'], dtype='datetime64[ns]')
- range(range)float32125.0 375.0 ... 2.396e+05 2.399e+05
- units :
- meters
- standard_name :
- projection_range_coordinate
- long_name :
- range_to_measurement_volume
- axis :
- radial_range_coordinate
- meters_between_gates :
- 250.0
- spacing_is_constant :
- true
- meters_to_center_of_first_gate :
- 125.0
array([1.25000e+02, 3.75000e+02, 6.25000e+02, ..., 2.39375e+05, 2.39625e+05, 2.39875e+05], dtype=float32)
- longitude()float64...
- long_name :
- longitude
- units :
- degrees_east
- standard_name :
- longitude
[1 values with dtype=float64]
- latitude()float64...
- long_name :
- latitude
- units :
- degrees_north
- positive :
- up
- standard_name :
- latitude
[1 values with dtype=float64]
- altitude()float64...
- long_name :
- altitude
- units :
- meters
- standard_name :
- altitude
[1 values with dtype=float64]
- azimuth(azimuth)float320.5 1.5 2.5 ... 357.5 358.5 359.5
- standard_name :
- ray_azimuth_angle
- long_name :
- azimuth_angle_from_true_north
- units :
- degrees
- axis :
- radial_azimuth_coordinate
array([ 0.5, 1.5, 2.5, ..., 357.5, 358.5, 359.5], dtype=float32)
- DBZH(azimuth, range)float32...
- _Undetect :
- 0.0
- long_name :
- Equivalent reflectivity factor H
- standard_name :
- radar_equivalent_reflectivity_factor_h
- units :
- dBZ
[345600 values with dtype=float32]
- sweep_mode()<U20...
[1 values with dtype=<U20]
- sweep_number()int64...
[1 values with dtype=int64]
- prt_mode()<U7...
[1 values with dtype=<U7]
- follow_mode()<U7...
[1 values with dtype=<U7]
- sweep_fixed_angle()float64...
[1 values with dtype=float64]
<xarray.DatasetView> Dimensions: (azimuth: 360, range: 960) Coordinates: elevation (azimuth) float32 ... time (azimuth) datetime64[ns] 2013-04-29T04:30:00.027777792... * range (range) float32 125.0 375.0 625.0 ... 2.396e+05 2.399e+05 longitude float64 ... latitude float64 ... altitude float64 ... * azimuth (azimuth) float32 0.5 1.5 2.5 3.5 ... 357.5 358.5 359.5 Data variables: DBZH (azimuth, range) float32 ... sweep_mode <U20 ... sweep_number int64 ... prt_mode <U7 ... follow_mode <U7 ... sweep_fixed_angle float64 ...
sweep_0- azimuth: 360
- range: 960
- elevation(azimuth)float32...
- standard_name :
- ray_elevation_angle
- long_name :
- elevation_angle_from_horizontal_plane
- units :
- degrees
- axis :
- radial_elevation_coordinate
[360 values with dtype=float32]
- time(azimuth)datetime64[ns]2013-04-29T04:30:20.027777792 .....
- standard_name :
- time
array(['2013-04-29T04:30:20.027777792', '2013-04-29T04:30:20.083333376', '2013-04-29T04:30:20.138888960', ..., '2013-04-29T04:30:39.861120512', '2013-04-29T04:30:39.916676096', '2013-04-29T04:30:39.972231680'], dtype='datetime64[ns]')
- range(range)float32125.0 375.0 ... 2.396e+05 2.399e+05
- units :
- meters
- standard_name :
- projection_range_coordinate
- long_name :
- range_to_measurement_volume
- axis :
- radial_range_coordinate
- meters_between_gates :
- 250.0
- spacing_is_constant :
- true
- meters_to_center_of_first_gate :
- 125.0
array([1.25000e+02, 3.75000e+02, 6.25000e+02, ..., 2.39375e+05, 2.39625e+05, 2.39875e+05], dtype=float32)
- longitude()float64...
- long_name :
- longitude
- units :
- degrees_east
- standard_name :
- longitude
[1 values with dtype=float64]
- latitude()float64...
- long_name :
- latitude
- units :
- degrees_north
- positive :
- up
- standard_name :
- latitude
[1 values with dtype=float64]
- altitude()float64...
- long_name :
- altitude
- units :
- meters
- standard_name :
- altitude
[1 values with dtype=float64]
- azimuth(azimuth)float320.5 1.5 2.5 ... 357.5 358.5 359.5
- standard_name :
- ray_azimuth_angle
- long_name :
- azimuth_angle_from_true_north
- units :
- degrees
- axis :
- radial_azimuth_coordinate
array([ 0.5, 1.5, 2.5, ..., 357.5, 358.5, 359.5], dtype=float32)
- DBZH(azimuth, range)float32...
- _Undetect :
- 0.0
- long_name :
- Equivalent reflectivity factor H
- standard_name :
- radar_equivalent_reflectivity_factor_h
- units :
- dBZ
[345600 values with dtype=float32]
- sweep_mode()<U20...
[1 values with dtype=<U20]
- sweep_number()int64...
[1 values with dtype=int64]
- prt_mode()<U7...
[1 values with dtype=<U7]
- follow_mode()<U7...
[1 values with dtype=<U7]
- sweep_fixed_angle()float64...
[1 values with dtype=float64]
<xarray.DatasetView> Dimensions: (azimuth: 360, range: 960) Coordinates: elevation (azimuth) float32 ... time (azimuth) datetime64[ns] 2013-04-29T04:30:20.027777792... * range (range) float32 125.0 375.0 625.0 ... 2.396e+05 2.399e+05 longitude float64 ... latitude float64 ... altitude float64 ... * azimuth (azimuth) float32 0.5 1.5 2.5 3.5 ... 357.5 358.5 359.5 Data variables: DBZH (azimuth, range) float32 ... sweep_mode <U20 ... sweep_number int64 ... prt_mode <U7 ... follow_mode <U7 ... sweep_fixed_angle float64 ...
sweep_1- azimuth: 360
- range: 960
- elevation(azimuth)float32...
- standard_name :
- ray_elevation_angle
- long_name :
- elevation_angle_from_horizontal_plane
- units :
- degrees
- axis :
- radial_elevation_coordinate
[360 values with dtype=float32]
- time(azimuth)datetime64[ns]2013-04-29T04:30:40.027777792 .....
- standard_name :
- time
array(['2013-04-29T04:30:40.027777792', '2013-04-29T04:30:40.083333376', '2013-04-29T04:30:40.138888960', ..., '2013-04-29T04:30:59.861120512', '2013-04-29T04:30:59.916676096', '2013-04-29T04:30:59.972231680'], dtype='datetime64[ns]')
- range(range)float32125.0 375.0 ... 2.396e+05 2.399e+05
- units :
- meters
- standard_name :
- projection_range_coordinate
- long_name :
- range_to_measurement_volume
- axis :
- radial_range_coordinate
- meters_between_gates :
- 250.0
- spacing_is_constant :
- true
- meters_to_center_of_first_gate :
- 125.0
array([1.25000e+02, 3.75000e+02, 6.25000e+02, ..., 2.39375e+05, 2.39625e+05, 2.39875e+05], dtype=float32)
- longitude()float64...
- long_name :
- longitude
- units :
- degrees_east
- standard_name :
- longitude
[1 values with dtype=float64]
- latitude()float64...
- long_name :
- latitude
- units :
- degrees_north
- positive :
- up
- standard_name :
- latitude
[1 values with dtype=float64]
- altitude()float64...
- long_name :
- altitude
- units :
- meters
- standard_name :
- altitude
[1 values with dtype=float64]
- azimuth(azimuth)float320.5 1.5 2.5 ... 357.5 358.5 359.5
- standard_name :
- ray_azimuth_angle
- long_name :
- azimuth_angle_from_true_north
- units :
- degrees
- axis :
- radial_azimuth_coordinate
array([ 0.5, 1.5, 2.5, ..., 357.5, 358.5, 359.5], dtype=float32)
- DBZH(azimuth, range)float32...
- _Undetect :
- 0.0
- long_name :
- Equivalent reflectivity factor H
- standard_name :
- radar_equivalent_reflectivity_factor_h
- units :
- dBZ
[345600 values with dtype=float32]
- sweep_mode()<U20...
[1 values with dtype=<U20]
- sweep_number()int64...
[1 values with dtype=int64]
- prt_mode()<U7...
[1 values with dtype=<U7]
- follow_mode()<U7...
[1 values with dtype=<U7]
- sweep_fixed_angle()float64...
[1 values with dtype=float64]
<xarray.DatasetView> Dimensions: (azimuth: 360, range: 960) Coordinates: elevation (azimuth) float32 ... time (azimuth) datetime64[ns] 2013-04-29T04:30:40.027777792... * range (range) float32 125.0 375.0 625.0 ... 2.396e+05 2.399e+05 longitude float64 ... latitude float64 ... altitude float64 ... * azimuth (azimuth) float32 0.5 1.5 2.5 3.5 ... 357.5 358.5 359.5 Data variables: DBZH (azimuth, range) float32 ... sweep_mode <U20 ... sweep_number int64 ... prt_mode <U7 ... follow_mode <U7 ... sweep_fixed_angle float64 ...
sweep_2- azimuth: 360
- range: 960
- elevation(azimuth)float32...
- standard_name :
- ray_elevation_angle
- long_name :
- elevation_angle_from_horizontal_plane
- units :
- degrees
- axis :
- radial_elevation_coordinate
[360 values with dtype=float32]
- time(azimuth)datetime64[ns]2013-04-29T04:31:00.027777792 .....
- standard_name :
- time
array(['2013-04-29T04:31:00.027777792', '2013-04-29T04:31:00.083333376', '2013-04-29T04:31:00.138888960', ..., '2013-04-29T04:31:19.861120512', '2013-04-29T04:31:19.916676096', '2013-04-29T04:31:19.972231680'], dtype='datetime64[ns]')
- range(range)float32125.0 375.0 ... 2.396e+05 2.399e+05
- units :
- meters
- standard_name :
- projection_range_coordinate
- long_name :
- range_to_measurement_volume
- axis :
- radial_range_coordinate
- meters_between_gates :
- 250.0
- spacing_is_constant :
- true
- meters_to_center_of_first_gate :
- 125.0
array([1.25000e+02, 3.75000e+02, 6.25000e+02, ..., 2.39375e+05, 2.39625e+05, 2.39875e+05], dtype=float32)
- longitude()float64...
- long_name :
- longitude
- units :
- degrees_east
- standard_name :
- longitude
[1 values with dtype=float64]
- latitude()float64...
- long_name :
- latitude
- units :
- degrees_north
- positive :
- up
- standard_name :
- latitude
[1 values with dtype=float64]
- altitude()float64...
- long_name :
- altitude
- units :
- meters
- standard_name :
- altitude
[1 values with dtype=float64]
- azimuth(azimuth)float320.5 1.5 2.5 ... 357.5 358.5 359.5
- standard_name :
- ray_azimuth_angle
- long_name :
- azimuth_angle_from_true_north
- units :
- degrees
- axis :
- radial_azimuth_coordinate
array([ 0.5, 1.5, 2.5, ..., 357.5, 358.5, 359.5], dtype=float32)
- DBZH(azimuth, range)float32...
- _Undetect :
- 0.0
- long_name :
- Equivalent reflectivity factor H
- standard_name :
- radar_equivalent_reflectivity_factor_h
- units :
- dBZ
[345600 values with dtype=float32]
- sweep_mode()<U20...
[1 values with dtype=<U20]
- sweep_number()int64...
[1 values with dtype=int64]
- prt_mode()<U7...
[1 values with dtype=<U7]
- follow_mode()<U7...
[1 values with dtype=<U7]
- sweep_fixed_angle()float64...
[1 values with dtype=float64]
<xarray.DatasetView> Dimensions: (azimuth: 360, range: 960) Coordinates: elevation (azimuth) float32 ... time (azimuth) datetime64[ns] 2013-04-29T04:31:00.027777792... * range (range) float32 125.0 375.0 625.0 ... 2.396e+05 2.399e+05 longitude float64 ... latitude float64 ... altitude float64 ... * azimuth (azimuth) float32 0.5 1.5 2.5 3.5 ... 357.5 358.5 359.5 Data variables: DBZH (azimuth, range) float32 ... sweep_mode <U20 ... sweep_number int64 ... prt_mode <U7 ... follow_mode <U7 ... sweep_fixed_angle float64 ...
sweep_3- azimuth: 360
- range: 960
- elevation(azimuth)float32...
- standard_name :
- ray_elevation_angle
- long_name :
- elevation_angle_from_horizontal_plane
- units :
- degrees
- axis :
- radial_elevation_coordinate
[360 values with dtype=float32]
- time(azimuth)datetime64[ns]2013-04-29T04:31:20.027777792 .....
- standard_name :
- time
array(['2013-04-29T04:31:20.027777792', '2013-04-29T04:31:20.083333376', '2013-04-29T04:31:20.138888960', ..., '2013-04-29T04:31:39.861120512', '2013-04-29T04:31:39.916676096', '2013-04-29T04:31:39.972231680'], dtype='datetime64[ns]')
- range(range)float32125.0 375.0 ... 2.396e+05 2.399e+05
- units :
- meters
- standard_name :
- projection_range_coordinate
- long_name :
- range_to_measurement_volume
- axis :
- radial_range_coordinate
- meters_between_gates :
- 250.0
- spacing_is_constant :
- true
- meters_to_center_of_first_gate :
- 125.0
array([1.25000e+02, 3.75000e+02, 6.25000e+02, ..., 2.39375e+05, 2.39625e+05, 2.39875e+05], dtype=float32)
- longitude()float64...
- long_name :
- longitude
- units :
- degrees_east
- standard_name :
- longitude
[1 values with dtype=float64]
- latitude()float64...
- long_name :
- latitude
- units :
- degrees_north
- positive :
- up
- standard_name :
- latitude
[1 values with dtype=float64]
- altitude()float64...
- long_name :
- altitude
- units :
- meters
- standard_name :
- altitude
[1 values with dtype=float64]
- azimuth(azimuth)float320.5 1.5 2.5 ... 357.5 358.5 359.5
- standard_name :
- ray_azimuth_angle
- long_name :
- azimuth_angle_from_true_north
- units :
- degrees
- axis :
- radial_azimuth_coordinate
array([ 0.5, 1.5, 2.5, ..., 357.5, 358.5, 359.5], dtype=float32)
- DBZH(azimuth, range)float32...
- _Undetect :
- 0.0
- long_name :
- Equivalent reflectivity factor H
- standard_name :
- radar_equivalent_reflectivity_factor_h
- units :
- dBZ
[345600 values with dtype=float32]
- sweep_mode()<U20...
[1 values with dtype=<U20]
- sweep_number()int64...
[1 values with dtype=int64]
- prt_mode()<U7...
[1 values with dtype=<U7]
- follow_mode()<U7...
[1 values with dtype=<U7]
- sweep_fixed_angle()float64...
[1 values with dtype=float64]
<xarray.DatasetView> Dimensions: (azimuth: 360, range: 960) Coordinates: elevation (azimuth) float32 ... time (azimuth) datetime64[ns] 2013-04-29T04:31:20.027777792... * range (range) float32 125.0 375.0 625.0 ... 2.396e+05 2.399e+05 longitude float64 ... latitude float64 ... altitude float64 ... * azimuth (azimuth) float32 0.5 1.5 2.5 3.5 ... 357.5 358.5 359.5 Data variables: DBZH (azimuth, range) float32 ... sweep_mode <U20 ... sweep_number int64 ... prt_mode <U7 ... follow_mode <U7 ... sweep_fixed_angle float64 ...
sweep_4- volume_number()int640
array(0)
- platform_type()<U5'fixed'
array('fixed', dtype='<U5')
- instrument_type()<U5'radar'
array('radar', dtype='<U5')
- time_coverage_start()<U20'2013-04-29T04:30:00Z'
array('2013-04-29T04:30:00Z', dtype='<U20')
- time_coverage_end()<U20'2013-04-29T04:31:39Z'
array('2013-04-29T04:31:39Z', dtype='<U20')
- longitude()float645.506
- long_name :
- longitude
- units :
- degrees_east
- standard_name :
- longitude
array(5.5056)
- altitude()float64592.0
- long_name :
- altitude
- units :
- meters
- standard_name :
- altitude
array(592.)
- latitude()float6449.91
- long_name :
- latitude
- units :
- degrees_north
- positive :
- up
- standard_name :
- latitude
array(49.914299)
- Conventions :
- ODIM_H5/V2_1
- version :
- None
- title :
- None
- institution :
- None
- references :
- None
- source :
- None
- history :
- None
- comment :
- im/exported using xradar
- instrument_name :
- None
Georeference sweeps#
[3]:
pvol = pvol.filter(lambda x: "sweep" in x.name)
vol = []
for sweep in pvol.values():
vol.append(sweep.ds.pipe(wrl.georef.georeference))
vol = xr.concat(vol, dim="tilt")
vol = vol.assign_coords(sweep_mode=vol.sweep_mode)
display(vol)
<xarray.Dataset> Dimensions: (tilt: 5, azimuth: 360, range: 960) Coordinates: (12/15) elevation (tilt, azimuth) float32 0.3 0.3 0.3 0.3 ... 6.0 6.0 6.0 time (tilt, azimuth) datetime64[ns] 2013-04-29T04:30:00.027... * range (range) float32 125.0 375.0 625.0 ... 2.396e+05 2.399e+05 sweep_mode (tilt) <U20 'azimuth_surveillance' ... 'azimuth_survei... longitude float64 5.506 latitude float64 49.91 ... ... y (tilt, azimuth, range) float32 125.0 375.0 ... 2.378e+05 z (tilt, azimuth, range) float32 592.0 594.0 ... 2.901e+04 gr (tilt, azimuth, range) float32 125.0 375.0 ... 2.378e+05 rays (azimuth, range) float32 0.5 0.5 0.5 ... 359.5 359.5 bins (azimuth, range) float32 125.0 375.0 ... 2.399e+05 crs_wkt int64 0 Dimensions without coordinates: tilt Data variables: DBZH (tilt, azimuth, range) float32 -32.0 -32.0 ... -32.0 sweep_number (tilt) int64 0 1 2 3 4 prt_mode (tilt) <U7 'not_set' 'not_set' ... 'not_set' 'not_set' follow_mode (tilt) <U7 'not_set' 'not_set' ... 'not_set' 'not_set' sweep_fixed_angle (tilt) float64 0.3 0.9 1.8 3.3 6.0
xarray.Dataset
- tilt: 5
- azimuth: 360
- range: 960
- elevation(tilt, azimuth)float320.3 0.3 0.3 0.3 ... 6.0 6.0 6.0 6.0
- standard_name :
- ray_elevation_angle
- long_name :
- elevation_angle_from_horizontal_plane
- units :
- degrees
- axis :
- radial_elevation_coordinate
array([[0.3, 0.3, 0.3, ..., 0.3, 0.3, 0.3], [0.9, 0.9, 0.9, ..., 0.9, 0.9, 0.9], [1.8, 1.8, 1.8, ..., 1.8, 1.8, 1.8], [3.3, 3.3, 3.3, ..., 3.3, 3.3, 3.3], [6. , 6. , 6. , ..., 6. , 6. , 6. ]], dtype=float32)
- time(tilt, azimuth)datetime64[ns]2013-04-29T04:30:00.027777792 .....
- standard_name :
- time
array([['2013-04-29T04:30:00.027777792', '2013-04-29T04:30:00.083333376', '2013-04-29T04:30:00.138888960', ..., '2013-04-29T04:30:19.861120512', '2013-04-29T04:30:19.916676096', '2013-04-29T04:30:19.972231680'], ['2013-04-29T04:30:20.027777792', '2013-04-29T04:30:20.083333376', '2013-04-29T04:30:20.138888960', ..., '2013-04-29T04:30:39.861120512', '2013-04-29T04:30:39.916676096', '2013-04-29T04:30:39.972231680'], ['2013-04-29T04:30:40.027777792', '2013-04-29T04:30:40.083333376', '2013-04-29T04:30:40.138888960', ..., '2013-04-29T04:30:59.861120512', '2013-04-29T04:30:59.916676096', '2013-04-29T04:30:59.972231680'], ['2013-04-29T04:31:00.027777792', '2013-04-29T04:31:00.083333376', '2013-04-29T04:31:00.138888960', ..., '2013-04-29T04:31:19.861120512', '2013-04-29T04:31:19.916676096', '2013-04-29T04:31:19.972231680'], ['2013-04-29T04:31:20.027777792', '2013-04-29T04:31:20.083333376', '2013-04-29T04:31:20.138888960', ..., '2013-04-29T04:31:39.861120512', '2013-04-29T04:31:39.916676096', '2013-04-29T04:31:39.972231680']], dtype='datetime64[ns]')
- range(range)float32125.0 375.0 ... 2.396e+05 2.399e+05
- units :
- meters
- standard_name :
- projection_range_coordinate
- long_name :
- range_to_measurement_volume
- axis :
- radial_range_coordinate
- meters_between_gates :
- 250.0
- spacing_is_constant :
- true
- meters_to_center_of_first_gate :
- 125.0
array([1.25000e+02, 3.75000e+02, 6.25000e+02, ..., 2.39375e+05, 2.39625e+05, 2.39875e+05], dtype=float32)
- sweep_mode(tilt)<U20'azimuth_surveillance' ... 'azim...
array(['azimuth_surveillance', 'azimuth_surveillance', 'azimuth_surveillance', 'azimuth_surveillance', 'azimuth_surveillance'], dtype='<U20')
- longitude()float645.506
- long_name :
- longitude
- units :
- degrees_east
- standard_name :
- longitude
array(5.5056)
- latitude()float6449.91
- long_name :
- latitude
- units :
- degrees_north
- positive :
- up
- standard_name :
- latitude
array(49.914299)
- altitude()float64592.0
- long_name :
- altitude
- units :
- meters
- standard_name :
- altitude
array(592.)
- azimuth(azimuth)float320.5 1.5 2.5 ... 357.5 358.5 359.5
- standard_name :
- ray_azimuth_angle
- long_name :
- azimuth_angle_from_true_north
- units :
- degrees
- axis :
- radial_azimuth_coordinate
array([ 0.5, 1.5, 2.5, ..., 357.5, 358.5, 359.5], dtype=float32)
- x(tilt, azimuth, range)float321.091 3.272 ... -2.075e+03
- standard_name :
- east_west_distance_from_radar
- units :
- meters
array([[[ 1.09072912e+00, 3.27218676e+00, 5.45364380e+00, ..., 2.08788477e+03, 2.09006396e+03, 2.09224292e+03], [ 3.27185106e+00, 9.81555176e+00, 1.63592510e+01, ..., 6.26301074e+03, 6.26954785e+03, 6.27608398e+03], [ 5.45197630e+00, 1.63559265e+01, 2.72598743e+01, ..., 1.04362295e+04, 1.04471221e+04, 1.04580137e+04], ..., [-5.45199537e+00, -1.63559837e+01, -2.72599697e+01, ..., -1.04362656e+04, -1.04471582e+04, -1.04580498e+04], [-3.27182555e+00, -9.81547451e+00, -1.63591232e+01, ..., -6.26296191e+03, -6.26949854e+03, -6.27603516e+03], [-1.09071815e+00, -3.27215385e+00, -5.45358896e+00, ..., -2.08786377e+03, -2.09004297e+03, -2.09222192e+03]], [[ 1.09060931e+00, 3.27182651e+00, 5.45304155e+00, ..., 2.08704004e+03, 2.08921753e+03, 2.09139502e+03], [ 3.27149153e+00, 9.81447124e+00, 1.63574429e+01, ..., 6.26047705e+03, 6.26700879e+03, 6.27354053e+03], [ 5.45137739e+00, 1.63541260e+01, 2.72568626e+01, ..., 1.04320068e+04, 1.04428916e+04, 1.04537754e+04], ... -1.04037686e+04, -1.04146123e+04, -1.04254531e+04], [-3.26644254e+00, -9.79930973e+00, -1.63321552e+01, ..., -6.24345947e+03, -6.24996729e+03, -6.25647314e+03], [-1.08892357e+00, -3.26676512e+00, -5.44459915e+00, ..., -2.08136255e+03, -2.08353174e+03, -2.08570068e+03]], [[ 1.08476722e+00, 3.25429153e+00, 5.42380285e+00, ..., 2.07068726e+03, 2.07284229e+03, 2.07499707e+03], [ 3.25396729e+00, 9.76187134e+00, 1.62697372e+01, ..., 6.21142334e+03, 6.21788770e+03, 6.22435205e+03], [ 5.42217636e+00, 1.62664776e+01, 2.71107159e+01, ..., 1.03502676e+04, 1.03610391e+04, 1.03718105e+04], ..., [-5.42219496e+00, -1.62665348e+01, -2.71108093e+01, ..., -1.03503037e+04, -1.03610752e+04, -1.03718467e+04], [-3.25394177e+00, -9.76179504e+00, -1.62696095e+01, ..., -6.21137451e+03, -6.21783936e+03, -6.22430322e+03], [-1.08475637e+00, -3.25425887e+00, -5.42374849e+00, ..., -2.07066650e+03, -2.07282153e+03, -2.07497632e+03]]], dtype=float32)
- y(tilt, azimuth, range)float32125.0 375.0 ... 2.375e+05 2.378e+05
- standard_name :
- north_south_distance_from_radar
- units :
- meters
array([[[1.24984802e+02, 3.74954346e+02, 6.24923828e+02, ..., 2.39247188e+05, 2.39496891e+05, 2.39746594e+05], [1.24946732e+02, 3.74840149e+02, 6.24733459e+02, ..., 2.39174312e+05, 2.39423938e+05, 2.39673562e+05], [1.24870605e+02, 3.74611755e+02, 6.24352844e+02, ..., 2.39028578e+05, 2.39278062e+05, 2.39527531e+05], ..., [1.24870605e+02, 3.74611755e+02, 6.24352844e+02, ..., 2.39028578e+05, 2.39278062e+05, 2.39527531e+05], [1.24946732e+02, 3.74840149e+02, 6.24733459e+02, ..., 2.39174312e+05, 2.39423938e+05, 2.39673562e+05], [1.24984802e+02, 3.74954346e+02, 6.24923828e+02, ..., 2.39247188e+05, 2.39496891e+05, 2.39746594e+05]], [[1.24971069e+02, 3.74913055e+02, 6.24854797e+02, ..., 2.39150391e+05, 2.39399906e+05, 2.39649422e+05], [1.24933006e+02, 3.74798859e+02, 6.24664490e+02, ..., 2.39077547e+05, 2.39327000e+05, 2.39576422e+05], [1.24856880e+02, 3.74570496e+02, 6.24283875e+02, ..., 2.38931875e+05, 2.39181172e+05, 2.39430453e+05], ... [1.24665154e+02, 3.73994812e+02, 6.23323608e+02, ..., 2.38284281e+05, 2.38532625e+05, 2.38780938e+05], [1.24741158e+02, 3.74222839e+02, 6.23703613e+02, ..., 2.38429547e+05, 2.38678062e+05, 2.38926516e+05], [1.24779167e+02, 3.74336853e+02, 6.23893677e+02, ..., 2.38502203e+05, 2.38750781e+05, 2.38999312e+05]], [[1.24301636e+02, 3.72903778e+02, 6.21504395e+02, ..., 2.37276547e+05, 2.37523484e+05, 2.37770406e+05], [1.24263779e+02, 3.72790192e+02, 6.21315125e+02, ..., 2.37204266e+05, 2.37451141e+05, 2.37697984e+05], [1.24188065e+02, 3.72563049e+02, 6.20936523e+02, ..., 2.37059734e+05, 2.37306453e+05, 2.37553156e+05], ..., [1.24188065e+02, 3.72563049e+02, 6.20936523e+02, ..., 2.37059734e+05, 2.37306453e+05, 2.37553156e+05], [1.24263779e+02, 3.72790192e+02, 6.21315125e+02, ..., 2.37204266e+05, 2.37451141e+05, 2.37697984e+05], [1.24301636e+02, 3.72903778e+02, 6.21504395e+02, ..., 2.37276547e+05, 2.37523484e+05, 2.37770406e+05]]], dtype=float32)
- z(tilt, azimuth, range)float32592.0 594.0 ... 2.898e+04 2.901e+04
- standard_name :
- height_above_ground
- units :
- meters
array([[[ 592., 594., 595., ..., 5219., 5228., 5236.], [ 592., 594., 595., ..., 5219., 5228., 5236.], [ 592., 594., 595., ..., 5219., 5228., 5236.], ..., [ 592., 594., 595., ..., 5219., 5228., 5236.], [ 592., 594., 595., ..., 5219., 5228., 5236.], [ 592., 594., 595., ..., 5219., 5228., 5236.]], [[ 594., 598., 602., ..., 7724., 7735., 7746.], [ 594., 598., 602., ..., 7724., 7735., 7746.], [ 594., 598., 602., ..., 7724., 7735., 7746.], ..., [ 594., 598., 602., ..., 7724., 7735., 7746.], [ 594., 598., 602., ..., 7724., 7735., 7746.], [ 594., 598., 602., ..., 7724., 7735., 7746.]], [[ 596., 604., 612., ..., 11479., 11494., 11509.], [ 596., 604., 612., ..., 11479., 11494., 11509.], [ 596., 604., 612., ..., 11479., 11494., 11509.], ..., [ 596., 604., 612., ..., 11479., 11494., 11509.], [ 596., 604., 612., ..., 11479., 11494., 11509.], [ 596., 604., 612., ..., 11479., 11494., 11509.]], [[ 599., 614., 628., ..., 17730., 17751., 17772.], [ 599., 614., 628., ..., 17730., 17751., 17772.], [ 599., 614., 628., ..., 17730., 17751., 17772.], ..., [ 599., 614., 628., ..., 17730., 17751., 17772.], [ 599., 614., 628., ..., 17730., 17751., 17772.], [ 599., 614., 628., ..., 17730., 17751., 17772.]], [[ 605., 631., 657., ..., 28942., 28975., 29008.], [ 605., 631., 657., ..., 28942., 28975., 29008.], [ 605., 631., 657., ..., 28942., 28975., 29008.], ..., [ 605., 631., 657., ..., 28942., 28975., 29008.], [ 605., 631., 657., ..., 28942., 28975., 29008.], [ 605., 631., 657., ..., 28942., 28975., 29008.]]], dtype=float32)
- gr(tilt, azimuth, range)float32125.0 375.0 ... 2.375e+05 2.378e+05
- standard_name :
- distance_from_radar
- units :
- meters
array([[[1.24989563e+02, 3.74968628e+02, 6.24947632e+02, ..., 2.39256297e+05, 2.39506016e+05, 2.39755734e+05], [1.24989563e+02, 3.74968658e+02, 6.24947632e+02, ..., 2.39256297e+05, 2.39506016e+05, 2.39755734e+05], [1.24989563e+02, 3.74968658e+02, 6.24947632e+02, ..., 2.39256297e+05, 2.39506016e+05, 2.39755734e+05], ..., [1.24989571e+02, 3.74968658e+02, 6.24947632e+02, ..., 2.39256297e+05, 2.39506016e+05, 2.39755734e+05], [1.24989563e+02, 3.74968658e+02, 6.24947632e+02, ..., 2.39256297e+05, 2.39506016e+05, 2.39755719e+05], [1.24989563e+02, 3.74968628e+02, 6.24947632e+02, ..., 2.39256297e+05, 2.39506016e+05, 2.39755734e+05]], [[1.24975830e+02, 3.74927338e+02, 6.24878601e+02, ..., 2.39159500e+05, 2.39409016e+05, 2.39658547e+05], [1.24975830e+02, 3.74927338e+02, 6.24878601e+02, ..., 2.39159500e+05, 2.39409031e+05, 2.39658547e+05], [1.24975830e+02, 3.74927338e+02, 6.24878601e+02, ..., 2.39159500e+05, 2.39409031e+05, 2.39658547e+05], ... [1.24783920e+02, 3.74351135e+02, 6.23917419e+02, ..., 2.38511297e+05, 2.38759875e+05, 2.39008422e+05], [1.24783920e+02, 3.74351135e+02, 6.23917419e+02, ..., 2.38511281e+05, 2.38759875e+05, 2.39008422e+05], [1.24783920e+02, 3.74351105e+02, 6.23917419e+02, ..., 2.38511297e+05, 2.38759875e+05, 2.39008406e+05]], [[1.24306366e+02, 3.72917999e+02, 6.21528076e+02, ..., 2.37285578e+05, 2.37532531e+05, 2.37779453e+05], [1.24306374e+02, 3.72917999e+02, 6.21528137e+02, ..., 2.37285578e+05, 2.37532547e+05, 2.37779469e+05], [1.24306381e+02, 3.72917969e+02, 6.21528076e+02, ..., 2.37285578e+05, 2.37532531e+05, 2.37779469e+05], ..., [1.24306381e+02, 3.72917969e+02, 6.21528076e+02, ..., 2.37285578e+05, 2.37532531e+05, 2.37779469e+05], [1.24306374e+02, 3.72917999e+02, 6.21528076e+02, ..., 2.37285578e+05, 2.37532547e+05, 2.37779453e+05], [1.24306366e+02, 3.72917999e+02, 6.21528076e+02, ..., 2.37285578e+05, 2.37532531e+05, 2.37779453e+05]]], dtype=float32)
- rays(azimuth, range)float320.5 0.5 0.5 ... 359.5 359.5 359.5
- standard_name :
- ray_azimuth_angle
- long_name :
- azimuth_angle_from_true_north
- units :
- degrees
- axis :
- radial_azimuth_coordinate
array([[ 0.5, 0.5, 0.5, ..., 0.5, 0.5, 0.5], [ 1.5, 1.5, 1.5, ..., 1.5, 1.5, 1.5], [ 2.5, 2.5, 2.5, ..., 2.5, 2.5, 2.5], ..., [357.5, 357.5, 357.5, ..., 357.5, 357.5, 357.5], [358.5, 358.5, 358.5, ..., 358.5, 358.5, 358.5], [359.5, 359.5, 359.5, ..., 359.5, 359.5, 359.5]], dtype=float32)
- bins(azimuth, range)float32125.0 375.0 ... 2.396e+05 2.399e+05
- units :
- meters
- standard_name :
- projection_range_coordinate
- long_name :
- range_to_measurement_volume
- axis :
- radial_range_coordinate
- meters_between_gates :
- 250.0
- spacing_is_constant :
- true
- meters_to_center_of_first_gate :
- 125.0
array([[1.25000e+02, 3.75000e+02, 6.25000e+02, ..., 2.39375e+05, 2.39625e+05, 2.39875e+05], [1.25000e+02, 3.75000e+02, 6.25000e+02, ..., 2.39375e+05, 2.39625e+05, 2.39875e+05], [1.25000e+02, 3.75000e+02, 6.25000e+02, ..., 2.39375e+05, 2.39625e+05, 2.39875e+05], ..., [1.25000e+02, 3.75000e+02, 6.25000e+02, ..., 2.39375e+05, 2.39625e+05, 2.39875e+05], [1.25000e+02, 3.75000e+02, 6.25000e+02, ..., 2.39375e+05, 2.39625e+05, 2.39875e+05], [1.25000e+02, 3.75000e+02, 6.25000e+02, ..., 2.39375e+05, 2.39625e+05, 2.39875e+05]], dtype=float32)
- crs_wkt()int640
- crs_wkt :
- PROJCRS["unknown",BASEGEOGCRS["unknown",DATUM["World Geodetic System 1984",ELLIPSOID["WGS 84",6378137,298.257223563,LENGTHUNIT["metre",1]],ID["EPSG",6326]],PRIMEM["Greenwich",0,ANGLEUNIT["degree",0.0174532925199433],ID["EPSG",8901]]],CONVERSION["unknown",METHOD["Modified Azimuthal Equidistant",ID["EPSG",9832]],PARAMETER["Latitude of natural origin",49.914299,ANGLEUNIT["degree",0.0174532925199433],ID["EPSG",8801]],PARAMETER["Longitude of natural origin",5.5056,ANGLEUNIT["degree",0.0174532925199433],ID["EPSG",8802]],PARAMETER["False easting",0,LENGTHUNIT["metre",1],ID["EPSG",8806]],PARAMETER["False northing",0,LENGTHUNIT["metre",1],ID["EPSG",8807]]],CS[Cartesian,2],AXIS["(E)",east,ORDER[1],LENGTHUNIT["metre",1,ID["EPSG",9001]]],AXIS["(N)",north,ORDER[2],LENGTHUNIT["metre",1,ID["EPSG",9001]]]]
- semi_major_axis :
- 6378137.0
- semi_minor_axis :
- 6356752.314245179
- inverse_flattening :
- 298.257223563
- reference_ellipsoid_name :
- WGS 84
- longitude_of_prime_meridian :
- 0.0
- prime_meridian_name :
- Greenwich
- geographic_crs_name :
- unknown
- horizontal_datum_name :
- World Geodetic System 1984
- projected_crs_name :
- unknown
- grid_mapping_name :
- azimuthal_equidistant
- latitude_of_projection_origin :
- 49.914299
- longitude_of_projection_origin :
- 5.5056
- false_easting :
- 0.0
- false_northing :
- 0.0
array(0)
- DBZH(tilt, azimuth, range)float32-32.0 -32.0 -32.0 ... -32.0 -32.0
- _Undetect :
- 0.0
- long_name :
- Equivalent reflectivity factor H
- standard_name :
- radar_equivalent_reflectivity_factor_h
- units :
- dBZ
array([[[-32. , -32. , -32. , ..., -32. , -32. , -32. ], [-32. , -32. , -32. , ..., -32. , -32. , -32. ], [-32. , -7.5, 4. , ..., -32. , -32. , -32. ], ..., [-32. , -3.5, -2. , ..., -32. , -32. , -32. ], [-32. , -32. , -32. , ..., -32. , -32. , -32. ], [-32. , -32. , -32. , ..., -32. , -32. , -32. ]], [[-32. , -32. , -32. , ..., -32. , -32. , -32. ], [-32. , -32. , -32. , ..., -32. , -32. , -32. ], [-32. , -32. , -32. , ..., -32. , -32. , -32. ], ..., [-32. , -6. , 2.5, ..., -32. , -32. , -32. ], [-32. , -32. , 0. , ..., -32. , -32. , -32. ], [-32. , -32. , -32. , ..., -32. , -32. , -32. ]], [[-32. , -32. , -32. , ..., -32. , -32. , -32. ], [-32. , -32. , -32. , ..., -32. , -32. , -32. ], [-32. , -32. , -32. , ..., -32. , -32. , -32. ], ..., [-32. , -32. , 2. , ..., -32. , -32. , -32. ], [-32. , -32. , -32. , ..., -32. , -32. , -32. ], [-32. , -32. , -32. , ..., -32. , -32. , -32. ]], [[-32. , -32. , 15.5, ..., -32. , -32. , -32. ], [-32. , -32. , -32. , ..., -32. , -32. , -32. ], [-32. , -32. , 5. , ..., -32. , -32. , -32. ], ..., [-32. , -6. , 1.5, ..., -32. , -32. , -32. ], [-32. , -8.5, 4. , ..., -32. , -32. , -32. ], [-32. , -32. , 12. , ..., -32. , -32. , -32. ]], [[-32. , -5. , 5.5, ..., -32. , -32. , -32. ], [-32. , -32. , -32. , ..., -32. , -32. , -32. ], [-32. , -4. , 2. , ..., -32. , -32. , -32. ], ..., [-32. , -32. , -32. , ..., -32. , -32. , -32. ], [-32. , -32. , -32. , ..., -32. , -32. , -32. ], [-32. , -32. , -32. , ..., -32. , -32. , -32. ]]], dtype=float32)
- sweep_number(tilt)int640 1 2 3 4
array([0, 1, 2, 3, 4])
- prt_mode(tilt)<U7'not_set' 'not_set' ... 'not_set'
array(['not_set', 'not_set', 'not_set', 'not_set', 'not_set'], dtype='<U7')
- follow_mode(tilt)<U7'not_set' 'not_set' ... 'not_set'
array(['not_set', 'not_set', 'not_set', 'not_set', 'not_set'], dtype='<U7')
- sweep_fixed_angle(tilt)float640.3 0.9 1.8 3.3 6.0
array([0.3, 0.9, 1.8, 3.3, 6. ])
- rangePandasIndex
PandasIndex(Index([ 125.0, 375.0, 625.0, 875.0, 1125.0, 1375.0, 1625.0, 1875.0, 2125.0, 2375.0, ... 237625.0, 237875.0, 238125.0, 238375.0, 238625.0, 238875.0, 239125.0, 239375.0, 239625.0, 239875.0], dtype='float32', name='range', length=960))
- azimuthPandasIndex
PandasIndex(Index([ 0.5, 1.5, 2.5, 3.5, 4.5, 5.5, 6.5, 7.5, 8.5, 9.5, ... 350.5, 351.5, 352.5, 353.5, 354.5, 355.5, 356.5, 357.5, 358.5, 359.5], dtype='float32', name='azimuth', length=360))
Construct collocated satellite data#
[4]:
proj_radar = osr.SpatialReference()
proj_radar.ImportFromWkt(vol.crs_wkt.attrs["crs_wkt"])
[4]:
0
[5]:
filename = "hdf5/SAFNWC_MSG3_CT___201304290415_BEL_________.h5"
filename = wrl.util.get_wradlib_data_file(filename)
Downloading file 'hdf5/SAFNWC_MSG3_CT___201304290415_BEL_________.h5' from 'https://github.com/wradlib/wradlib-data/raw/pooch/data/hdf5/SAFNWC_MSG3_CT___201304290415_BEL_________.h5' to '/home/runner/work/wradlib/wradlib/wradlib-data'.
[6]:
sat_gdal = wrl.io.read_safnwc(filename)
val_sat = wrl.georef.read_gdal_values(sat_gdal)
coord_sat = wrl.georef.read_gdal_coordinates(sat_gdal)
proj_sat = wrl.georef.read_gdal_projection(sat_gdal)
coord_sat = wrl.georef.reproject(coord_sat, src_crs=proj_sat, trg_crs=proj_radar)
[7]:
coord_radar = np.stack((vol.x, vol.y), axis=-1)
coord_sat[..., 0:2].reshape(-1, 2).shape, coord_radar[..., 0:2].reshape(-1, 2).shape
[7]:
((180000, 2), (1728000, 2))
[8]:
interp = wrl.ipol.Nearest(
coord_sat[..., 0:2].reshape(-1, 2), coord_radar[..., 0:2].reshape(-1, 2)
)
[9]:
val_sat = interp(val_sat.ravel()).reshape(coord_radar.shape[:-1])
Estimate localisation errors#
[10]:
timelag = 9 * 60
wind = 10
error = np.absolute(timelag) * wind
Identify clutter based on collocated cloudtype#
[11]:
rscale = vol.range.diff("range").median().values
clutter = wrl.classify.filter_cloudtype(
vol.DBZH, val_sat, scale=rscale, smoothing=error
)
Assign to vol#
[12]:
vol = vol.assign(sat=(["tilt", "azimuth", "range"], val_sat))
vol = vol.assign(clutter=(["tilt", "azimuth", "range"], clutter.values))
display(vol)
<xarray.Dataset> Dimensions: (tilt: 5, azimuth: 360, range: 960) Coordinates: (12/15) elevation (tilt, azimuth) float32 0.3 0.3 0.3 0.3 ... 6.0 6.0 6.0 time (tilt, azimuth) datetime64[ns] 2013-04-29T04:30:00.027... * range (range) float32 125.0 375.0 625.0 ... 2.396e+05 2.399e+05 sweep_mode (tilt) <U20 'azimuth_surveillance' ... 'azimuth_survei... longitude float64 5.506 latitude float64 49.91 ... ... y (tilt, azimuth, range) float32 125.0 375.0 ... 2.378e+05 z (tilt, azimuth, range) float32 592.0 594.0 ... 2.901e+04 gr (tilt, azimuth, range) float32 125.0 375.0 ... 2.378e+05 rays (azimuth, range) float32 0.5 0.5 0.5 ... 359.5 359.5 bins (azimuth, range) float32 125.0 375.0 ... 2.399e+05 crs_wkt int64 0 Dimensions without coordinates: tilt Data variables: DBZH (tilt, azimuth, range) float32 -32.0 -32.0 ... -32.0 sweep_number (tilt) int64 0 1 2 3 4 prt_mode (tilt) <U7 'not_set' 'not_set' ... 'not_set' 'not_set' follow_mode (tilt) <U7 'not_set' 'not_set' ... 'not_set' 'not_set' sweep_fixed_angle (tilt) float64 0.3 0.9 1.8 3.3 6.0 sat (tilt, azimuth, range) uint8 6 6 6 6 6 ... 10 10 10 10 10 clutter (tilt, azimuth, range) bool False False ... False False
xarray.Dataset
- tilt: 5
- azimuth: 360
- range: 960
- elevation(tilt, azimuth)float320.3 0.3 0.3 0.3 ... 6.0 6.0 6.0 6.0
- standard_name :
- ray_elevation_angle
- long_name :
- elevation_angle_from_horizontal_plane
- units :
- degrees
- axis :
- radial_elevation_coordinate
array([[0.3, 0.3, 0.3, ..., 0.3, 0.3, 0.3], [0.9, 0.9, 0.9, ..., 0.9, 0.9, 0.9], [1.8, 1.8, 1.8, ..., 1.8, 1.8, 1.8], [3.3, 3.3, 3.3, ..., 3.3, 3.3, 3.3], [6. , 6. , 6. , ..., 6. , 6. , 6. ]], dtype=float32)
- time(tilt, azimuth)datetime64[ns]2013-04-29T04:30:00.027777792 .....
- standard_name :
- time
array([['2013-04-29T04:30:00.027777792', '2013-04-29T04:30:00.083333376', '2013-04-29T04:30:00.138888960', ..., '2013-04-29T04:30:19.861120512', '2013-04-29T04:30:19.916676096', '2013-04-29T04:30:19.972231680'], ['2013-04-29T04:30:20.027777792', '2013-04-29T04:30:20.083333376', '2013-04-29T04:30:20.138888960', ..., '2013-04-29T04:30:39.861120512', '2013-04-29T04:30:39.916676096', '2013-04-29T04:30:39.972231680'], ['2013-04-29T04:30:40.027777792', '2013-04-29T04:30:40.083333376', '2013-04-29T04:30:40.138888960', ..., '2013-04-29T04:30:59.861120512', '2013-04-29T04:30:59.916676096', '2013-04-29T04:30:59.972231680'], ['2013-04-29T04:31:00.027777792', '2013-04-29T04:31:00.083333376', '2013-04-29T04:31:00.138888960', ..., '2013-04-29T04:31:19.861120512', '2013-04-29T04:31:19.916676096', '2013-04-29T04:31:19.972231680'], ['2013-04-29T04:31:20.027777792', '2013-04-29T04:31:20.083333376', '2013-04-29T04:31:20.138888960', ..., '2013-04-29T04:31:39.861120512', '2013-04-29T04:31:39.916676096', '2013-04-29T04:31:39.972231680']], dtype='datetime64[ns]')
- range(range)float32125.0 375.0 ... 2.396e+05 2.399e+05
- units :
- meters
- standard_name :
- projection_range_coordinate
- long_name :
- range_to_measurement_volume
- axis :
- radial_range_coordinate
- meters_between_gates :
- 250.0
- spacing_is_constant :
- true
- meters_to_center_of_first_gate :
- 125.0
array([1.25000e+02, 3.75000e+02, 6.25000e+02, ..., 2.39375e+05, 2.39625e+05, 2.39875e+05], dtype=float32)
- sweep_mode(tilt)<U20'azimuth_surveillance' ... 'azim...
array(['azimuth_surveillance', 'azimuth_surveillance', 'azimuth_surveillance', 'azimuth_surveillance', 'azimuth_surveillance'], dtype='<U20')
- longitude()float645.506
- long_name :
- longitude
- units :
- degrees_east
- standard_name :
- longitude
array(5.5056)
- latitude()float6449.91
- long_name :
- latitude
- units :
- degrees_north
- positive :
- up
- standard_name :
- latitude
array(49.914299)
- altitude()float64592.0
- long_name :
- altitude
- units :
- meters
- standard_name :
- altitude
array(592.)
- azimuth(azimuth)float320.5 1.5 2.5 ... 357.5 358.5 359.5
- standard_name :
- ray_azimuth_angle
- long_name :
- azimuth_angle_from_true_north
- units :
- degrees
- axis :
- radial_azimuth_coordinate
array([ 0.5, 1.5, 2.5, ..., 357.5, 358.5, 359.5], dtype=float32)
- x(tilt, azimuth, range)float321.091 3.272 ... -2.075e+03
- standard_name :
- east_west_distance_from_radar
- units :
- meters
array([[[ 1.09072912e+00, 3.27218676e+00, 5.45364380e+00, ..., 2.08788477e+03, 2.09006396e+03, 2.09224292e+03], [ 3.27185106e+00, 9.81555176e+00, 1.63592510e+01, ..., 6.26301074e+03, 6.26954785e+03, 6.27608398e+03], [ 5.45197630e+00, 1.63559265e+01, 2.72598743e+01, ..., 1.04362295e+04, 1.04471221e+04, 1.04580137e+04], ..., [-5.45199537e+00, -1.63559837e+01, -2.72599697e+01, ..., -1.04362656e+04, -1.04471582e+04, -1.04580498e+04], [-3.27182555e+00, -9.81547451e+00, -1.63591232e+01, ..., -6.26296191e+03, -6.26949854e+03, -6.27603516e+03], [-1.09071815e+00, -3.27215385e+00, -5.45358896e+00, ..., -2.08786377e+03, -2.09004297e+03, -2.09222192e+03]], [[ 1.09060931e+00, 3.27182651e+00, 5.45304155e+00, ..., 2.08704004e+03, 2.08921753e+03, 2.09139502e+03], [ 3.27149153e+00, 9.81447124e+00, 1.63574429e+01, ..., 6.26047705e+03, 6.26700879e+03, 6.27354053e+03], [ 5.45137739e+00, 1.63541260e+01, 2.72568626e+01, ..., 1.04320068e+04, 1.04428916e+04, 1.04537754e+04], ... -1.04037686e+04, -1.04146123e+04, -1.04254531e+04], [-3.26644254e+00, -9.79930973e+00, -1.63321552e+01, ..., -6.24345947e+03, -6.24996729e+03, -6.25647314e+03], [-1.08892357e+00, -3.26676512e+00, -5.44459915e+00, ..., -2.08136255e+03, -2.08353174e+03, -2.08570068e+03]], [[ 1.08476722e+00, 3.25429153e+00, 5.42380285e+00, ..., 2.07068726e+03, 2.07284229e+03, 2.07499707e+03], [ 3.25396729e+00, 9.76187134e+00, 1.62697372e+01, ..., 6.21142334e+03, 6.21788770e+03, 6.22435205e+03], [ 5.42217636e+00, 1.62664776e+01, 2.71107159e+01, ..., 1.03502676e+04, 1.03610391e+04, 1.03718105e+04], ..., [-5.42219496e+00, -1.62665348e+01, -2.71108093e+01, ..., -1.03503037e+04, -1.03610752e+04, -1.03718467e+04], [-3.25394177e+00, -9.76179504e+00, -1.62696095e+01, ..., -6.21137451e+03, -6.21783936e+03, -6.22430322e+03], [-1.08475637e+00, -3.25425887e+00, -5.42374849e+00, ..., -2.07066650e+03, -2.07282153e+03, -2.07497632e+03]]], dtype=float32)
- y(tilt, azimuth, range)float32125.0 375.0 ... 2.375e+05 2.378e+05
- standard_name :
- north_south_distance_from_radar
- units :
- meters
array([[[1.24984802e+02, 3.74954346e+02, 6.24923828e+02, ..., 2.39247188e+05, 2.39496891e+05, 2.39746594e+05], [1.24946732e+02, 3.74840149e+02, 6.24733459e+02, ..., 2.39174312e+05, 2.39423938e+05, 2.39673562e+05], [1.24870605e+02, 3.74611755e+02, 6.24352844e+02, ..., 2.39028578e+05, 2.39278062e+05, 2.39527531e+05], ..., [1.24870605e+02, 3.74611755e+02, 6.24352844e+02, ..., 2.39028578e+05, 2.39278062e+05, 2.39527531e+05], [1.24946732e+02, 3.74840149e+02, 6.24733459e+02, ..., 2.39174312e+05, 2.39423938e+05, 2.39673562e+05], [1.24984802e+02, 3.74954346e+02, 6.24923828e+02, ..., 2.39247188e+05, 2.39496891e+05, 2.39746594e+05]], [[1.24971069e+02, 3.74913055e+02, 6.24854797e+02, ..., 2.39150391e+05, 2.39399906e+05, 2.39649422e+05], [1.24933006e+02, 3.74798859e+02, 6.24664490e+02, ..., 2.39077547e+05, 2.39327000e+05, 2.39576422e+05], [1.24856880e+02, 3.74570496e+02, 6.24283875e+02, ..., 2.38931875e+05, 2.39181172e+05, 2.39430453e+05], ... [1.24665154e+02, 3.73994812e+02, 6.23323608e+02, ..., 2.38284281e+05, 2.38532625e+05, 2.38780938e+05], [1.24741158e+02, 3.74222839e+02, 6.23703613e+02, ..., 2.38429547e+05, 2.38678062e+05, 2.38926516e+05], [1.24779167e+02, 3.74336853e+02, 6.23893677e+02, ..., 2.38502203e+05, 2.38750781e+05, 2.38999312e+05]], [[1.24301636e+02, 3.72903778e+02, 6.21504395e+02, ..., 2.37276547e+05, 2.37523484e+05, 2.37770406e+05], [1.24263779e+02, 3.72790192e+02, 6.21315125e+02, ..., 2.37204266e+05, 2.37451141e+05, 2.37697984e+05], [1.24188065e+02, 3.72563049e+02, 6.20936523e+02, ..., 2.37059734e+05, 2.37306453e+05, 2.37553156e+05], ..., [1.24188065e+02, 3.72563049e+02, 6.20936523e+02, ..., 2.37059734e+05, 2.37306453e+05, 2.37553156e+05], [1.24263779e+02, 3.72790192e+02, 6.21315125e+02, ..., 2.37204266e+05, 2.37451141e+05, 2.37697984e+05], [1.24301636e+02, 3.72903778e+02, 6.21504395e+02, ..., 2.37276547e+05, 2.37523484e+05, 2.37770406e+05]]], dtype=float32)
- z(tilt, azimuth, range)float32592.0 594.0 ... 2.898e+04 2.901e+04
- standard_name :
- height_above_ground
- units :
- meters
array([[[ 592., 594., 595., ..., 5219., 5228., 5236.], [ 592., 594., 595., ..., 5219., 5228., 5236.], [ 592., 594., 595., ..., 5219., 5228., 5236.], ..., [ 592., 594., 595., ..., 5219., 5228., 5236.], [ 592., 594., 595., ..., 5219., 5228., 5236.], [ 592., 594., 595., ..., 5219., 5228., 5236.]], [[ 594., 598., 602., ..., 7724., 7735., 7746.], [ 594., 598., 602., ..., 7724., 7735., 7746.], [ 594., 598., 602., ..., 7724., 7735., 7746.], ..., [ 594., 598., 602., ..., 7724., 7735., 7746.], [ 594., 598., 602., ..., 7724., 7735., 7746.], [ 594., 598., 602., ..., 7724., 7735., 7746.]], [[ 596., 604., 612., ..., 11479., 11494., 11509.], [ 596., 604., 612., ..., 11479., 11494., 11509.], [ 596., 604., 612., ..., 11479., 11494., 11509.], ..., [ 596., 604., 612., ..., 11479., 11494., 11509.], [ 596., 604., 612., ..., 11479., 11494., 11509.], [ 596., 604., 612., ..., 11479., 11494., 11509.]], [[ 599., 614., 628., ..., 17730., 17751., 17772.], [ 599., 614., 628., ..., 17730., 17751., 17772.], [ 599., 614., 628., ..., 17730., 17751., 17772.], ..., [ 599., 614., 628., ..., 17730., 17751., 17772.], [ 599., 614., 628., ..., 17730., 17751., 17772.], [ 599., 614., 628., ..., 17730., 17751., 17772.]], [[ 605., 631., 657., ..., 28942., 28975., 29008.], [ 605., 631., 657., ..., 28942., 28975., 29008.], [ 605., 631., 657., ..., 28942., 28975., 29008.], ..., [ 605., 631., 657., ..., 28942., 28975., 29008.], [ 605., 631., 657., ..., 28942., 28975., 29008.], [ 605., 631., 657., ..., 28942., 28975., 29008.]]], dtype=float32)
- gr(tilt, azimuth, range)float32125.0 375.0 ... 2.375e+05 2.378e+05
- standard_name :
- distance_from_radar
- units :
- meters
array([[[1.24989563e+02, 3.74968628e+02, 6.24947632e+02, ..., 2.39256297e+05, 2.39506016e+05, 2.39755734e+05], [1.24989563e+02, 3.74968658e+02, 6.24947632e+02, ..., 2.39256297e+05, 2.39506016e+05, 2.39755734e+05], [1.24989563e+02, 3.74968658e+02, 6.24947632e+02, ..., 2.39256297e+05, 2.39506016e+05, 2.39755734e+05], ..., [1.24989571e+02, 3.74968658e+02, 6.24947632e+02, ..., 2.39256297e+05, 2.39506016e+05, 2.39755734e+05], [1.24989563e+02, 3.74968658e+02, 6.24947632e+02, ..., 2.39256297e+05, 2.39506016e+05, 2.39755719e+05], [1.24989563e+02, 3.74968628e+02, 6.24947632e+02, ..., 2.39256297e+05, 2.39506016e+05, 2.39755734e+05]], [[1.24975830e+02, 3.74927338e+02, 6.24878601e+02, ..., 2.39159500e+05, 2.39409016e+05, 2.39658547e+05], [1.24975830e+02, 3.74927338e+02, 6.24878601e+02, ..., 2.39159500e+05, 2.39409031e+05, 2.39658547e+05], [1.24975830e+02, 3.74927338e+02, 6.24878601e+02, ..., 2.39159500e+05, 2.39409031e+05, 2.39658547e+05], ... [1.24783920e+02, 3.74351135e+02, 6.23917419e+02, ..., 2.38511297e+05, 2.38759875e+05, 2.39008422e+05], [1.24783920e+02, 3.74351135e+02, 6.23917419e+02, ..., 2.38511281e+05, 2.38759875e+05, 2.39008422e+05], [1.24783920e+02, 3.74351105e+02, 6.23917419e+02, ..., 2.38511297e+05, 2.38759875e+05, 2.39008406e+05]], [[1.24306366e+02, 3.72917999e+02, 6.21528076e+02, ..., 2.37285578e+05, 2.37532531e+05, 2.37779453e+05], [1.24306374e+02, 3.72917999e+02, 6.21528137e+02, ..., 2.37285578e+05, 2.37532547e+05, 2.37779469e+05], [1.24306381e+02, 3.72917969e+02, 6.21528076e+02, ..., 2.37285578e+05, 2.37532531e+05, 2.37779469e+05], ..., [1.24306381e+02, 3.72917969e+02, 6.21528076e+02, ..., 2.37285578e+05, 2.37532531e+05, 2.37779469e+05], [1.24306374e+02, 3.72917999e+02, 6.21528076e+02, ..., 2.37285578e+05, 2.37532547e+05, 2.37779453e+05], [1.24306366e+02, 3.72917999e+02, 6.21528076e+02, ..., 2.37285578e+05, 2.37532531e+05, 2.37779453e+05]]], dtype=float32)
- rays(azimuth, range)float320.5 0.5 0.5 ... 359.5 359.5 359.5
- standard_name :
- ray_azimuth_angle
- long_name :
- azimuth_angle_from_true_north
- units :
- degrees
- axis :
- radial_azimuth_coordinate
array([[ 0.5, 0.5, 0.5, ..., 0.5, 0.5, 0.5], [ 1.5, 1.5, 1.5, ..., 1.5, 1.5, 1.5], [ 2.5, 2.5, 2.5, ..., 2.5, 2.5, 2.5], ..., [357.5, 357.5, 357.5, ..., 357.5, 357.5, 357.5], [358.5, 358.5, 358.5, ..., 358.5, 358.5, 358.5], [359.5, 359.5, 359.5, ..., 359.5, 359.5, 359.5]], dtype=float32)
- bins(azimuth, range)float32125.0 375.0 ... 2.396e+05 2.399e+05
- units :
- meters
- standard_name :
- projection_range_coordinate
- long_name :
- range_to_measurement_volume
- axis :
- radial_range_coordinate
- meters_between_gates :
- 250.0
- spacing_is_constant :
- true
- meters_to_center_of_first_gate :
- 125.0
array([[1.25000e+02, 3.75000e+02, 6.25000e+02, ..., 2.39375e+05, 2.39625e+05, 2.39875e+05], [1.25000e+02, 3.75000e+02, 6.25000e+02, ..., 2.39375e+05, 2.39625e+05, 2.39875e+05], [1.25000e+02, 3.75000e+02, 6.25000e+02, ..., 2.39375e+05, 2.39625e+05, 2.39875e+05], ..., [1.25000e+02, 3.75000e+02, 6.25000e+02, ..., 2.39375e+05, 2.39625e+05, 2.39875e+05], [1.25000e+02, 3.75000e+02, 6.25000e+02, ..., 2.39375e+05, 2.39625e+05, 2.39875e+05], [1.25000e+02, 3.75000e+02, 6.25000e+02, ..., 2.39375e+05, 2.39625e+05, 2.39875e+05]], dtype=float32)
- crs_wkt()int640
- crs_wkt :
- PROJCRS["unknown",BASEGEOGCRS["unknown",DATUM["World Geodetic System 1984",ELLIPSOID["WGS 84",6378137,298.257223563,LENGTHUNIT["metre",1]],ID["EPSG",6326]],PRIMEM["Greenwich",0,ANGLEUNIT["degree",0.0174532925199433],ID["EPSG",8901]]],CONVERSION["unknown",METHOD["Modified Azimuthal Equidistant",ID["EPSG",9832]],PARAMETER["Latitude of natural origin",49.914299,ANGLEUNIT["degree",0.0174532925199433],ID["EPSG",8801]],PARAMETER["Longitude of natural origin",5.5056,ANGLEUNIT["degree",0.0174532925199433],ID["EPSG",8802]],PARAMETER["False easting",0,LENGTHUNIT["metre",1],ID["EPSG",8806]],PARAMETER["False northing",0,LENGTHUNIT["metre",1],ID["EPSG",8807]]],CS[Cartesian,2],AXIS["(E)",east,ORDER[1],LENGTHUNIT["metre",1,ID["EPSG",9001]]],AXIS["(N)",north,ORDER[2],LENGTHUNIT["metre",1,ID["EPSG",9001]]]]
- semi_major_axis :
- 6378137.0
- semi_minor_axis :
- 6356752.314245179
- inverse_flattening :
- 298.257223563
- reference_ellipsoid_name :
- WGS 84
- longitude_of_prime_meridian :
- 0.0
- prime_meridian_name :
- Greenwich
- geographic_crs_name :
- unknown
- horizontal_datum_name :
- World Geodetic System 1984
- projected_crs_name :
- unknown
- grid_mapping_name :
- azimuthal_equidistant
- latitude_of_projection_origin :
- 49.914299
- longitude_of_projection_origin :
- 5.5056
- false_easting :
- 0.0
- false_northing :
- 0.0
array(0)
- DBZH(tilt, azimuth, range)float32-32.0 -32.0 -32.0 ... -32.0 -32.0
- _Undetect :
- 0.0
- long_name :
- Equivalent reflectivity factor H
- standard_name :
- radar_equivalent_reflectivity_factor_h
- units :
- dBZ
array([[[-32. , -32. , -32. , ..., -32. , -32. , -32. ], [-32. , -32. , -32. , ..., -32. , -32. , -32. ], [-32. , -7.5, 4. , ..., -32. , -32. , -32. ], ..., [-32. , -3.5, -2. , ..., -32. , -32. , -32. ], [-32. , -32. , -32. , ..., -32. , -32. , -32. ], [-32. , -32. , -32. , ..., -32. , -32. , -32. ]], [[-32. , -32. , -32. , ..., -32. , -32. , -32. ], [-32. , -32. , -32. , ..., -32. , -32. , -32. ], [-32. , -32. , -32. , ..., -32. , -32. , -32. ], ..., [-32. , -6. , 2.5, ..., -32. , -32. , -32. ], [-32. , -32. , 0. , ..., -32. , -32. , -32. ], [-32. , -32. , -32. , ..., -32. , -32. , -32. ]], [[-32. , -32. , -32. , ..., -32. , -32. , -32. ], [-32. , -32. , -32. , ..., -32. , -32. , -32. ], [-32. , -32. , -32. , ..., -32. , -32. , -32. ], ..., [-32. , -32. , 2. , ..., -32. , -32. , -32. ], [-32. , -32. , -32. , ..., -32. , -32. , -32. ], [-32. , -32. , -32. , ..., -32. , -32. , -32. ]], [[-32. , -32. , 15.5, ..., -32. , -32. , -32. ], [-32. , -32. , -32. , ..., -32. , -32. , -32. ], [-32. , -32. , 5. , ..., -32. , -32. , -32. ], ..., [-32. , -6. , 1.5, ..., -32. , -32. , -32. ], [-32. , -8.5, 4. , ..., -32. , -32. , -32. ], [-32. , -32. , 12. , ..., -32. , -32. , -32. ]], [[-32. , -5. , 5.5, ..., -32. , -32. , -32. ], [-32. , -32. , -32. , ..., -32. , -32. , -32. ], [-32. , -4. , 2. , ..., -32. , -32. , -32. ], ..., [-32. , -32. , -32. , ..., -32. , -32. , -32. ], [-32. , -32. , -32. , ..., -32. , -32. , -32. ], [-32. , -32. , -32. , ..., -32. , -32. , -32. ]]], dtype=float32)
- sweep_number(tilt)int640 1 2 3 4
array([0, 1, 2, 3, 4])
- prt_mode(tilt)<U7'not_set' 'not_set' ... 'not_set'
array(['not_set', 'not_set', 'not_set', 'not_set', 'not_set'], dtype='<U7')
- follow_mode(tilt)<U7'not_set' 'not_set' ... 'not_set'
array(['not_set', 'not_set', 'not_set', 'not_set', 'not_set'], dtype='<U7')
- sweep_fixed_angle(tilt)float640.3 0.9 1.8 3.3 6.0
array([0.3, 0.9, 1.8, 3.3, 6. ])
- sat(tilt, azimuth, range)uint86 6 6 6 6 6 6 ... 10 10 10 10 10 10
array([[[ 6, 6, 6, ..., 10, 10, 10], [ 6, 6, 6, ..., 10, 10, 10], [ 6, 6, 6, ..., 10, 10, 10], ..., [ 6, 6, 6, ..., 10, 10, 10], [ 6, 6, 6, ..., 10, 10, 10], [ 6, 6, 6, ..., 10, 10, 10]], [[ 6, 6, 6, ..., 10, 10, 10], [ 6, 6, 6, ..., 10, 10, 10], [ 6, 6, 6, ..., 10, 10, 10], ..., [ 6, 6, 6, ..., 10, 10, 10], [ 6, 6, 6, ..., 10, 10, 10], [ 6, 6, 6, ..., 10, 10, 10]], [[ 6, 6, 6, ..., 10, 10, 10], [ 6, 6, 6, ..., 10, 10, 10], [ 6, 6, 6, ..., 10, 10, 10], ..., [ 6, 6, 6, ..., 10, 10, 10], [ 6, 6, 6, ..., 10, 10, 10], [ 6, 6, 6, ..., 10, 10, 10]], [[ 6, 6, 6, ..., 10, 10, 10], [ 6, 6, 6, ..., 10, 10, 10], [ 6, 6, 6, ..., 10, 10, 10], ..., [ 6, 6, 6, ..., 10, 10, 10], [ 6, 6, 6, ..., 10, 10, 10], [ 6, 6, 6, ..., 10, 10, 10]], [[ 6, 6, 6, ..., 10, 10, 10], [ 6, 6, 6, ..., 16, 16, 10], [ 6, 6, 6, ..., 16, 16, 16], ..., [ 6, 6, 6, ..., 10, 10, 10], [ 6, 6, 6, ..., 10, 10, 10], [ 6, 6, 6, ..., 10, 10, 10]]], dtype=uint8)
- clutter(tilt, azimuth, range)boolFalse False False ... False False
array([[[False, False, False, ..., False, False, False], [False, False, False, ..., False, False, False], [False, False, False, ..., False, False, False], ..., [False, False, False, ..., False, False, False], [False, False, False, ..., False, False, False], [False, False, False, ..., False, False, False]], [[False, False, False, ..., False, False, False], [False, False, False, ..., False, False, False], [False, False, False, ..., False, False, False], ..., [False, False, False, ..., False, False, False], [False, False, False, ..., False, False, False], [False, False, False, ..., False, False, False]], [[False, False, False, ..., False, False, False], [False, False, False, ..., False, False, False], [False, False, False, ..., False, False, False], ..., [False, False, False, ..., False, False, False], [False, False, False, ..., False, False, False], [False, False, False, ..., False, False, False]], [[False, False, False, ..., False, False, False], [False, False, False, ..., False, False, False], [False, False, False, ..., False, False, False], ..., [False, False, False, ..., False, False, False], [False, False, False, ..., False, False, False], [False, False, False, ..., False, False, False]], [[False, False, False, ..., False, False, False], [False, False, False, ..., False, False, False], [False, False, False, ..., False, False, False], ..., [False, False, False, ..., False, False, False], [False, False, False, ..., False, False, False], [False, False, False, ..., False, False, False]]])
- rangePandasIndex
PandasIndex(Index([ 125.0, 375.0, 625.0, 875.0, 1125.0, 1375.0, 1625.0, 1875.0, 2125.0, 2375.0, ... 237625.0, 237875.0, 238125.0, 238375.0, 238625.0, 238875.0, 239125.0, 239375.0, 239625.0, 239875.0], dtype='float32', name='range', length=960))
- azimuthPandasIndex
PandasIndex(Index([ 0.5, 1.5, 2.5, 3.5, 4.5, 5.5, 6.5, 7.5, 8.5, 9.5, ... 350.5, 351.5, 352.5, 353.5, 354.5, 355.5, 356.5, 357.5, 358.5, 359.5], dtype='float32', name='azimuth', length=360))
Plot the results#
[13]:
fig = plt.figure(figsize=(16, 8))
tilt = 0
ax = fig.add_subplot(131)
pm = vol.DBZH[tilt].wrl.vis.plot(ax=ax)
plt.colorbar(pm, shrink=0.5)
plt.title("Radar reflectivity")
ax = fig.add_subplot(132)
pm = vol.sat[tilt].wrl.vis.plot(ax=ax)
plt.colorbar(pm, shrink=0.5)
plt.title("Satellite cloud classification")
ax = fig.add_subplot(133)
pm = vol.clutter[tilt].wrl.vis.plot(ax=ax)
plt.colorbar(pm, shrink=0.5)
plt.title("Detected clutter")
[13]:
Text(0.5, 1.0, 'Detected clutter')
