From f61800c745974d55d66825bad7e875c69577d8e8 Mon Sep 17 00:00:00 2001 From: Drew Camron Date: Tue, 20 Dec 2022 14:38:09 -0700 Subject: [PATCH] Fix test for minimum xarray --- tests/calc/test_kinematics.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tests/calc/test_kinematics.py b/tests/calc/test_kinematics.py index b132218bc2f..a5f120f9579 100644 --- a/tests/calc/test_kinematics.py +++ b/tests/calc/test_kinematics.py @@ -381,11 +381,14 @@ def test_advection_1d_vertical(): pressure = xr.DataArray( np.array([1000., 950., 900.]), dims='pressure', attrs={'units': 'hPa'}) omega = xr.DataArray( - np.array([20., 30., 40.]), coords={'pressure': pressure}, attrs={'units': 'hPa/sec'}) + np.array([20., 30., 40.]), + coords=[pressure], dims=['pressure'], attrs={'units': 'hPa/sec'}) s = xr.DataArray( - np.array([25., 20., 15.]), coords={'pressure': pressure}, attrs={'units': 'degC'}) + np.array([25., 20., 15.]), + coords=[pressure], dims=['pressure'], attrs={'units': 'degC'}) a = advection(s, w=omega) - truth = xr.DataArray(-np.array([2, 3, 4]) * units('K/sec'), coords=a.coords) + truth = xr.DataArray( + -np.array([2, 3, 4]) * units('K/sec'), coords=[pressure], dims=['pressure']) assert_array_almost_equal(a, truth)