From bafcf8a49cc36e8685fa0cf04ed64e3aac1ed0c7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 17 Jun 2024 17:36:35 +0000 Subject: [PATCH 1/4] CI: (deps): Bump pint from 0.23 to 0.24 in /ci Bumps [pint](https://github.com/hgrecco/pint) from 0.23 to 0.24. - [Changelog](https://github.com/hgrecco/pint/blob/master/CHANGES) - [Commits](https://github.com/hgrecco/pint/compare/0.23...0.24) --- updated-dependencies: - dependency-name: pint dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- ci/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/requirements.txt b/ci/requirements.txt index 241dfc6978..b6c0acf581 100644 --- a/ci/requirements.txt +++ b/ci/requirements.txt @@ -2,7 +2,7 @@ matplotlib==3.8.4 numpy==1.26.4 pandas==2.2.2 pooch==1.8.2 -pint==0.23 +pint==0.24 pyproj==3.6.1 scipy==1.13.1 traitlets==5.14.3 From f273d73e77d2b1ecdbc76fef59ea8a8c7d3960d3 Mon Sep 17 00:00:00 2001 From: Ryan May Date: Mon, 17 Jun 2024 13:24:02 -0600 Subject: [PATCH 2/4] BUG: Fix conversion in sweat_index() Was incorrectly casting the total_totals_index to degC, even though this calculation is returning delta_degC units. This started being correctly flagged by Pint in version 0.24. --- src/metpy/calc/thermo.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/metpy/calc/thermo.py b/src/metpy/calc/thermo.py index 379785d586..d2b265ee04 100644 --- a/src/metpy/calc/thermo.py +++ b/src/metpy/calc/thermo.py @@ -5117,7 +5117,7 @@ def sweat_index(pressure, temperature, dewpoint, speed, direction, vertical_dim= first_term = 12 * np.clip(td850.m_as('degC'), 0, None) # Second term is set to zero if TT is less than 49 - second_term = 20 * np.clip(tt.m_as('degC') - 49, 0, None) + second_term = 20 * np.clip(tt.m_as('delta_degC') - 49, 0, None) # Shear term is set to zero if any of four conditions are not met required = ((units.Quantity(130, 'deg') <= dd850) & (dd850 <= units.Quantity(250, 'deg')) From 6180bd8f76fdef2a8221359f9875eb182726392a Mon Sep 17 00:00:00 2001 From: Ryan May Date: Mon, 17 Jun 2024 13:48:41 -0600 Subject: [PATCH 3/4] MNT: Update example output for Pint 0.24 Changed and was failing doctests. No significant change. --- src/metpy/calc/thermo.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/metpy/calc/thermo.py b/src/metpy/calc/thermo.py index d2b265ee04..1de5777bbe 100644 --- a/src/metpy/calc/thermo.py +++ b/src/metpy/calc/thermo.py @@ -4067,7 +4067,7 @@ def static_stability(pressure, temperature, vertical_dim=0): 4.80962228e-06 7.72162917e-06 1.13637163e-05 1.89412484e-05 5.12162481e-05 1.59883754e-04 3.74228296e-04 5.30145977e-04 7.20889325e-04 1.00335001e-03 1.48043778e-03 2.32777913e-03 - 3.43878993e-03 5.74908298e-03], 'meter ** 2 / pascal ** 2 / second ** 2')> + 3.43878993e-03 5.74908298e-03], 'meter ** 2 / second ** 2 / pascal ** 2')> .. versionchanged:: 1.0 Renamed ``axis`` parameter ``vertical_dim`` From 5bac73696ad3df4a0bfa17b72c36b4f25f150501 Mon Sep 17 00:00:00 2001 From: Ryan May Date: Mon, 24 Jun 2024 16:35:37 -0600 Subject: [PATCH 4/4] CI: Bump to Pint 0.24.1 This should allow us to run on Python 3.9. --- ci/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/requirements.txt b/ci/requirements.txt index b6c0acf581..2ddcca6561 100644 --- a/ci/requirements.txt +++ b/ci/requirements.txt @@ -2,7 +2,7 @@ matplotlib==3.8.4 numpy==1.26.4 pandas==2.2.2 pooch==1.8.2 -pint==0.24 +pint==0.24.1 pyproj==3.6.1 scipy==1.13.1 traitlets==5.14.3