Skip to content

Commit

Permalink
Rename Gatemapper Example to Execute (#1090)
Browse files Browse the repository at this point in the history
* add more restrictive ref filter

* add in sys call to increase recursion

* update doc with scipy pinned version

* pin to previous version of scipy

* remove pinned python 36

* remove sys portion of example
  • Loading branch information
mgrover1 authored Mar 25, 2022
1 parent 3c0d59f commit cb3a0af
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
3 changes: 1 addition & 2 deletions doc/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@ channels:
- conda-forge
- defaults
dependencies:
- python=3.6
- gdal
- numpy
- scipy
- scipy>=1.7
- matplotlib
- pandas
- netcdf4
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
# adequate match), using the tol variable.

gatefilter = pyart.filters.GateFilter(radar_sw)
gatefilter.exclude_below('reflectivity_horizontal', 0)
gatefilter.exclude_below('reflectivity_horizontal', 20)
gmapper = pyart.map.GateMapper(radar_sw,
radar_se,
tol=500.,
Expand Down Expand Up @@ -87,8 +87,6 @@
lat_lines=np.arange(36, 37.25, .25),
lon_lines=np.arange(-98, -96.75, .25))

plt.show()

######################################
# Now, we can compare our original field from the southwestern radar,
# to the new remapped field - there are similarities...
Expand Down Expand Up @@ -125,8 +123,6 @@
lat_lines=np.arange(36, 37.25, .25),
lon_lines=np.arange(-98, -96.75, .25))

plt.show()

######################################
# **Calculate and Plot the Difference**
#
Expand Down Expand Up @@ -168,7 +164,6 @@
lat_lines=np.arange(36, 37.25, .25),
lon_lines=np.arange(-98, -96.75, .25))

plt.show()

######################################
# **Plot a Histogram for Comparison**
Expand All @@ -191,6 +186,9 @@
hist = np.histogram2d(refl_se.flatten(), refl_sw.flatten(), bins=bins)[0]
hist = np.ma.masked_where(hist == 0, hist)

# Setup our figure
fig = plt.figure(figsize=(8, 6))

# Create a 1-1 comparison
x, y = np.meshgrid((bins[:-1] + bins[1:])/2., (bins[:-1] + bins[1:])/2.)
c = plt.pcolormesh(x, y, np.log10(hist), cmap='pyart_HomeyerRainbow')
Expand Down

0 comments on commit cb3a0af

Please sign in to comment.