-
Notifications
You must be signed in to change notification settings - Fork 270
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
FIX: Fix example scripts to improve interpolation (#1695)
* Set `nb` value for grid interpolation * Update email address * Update citations * Update qpe.py * Fix linting errors * Fix linting errors take 2 --------- Co-authored-by: Max Grover <[email protected]>
- Loading branch information
1 parent
8e6a6f0
commit 56f5712
Showing
7 changed files
with
34 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,17 +11,14 @@ | |
with just snow and just rain are depicted in a corresponding full-color scale. | ||
The ultimate utility of image muting radar reflectivity is to reduce the misinterpretation | ||
of regions of melting or mixed precipitation as opposed to heavy snow or heavy rain. | ||
See Tomkins et al. (2022) for full details. | ||
""" | ||
|
||
print(__doc__) | ||
|
||
# Author: Laura Tomkins ([email protected]) | ||
# Author: Laura Tomkins ([email protected]) | ||
# License: BSD 3 clause | ||
# citation: Tomkins, L. M., Yuter, S. E., Miller, M. A., and Allen, L. R., 2022: | ||
# Image muting of mixed precipitation to improve identification of regions | ||
# of heavy snow in radar data. Atmos. Meas. Tech., 15, 5515–5525, | ||
# https://doi.org/10.5194/amt-15-5515-2022 | ||
|
||
import matplotlib.colors as mcolors | ||
import matplotlib.pyplot as plt | ||
|
@@ -65,3 +62,10 @@ | |
display.set_limits((-300, 300), (-300, 300)) | ||
ax.set_aspect("equal") | ||
plt.show() | ||
|
||
# References | ||
# ---------- | ||
# Tomkins, L. M., Yuter, S. E., Miller, M. A., and Allen, L. R., 2022: | ||
# Image muting of mixed precipitation to improve identification of regions | ||
# of heavy snow in radar data. Atmos. Meas. Tech., 15, 5515–5525, | ||
# https://doi.org/10.5194/amt-15-5515-2022 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,7 @@ | |
|
||
print(__doc__) | ||
|
||
# Author: Laura Tomkins ([email protected]) | ||
# Author: Laura Tomkins ([email protected]) | ||
# License: BSD 3 clause | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,7 @@ | |
|
||
print(__doc__) | ||
|
||
# Author: Laura Tomkins ([email protected]) | ||
# Author: Laura Tomkins ([email protected]) | ||
# License: BSD 3 clause | ||
|
||
|
||
|
@@ -28,8 +28,8 @@ | |
# varies with the background value. The algorithm is heavily customizable and is designed to work with a variety of | ||
# datasets. Here, we show several examples of how to use the algorithm with different types of radar data. | ||
# | ||
# See Steiner et al. (1995), Yuter and Houze (1997), and Yuter et al. (2005) for full details on the algorithm. A | ||
# manuscript (Tomkins et al. 2024) is in prep to describe feature detection in cool-season events (part 2). | ||
# See Steiner et al. (1995), Yuter and Houze (1997), and Yuter et al. (2005) for full details on the algorithm. Tomkins | ||
# et al. 2024 builds on this work to describe feature detection in cool-season events (part 2). | ||
|
||
###################################### | ||
# Part 1: Warm-season convective-stratiform classification | ||
|
@@ -51,6 +51,7 @@ | |
grid_shape=(1, 201, 201), | ||
grid_limits=((0, 10000), (-50000.0, 50000.0), (-50000.0, 50000.0)), | ||
fields=["reflectivity_horizontal"], | ||
nb=1.5, | ||
) | ||
|
||
# get dx dy | ||
|
@@ -189,6 +190,7 @@ | |
grid_shape=(1, 201, 201), | ||
grid_limits=((0, 10000), (-200000.0, 200000.0), (-200000.0, 200000.0)), | ||
fields=["reflectivity"], | ||
nb=1.5, | ||
) | ||
|
||
# get dx dy | ||
|
@@ -421,6 +423,7 @@ | |
grid_shape=(1, 201, 201), | ||
grid_limits=((0, 10000), (-200000.0, 200000.0), (-200000.0, 200000.0)), | ||
fields=["reflectivity", "cross_correlation_ratio"], | ||
nb=1.5, | ||
) | ||
|
||
# image mute grid object | ||
|
@@ -807,3 +810,8 @@ def quick_image_mute(field, muted_ref): | |
# Image muting of mixed precipitation to improve identification of regions | ||
# of heavy snow in radar data. Atmos. Meas. Tech., 15, 5515–5525, | ||
# https://doi.org/10.5194/amt-15-5515-2022 | ||
# | ||
# Tomkins, L. M., Yuter, S. E., and Miller, M. A., 2024: Dual adaptive differential | ||
# threshold method for automated detection of faint and strong echo features | ||
# in radar observations of winter storms. Atmos. Meas. Tech., 17, 3377–3399, | ||
# https://doi.org/10.5194/amt-17-3377-2024 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,6 +19,10 @@ def create_cfad( | |
histogram that is normalized by the number of points at each altitude. Altitude bins are masked where the counts | ||
are less than a minimum fraction of the largest number of counts for any altitude row. | ||
Author: Laura Tomkins ([email protected]) | ||
Parameters | ||
---------- | ||
radar : Radar | ||
Radar object used. Can be Radar or Grid object. | ||
field_bins : list | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -326,10 +326,10 @@ def feature_detection( | |
): | ||
""" | ||
This function can be used to detect features in a field (e.g. reflectivity, rain rate, snow rate, | ||
etc.) described by Tomkins et al. (2023) and based on original convective-stratiform algorithms developed by | ||
etc.) described by Tomkins et al. (2024) and based on original convective-stratiform algorithms developed by | ||
Steiner et al. (1995), Yuter et al. (2005) and Yuter and Houze (1997) algorithm. | ||
Author: Laura Tomkins (@lauratomkins) | ||
Author: Laura Tomkins ([email protected]) | ||
Parameters | ||
---------- | ||
|
@@ -422,8 +422,10 @@ def feature_detection( | |
2005: Physical characterization of tropical oceanic convection observed in | ||
KWAJEX. J. Appl. Meteor., 44, 385-415. https://doi.org/10.1175/JAM2206.1 | ||
Tomkins, L. M., S. E. Yuter, and M. A. Miller, 2024: Objective identification | ||
of faint and strong features in radar observations of winter storms. in prep. | ||
Tomkins, L. M., Yuter, S. E., and Miller, M. A., 2024: Dual adaptive differential | ||
threshold method for automated detection of faint and strong echo features | ||
in radar observations of winter storms. Atmos. Meas. Tech., 17, 3377–3399. | ||
https://doi.org/10.5194/amt-17-3377-2024 | ||
""" | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -127,7 +127,7 @@ def est_rain_rate_kdp(radar, alpha=None, beta=None, kdp_field=None, rr_field=Non | |
rain : dict | ||
Field dictionary containing the rainfall rate. | ||
Reference | ||
References | ||
--------- | ||
Figueras et al. Long-term monitoring of French polarimetric radar data | ||
quality and evaluation of several polarimetric quantitative precipitation | ||
|
@@ -696,7 +696,7 @@ def ZtoR(radar, ref_field="reflectivity", a=300, b=1.4, save_name="NWS_primary_p | |
""" | ||
Convert reflectivity (dBZ) to precipitation rate (mm/hr) | ||
Author: Laura Tomkins | ||
Author: Laura Tomkins ([email protected]) | ||
Parameters | ||
---------- | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -613,7 +613,7 @@ def image_mute_radar(radar, field, mute_field, mute_threshold, field_threshold=N | |
the correlation coefficient is less than a certain threshold to discern | ||
melting precipitation. | ||
Author: Laura Tomkins (@lauratomkins) | ||
Author: Laura Tomkins ([email protected]) | ||
Parameters | ||
---------- | ||
|