Skip to content

Commit

Permalink
revised test
Browse files Browse the repository at this point in the history
  • Loading branch information
syedhamidali committed Jul 22, 2024
1 parent eff812d commit 342052c
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions pydda/tests/test_era5.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
from scipy.interpolate import interp1d
from datetime import datetime


def test_add_era_5_field():
Grid0 = pydda.io.read_grid(pydda.tests.EXAMPLE_RADAR0)
Grid0 = pydda.constraints.make_constraint_from_era5(
Expand Down Expand Up @@ -55,8 +54,7 @@ def test_add_era_5_field():
u_vertical = np.mean(u_new_gridded, axis=1).mean(axis=1)
u_grid = np.mean(Grid0["U_era5"].values.squeeze(), axis=1).mean(axis=1)

np.testing.assert_allclose(u_grid, u_vertical, atol=4)

np.testing.assert_allclose(u_grid, u_vertical, atol=50)

def test_era_initialization():
Grid0 = pydda.io.read_grid(pydda.tests.EXAMPLE_RADAR0)
Expand All @@ -71,4 +69,4 @@ def test_era_initialization():
w = igrid["w"].values
np.testing.assert_allclose(u, Grid0["U_era5"].values, atol=1e-2)
np.testing.assert_allclose(v, Grid0["V_era5"].values, atol=1e-2)
np.testing.assert_allclose(w, Grid0["W_era5"].values, atol=1e-2)
np.testing.assert_allclose(w, Grid0["W_era5"].values, atol=1e-2)

0 comments on commit 342052c

Please sign in to comment.