Skip to content

Commit 455ffa0

Browse files
committed
Fix QG notebook for latest MetPy
1 parent 6cda3d7 commit 455ffa0

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

pages/workshop/MetPy_Advanced/QG Analysis.ipynb

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@
5252
"import cartopy.crs as ccrs\n",
5353
"import cartopy.feature as cfeature\n",
5454
"import numpy as np\n",
55-
"from scipy.ndimage import gaussian_filter\n",
5655
"from siphon.catalog import TDSCatalog\n",
5756
"from siphon.ncss import NCSS\n",
5857
"import matplotlib.pyplot as plt\n",
@@ -312,20 +311,20 @@
312311
"n_reps = 50\n",
313312
"\n",
314313
"# Apply the 9-point smoother\n",
315-
"hght_700s = mpcalc.smooth_n_point(hght_700, 9, n_reps)\n",
316-
"hght_500s = mpcalc.smooth_n_point(hght_500, 9, n_reps)\n",
314+
"hght_700s = mpcalc.smooth_n_point(hght_700, 9, n_reps).metpy.unit_array\n",
315+
"hght_500s = mpcalc.smooth_n_point(hght_500, 9, n_reps).metpy.unit_array\n",
317316
"\n",
318-
"tmpk_700s = mpcalc.smooth_n_point(tmpk_700, 9, n_reps)\n",
317+
"tmpk_700s = mpcalc.smooth_n_point(tmpk_700, 9, n_reps).metpy.unit_array\n",
319318
"tmpc_700s = tmpk_700s.to('degC')\n",
320319
"\n",
321-
"uwnd_700s = mpcalc.smooth_n_point(uwnd_700, 9, n_reps)\n",
322-
"vwnd_700s = mpcalc.smooth_n_point(vwnd_700, 9, n_reps)\n",
320+
"uwnd_700s = mpcalc.smooth_n_point(uwnd_700, 9, n_reps).metpy.unit_array\n",
321+
"vwnd_700s = mpcalc.smooth_n_point(vwnd_700, 9, n_reps).metpy.unit_array\n",
323322
"\n",
324-
"uwnd_500s = mpcalc.smooth_n_point(uwnd_500, 9, n_reps)\n",
325-
"vwnd_500s = mpcalc.smooth_n_point(vwnd_500, 9, n_reps)\n",
323+
"uwnd_500s = mpcalc.smooth_n_point(uwnd_500, 9, n_reps).metpy.unit_array\n",
324+
"vwnd_500s = mpcalc.smooth_n_point(vwnd_500, 9, n_reps).metpy.unit_array\n",
326325
"\n",
327-
"uwnd_900s = mpcalc.smooth_n_point(uwnd_900, 9, n_reps)\n",
328-
"vwnd_900s = mpcalc.smooth_n_point(vwnd_900, 9, n_reps)"
326+
"uwnd_900s = mpcalc.smooth_n_point(uwnd_900, 9, n_reps).metpy.unit_array\n",
327+
"vwnd_900s = mpcalc.smooth_n_point(vwnd_900, 9, n_reps).metpy.unit_array"
329328
]
330329
},
331330
{

0 commit comments

Comments
 (0)