Skip to content

Commit

Permalink
added smoke test for decadal with calendar fix
Browse files Browse the repository at this point in the history
  • Loading branch information
cehbrecht committed Nov 14, 2024
1 parent ac11c9c commit 53a82b5
Showing 1 changed file with 53 additions and 0 deletions.
53 changes: 53 additions & 0 deletions tests/smoke/test_smoke_checks.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,49 @@
)


WF_C3S_CMIP6_DECADAL_2 = json.dumps(
{
"doc": "subset on c3s-cmip6-decadal with proleptic gregorian calendar",
"inputs": {
"ds": [
"c3s-cmip6-decadal.DCPP.EC-Earth-Consortium.EC-Earth3.dcppA-hindcast.s1976-r10i1p1f1.Amon.psl.gr.v20201216", # noqa
"c3s-cmip6-decadal.DCPP.EC-Earth-Consortium.EC-Earth3.dcppA-hindcast.s1976-r1i1p1f1.Amon.psl.gr.v20201215", # noqa
"c3s-cmip6-decadal.DCPP.EC-Earth-Consortium.EC-Earth3.dcppA-hindcast.s1976-r2i1p1f1.Amon.psl.gr.v20201215", # noqa
"c3s-cmip6-decadal.DCPP.EC-Earth-Consortium.EC-Earth3.dcppA-hindcast.s1976-r3i1p1f1.Amon.psl.gr.v20201215", # noqa
"c3s-cmip6-decadal.DCPP.EC-Earth-Consortium.EC-Earth3.dcppA-hindcast.s1976-r4i1p1f1.Amon.psl.gr.v20201216", # noqa
"c3s-cmip6-decadal.DCPP.EC-Earth-Consortium.EC-Earth3.dcppA-hindcast.s1976-r5i1p1f1.Amon.psl.gr.v20201216", # noqa
"c3s-cmip6-decadal.DCPP.EC-Earth-Consortium.EC-Earth3.dcppA-hindcast.s1976-r6i1p1f1.Amon.psl.gr.v20201216", # noqa
"c3s-cmip6-decadal.DCPP.EC-Earth-Consortium.EC-Earth3.dcppA-hindcast.s1976-r7i1p1f1.Amon.psl.gr.v20201216", # noqa
"c3s-cmip6-decadal.DCPP.EC-Earth-Consortium.EC-Earth3.dcppA-hindcast.s1976-r8i1p1f1.Amon.psl.gr.v20201216", # noqa
"c3s-cmip6-decadal.DCPP.EC-Earth-Consortium.EC-Earth3.dcppA-hindcast.s1976-r9i1p1f1.Amon.psl.gr.v20201216", # noqa
]
},
"outputs": {"output": "subset/output"},
"steps": {
"concat": {
"run": "concat",
"in": {
"collection": "inputs/ds",
"dims": "realization",
"time": "1976-01-01/1976-12-31",
},
},
"average": {
"run": "average",
"in": {"collection": "concat/output", "dims": "realization"},
},
"subset": {
"run": "subset",
"in": {
"collection": "average/output",
"time": "1976-01-01/1976-12-31",
},
},
},
}
)


def test_smoke_get_capabilities(wps):
caps = wps.getcapabilities()
assert caps.identification.type == "WPS"
Expand Down Expand Up @@ -637,6 +680,16 @@ def test_smoke_execute_c3s_cmip6_decadal_orchestrate(wps):
assert "19951116-19951216.nc" in urls[0]


def test_smoke_execute_c3s_cmip6_decadal_fix_calendar_orchestrate(wps):
inputs = [
("workflow", ComplexDataInput(WF_C3S_CMIP6_DECADAL_2)),
]
urls = wps.execute("orchestrate", inputs)
assert len(urls) == 1
assert "psl_Amon_EC-Earth3_dcppA-hindcast" in urls[0]
assert "19761116-19761216.nc" in urls[0]


def test_smoke_execute_c3s_ipcc_atlas_cmip5_subset(wps):
inputs = [
("collection", C3S_IPCC_ATLAS_CMIP5_COLLECTION),
Expand Down

0 comments on commit 53a82b5

Please sign in to comment.