From a6abcce8a0d91cfa243ef1ceb6f6187a738f8e29 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 17 Jul 2023 19:58:32 +0000 Subject: [PATCH 1/2] CI: (deps): Bump scipy from 1.10.1 to 1.11.1 in /ci Bumps [scipy](https://github.com/scipy/scipy) from 1.10.1 to 1.11.1. - [Release notes](https://github.com/scipy/scipy/releases) - [Commits](https://github.com/scipy/scipy/compare/v1.10.1...v1.11.1) --- updated-dependencies: - dependency-name: scipy 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 8dc1a08a164..f248eb41e45 100644 --- a/ci/requirements.txt +++ b/ci/requirements.txt @@ -4,6 +4,6 @@ pandas==2.0.3 pooch==1.7.0 pint==0.22 pyproj==3.6.0 -scipy==1.10.1 +scipy==1.11.1 traitlets==5.9.0 xarray==2023.7.0 From 624b571955668ba9f778c4893d6e690a3062c3da Mon Sep 17 00:00:00 2001 From: Ryan May Date: Fri, 21 Jul 2023 15:30:01 -0600 Subject: [PATCH 2/2] MNT: Avoid passing NaN to moist_lapse. This test was added in #2263, but not sure if the functionality worked before then. Regardless, scipy now disallows passing nan for initial values to solve_ivp, so instead of trying to hack around it, just let the scipy error persist and don't trigger it in our code. --- tests/calc/test_thermo.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/calc/test_thermo.py b/tests/calc/test_thermo.py index 3119ed1da40..73f14f9a007 100644 --- a/tests/calc/test_thermo.py +++ b/tests/calc/test_thermo.py @@ -140,9 +140,9 @@ def test_moist_lapse_ref_pressure(): def test_moist_lapse_multiple_temps(): """Test moist_lapse with multiple starting temperatures.""" temp = moist_lapse(np.array([1050., 800., 600., 500., 400.]) * units.mbar, - np.array([19.85, np.nan, 19.85]) * units.degC, 1000. * units.mbar) + np.array([19.85, 25.6, 19.85]) * units.degC, 1000. * units.mbar) true_temp = np.array([[294.76, 284.64, 272.81, 264.42, 252.91], - [np.nan, np.nan, np.nan, np.nan, np.nan], + [300.35, 291.27, 281.05, 274.05, 264.64], [294.76, 284.64, 272.81, 264.42, 252.91]]) * units.kelvin assert_array_almost_equal(temp, true_temp, 2)