Skip to content
This repository has been archived by the owner on Jan 10, 2025. It is now read-only.

Commit

Permalink
fix checking stats
Browse files Browse the repository at this point in the history
  • Loading branch information
floriankrb committed Mar 13, 2024
1 parent 648f6d5 commit a23dc8a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
9 changes: 5 additions & 4 deletions ecml_tools/create/check.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
1 change: 1 addition & 0 deletions tests/create/test_create.py
Original file line number Diff line number Diff line change
Expand Up @@ -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/"
Expand Down

0 comments on commit a23dc8a

Please sign in to comment.