Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ENH: Update nexrad level 3 reader to read super resolution data. #1591

Merged
merged 4 commits into from
Jun 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions pyart/default_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -1072,6 +1072,9 @@
134: None, # High Resolution VIL
135: None, # Enhanced Echo Tops
138: radar_estimated_rain_rate, # Digital Storm Total Precipitation
153: reflectivity, # Super Resolution Base Reflectivity Data Array
154: velocity, # Super Resolution Base Velocity Data Array
155: spectrum_width, # Super Resolution Base Spectrum Width Data Array
159: differential_reflectivity, # Digital Differential Reflectivity
161: cross_correlation_ratio, # Digital Correlation Coefficient
163: specific_differential_phase, # Digital Specific Differential Phase
Expand Down
34 changes: 29 additions & 5 deletions pyart/io/nexrad_level3.py
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ def get_data(self):
elif msg_code in [134]:
mdata = self._get_data_msg_134()

elif msg_code in [94, 99, 182, 186]:
elif msg_code in [94, 99, 153, 154, 155, 182, 186]:
hw31, hw32 = np.frombuffer(threshold_data[:4], ">i2")
data = (self.raw_data - 2) * (hw32 / 10.0) + hw31 / 10.0
mdata = np.ma.array(data, mask=self.raw_data < 2)
Expand Down Expand Up @@ -598,7 +598,24 @@ def _int16_to_float16(val):

# List of product numbers for which Halfword 30 corresponds to sweep elev angle
# Per Table V of the ICD
ELEVATION_ANGLE = [19, 20, 25, 27, 28, 30, 56, 94, 99, 159, 161, 163, 165]
ELEVATION_ANGLE = [
19,
20,
25,
27,
28,
30,
56,
94,
99,
153,
154,
155,
159,
161,
163,
165,
]

PRODUCT_RANGE_RESOLUTION = {
19: 1.0, # 124 nm
Expand All @@ -618,6 +635,9 @@ def _int16_to_float16(val):
134: 1000.0,
135: 1000.0,
138: 1.0,
153: 0.25,
154: 0.25,
155: 0.25,
159: 0.25,
161: 0.25,
163: 0.25,
Expand Down Expand Up @@ -655,6 +675,9 @@ def _int16_to_float16(val):
134: 1,
135: 0,
138: 2,
153: 0,
154: 0,
155: 0,
159: 0,
161: 0,
163: 0,
Expand Down Expand Up @@ -803,6 +826,10 @@ def _int16_to_float16(val):
134, # High Resolution VIL
135, # Enhanced Echo Tops
138, # Digital Storm Total
# Super Resolution
153, # Super Resolution Base Reflectivity Data Array
154, # Super Resolution Base Velocity Data Array
155, # Super Resolution Base Spectrum Width Data Array
# Precipitation
159, # Digital Differential
# Reflectivity
Expand Down Expand Up @@ -861,9 +888,6 @@ def _int16_to_float16(val):
# 147, # Storm Total Snow Depth
# 150, # User Selectable Snow Water Equivalent
# 151, # User Selectable Snow Depth
# 153, # Super Resolution Reflectivity Data Array
# 154, # Super Resolution Velocity Data Array
# 155, # Super Resolution Spectrum Width Data Array
# 158, # Differential Reflectivity
# 160, # Correlation Coefficient
# 162, # Specific Differential Phase
Expand Down
Loading