Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ def _jabw_diffusion_config(n_substeps: int):
hdiff_efdt_ratio=10.0,
hdiff_w_efdt_ratio=15.0,
smagorinski_scaling_factor=0.025,
zdiffu_t=True,
zdiffu_t=False,
velocity_boundary_diffusion_denom=200.0,
)

Expand All @@ -124,6 +124,7 @@ def _jabw_nonhydro_config():
# original igradp_method is 2
# original divdamp_order is 4
fourth_order_divdamp_factor=0.0025,
rayleigh_coeff=0.1
)

def _mch_ch_r04b09_config():
Expand All @@ -144,7 +145,7 @@ def _mch_ch_r04b09_config():
def _jablonowski_williamson_config():
icon_run_config = Icon4pyRunConfig(
dtime=datetime.timedelta(seconds=300.0),
end_date=datetime.datetime(1, 1, 1, 0, 30, 0),
end_date=datetime.datetime(1, 1, 1, 0, 5, 0),
apply_initial_stabilization=False,
n_substeps=5,
backend=backend,
Expand Down
86 changes: 52 additions & 34 deletions model/driver/tests/driver/integration_tests/test_icon4py.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,42 +43,55 @@
@pytest.mark.parametrize(
"experiment, istep_init, istep_exit, substep_init, substep_exit, timeloop_date_init, timeloop_date_exit, step_date_init, step_date_exit, timeloop_diffusion_linit_init, timeloop_diffusion_linit_exit",
[
# (
# definitions.Experiments.MCH_CH_R04B09,
# 1,
# 2,
# 1,
# 2,
# "2021-06-20T12:00:00.000",
# "2021-06-20T12:00:10.000",
# "2021-06-20T12:00:10.000",
# "2021-06-20T12:00:10.000",
# True,
# False,
# ),
# (
# definitions.Experiments.MCH_CH_R04B09,
# 1,
# 2,
# 1,
# 2,
# "2021-06-20T12:00:10.000",
# "2021-06-20T12:00:20.000",
# "2021-06-20T12:00:20.000",
# "2021-06-20T12:00:20.000",
# False,
# False,
# ),
# (
# definitions.Experiments.GAUSS3D,
# 1,
# 2,
# 1,
# 5,
# "2001-01-01T00:00:00.000",
# "2001-01-01T00:00:04.000",
# "2001-01-01T00:00:04.000",
# "2001-01-01T00:00:04.000",
# False,
# False,
# ),
(
definitions.Experiments.MCH_CH_R04B09,
1,
2,
1,
2,
"2021-06-20T12:00:00.000",
"2021-06-20T12:00:10.000",
"2021-06-20T12:00:10.000",
"2021-06-20T12:00:10.000",
True,
False,
),
(
definitions.Experiments.MCH_CH_R04B09,
1,
2,
1,
2,
"2021-06-20T12:00:10.000",
"2021-06-20T12:00:20.000",
"2021-06-20T12:00:20.000",
"2021-06-20T12:00:20.000",
False,
False,
),
(
definitions.Experiments.GAUSS3D,
definitions.Experiments.JW,
1,
2,
1,
5,
"2001-01-01T00:00:00.000",
"2001-01-01T00:00:04.000",
"2001-01-01T00:00:04.000",
"2001-01-01T00:00:04.000",
"2008-09-01T00:00:00.000",
"2008-09-01T00:05:00.000",
"2008-09-01T00:05:00.000",
"2008-09-01T00:05:00.000",
False,
False,
),
Expand Down Expand Up @@ -106,9 +119,14 @@ def test_run_timeloop_single_step(
savepoint_nonhydro_exit: sb.IconNonHydroExitSavepoint,
backend: gtx_typing.Backend,
):
if experiment == definitions.Experiments.GAUSS3D:
if experiment in (definitions.Experiments.GAUSS3D, definitions.Experiments.JW):
experiment_type = (
driver_init.ExperimentType.GAUSS3D
if experiment == definitions.Experiments.GAUSS3D
else driver_init.ExperimentType.JABW
)
config = icon4py_configuration.read_config(
experiment_type=driver_init.ExperimentType.GAUSS3D,
experiment_type=experiment_type,
backend=backend,
)
diffusion_config = config.diffusion_config
Expand Down Expand Up @@ -351,7 +369,7 @@ def test_run_timeloop_single_step(
assert test_utils.dallclose(
prognostic_states.current.w.asnumpy(),
w_sp.asnumpy(),
atol=8e-14,
atol=8e-12,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
atol=8e-12,
atol=9e-14,

)

assert test_utils.dallclose(
Expand Down
Loading