\(\Delta \phi_{DP}\)#
We will use the simple method of finding the first and the last non NAN values per ray from. This is the most simple and probably not very robust method. See also PHIDP Processing Notebook.
import matplotlib.pyplot as plt
import numpy as np
import xarray as xr
import radarpolarimetry as rp
Load Data#
stage = "04_kdp"
dtime = "20170810T1100"
fname = rp.data_path() / "lecture" / f"{stage}_{dtime}.zarr"
swp = xr.open_dataset(fname, chunks={})
display(swp)
<xarray.Dataset> Size: 68MB
Dimensions: (azimuth: 360, range: 750)
Coordinates: (12/16)
* azimuth (azimuth) float64 3kB 0.5 1.5 2.5 ... 357.5 358.5 359.5
elevation (azimuth) float64 3kB dask.array<chunksize=(360,), meta=np.ndarray>
time (azimuth) datetime64[ns] 3kB dask.array<chunksize=(360,), meta=np.ndarray>
* range (range) float32 3kB 100.0 300.0 ... 1.497e+05 1.499e+05
bins (azimuth, range) float32 1MB dask.array<chunksize=(180, 375), meta=np.ndarray>
gr (azimuth, range) float64 2MB dask.array<chunksize=(90, 375), meta=np.ndarray>
... ...
altitude float64 8B ...
crs_wkt int64 8B ...
latitude float64 8B ...
longitude float64 8B ...
NOISE_LEVEL float64 8B ...
sweep_mode <U20 80B ...
Data variables: (12/36)
CMAP (azimuth, range) float64 2MB dask.array<chunksize=(180, 750), meta=np.ndarray>
CMAP2 (azimuth, range) uint8 270kB dask.array<chunksize=(180, 750), meta=np.ndarray>
DBTH (azimuth, range) float64 2MB dask.array<chunksize=(180, 750), meta=np.ndarray>
DBTV (azimuth, range) float64 2MB dask.array<chunksize=(180, 750), meta=np.ndarray>
DBZH (azimuth, range) float64 2MB dask.array<chunksize=(180, 750), meta=np.ndarray>
DBZV (azimuth, range) float64 2MB dask.array<chunksize=(180, 750), meta=np.ndarray>
... ...
SYSPHI4 (azimuth) float64 3kB dask.array<chunksize=(360,), meta=np.ndarray>
VRADH (azimuth, range) float64 2MB dask.array<chunksize=(180, 750), meta=np.ndarray>
VRADV (azimuth, range) float64 2MB dask.array<chunksize=(180, 750), meta=np.ndarray>
WRADH (azimuth, range) float64 2MB dask.array<chunksize=(180, 750), meta=np.ndarray>
WRADV (azimuth, range) float64 2MB dask.array<chunksize=(180, 750), meta=np.ndarray>
ZDR (azimuth, range) float64 2MB dask.array<chunksize=(180, 750), meta=np.ndarray>
Attributes:
source: gamic
ant_gain_h: 44.0
ant_gain_v: 44.0
noise_power_h: -1.39495
noise_power_v: -1.09706
rx_loss_h: 0.73
rx_loss_v: 0.73xarray.Dataset
- azimuth: 360
- range: 750
- azimuth(azimuth)float640.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], shape=(360,))
- elevation(azimuth)float64dask.array<chunksize=(360,), meta=np.ndarray>
- standard_name :
- ray_elevation_angle
- long_name :
- elevation_angle_from_horizontal_plane
- units :
- degrees
- axis :
- radial_elevation_coordinate
Array Chunk Bytes 2.81 kiB 2.81 kiB Shape (360,) (360,) Dask graph 1 chunks in 2 graph layers Data type float64 numpy.ndarray - time(azimuth)datetime64[ns]dask.array<chunksize=(360,), meta=np.ndarray>
- standard_name :
- time
Array Chunk Bytes 2.81 kiB 2.81 kiB Shape (360,) (360,) Dask graph 1 chunks in 2 graph layers Data type datetime64[ns] numpy.ndarray - range(range)float32100.0 300.0 ... 1.497e+05 1.499e+05
- units :
- meters
- standard_name :
- projection_range_coordinate
- long_name :
- range_to_measurement_volume
- axis :
- radial_range_coordinate
- meters_between_gates :
- 200.0
- spacing_is_constant :
- true
- meters_to_center_of_first_gate :
- 100.0
array([1.000e+02, 3.000e+02, 5.000e+02, ..., 1.495e+05, 1.497e+05, 1.499e+05], shape=(750,), dtype=float32) - bins(azimuth, range)float32dask.array<chunksize=(180, 375), meta=np.ndarray>
- units :
- meters
- standard_name :
- projection_range_coordinate
- long_name :
- range_to_measurement_volume
- axis :
- radial_range_coordinate
- meters_between_gates :
- 200.0
- spacing_is_constant :
- true
- meters_to_center_of_first_gate :
- 100.0
Array Chunk Bytes 1.03 MiB 263.67 kiB Shape (360, 750) (180, 375) Dask graph 4 chunks in 2 graph layers Data type float32 numpy.ndarray - gr(azimuth, range)float64dask.array<chunksize=(90, 375), meta=np.ndarray>
- standard_name :
- distance_from_radar
- units :
- metre
Array Chunk Bytes 2.06 MiB 263.67 kiB Shape (360, 750) (90, 375) Dask graph 8 chunks in 2 graph layers Data type float64 numpy.ndarray - rays(azimuth, range)float64dask.array<chunksize=(90, 375), meta=np.ndarray>
- standard_name :
- ray_azimuth_angle
- long_name :
- azimuth_angle_from_true_north
- units :
- degrees
- axis :
- radial_azimuth_coordinate
Array Chunk Bytes 2.06 MiB 263.67 kiB Shape (360, 750) (90, 375) Dask graph 8 chunks in 2 graph layers Data type float64 numpy.ndarray - x(azimuth, range)float64dask.array<chunksize=(90, 375), meta=np.ndarray>
- axis :
- X
- long_name :
- Easting
- standard_name :
- projection_x_coordinate
- units :
- metre
Array Chunk Bytes 2.06 MiB 263.67 kiB Shape (360, 750) (90, 375) Dask graph 8 chunks in 2 graph layers Data type float64 numpy.ndarray - y(azimuth, range)float64dask.array<chunksize=(90, 375), meta=np.ndarray>
- axis :
- Y
- long_name :
- Northing
- standard_name :
- projection_y_coordinate
- units :
- metre
Array Chunk Bytes 2.06 MiB 263.67 kiB Shape (360, 750) (90, 375) Dask graph 8 chunks in 2 graph layers Data type float64 numpy.ndarray - z(azimuth, range)float64dask.array<chunksize=(90, 375), meta=np.ndarray>
- standard_name :
- height_above_ground
- units :
- metre
Array Chunk Bytes 2.06 MiB 263.67 kiB Shape (360, 750) (90, 375) Dask graph 8 chunks in 2 graph layers Data type float64 numpy.ndarray - altitude()float64...
- long_name :
- altitude
- units :
- meters
- standard_name :
- altitude
[1 values with dtype=float64]
- crs_wkt()int64...
- crs_wkt :
- PROJCRS["AEQD centered at 50.73052N 7.071663E",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["Azimuthal Equidistant",ID["EPSG",1125]],PARAMETER["Latitude of natural origin",50.73052,ANGLEUNIT["degree",0.0174532925199433],ID["EPSG",8801]],PARAMETER["Longitude of natural origin",7.071663,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 :
- AEQD centered at 50.73052N 7.071663E
- grid_mapping_name :
- azimuthal_equidistant
- latitude_of_projection_origin :
- 50.73052
- longitude_of_projection_origin :
- 7.071663
- false_easting :
- 0.0
- false_northing :
- 0.0
[1 values with dtype=int64]
- latitude()float64...
- long_name :
- latitude
- units :
- degrees_north
- positive :
- up
- standard_name :
- latitude
[1 values with dtype=float64]
- longitude()float64...
- long_name :
- longitude
- units :
- degrees_east
- standard_name :
- longitude
[1 values with dtype=float64]
- NOISE_LEVEL()float64...
[1 values with dtype=float64]
- sweep_mode()<U20...
[1 values with dtype=<U20]
- CMAP(azimuth, range)float64dask.array<chunksize=(180, 750), meta=np.ndarray>
- format :
- UV16
- is_dft :
- 0
- units :
- unitless
- long_name :
- Clutter Map
- standard_name :
- clutter_map
- _Undetect :
- 0.0
Array Chunk Bytes 2.06 MiB 1.03 MiB Shape (360, 750) (180, 750) Dask graph 2 chunks in 2 graph layers Data type float64 numpy.ndarray - CMAP2(azimuth, range)uint8dask.array<chunksize=(180, 750), meta=np.ndarray>
- format :
- UV8
- is_dft :
- 0
- unit :
- dBZ
- units :
- unitless
- long_name :
- Clutter Map
- standard_name :
- clutter_map
- _Undetect :
- 0.0
- short_name :
- CMAP
Array Chunk Bytes 263.67 kiB 131.84 kiB Shape (360, 750) (180, 750) Dask graph 2 chunks in 2 graph layers Data type uint8 numpy.ndarray - DBTH(azimuth, range)float64dask.array<chunksize=(180, 750), meta=np.ndarray>
- format :
- UV8
- is_dft :
- 0
- unit :
- dBZ
- units :
- dBZ
- long_name :
- Total power H (uncorrected reflectivity)
- standard_name :
- radar_equivalent_reflectivity_factor_h
- _Undetect :
- 0.0
Array Chunk Bytes 2.06 MiB 1.03 MiB Shape (360, 750) (180, 750) Dask graph 2 chunks in 2 graph layers Data type float64 numpy.ndarray - DBTV(azimuth, range)float64dask.array<chunksize=(180, 750), meta=np.ndarray>
- format :
- UV8
- is_dft :
- 0
- unit :
- dBZ
- units :
- dBZ
- long_name :
- Total power V (uncorrected reflectivity)
- standard_name :
- radar_equivalent_reflectivity_factor_v
- _Undetect :
- 0.0
Array Chunk Bytes 2.06 MiB 1.03 MiB Shape (360, 750) (180, 750) Dask graph 2 chunks in 2 graph layers Data type float64 numpy.ndarray - DBZH(azimuth, range)float64dask.array<chunksize=(180, 750), meta=np.ndarray>
- format :
- UV8
- is_dft :
- 0
- unit :
- dBZ
- units :
- dBZ
- long_name :
- Equivalent reflectivity factor H
- standard_name :
- radar_equivalent_reflectivity_factor_h
- _Undetect :
- 0.0
Array Chunk Bytes 2.06 MiB 1.03 MiB Shape (360, 750) (180, 750) Dask graph 2 chunks in 2 graph layers Data type float64 numpy.ndarray - DBZV(azimuth, range)float64dask.array<chunksize=(180, 750), meta=np.ndarray>
- format :
- UV8
- is_dft :
- 0
- unit :
- dBZ
- units :
- dBZ
- long_name :
- Equivalent reflectivity factor V
- standard_name :
- radar_equivalent_reflectivity_factor_v
- _Undetect :
- 0.0
Array Chunk Bytes 2.06 MiB 1.03 MiB Shape (360, 750) (180, 750) Dask graph 2 chunks in 2 graph layers Data type float64 numpy.ndarray - follow_mode()<U7...
[1 values with dtype=<U7]
- KDP(azimuth, range)float64dask.array<chunksize=(180, 750), meta=np.ndarray>
- format :
- UV8
- is_dft :
- 0
- unit :
- deg/km
- units :
- degrees per kilometer
- long_name :
- Specific differential phase HV
- standard_name :
- radar_specific_differential_phase_hv
- _Undetect :
- 0.0
Array Chunk Bytes 2.06 MiB 1.03 MiB Shape (360, 750) (180, 750) Dask graph 2 chunks in 2 graph layers Data type float64 numpy.ndarray - KDP_LANC(azimuth, range)float64dask.array<chunksize=(90, 375), meta=np.ndarray>
- standard_name :
- radar_specific_differential_phase_hv
- long_name :
- Specific differential phase HV
- short_name :
- KDP
- units :
- degrees per kilometer
Array Chunk Bytes 2.06 MiB 263.67 kiB Shape (360, 750) (90, 375) Dask graph 8 chunks in 2 graph layers Data type float64 numpy.ndarray - KDP_VULP(azimuth, range)float64dask.array<chunksize=(90, 375), meta=np.ndarray>
- standard_name :
- radar_specific_differential_phase_hv
- long_name :
- Specific differential phase HV
- short_name :
- KDP
- units :
- degrees per kilometer
Array Chunk Bytes 2.06 MiB 263.67 kiB Shape (360, 750) (90, 375) Dask graph 8 chunks in 2 graph layers Data type float64 numpy.ndarray - nyquist_velocity()float64...
- standard_name :
- nyquist_velocity
- units :
- m s-1
[1 values with dtype=float64]
- PHIDP(azimuth, range)float64dask.array<chunksize=(180, 750), meta=np.ndarray>
- format :
- UV16
- is_dft :
- 0
- unit :
- deg
- units :
- degrees
- long_name :
- Differential phase HV
- standard_name :
- radar_differential_phase_hv
- _Undetect :
- 0.0
Array Chunk Bytes 2.06 MiB 1.03 MiB Shape (360, 750) (180, 750) Dask graph 2 chunks in 2 graph layers Data type float64 numpy.ndarray - PHIDP_CORR1(azimuth, range)float64dask.array<chunksize=(90, 375), meta=np.ndarray>
- format :
- UV16
- is_dft :
- 0
- unit :
- deg
- units :
- degrees
- long_name :
- Differential phase HV
- standard_name :
- radar_differential_phase_hv
- _Undetect :
- 0.0
Array Chunk Bytes 2.06 MiB 263.67 kiB Shape (360, 750) (90, 375) Dask graph 8 chunks in 2 graph layers Data type float64 numpy.ndarray - PHIDP_CORR2(azimuth, range)float64dask.array<chunksize=(90, 375), meta=np.ndarray>
- format :
- UV16
- is_dft :
- 0
- unit :
- deg
- units :
- degrees
- long_name :
- Differential phase HV
- standard_name :
- radar_differential_phase_hv
- _Undetect :
- 0.0
Array Chunk Bytes 2.06 MiB 263.67 kiB Shape (360, 750) (90, 375) Dask graph 8 chunks in 2 graph layers Data type float64 numpy.ndarray - PHIDP_CORR3(azimuth, range)float64dask.array<chunksize=(90, 375), meta=np.ndarray>
- format :
- UV16
- is_dft :
- 0
- unit :
- deg
- units :
- degrees
- long_name :
- Differential phase HV
- standard_name :
- radar_differential_phase_hv
- _Undetect :
- 0.0
Array Chunk Bytes 2.06 MiB 263.67 kiB Shape (360, 750) (90, 375) Dask graph 8 chunks in 2 graph layers Data type float64 numpy.ndarray - PHIDP_CORR4(azimuth, range)float64dask.array<chunksize=(90, 375), meta=np.ndarray>
- format :
- UV16
- is_dft :
- 0
- unit :
- deg
- units :
- degrees
- long_name :
- Differential phase HV
- standard_name :
- radar_differential_phase_hv
- _Undetect :
- 0.0
Array Chunk Bytes 2.06 MiB 263.67 kiB Shape (360, 750) (90, 375) Dask graph 8 chunks in 2 graph layers Data type float64 numpy.ndarray - PHIDP_OC1(azimuth, range)float64dask.array<chunksize=(90, 375), meta=np.ndarray>
- format :
- UV16
- is_dft :
- 0
- unit :
- deg
- units :
- degrees
- long_name :
- Differential phase HV
- standard_name :
- radar_differential_phase_hv
- _Undetect :
- 0.0
Array Chunk Bytes 2.06 MiB 263.67 kiB Shape (360, 750) (90, 375) Dask graph 8 chunks in 2 graph layers Data type float64 numpy.ndarray - PHIDP_OC2(azimuth, range)float64dask.array<chunksize=(90, 375), meta=np.ndarray>
- format :
- UV16
- is_dft :
- 0
- unit :
- deg
- units :
- degrees
- long_name :
- Differential phase HV
- standard_name :
- radar_differential_phase_hv
- _Undetect :
- 0.0
Array Chunk Bytes 2.06 MiB 263.67 kiB Shape (360, 750) (90, 375) Dask graph 8 chunks in 2 graph layers Data type float64 numpy.ndarray - PHIDP_OC3(azimuth, range)float64dask.array<chunksize=(90, 375), meta=np.ndarray>
- format :
- UV16
- is_dft :
- 0
- unit :
- deg
- units :
- degrees
- long_name :
- Differential phase HV
- standard_name :
- radar_differential_phase_hv
- _Undetect :
- 0.0
Array Chunk Bytes 2.06 MiB 263.67 kiB Shape (360, 750) (90, 375) Dask graph 8 chunks in 2 graph layers Data type float64 numpy.ndarray - PHIDP_OC4(azimuth, range)float64dask.array<chunksize=(90, 375), meta=np.ndarray>
- format :
- UV16
- is_dft :
- 0
- unit :
- deg
- units :
- degrees
- long_name :
- Differential phase HV
- standard_name :
- radar_differential_phase_hv
- _Undetect :
- 0.0
Array Chunk Bytes 2.06 MiB 263.67 kiB Shape (360, 750) (90, 375) Dask graph 8 chunks in 2 graph layers Data type float64 numpy.ndarray - prt_mode()<U7...
[1 values with dtype=<U7]
- RHOHV(azimuth, range)float64dask.array<chunksize=(180, 750), meta=np.ndarray>
- format :
- UV8
- is_dft :
- 0
- units :
- unitless
- long_name :
- Correlation coefficient HV
- standard_name :
- radar_correlation_coefficient_hv
- _Undetect :
- 0.0
Array Chunk Bytes 2.06 MiB 1.03 MiB Shape (360, 750) (180, 750) Dask graph 2 chunks in 2 graph layers Data type float64 numpy.ndarray - RHOHV_NC(azimuth, range)float64dask.array<chunksize=(90, 375), meta=np.ndarray>
- format :
- UV8
- is_dft :
- 0
- units :
- unitless
- _Undetect :
- 0.0
- unit :
- dBZ
- axis :
- radial_range_coordinate
- meters_between_gates :
- 200.0
- spacing_is_constant :
- true
- meters_to_center_of_first_gate :
- 100.0
- short_name :
- SNRH
- long_name :
- Correlation coefficient HV
- standard_name :
- radar_correlation_coefficient_hv
Array Chunk Bytes 2.06 MiB 263.67 kiB Shape (360, 750) (90, 375) Dask graph 8 chunks in 2 graph layers Data type float64 numpy.ndarray - RSUM(azimuth, range)float64dask.array<chunksize=(360, 750), meta=np.ndarray>
- format :
- UV8
- is_dft :
- 0
- unit :
- dBZ
- units :
- dBZ
- long_name :
- Total power H (uncorrected reflectivity)
- standard_name :
- radar_equivalent_reflectivity_factor_h
- _Undetect :
- 0.0
Array Chunk Bytes 2.06 MiB 2.06 MiB Shape (360, 750) (360, 750) Dask graph 1 chunks in 2 graph layers Data type float64 numpy.ndarray - SNRH(azimuth, range)float64dask.array<chunksize=(90, 375), meta=np.ndarray>
- format :
- UV8
- is_dft :
- 0
- unit :
- dBZ
- _Undetect :
- 0.0
- axis :
- radial_range_coordinate
- meters_between_gates :
- 200.0
- spacing_is_constant :
- true
- meters_to_center_of_first_gate :
- 100.0
- units :
- unitless
- standard_name :
- signal_noise_ratio_h
- long_name :
- Signal Noise Ratio H
- short_name :
- SNRH
Array Chunk Bytes 2.06 MiB 263.67 kiB Shape (360, 750) (90, 375) Dask graph 8 chunks in 2 graph layers Data type float64 numpy.ndarray - sweep_fixed_angle()float64...
[1 values with dtype=float64]
- sweep_number()int64...
[1 values with dtype=int64]
- SYSPHI1()float64...
- format :
- UV16
- is_dft :
- 0
- unit :
- deg
- units :
- degrees
- long_name :
- Differential phase HV
- standard_name :
- radar_differential_phase_hv
- _Undetect :
- 0.0
[1 values with dtype=float64]
- SYSPHI2()float64...
- format :
- UV16
- is_dft :
- 0
- unit :
- deg
- units :
- degrees
- long_name :
- Differential phase HV
- standard_name :
- radar_differential_phase_hv
- _Undetect :
- 0.0
[1 values with dtype=float64]
- SYSPHI3()float64...
- format :
- UV16
- is_dft :
- 0
- unit :
- deg
- units :
- degrees
- long_name :
- Differential phase HV
- standard_name :
- radar_differential_phase_hv
- _Undetect :
- 0.0
[1 values with dtype=float64]
- SYSPHI4(azimuth)float64dask.array<chunksize=(360,), meta=np.ndarray>
Array Chunk Bytes 2.81 kiB 2.81 kiB Shape (360,) (360,) Dask graph 1 chunks in 2 graph layers Data type float64 numpy.ndarray - VRADH(azimuth, range)float64dask.array<chunksize=(180, 750), meta=np.ndarray>
- format :
- UV8
- is_dft :
- 0
- unit :
- m/s
- units :
- meters per seconds
- long_name :
- Radial velocity of scatterers away from instrument H
- standard_name :
- radial_velocity_of_scatterers_away_from_instrument_h
- _Undetect :
- 0.0
Array Chunk Bytes 2.06 MiB 1.03 MiB Shape (360, 750) (180, 750) Dask graph 2 chunks in 2 graph layers Data type float64 numpy.ndarray - VRADV(azimuth, range)float64dask.array<chunksize=(180, 750), meta=np.ndarray>
- format :
- UV8
- is_dft :
- 0
- unit :
- m/s
- units :
- meters per second
- long_name :
- Radial velocity of scatterers away from instrument V
- standard_name :
- radial_velocity_of_scatterers_away_from_instrument_v
- _Undetect :
- 0.0
Array Chunk Bytes 2.06 MiB 1.03 MiB Shape (360, 750) (180, 750) Dask graph 2 chunks in 2 graph layers Data type float64 numpy.ndarray - WRADH(azimuth, range)float64dask.array<chunksize=(180, 750), meta=np.ndarray>
- format :
- UV8
- is_dft :
- 0
- unit :
- m/s
- units :
- meters per seconds
- long_name :
- Doppler spectrum width H
- standard_name :
- radar_doppler_spectrum_width_h
- _Undetect :
- 0.0
Array Chunk Bytes 2.06 MiB 1.03 MiB Shape (360, 750) (180, 750) Dask graph 2 chunks in 2 graph layers Data type float64 numpy.ndarray - WRADV(azimuth, range)float64dask.array<chunksize=(180, 750), meta=np.ndarray>
- format :
- UV8
- is_dft :
- 0
- unit :
- m/s
- units :
- meters per second
- long_name :
- Doppler spectrum width V
- standard_name :
- radar_doppler_spectrum_width_v
- _Undetect :
- 0.0
Array Chunk Bytes 2.06 MiB 1.03 MiB Shape (360, 750) (180, 750) Dask graph 2 chunks in 2 graph layers Data type float64 numpy.ndarray - ZDR(azimuth, range)float64dask.array<chunksize=(180, 750), meta=np.ndarray>
- format :
- UV8
- is_dft :
- 0
- unit :
- dB
- units :
- dB
- long_name :
- Log differential reflectivity H/V
- standard_name :
- radar_differential_reflectivity_hv
- _Undetect :
- 0.0
Array Chunk Bytes 2.06 MiB 1.03 MiB Shape (360, 750) (180, 750) Dask graph 2 chunks in 2 graph layers Data type float64 numpy.ndarray
- source :
- gamic
- ant_gain_h :
- 44.0
- ant_gain_v :
- 44.0
- noise_power_h :
- -1.39495
- noise_power_v :
- -1.09706
- rx_loss_h :
- 0.73
- rx_loss_v :
- 0.73
Plot Overview#
fig = plt.figure(figsize=(14, 6))
ax1 = fig.add_subplot(121)
im1 = rp.plot_moment(swp.PHIDP_CORR1, ax=ax1)
t = plt.title(r"Corrected $\phi_{DP}$")
t.set_y(1.1)
ax2 = fig.add_subplot(122)
im2 = rp.plot_moment(swp.DBZH, ax=ax2)
t = plt.title(r"Uncorrected $Z_{H}$")
t.set_y(1.1)
fig.suptitle(swp.time.min().values.astype("<M8[s]"), fontsize=14)
fig.tight_layout()
Choose Differential Phase Moment#
We also mask using CMAP/CMAP2 and RHOHV.
CMAP = swp.CMAP.astype("uint16")
noise = ((CMAP >> 0) & 0x1).astype(bool)
clutter = ((CMAP >> 2) & 0x1).astype(bool)
masked = noise | clutter
valid = ~masked
phi = swp.PHIDP.where((swp.CMAP2 == 0) & valid & (swp.RHOHV > 0.9))
Set Range Region#
rng = 2000.0
Get Range parameters#
range_step = np.diff(phi.range)[0]
nprec = int(rng / range_step)
if nprec % 2 == 0:
nprec += 1
offset = nprec // 2 * np.diff(phi.range)[0]
offset_idx = nprec // 2
print(nprec, offset, offset_idx)
11 1000.0 5
Create binary array#
phib = xr.where(np.isnan(phi), 0, 1)
phib.wrl.vis.plot()
<matplotlib.collections.QuadMesh at 0x7f9d5831d590>
take nprec range bins and calculate rolling sum#
phib_sum = phib.rolling(range=nprec, center=True, min_periods=nprec).sum(skipna=True)
fig, (ax1, ax2) = plt.subplots(1, 2, figsize=(12, 4))
phib_sum.plot(x="azimuth", ax=ax1)
secs = "<M8[s]"
t0 = phi.time.min().values.astype(secs)
ax1.set_title(f"Valid Count - {t0}")
phi.where(phib_sum == nprec).plot(x="azimuth", ax=ax2)
ax2.set_title(f"{phi.name} - {t0}")
plt.tight_layout()
Get start range per each ray and retrieve phase values#
First consecutive valid N bins.
start_range = phib_sum.idxmax(dim="range") - offset
start_range_idx = phib_sum.argmax(dim="range") - offset_idx
first = phi.where(
(phi.range >= start_range.load()) & (phi.range <= start_range.load() + rng),
)
fig, (ax1, ax2) = plt.subplots(2, 1, figsize=(16, 8))
phi.where(phib_sum >= offset_idx).plot(x="azimuth", vmin=80, vmax=90, ax=ax1)
start_range.plot(lw=0.8, c="k", ax=ax1)
ax1.set_ylim(0, 60000)
secs = "<M8[s]"
t0 = phi.time.min().values.astype(secs)
ax1.set_title(f"{phi.name} - {t0}")
first.plot(x="azimuth", ax=ax2)
start_range.plot(lw=0.8, c="k", ax=ax2)
ax2.set_title(f"{phi.name} first N - {t0}")
ax2.set_ylim(0, 60000)
plt.tight_layout()
Get stop range per each ray and retrieve phase values#
We just do this in reversed range order. Last consecutive valid N bins.
stop_range = phib_sum[..., ::-1].idxmax(dim="range") - offset
stop_range_idx = (
len(phib_sum.range) - (phib_sum[..., ::-1].argmax(dim="range") - offset_idx) - 2
)
last = phi.where(
(phi.range >= stop_range.load() - rng) & (phi.range <= stop_range.load()),
)
fig, (ax1, ax2) = plt.subplots(2, 1, figsize=(16, 8))
phi.where(phib_sum >= offset_idx).plot(x="azimuth", ax=ax1)
stop_range.plot(lw=0.8, c="k", ax=ax1)
secs = "<M8[s]"
t0 = phi.time.min().values.astype(secs)
ax1.set_title(f"{phi.name} - {t0}")
last.plot(x="azimuth", ax=ax2)
stop_range.plot(lw=0.8, c="k", ax=ax2)
ax2.set_title(f"{phi.name} first N - {t0}")
plt.tight_layout()
Calculate \(\Delta \phi_{DP}\)#
first = first.median("range", skipna=True)
last = last.median("range", skipna=True)
dphi = last - first
Merge sweep Data#
cphase = xr.Dataset(
dict(
phib=phib_sum,
offset=offset,
offset_idx=offset_idx,
start_range=start_range,
stop_range=stop_range,
first=first,
first_idx=start_range_idx,
last=last,
last_idx=stop_range_idx,
dphi=dphi,
)
)
swp = xr.merge([swp, cphase])
display(swp)
<xarray.Dataset> Size: 71MB
Dimensions: (azimuth: 360, range: 750)
Coordinates: (12/16)
* azimuth (azimuth) float64 3kB 0.5 1.5 2.5 ... 357.5 358.5 359.5
elevation (azimuth) float64 3kB 0.9998 0.9998 ... 0.9998 0.9998
time (azimuth) datetime64[ns] 3kB 2017-08-10T11:03:42.69900...
* range (range) float32 3kB 100.0 300.0 ... 1.497e+05 1.499e+05
bins (azimuth, range) float32 1MB dask.array<chunksize=(180, 375), meta=np.ndarray>
gr (azimuth, range) float64 2MB dask.array<chunksize=(90, 375), meta=np.ndarray>
... ...
altitude float64 8B 99.5
crs_wkt int64 8B 0
latitude float64 8B 50.73
longitude float64 8B 7.072
NOISE_LEVEL float64 8B -24.7
sweep_mode <U20 80B 'azimuth_surveillance'
Data variables: (12/46)
CMAP (azimuth, range) float64 2MB dask.array<chunksize=(180, 750), meta=np.ndarray>
CMAP2 (azimuth, range) uint8 270kB dask.array<chunksize=(180, 750), meta=np.ndarray>
DBTH (azimuth, range) float64 2MB dask.array<chunksize=(180, 750), meta=np.ndarray>
DBTV (azimuth, range) float64 2MB dask.array<chunksize=(180, 750), meta=np.ndarray>
DBZH (azimuth, range) float64 2MB dask.array<chunksize=(180, 750), meta=np.ndarray>
DBZV (azimuth, range) float64 2MB dask.array<chunksize=(180, 750), meta=np.ndarray>
... ...
stop_range (azimuth) float32 1kB 5.51e+04 5.53e+04 ... 6.19e+04
first (azimuth) float64 3kB dask.array<chunksize=(180,), meta=np.ndarray>
first_idx (azimuth) int64 3kB dask.array<chunksize=(180,), meta=np.ndarray>
last (azimuth) float64 3kB dask.array<chunksize=(180,), meta=np.ndarray>
last_idx (azimuth) int64 3kB dask.array<chunksize=(180,), meta=np.ndarray>
dphi (azimuth) float64 3kB dask.array<chunksize=(180,), meta=np.ndarray>
Attributes:
source: gamic
ant_gain_h: 44.0
ant_gain_v: 44.0
noise_power_h: -1.39495
noise_power_v: -1.09706
rx_loss_h: 0.73
rx_loss_v: 0.73xarray.Dataset
- azimuth: 360
- range: 750
- azimuth(azimuth)float640.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], shape=(360,))
- elevation(azimuth)float640.9998 0.9998 ... 0.9998 0.9998
- standard_name :
- ray_elevation_angle
- long_name :
- elevation_angle_from_horizontal_plane
- units :
- degrees
- axis :
- radial_elevation_coordinate
array([0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, ... 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586, 0.99975586]) - time(azimuth)datetime64[ns]2017-08-10T11:03:42.699000 ... 2...
- standard_name :
- time
array(['2017-08-10T11:03:42.699000000', '2017-08-10T11:03:42.800000000', '2017-08-10T11:03:42.902000000', '2017-08-10T11:03:43.001000000', '2017-08-10T11:03:43.102000000', '2017-08-10T11:03:43.202000000', '2017-08-10T11:03:43.302000000', '2017-08-10T11:03:43.402000000', '2017-08-10T11:03:43.504000000', '2017-08-10T11:03:43.603000000', '2017-08-10T11:03:43.705000000', '2017-08-10T11:03:43.803000000', '2017-08-10T11:03:43.905000000', '2017-08-10T11:03:44.008000000', '2017-08-10T11:03:44.108000000', '2017-08-10T11:03:44.208000000', '2017-08-10T11:03:44.308000000', '2017-08-10T11:03:44.408000000', '2017-08-10T11:03:44.510000000', '2017-08-10T11:03:44.608000000', '2017-08-10T11:03:44.710000000', '2017-08-10T11:03:44.809000000', '2017-08-10T11:03:44.910000000', '2017-08-10T11:03:45.010000000', '2017-08-10T11:03:45.110000000', '2017-08-10T11:03:45.210000000', '2017-08-10T11:03:45.314000000', '2017-08-10T11:03:45.414000000', '2017-08-10T11:03:45.514000000', '2017-08-10T11:03:45.614000000', '2017-08-10T11:03:45.716000000', '2017-08-10T11:03:45.814000000', '2017-08-10T11:03:45.916000000', '2017-08-10T11:03:46.016000000', '2017-08-10T11:03:46.116000000', '2017-08-10T11:03:46.216000000', '2017-08-10T11:03:46.318000000', '2017-08-10T11:03:46.416000000', '2017-08-10T11:03:46.518000000', '2017-08-10T11:03:46.617000000', ... '2017-08-10T11:03:38.879000000', '2017-08-10T11:03:38.982000000', '2017-08-10T11:03:39.082000000', '2017-08-10T11:03:39.182000000', '2017-08-10T11:03:39.282000000', '2017-08-10T11:03:39.382000000', '2017-08-10T11:03:39.484000000', '2017-08-10T11:03:39.584000000', '2017-08-10T11:03:39.684000000', '2017-08-10T11:03:39.784000000', '2017-08-10T11:03:39.884000000', '2017-08-10T11:03:39.984000000', '2017-08-10T11:03:40.086000000', '2017-08-10T11:03:40.184000000', '2017-08-10T11:03:40.288000000', '2017-08-10T11:03:40.388000000', '2017-08-10T11:03:40.490000000', '2017-08-10T11:03:40.590000000', '2017-08-10T11:03:40.690000000', '2017-08-10T11:03:40.790000000', '2017-08-10T11:03:40.890000000', '2017-08-10T11:03:40.990000000', '2017-08-10T11:03:41.091000000', '2017-08-10T11:03:41.191000000', '2017-08-10T11:03:41.291000000', '2017-08-10T11:03:41.391000000', '2017-08-10T11:03:41.491000000', '2017-08-10T11:03:41.591000000', '2017-08-10T11:03:41.695000000', '2017-08-10T11:03:41.795000000', '2017-08-10T11:03:41.897000000', '2017-08-10T11:03:41.995000000', '2017-08-10T11:03:42.097000000', '2017-08-10T11:03:42.197000000', '2017-08-10T11:03:42.297000000', '2017-08-10T11:03:42.397000000', '2017-08-10T11:03:42.497000000', '2017-08-10T11:03:42.597000000'], dtype='datetime64[ns]') - range(range)float32100.0 300.0 ... 1.497e+05 1.499e+05
- units :
- meters
- standard_name :
- projection_range_coordinate
- long_name :
- range_to_measurement_volume
- axis :
- radial_range_coordinate
- meters_between_gates :
- 200.0
- spacing_is_constant :
- true
- meters_to_center_of_first_gate :
- 100.0
array([1.000e+02, 3.000e+02, 5.000e+02, ..., 1.495e+05, 1.497e+05, 1.499e+05], shape=(750,), dtype=float32) - bins(azimuth, range)float32dask.array<chunksize=(180, 375), meta=np.ndarray>
- units :
- meters
- standard_name :
- projection_range_coordinate
- long_name :
- range_to_measurement_volume
- axis :
- radial_range_coordinate
- meters_between_gates :
- 200.0
- spacing_is_constant :
- true
- meters_to_center_of_first_gate :
- 100.0
Array Chunk Bytes 1.03 MiB 263.67 kiB Shape (360, 750) (180, 375) Dask graph 4 chunks in 5 graph layers Data type float32 numpy.ndarray - gr(azimuth, range)float64dask.array<chunksize=(90, 375), meta=np.ndarray>
- standard_name :
- distance_from_radar
- units :
- metre
Array Chunk Bytes 2.06 MiB 263.67 kiB Shape (360, 750) (90, 375) Dask graph 8 chunks in 5 graph layers Data type float64 numpy.ndarray - rays(azimuth, range)float64dask.array<chunksize=(90, 375), meta=np.ndarray>
- standard_name :
- ray_azimuth_angle
- long_name :
- azimuth_angle_from_true_north
- units :
- degrees
- axis :
- radial_azimuth_coordinate
Array Chunk Bytes 2.06 MiB 263.67 kiB Shape (360, 750) (90, 375) Dask graph 8 chunks in 5 graph layers Data type float64 numpy.ndarray - x(azimuth, range)float64dask.array<chunksize=(90, 375), meta=np.ndarray>
- axis :
- X
- long_name :
- Easting
- standard_name :
- projection_x_coordinate
- units :
- metre
Array Chunk Bytes 2.06 MiB 263.67 kiB Shape (360, 750) (90, 375) Dask graph 8 chunks in 5 graph layers Data type float64 numpy.ndarray - y(azimuth, range)float64dask.array<chunksize=(90, 375), meta=np.ndarray>
- axis :
- Y
- long_name :
- Northing
- standard_name :
- projection_y_coordinate
- units :
- metre
Array Chunk Bytes 2.06 MiB 263.67 kiB Shape (360, 750) (90, 375) Dask graph 8 chunks in 5 graph layers Data type float64 numpy.ndarray - z(azimuth, range)float64dask.array<chunksize=(90, 375), meta=np.ndarray>
- standard_name :
- height_above_ground
- units :
- metre
Array Chunk Bytes 2.06 MiB 263.67 kiB Shape (360, 750) (90, 375) Dask graph 8 chunks in 5 graph layers Data type float64 numpy.ndarray - altitude()float6499.5
- long_name :
- altitude
- units :
- meters
- standard_name :
- altitude
array(99.5)
- crs_wkt()int640
- crs_wkt :
- PROJCRS["AEQD centered at 50.73052N 7.071663E",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["Azimuthal Equidistant",ID["EPSG",1125]],PARAMETER["Latitude of natural origin",50.73052,ANGLEUNIT["degree",0.0174532925199433],ID["EPSG",8801]],PARAMETER["Longitude of natural origin",7.071663,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 :
- AEQD centered at 50.73052N 7.071663E
- grid_mapping_name :
- azimuthal_equidistant
- latitude_of_projection_origin :
- 50.73052
- longitude_of_projection_origin :
- 7.071663
- false_easting :
- 0.0
- false_northing :
- 0.0
array(0)
- latitude()float6450.73
- long_name :
- latitude
- units :
- degrees_north
- positive :
- up
- standard_name :
- latitude
array(50.73052)
- longitude()float647.072
- long_name :
- longitude
- units :
- degrees_east
- standard_name :
- longitude
array(7.071663)
- NOISE_LEVEL()float64-24.7
array(-24.7)
- sweep_mode()<U20'azimuth_surveillance'
array('azimuth_surveillance', dtype='<U20')
- CMAP(azimuth, range)float64dask.array<chunksize=(180, 750), meta=np.ndarray>
- format :
- UV16
- is_dft :
- 0
- units :
- unitless
- long_name :
- Clutter Map
- standard_name :
- clutter_map
- _Undetect :
- 0.0
Array Chunk Bytes 2.06 MiB 1.03 MiB Shape (360, 750) (180, 750) Dask graph 2 chunks in 2 graph layers Data type float64 numpy.ndarray - CMAP2(azimuth, range)uint8dask.array<chunksize=(180, 750), meta=np.ndarray>
- format :
- UV8
- is_dft :
- 0
- unit :
- dBZ
- units :
- unitless
- long_name :
- Clutter Map
- standard_name :
- clutter_map
- _Undetect :
- 0.0
- short_name :
- CMAP
Array Chunk Bytes 263.67 kiB 131.84 kiB Shape (360, 750) (180, 750) Dask graph 2 chunks in 2 graph layers Data type uint8 numpy.ndarray - DBTH(azimuth, range)float64dask.array<chunksize=(180, 750), meta=np.ndarray>
- format :
- UV8
- is_dft :
- 0
- unit :
- dBZ
- units :
- dBZ
- long_name :
- Total power H (uncorrected reflectivity)
- standard_name :
- radar_equivalent_reflectivity_factor_h
- _Undetect :
- 0.0
Array Chunk Bytes 2.06 MiB 1.03 MiB Shape (360, 750) (180, 750) Dask graph 2 chunks in 2 graph layers Data type float64 numpy.ndarray - DBTV(azimuth, range)float64dask.array<chunksize=(180, 750), meta=np.ndarray>
- format :
- UV8
- is_dft :
- 0
- unit :
- dBZ
- units :
- dBZ
- long_name :
- Total power V (uncorrected reflectivity)
- standard_name :
- radar_equivalent_reflectivity_factor_v
- _Undetect :
- 0.0
Array Chunk Bytes 2.06 MiB 1.03 MiB Shape (360, 750) (180, 750) Dask graph 2 chunks in 2 graph layers Data type float64 numpy.ndarray - DBZH(azimuth, range)float64dask.array<chunksize=(180, 750), meta=np.ndarray>
- format :
- UV8
- is_dft :
- 0
- unit :
- dBZ
- units :
- dBZ
- long_name :
- Equivalent reflectivity factor H
- standard_name :
- radar_equivalent_reflectivity_factor_h
- _Undetect :
- 0.0
Array Chunk Bytes 2.06 MiB 1.03 MiB Shape (360, 750) (180, 750) Dask graph 2 chunks in 2 graph layers Data type float64 numpy.ndarray - DBZV(azimuth, range)float64dask.array<chunksize=(180, 750), meta=np.ndarray>
- format :
- UV8
- is_dft :
- 0
- unit :
- dBZ
- units :
- dBZ
- long_name :
- Equivalent reflectivity factor V
- standard_name :
- radar_equivalent_reflectivity_factor_v
- _Undetect :
- 0.0
Array Chunk Bytes 2.06 MiB 1.03 MiB Shape (360, 750) (180, 750) Dask graph 2 chunks in 2 graph layers Data type float64 numpy.ndarray - follow_mode()<U7...
[1 values with dtype=<U7]
- KDP(azimuth, range)float64dask.array<chunksize=(180, 750), meta=np.ndarray>
- format :
- UV8
- is_dft :
- 0
- unit :
- deg/km
- units :
- degrees per kilometer
- long_name :
- Specific differential phase HV
- standard_name :
- radar_specific_differential_phase_hv
- _Undetect :
- 0.0
Array Chunk Bytes 2.06 MiB 1.03 MiB Shape (360, 750) (180, 750) Dask graph 2 chunks in 2 graph layers Data type float64 numpy.ndarray - KDP_LANC(azimuth, range)float64dask.array<chunksize=(90, 375), meta=np.ndarray>
- standard_name :
- radar_specific_differential_phase_hv
- long_name :
- Specific differential phase HV
- short_name :
- KDP
- units :
- degrees per kilometer
Array Chunk Bytes 2.06 MiB 263.67 kiB Shape (360, 750) (90, 375) Dask graph 8 chunks in 2 graph layers Data type float64 numpy.ndarray - KDP_VULP(azimuth, range)float64dask.array<chunksize=(90, 375), meta=np.ndarray>
- standard_name :
- radar_specific_differential_phase_hv
- long_name :
- Specific differential phase HV
- short_name :
- KDP
- units :
- degrees per kilometer
Array Chunk Bytes 2.06 MiB 263.67 kiB Shape (360, 750) (90, 375) Dask graph 8 chunks in 2 graph layers Data type float64 numpy.ndarray - nyquist_velocity()float64...
- standard_name :
- nyquist_velocity
- units :
- m s-1
[1 values with dtype=float64]
- PHIDP(azimuth, range)float64dask.array<chunksize=(180, 750), meta=np.ndarray>
- format :
- UV16
- is_dft :
- 0
- unit :
- deg
- units :
- degrees
- long_name :
- Differential phase HV
- standard_name :
- radar_differential_phase_hv
- _Undetect :
- 0.0
Array Chunk Bytes 2.06 MiB 1.03 MiB Shape (360, 750) (180, 750) Dask graph 2 chunks in 2 graph layers Data type float64 numpy.ndarray - PHIDP_CORR1(azimuth, range)float64dask.array<chunksize=(90, 375), meta=np.ndarray>
- format :
- UV16
- is_dft :
- 0
- unit :
- deg
- units :
- degrees
- long_name :
- Differential phase HV
- standard_name :
- radar_differential_phase_hv
- _Undetect :
- 0.0
Array Chunk Bytes 2.06 MiB 263.67 kiB Shape (360, 750) (90, 375) Dask graph 8 chunks in 2 graph layers Data type float64 numpy.ndarray - PHIDP_CORR2(azimuth, range)float64dask.array<chunksize=(90, 375), meta=np.ndarray>
- format :
- UV16
- is_dft :
- 0
- unit :
- deg
- units :
- degrees
- long_name :
- Differential phase HV
- standard_name :
- radar_differential_phase_hv
- _Undetect :
- 0.0
Array Chunk Bytes 2.06 MiB 263.67 kiB Shape (360, 750) (90, 375) Dask graph 8 chunks in 2 graph layers Data type float64 numpy.ndarray - PHIDP_CORR3(azimuth, range)float64dask.array<chunksize=(90, 375), meta=np.ndarray>
- format :
- UV16
- is_dft :
- 0
- unit :
- deg
- units :
- degrees
- long_name :
- Differential phase HV
- standard_name :
- radar_differential_phase_hv
- _Undetect :
- 0.0
Array Chunk Bytes 2.06 MiB 263.67 kiB Shape (360, 750) (90, 375) Dask graph 8 chunks in 2 graph layers Data type float64 numpy.ndarray - PHIDP_CORR4(azimuth, range)float64dask.array<chunksize=(90, 375), meta=np.ndarray>
- format :
- UV16
- is_dft :
- 0
- unit :
- deg
- units :
- degrees
- long_name :
- Differential phase HV
- standard_name :
- radar_differential_phase_hv
- _Undetect :
- 0.0
Array Chunk Bytes 2.06 MiB 263.67 kiB Shape (360, 750) (90, 375) Dask graph 8 chunks in 2 graph layers Data type float64 numpy.ndarray - PHIDP_OC1(azimuth, range)float64dask.array<chunksize=(90, 375), meta=np.ndarray>
- format :
- UV16
- is_dft :
- 0
- unit :
- deg
- units :
- degrees
- long_name :
- Differential phase HV
- standard_name :
- radar_differential_phase_hv
- _Undetect :
- 0.0
Array Chunk Bytes 2.06 MiB 263.67 kiB Shape (360, 750) (90, 375) Dask graph 8 chunks in 2 graph layers Data type float64 numpy.ndarray - PHIDP_OC2(azimuth, range)float64dask.array<chunksize=(90, 375), meta=np.ndarray>
- format :
- UV16
- is_dft :
- 0
- unit :
- deg
- units :
- degrees
- long_name :
- Differential phase HV
- standard_name :
- radar_differential_phase_hv
- _Undetect :
- 0.0
Array Chunk Bytes 2.06 MiB 263.67 kiB Shape (360, 750) (90, 375) Dask graph 8 chunks in 2 graph layers Data type float64 numpy.ndarray - PHIDP_OC3(azimuth, range)float64dask.array<chunksize=(90, 375), meta=np.ndarray>
- format :
- UV16
- is_dft :
- 0
- unit :
- deg
- units :
- degrees
- long_name :
- Differential phase HV
- standard_name :
- radar_differential_phase_hv
- _Undetect :
- 0.0
Array Chunk Bytes 2.06 MiB 263.67 kiB Shape (360, 750) (90, 375) Dask graph 8 chunks in 2 graph layers Data type float64 numpy.ndarray - PHIDP_OC4(azimuth, range)float64dask.array<chunksize=(90, 375), meta=np.ndarray>
- format :
- UV16
- is_dft :
- 0
- unit :
- deg
- units :
- degrees
- long_name :
- Differential phase HV
- standard_name :
- radar_differential_phase_hv
- _Undetect :
- 0.0
Array Chunk Bytes 2.06 MiB 263.67 kiB Shape (360, 750) (90, 375) Dask graph 8 chunks in 2 graph layers Data type float64 numpy.ndarray - prt_mode()<U7...
[1 values with dtype=<U7]
- RHOHV(azimuth, range)float64dask.array<chunksize=(180, 750), meta=np.ndarray>
- format :
- UV8
- is_dft :
- 0
- units :
- unitless
- long_name :
- Correlation coefficient HV
- standard_name :
- radar_correlation_coefficient_hv
- _Undetect :
- 0.0
Array Chunk Bytes 2.06 MiB 1.03 MiB Shape (360, 750) (180, 750) Dask graph 2 chunks in 2 graph layers Data type float64 numpy.ndarray - RHOHV_NC(azimuth, range)float64dask.array<chunksize=(90, 375), meta=np.ndarray>
- format :
- UV8
- is_dft :
- 0
- units :
- unitless
- _Undetect :
- 0.0
- unit :
- dBZ
- axis :
- radial_range_coordinate
- meters_between_gates :
- 200.0
- spacing_is_constant :
- true
- meters_to_center_of_first_gate :
- 100.0
- short_name :
- SNRH
- long_name :
- Correlation coefficient HV
- standard_name :
- radar_correlation_coefficient_hv
Array Chunk Bytes 2.06 MiB 263.67 kiB Shape (360, 750) (90, 375) Dask graph 8 chunks in 2 graph layers Data type float64 numpy.ndarray - RSUM(azimuth, range)float64dask.array<chunksize=(360, 750), meta=np.ndarray>
- format :
- UV8
- is_dft :
- 0
- unit :
- dBZ
- units :
- dBZ
- long_name :
- Total power H (uncorrected reflectivity)
- standard_name :
- radar_equivalent_reflectivity_factor_h
- _Undetect :
- 0.0
Array Chunk Bytes 2.06 MiB 2.06 MiB Shape (360, 750) (360, 750) Dask graph 1 chunks in 2 graph layers Data type float64 numpy.ndarray - SNRH(azimuth, range)float64dask.array<chunksize=(90, 375), meta=np.ndarray>
- format :
- UV8
- is_dft :
- 0
- unit :
- dBZ
- _Undetect :
- 0.0
- axis :
- radial_range_coordinate
- meters_between_gates :
- 200.0
- spacing_is_constant :
- true
- meters_to_center_of_first_gate :
- 100.0
- units :
- unitless
- standard_name :
- signal_noise_ratio_h
- long_name :
- Signal Noise Ratio H
- short_name :
- SNRH
Array Chunk Bytes 2.06 MiB 263.67 kiB Shape (360, 750) (90, 375) Dask graph 8 chunks in 2 graph layers Data type float64 numpy.ndarray - sweep_fixed_angle()float64...
[1 values with dtype=float64]
- sweep_number()int64...
[1 values with dtype=int64]
- SYSPHI1()float64...
- format :
- UV16
- is_dft :
- 0
- unit :
- deg
- units :
- degrees
- long_name :
- Differential phase HV
- standard_name :
- radar_differential_phase_hv
- _Undetect :
- 0.0
[1 values with dtype=float64]
- SYSPHI2()float64...
- format :
- UV16
- is_dft :
- 0
- unit :
- deg
- units :
- degrees
- long_name :
- Differential phase HV
- standard_name :
- radar_differential_phase_hv
- _Undetect :
- 0.0
[1 values with dtype=float64]
- SYSPHI3()float64...
- format :
- UV16
- is_dft :
- 0
- unit :
- deg
- units :
- degrees
- long_name :
- Differential phase HV
- standard_name :
- radar_differential_phase_hv
- _Undetect :
- 0.0
[1 values with dtype=float64]
- SYSPHI4(azimuth)float64dask.array<chunksize=(360,), meta=np.ndarray>
Array Chunk Bytes 2.81 kiB 2.81 kiB Shape (360,) (360,) Dask graph 1 chunks in 2 graph layers Data type float64 numpy.ndarray - VRADH(azimuth, range)float64dask.array<chunksize=(180, 750), meta=np.ndarray>
- format :
- UV8
- is_dft :
- 0
- unit :
- m/s
- units :
- meters per seconds
- long_name :
- Radial velocity of scatterers away from instrument H
- standard_name :
- radial_velocity_of_scatterers_away_from_instrument_h
- _Undetect :
- 0.0
Array Chunk Bytes 2.06 MiB 1.03 MiB Shape (360, 750) (180, 750) Dask graph 2 chunks in 2 graph layers Data type float64 numpy.ndarray - VRADV(azimuth, range)float64dask.array<chunksize=(180, 750), meta=np.ndarray>
- format :
- UV8
- is_dft :
- 0
- unit :
- m/s
- units :
- meters per second
- long_name :
- Radial velocity of scatterers away from instrument V
- standard_name :
- radial_velocity_of_scatterers_away_from_instrument_v
- _Undetect :
- 0.0
Array Chunk Bytes 2.06 MiB 1.03 MiB Shape (360, 750) (180, 750) Dask graph 2 chunks in 2 graph layers Data type float64 numpy.ndarray - WRADH(azimuth, range)float64dask.array<chunksize=(180, 750), meta=np.ndarray>
- format :
- UV8
- is_dft :
- 0
- unit :
- m/s
- units :
- meters per seconds
- long_name :
- Doppler spectrum width H
- standard_name :
- radar_doppler_spectrum_width_h
- _Undetect :
- 0.0
Array Chunk Bytes 2.06 MiB 1.03 MiB Shape (360, 750) (180, 750) Dask graph 2 chunks in 2 graph layers Data type float64 numpy.ndarray - WRADV(azimuth, range)float64dask.array<chunksize=(180, 750), meta=np.ndarray>
- format :
- UV8
- is_dft :
- 0
- unit :
- m/s
- units :
- meters per second
- long_name :
- Doppler spectrum width V
- standard_name :
- radar_doppler_spectrum_width_v
- _Undetect :
- 0.0
Array Chunk Bytes 2.06 MiB 1.03 MiB Shape (360, 750) (180, 750) Dask graph 2 chunks in 2 graph layers Data type float64 numpy.ndarray - ZDR(azimuth, range)float64dask.array<chunksize=(180, 750), meta=np.ndarray>
- format :
- UV8
- is_dft :
- 0
- unit :
- dB
- units :
- dB
- long_name :
- Log differential reflectivity H/V
- standard_name :
- radar_differential_reflectivity_hv
- _Undetect :
- 0.0
Array Chunk Bytes 2.06 MiB 1.03 MiB Shape (360, 750) (180, 750) Dask graph 2 chunks in 2 graph layers Data type float64 numpy.ndarray - phib(azimuth, range)float64dask.array<chunksize=(180, 741), meta=np.ndarray>
Array Chunk Bytes 2.06 MiB 1.02 MiB Shape (360, 750) (180, 741) Dask graph 4 chunks in 33 graph layers Data type float64 numpy.ndarray - offset()float321e+03
array(1000., dtype=float32)
- offset_idx()int645
array(5)
- start_range(azimuth)float325.49e+04 5.49e+04 ... 1.21e+04
array([54900., 54900., 25500., 44500., 31700., 39900., 4900., 5700., 4900., 4700., 13100., 5700., 4700., 5900., 5900., 5700., 30700., 13300., 12900., 12900., 12700., 12700., 12700., 12900., 13100., 13100., 5500., 5700., 4900., 5500., 6500., 14100., 6700., 5700., 6700., 19700., 21700., 28900., 29100., 24300., 26300., 34100., 19100., 19100., 22300., 31100., 30500., 22500., 22300., 22300., 21500., 19500., 19300., 19100., 19100., 18700., 18700., 22100., 22100., 13300., 12500., 21500., 20300., 20900., 13700., 12500., 9700., 13100., 14300., 17700., 27500., 14700., 13900., 13100., 15500., 14500., 10900., 10900., 11100., 11300., 12900., 13500., 14100., 8500., 9900., 9700., 8700., 7500., 7700., 7900., 8100., 12900., 12100., 11100., 17300., 11900., 16700., 11300., 8100., 8100., 8700., 7900., 9700., 11300., 9900., 9700., 11900., 10700., 18100., 16100., 16300., 26300., 41900., 14500., 15500., 15100., 14900., 15700., 15900., 15900., 21700., 21100., 21500., 21900., 13700., 12500., 7900., 6500., 5700., 6900., 7700., 8300., 8500., 9100., 9300., 9300., 9500., 10900., 5700., 5900., 10700., 11500., 11500., 11700., 10700., 11700., 7900., 6700., 9700., 6300., 12100., 6900., 10300., 11100., 100., 100., 100., 100., 100., 100., ... 19700., 29100., 32900., 16900., 11300., 9100., 8700., 9100., 9300., 11300., 7900., 7900., 6900., 9500., 8300., 8700., 9100., 10900., 10900., 11100., 23300., 30900., 13900., 11500., 10900., 10300., 9100., 8500., 10100., 10100., 7900., 7900., 6900., 7500., 10100., 7500., 7500., 7500., 10100., 9900., 9900., 7900., 9100., 10100., 10500., 10500., 10500., 8900., 10300., 10500., 10300., 5700., 8900., 5700., 7300., 7300., 5900., 6100., 10900., 5900., 6100., 6300., 8300., 6700., 6900., 7300., 6700., 6700., 6900., 6700., 6500., 6900., 6500., 6300., 6100., 5900., 7500., 5900., 6500., 9100., 7300., 9500., 8900., 8900., 6700., 7700., 7900., 6700., 6700., 6700., 6700., 6900., 16900., 17100., 22700., 20300., 20100., 7100., 20100., 20100., 23300., 26500., 26500., 28900., 24100., 23700., 23100., 22900., 23100., 21100., 21700., 21900., 9700., 9700., 9700., 32700., 29500., 29500., 29700., 29500., 28700., 27700., 27700., 32700., 16700., 36900., 32300., 33700., 34100., 33100., 15900., 11300., 17300., 11700., 15300., 35700., 36100., 11500., 12100., 28100., 28100., 35500., 18300., 18900., 23100., 11900., 53900., 30700., 26500., 24100., 12100., 12100.], dtype=float32) - stop_range(azimuth)float325.51e+04 5.53e+04 ... 6.19e+04
array([ 55100., 55300., 56100., 63900., 64500., 64900., 65500., 66500., 70900., 52700., 52900., 47500., 47500., 47700., 45500., 45300., 45700., 49500., 50300., 75500., 80700., 80700., 76100., 76300., 70900., 68300., 69500., 64100., 68500., 68100., 62300., 60900., 67700., 67100., 66500., 53300., 52100., 59700., 61100., 61300., 60300., 58500., 55900., 55300., 55100., 56100., 56500., 57100., 57100., 62700., 43900., 63700., 64500., 80300., 80100., 77700., 89700., 89700., 87700., 80700., 81500., 82300., 86300., 85300., 71100., 62100., 68300., 67700., 67900., 67700., 66100., 64900., 78700., 79900., 77900., 66500., 61100., 74100., 73900., 73300., 74100., 74900., 74300., 75100., 73500., 73700., 74300., 73500., 72900., 75700., 75300., 73100., 60700., 59700., 60300., 59100., 59500., 59300., 60900., 61700., 61700., 62700., 61300., 60900., 62100., 62700., 60500., 68300., 71500., 70100., 65500., 52100., 49300., 49500., 59500., 58900., 55100., 54300., 63900., 64100., 65500., 69900., 69900., 69100., 68300., 75700., 79100., 84500., 82300., 82700., 87900., 75900., 62300., 50500., 47500., 18300., 14500., 10900., 6100., 12500., ... 43900., 44700., 44100., 44500., 44300., 44500., 44100., 44300., 45700., 45500., 44900., 44500., 43700., 43900., 43700., 43300., 42300., 41300., 41500., 41700., 39300., 42700., 43500., 39500., 39500., 39700., 40100., 40300., 40500., 40900., 40900., 41100., 40900., 41100., 41900., 42300., 42500., 43100., 43700., 43900., 49900., 50700., 50500., 49700., 55900., 50100., 52300., 51500., 50700., 52300., 52300., 52300., 52100., 52500., 53700., 54500., 55700., 55100., 56900., 57500., 57700., 50900., 51300., 48300., 52500., 58500., 59900., 59100., 47300., 46300., 46500., 46300., 46500., 47500., 58100., 50500., 50700., 50300., 50900., 51900., 52700., 48100., 47900., 48100., 47700., 48500., 49700., 50700., 51900., 53700., 53700., 52100., 50900., 43500., 51900., 46700., 47300., 49100., 47700., 46900., 46300., 45900., 46900., 62100., 62900., 62900., 67100., 67100., 67100., 69100., 69500., 70700., 69900., 70700., 73700., 73900., 78100., 80300., 81700., 85500., 88700., 89100., 65500., 63500., 67100., 67100., 60500., 56300., 62900., 62500., 60500., 65700., 65700., 69100., 64700., 61900.], dtype=float32) - first(azimuth)float64dask.array<chunksize=(180,), meta=np.ndarray>
- format :
- UV16
- is_dft :
- 0
- unit :
- deg
- units :
- degrees
- long_name :
- Differential phase HV
- standard_name :
- radar_differential_phase_hv
- _Undetect :
- 0.0
Array Chunk Bytes 2.81 kiB 1.41 kiB Shape (360,) (180,) Dask graph 2 chunks in 26 graph layers Data type float64 numpy.ndarray - first_idx(azimuth)int64dask.array<chunksize=(180,), meta=np.ndarray>
Array Chunk Bytes 2.81 kiB 1.41 kiB Shape (360,) (180,) Dask graph 2 chunks in 36 graph layers Data type int64 numpy.ndarray - last(azimuth)float64dask.array<chunksize=(180,), meta=np.ndarray>
- format :
- UV16
- is_dft :
- 0
- unit :
- deg
- units :
- degrees
- long_name :
- Differential phase HV
- standard_name :
- radar_differential_phase_hv
- _Undetect :
- 0.0
Array Chunk Bytes 2.81 kiB 1.41 kiB Shape (360,) (180,) Dask graph 2 chunks in 26 graph layers Data type float64 numpy.ndarray - last_idx(azimuth)int64dask.array<chunksize=(180,), meta=np.ndarray>
Array Chunk Bytes 2.81 kiB 1.41 kiB Shape (360,) (180,) Dask graph 2 chunks in 39 graph layers Data type int64 numpy.ndarray - dphi(azimuth)float64dask.array<chunksize=(180,), meta=np.ndarray>
- format :
- UV16
- is_dft :
- 0
- unit :
- deg
- units :
- degrees
- long_name :
- Differential phase HV
- standard_name :
- radar_differential_phase_hv
- _Undetect :
- 0.0
Array Chunk Bytes 2.81 kiB 1.41 kiB Shape (360,) (180,) Dask graph 2 chunks in 31 graph layers Data type float64 numpy.ndarray
- source :
- gamic
- ant_gain_h :
- 44.0
- ant_gain_v :
- 44.0
- noise_power_h :
- -1.39495
- noise_power_v :
- -1.09706
- rx_loss_h :
- 0.73
- rx_loss_v :
- 0.73
\(\Delta \phi_{DP}\) - Linear Plots#
fig, (ax1, ax2) = plt.subplots(2, 1, figsize=(16, 8))
cphase.first.plot(label="first", ax=ax1)
cphase.last.plot(label="last", ax=ax1)
ax1.grid()
ax1.legend()
cphase.dphi.plot(ls="-", marker=".", label="delta", ax=ax2)
ax2.grid()
ax2.legend()
plt.tight_layout()
\(\Delta \phi_{DP}\) - Polar Plots#
This visualizes first and last indizes including \(\Delta \phi_{DP}\).
fig = plt.figure(figsize=(20, 14))
ax1 = plt.subplot(231, projection="polar")
ax2 = plt.subplot(232, projection="polar")
ax3 = plt.subplot(233, projection="polar")
ax4 = plt.subplot(234, projection="polar")
ax5 = plt.subplot(235, projection="polar")
ax6 = plt.subplot(236, projection="polar")
# set the lable go clockwise and start from the top
ax1.set_theta_zero_location("N")
ax2.set_theta_zero_location("N")
ax3.set_theta_zero_location("N")
ax4.set_theta_zero_location("N")
ax5.set_theta_zero_location("N")
ax6.set_theta_zero_location("N")
# clockwise
ax1.set_theta_direction(-1)
ax2.set_theta_direction(-1)
ax3.set_theta_direction(-1)
ax4.set_theta_direction(-1)
ax5.set_theta_direction(-1)
ax6.set_theta_direction(-1)
theta = np.linspace(0, 2 * np.pi, num=360, endpoint=False)
ax1.plot(theta, cphase.first_idx, color="b", linewidth=3)
_ = ax1.set_title("Delta PHIDP - First Index")
ax2.plot(theta, cphase.last_idx, color="r", linewidth=3)
_ = ax2.set_title("Delta PHIDP - Last Index")
ax3.plot(theta, dphi, color="g", linewidth=3)
_ = ax3.set_title("Delta PHIDP")
ax4.plot(theta, cphase.start_range, color="b", linewidth=3)
_ = ax4.set_title("Delta PHIDP - First Range")
ax5.plot(theta, cphase.stop_range, color="r", linewidth=3)
_ = ax5.set_title("Delta PHIDP - Last Range")
ax6.plot(theta, cphase.dphi, color="g", linewidth=3)
_ = ax6.set_title("Delta PHIDP")
Save data#
dim0 = "azimuth"
dtime = swp.time.min(dim0).dt.floor("5min").dt.strftime("%Y%m%dT%H%M").values
stage = "05_delta_phi"
fname = rp.data_path() / "lecture" / f"{stage}_{dtime}.zarr"
print(fname)
swp.to_zarr(fname, mode="w", zarr_version=2)
/builds/_NRRzFk9l/0/grp_meteo/radar/radarpolarimetry/data/lecture/05_delta_phi_20170810T1100.zarr
<xarray.backends.zarr.ZarrStore at 0x7f9d1042aca0>