From a23dc8a1c7f4013ab4d1bfd7b7a739ae34a28482 Mon Sep 17 00:00:00 2001 From: Florian Pinault Date: Wed, 13 Mar 2024 07:43:20 +0000 Subject: [PATCH] fix checking stats --- ecml_tools/create/check.py | 9 +++++---- tests/create/test_create.py | 1 + 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/ecml_tools/create/check.py b/ecml_tools/create/check.py index aff292d..c2e47c1 100644 --- a/ecml_tools/create/check.py +++ b/ecml_tools/create/check.py @@ -166,14 +166,15 @@ def check_data_values(arr, *, name: str, log=[], allow_nan=False): warnings.warn(f"Max value 9999 for {name}") in_0_1 = dict(minimum=0, maximum=1) + in_minus_1_plus_1 = dict(minimum=-1, maximum=1) is_temperature = dict(minimum=173.15, maximum=373.15) # -100 celsius to +200 celsius # is_wind = dict(minimum=-500., maximum=500.) limits = { "lsm": in_0_1, - "cos_latitude": in_0_1, - "sin_latitude": in_0_1, - "cos_longitude": in_0_1, - "sin_longitude": in_0_1, + "cos_latitude": in_minus_1_plus_1, + "sin_latitude": in_minus_1_plus_1, + "cos_longitude": in_minus_1_plus_1, + "sin_longitude": in_minus_1_plus_1, "insolation": in_0_1, "2t": is_temperature, "sst": is_temperature, diff --git a/tests/create/test_create.py b/tests/create/test_create.py index 3db5a8e..f6bbb2c 100755 --- a/tests/create/test_create.py +++ b/tests/create/test_create.py @@ -27,6 +27,7 @@ "perturbations", ] ] +NAMES = ["join"] assert NAMES, "No yaml files found in " + HERE TEST_DATA_ROOT = "https://object-store.os-api.cci1.ecmwf.int/ml-tests/test-data/anemoi-datasets/create/"