From e1a272adb4e8bdbfac264ea03f50525e4231c188 Mon Sep 17 00:00:00 2001 From: Bill Ladwig Date: Wed, 3 Oct 2018 16:00:52 -0600 Subject: [PATCH] Properly extracts the staggered geopotential height, and removes the 1000 scaling in the Fortran routine. Fixes #75 --- fortran/calc_uh.f90 | 2 -- src/wrf/g_helicity.py | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/fortran/calc_uh.f90 b/fortran/calc_uh.f90 index 72acfe6..d66ef06 100644 --- a/fortran/calc_uh.f90 +++ b/fortran/calc_uh.f90 @@ -154,8 +154,6 @@ SUBROUTINE DCALCUH(nx, ny, nz, nzp1, zp, mapfct, dx, dy, uhmnhgt, uhmxhgt, us, & !$OMP END PARALLEL - uh = uh*1000. ! Scale according to Kain et al. (2008) - RETURN END SUBROUTINE DCALCUH diff --git a/src/wrf/g_helicity.py b/src/wrf/g_helicity.py index 0429aef..36464f9 100755 --- a/src/wrf/g_helicity.py +++ b/src/wrf/g_helicity.py @@ -197,7 +197,7 @@ def get_uh(wrfin, timeidx=0, method="cat", squeeze=True, meta=False, _key=_key) v = destagger(v_vars[varname], -2) - zp = ph + phb + zp = (ph + phb) / Constants.G uh = _udhel(zp, mapfct, u, v, wstag, dx, dy, bottom, top)