Skip to content

Commit

Permalink
esmtools based data
Browse files Browse the repository at this point in the history
  • Loading branch information
pgierz committed Nov 15, 2024
1 parent b89a37c commit b39d495
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
21 changes: 21 additions & 0 deletions tests/fixtures/sample_rules.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,27 @@
from pymorize.rule import Rule


@pytest.fixture
def fesom_2p6_esmtools_temp_rule(fesom_2p6_pimesh_esm_tools_data):
return Rule.from_dict(
{
"name": "temp",
"experiment_id": "piControl",
"output_directory": "./output",
"source_id": "FESOM",
"variant_label": "r1i1p1f1",
"inputs": [
{
"path": fesom_2p6_pimesh_esm_tools_data / "outdata/fesom",
"pattern": "temp.fesom..*.nc",
},
],
"cmor_variable": "thetao",
"model_variable": "temp",
}
)


@pytest.fixture
def pi_uxarray_temp_rule(pi_uxarray_data):
return Rule.from_dict(
Expand Down
6 changes: 6 additions & 0 deletions tests/unit/test_gather_inputs.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,9 @@ def test_load_mfdataset_pi_uxarray(pi_uxarray_temp_rule):
data = load_mfdataset(None, pi_uxarray_temp_rule)
# Check if load worked correctly and we got back a Dataset
assert isinstance(data, xr.Dataset)


def test_load_mfdataset_fesom_2p6_esmtools(fesom_2p6_esmtools_temp_rule):
data = load_mfdataset(None, fesom_2p6_esmtools_temp_rule)
# Check if load worked correctly and we got back a Dataset
assert isinstance(data, xr.Dataset)

0 comments on commit b39d495

Please sign in to comment.