Skip to content

Commit

Permalink
FIX: Correct whitespace issues and typos
Browse files Browse the repository at this point in the history
  • Loading branch information
alakocy-pec authored and kgoebber committed Sep 21, 2023
1 parent c96683d commit 8a54bb4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions docs/api/references.rst
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ References
Services and Supporting Research, 2003.
`FCM-R19-2003 <../_static/FCM-R19-2003-WindchillReport.pdf>`_, 75 pp.
.. [Galvez2015] Galvez, J. M. and Michel Davison, 2015. “The Gálvez-Davison Index for Tropical
Convection.” `GDI_Manuscript_V20161021
.. [Galvez2015] Galvez, J. M. and Michel Davison, 2015. “The Gálvez-Davison Index for Tropical
Convection.” `GDI_Manuscript_V20161021
<https://www.wpc.ncep.noaa.gov/international/gdi/GDI_Manuscript_V20161021.pdf>`_.
.. [Galway1956] Galway, J. G., 1956: The Lifted Index as a Predictor of Latent Instability.
Expand Down
10 changes: 5 additions & 5 deletions src/metpy/calc/thermo.py
Original file line number Diff line number Diff line change
Expand Up @@ -4470,12 +4470,12 @@ def galvez_davison_index(pressure, temperature, dewpoint, vertical_dim=0):
# Latent heat of vaporization of water - different from MetPy constant
# Using different value, from paper, since GDI unlikely to be used to
# derive other metrics
Lo = 2.69E6 * (units.joule / units.kilogram)
l_0 = 2.69E6 * (units.joule / units.kilogram)

# Temperature math from here on requires kelvin units
eptp_a = th_a * np.exp((Lo * r_a) / (Cp_d * t850))
eptp_b = th_b * np.exp((Lo * r_b) / (Cp_d * t850)) + alpha
eptp_c = th_c * np.exp((Lo * r_c) / (Cp_d * t850)) + alpha
eptp_a = th_a * np.exp((l_0 * r_a) / (Cp_d * t850))
eptp_b = th_b * np.exp((l_0 * r_b) / (Cp_d * t850)) + alpha
eptp_c = th_c * np.exp((l_0 * r_c) / (Cp_d * t850)) + alpha

if t950.size == 1:
is_array = False
Expand Down Expand Up @@ -4503,7 +4503,7 @@ def galvez_davison_index(pressure, temperature, dewpoint, vertical_dim=0):
column_buoyancy_index = column_buoyancy_index.magnitude

# Calculate Mid-tropospheric Warming Index
tau = 263.15 * units.kelvin # Threshhold
tau = 263.15 * units.kelvin # Threshold
mu = -7 * (1 / units.kelvin) # Empirical adjustment

t_diff = t500 - tau
Expand Down

0 comments on commit 8a54bb4

Please sign in to comment.