Skip to content

Commit 38e3a25

Browse files
committed
Fixed erroneous computation of psi parameter in ecape_calc.py
1 parent fc6cc4b commit 38e3a25

File tree

6 files changed

+5
-2
lines changed

6 files changed

+5
-2
lines changed
-16 KB
Binary file not shown.

dist/ecape_parcel-1.1.2.tar.gz

-14.8 KB
Binary file not shown.
16.2 KB
Binary file not shown.

dist/ecape_parcel-1.1.3.tar.gz

14.9 KB
Binary file not shown.

src/ecape_parcel/__about__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# SPDX-FileCopyrightText: 2023-present Amelia Urquhart <[email protected]>
22
#
33
# SPDX-License-Identifier: MIT
4-
__version__ = '1.1.2'
4+
__version__ = '1.1.3'

src/ecape_parcel/ecape_calc.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@
66
# There are also a few issues related to MetPy weirdness and irreversible adiabatic descent that
77
# I've worked out here.
88

9+
# The calculation for the Psi parameter appeared to have an extra 4.0 coefficient in the denominator
10+
# that didn't appear in Peters et. al. 2023 Eq. 52, so I've removed it here
11+
912
# SPDX-FileCopyrightText: 2023-present Robert Capella <[email protected]>
1013
# SPDX-License-Identifier: MIT
1114

@@ -338,7 +341,7 @@ def calc_psi(el_z: pint.Quantity) -> pint.Quantity:
338341
pr = (1.0 / 3.0) * units("dimensionless") # prandtl number
339342
ksq = 0.18 * units("dimensionless") # von karman constant
340343

341-
psi = (ksq * alpha**2 * np.pi**2 * l_mix) / (4.0 * pr * sigma**2 * el_z)
344+
psi = (ksq * alpha**2 * np.pi**2 * l_mix) / (pr * sigma**2 * el_z)
342345

343346
return psi
344347

0 commit comments

Comments
 (0)