From b839658fec9240b8e20d8ace2a70162219ed7906 Mon Sep 17 00:00:00 2001 From: Natalie Perlin <68030316+natalie-perlin@users.noreply.github.com> Date: Mon, 14 Nov 2022 09:16:50 -0500 Subject: [PATCH] [develop] Patch to correct a variable name to a lower-case (#468) * Update plot_allvars.py Updating a variable name "Geopotential Height" to "Geopotential height". Lower-case is needed for it to work with a newer Python. * Update plot_allvars_diff.py Updating a variable name "Geopotential Height" to "Geopotential height" (lower-case). This is needed to work with newer Python --- ush/Python/plot_allvars.py | 2 +- ush/Python/plot_allvars_diff.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ush/Python/plot_allvars.py b/ush/Python/plot_allvars.py index 3af564e522..87a38ab0e1 100755 --- a/ush/Python/plot_allvars.py +++ b/ush/Python/plot_allvars.py @@ -353,7 +353,7 @@ def rotate_wind(true_lat,lov_lon,earth_lons,uin,vin,proj,inverse=False): cin = data1.select(name='Convective inhibition',typeOfLevel='surface')[0].values # 500 mb height, wind, vorticity - z500 = data1.select(name='Geopotential Height',level=500)[0].values * 0.1 + z500 = data1.select(name='Geopotential height',level=500)[0].values * 0.1 z500 = ndimage.filters.gaussian_filter(z500, 6.89) vort500 = data1.select(name='Absolute vorticity',level=500)[0].values * 100000 vort500 = ndimage.filters.gaussian_filter(vort500,1.7225) diff --git a/ush/Python/plot_allvars_diff.py b/ush/Python/plot_allvars_diff.py index ec85df2e5b..12fcdbd949 100755 --- a/ush/Python/plot_allvars_diff.py +++ b/ush/Python/plot_allvars_diff.py @@ -383,9 +383,9 @@ def rotate_wind(true_lat,lov_lon,earth_lons,uin,vin,proj,inverse=False): cin_diff = cin_2 - cin_1 # 500 mb height, wind, vorticity - z500_1 = data1.select(name='Geopotential Height',level=500)[0].values * 0.1 + z500_1 = data1.select(name='Geopotential height',level=500)[0].values * 0.1 z500_1 = ndimage.filters.gaussian_filter(z500_1, 6.89) - z500_2 = data2.select(name='Geopotential Height',level=500)[0].values * 0.1 + z500_2 = data2.select(name='Geopotential height',level=500)[0].values * 0.1 z500_2 = ndimage.filters.gaussian_filter(z500_2, 6.89) z500_diff = z500_2 - z500_1 vort500_1 = data1.select(name='Absolute vorticity',level=500)[0].values * 100000