Skip to content
Merged
Show file tree
Hide file tree
Changes from 95 commits
Commits
Show all changes
125 commits
Select commit Hold shift + click to select a range
d01fd13
CI for standalone_driver
nfarabullini Feb 19, 2026
f3c69ff
Merge branch 'main' into ci_for_standalone_driver
nfarabullini Feb 19, 2026
4bf1e15
edits to yamla nd toml files
nfarabullini Feb 19, 2026
de83aeb
further edits and fixes
nfarabullini Feb 19, 2026
203fcf9
inital conditions edits and tests
nfarabullini Feb 25, 2026
ca8d67c
Merge branch 'main' into ci_for_standalone_driver
nfarabullini Feb 25, 2026
dfdcfcb
further edits to remove serialized constants
nfarabullini Feb 25, 2026
bdde616
Merge branch 'ci_for_standalone_driver' of https://github.com/C2SM/ic…
nfarabullini Feb 25, 2026
7234c6b
Merge branch 'main' into ci_for_standalone_driver
nfarabullini Feb 25, 2026
5e5a6ef
Merge branch 'main' into ci_for_standalone_driver
nfarabullini Feb 27, 2026
46014f6
further edits
nfarabullini Mar 2, 2026
1061e37
Merge branch 'main' into ci_for_standalone_driver
nfarabullini Mar 2, 2026
bb9ebf1
lowered tolerance in standalone driver test and ran pre-commit
nfarabullini Mar 2, 2026
5b8a448
Merge branch 'main' into ci_for_standalone_driver
nfarabullini Mar 2, 2026
cd8ef1c
update from upstream, edits to types, and ran pre-commit
nfarabullini Mar 2, 2026
3eea114
some edits
nfarabullini Mar 2, 2026
c1217d5
small edit
nfarabullini Mar 2, 2026
4bf3733
Merge branch 'main' into ci_for_standalone_driver
nfarabullini Mar 2, 2026
cc30a62
small fix
nfarabullini Mar 2, 2026
6b1bb5f
small edit to fixture
nfarabullini Mar 2, 2026
930e167
commented out parametrization
nfarabullini Mar 2, 2026
e86051a
Merge branch 'main' into ci_for_standalone_driver
nfarabullini Mar 2, 2026
22338bf
removed w_1
nfarabullini Mar 3, 2026
fc982cb
small test edits
nfarabullini Mar 3, 2026
5424978
Merge branch 'ci_for_standalone_driver' of https://github.com/C2SM/ic…
nfarabullini Mar 3, 2026
3fc3dbf
edited one tolerance
nfarabullini Mar 3, 2026
55836c3
further fixes for w_1
nfarabullini Mar 3, 2026
69c8ae6
Merge branch 'main' into ci_for_standalone_driver
nfarabullini Mar 3, 2026
cfabcd3
Update diffusion.py
nfarabullini Mar 3, 2026
6cbcbad
merge with upstream
nfarabullini Mar 3, 2026
5724bc6
edits to icon4py test
nfarabullini Mar 3, 2026
961f4cd
small type hint edit
nfarabullini Mar 3, 2026
3db70c3
further edits
nfarabullini Mar 3, 2026
68e85a4
standalone driver parametrization edits
nfarabullini Mar 3, 2026
f0e14d2
Merge branch 'main' into ci_for_standalone_driver
nfarabullini Mar 3, 2026
fa07307
adjusted standalone tolerances
nfarabullini Mar 3, 2026
d2335c1
Merge branch 'main' into ci_for_standalone_driver
nfarabullini Mar 4, 2026
09e99d2
ran pre-commit
nfarabullini Mar 4, 2026
88ffb2f
Merge branch 'ci_for_standalone_driver' of https://github.com/C2SM/ic…
nfarabullini Mar 4, 2026
20aed6e
change config of metric factory for JW
OngChia Mar 4, 2026
4bf0618
Merge branch 'main' into ci_for_standalone_driver
nfarabullini Mar 5, 2026
cecea11
adjusted tolerances
nfarabullini Mar 5, 2026
3013e78
Merge branch 'ci_for_standalone_driver' of https://github.com/C2SM/ic…
nfarabullini Mar 5, 2026
03fb537
replaced a few more np with array_ns
nfarabullini Mar 5, 2026
d96956a
edit for scipy func to flexible gpu/cpu func
nfarabullini Mar 5, 2026
890166a
replaced gt4py field operator within regular function to regular pyth…
nfarabullini Mar 5, 2026
5fb0b0e
small fix to bounds
nfarabullini Mar 6, 2026
726fd50
fix to index
nfarabullini Mar 6, 2026
356f889
introduced array_ns instead of strict numpy computation in init_w
nfarabullini Mar 6, 2026
b47aa03
edit from asnumpy() to ndarray
nfarabullini Mar 6, 2026
1869d03
additional edit from asnumpy() to ndarray
nfarabullini Mar 6, 2026
7b3e18a
potential fix
nfarabullini Mar 6, 2026
5305e2f
Merge branch 'main' into ci_for_standalone_driver
nfarabullini Mar 6, 2026
be614a0
potential fix
nfarabullini Mar 6, 2026
5fc92d8
Merge branch 'ci_for_standalone_driver' of https://github.com/C2SM/ic…
nfarabullini Mar 6, 2026
b6314b6
more edits
nfarabullini Mar 8, 2026
3b95f9b
more edits
nfarabullini Mar 8, 2026
b1386d2
removed serialized exit point from internal code
nfarabullini Mar 8, 2026
50ebb90
small edit to equation to see if this works with gpu backend
nfarabullini Mar 9, 2026
6642aa2
new for loop implementaed instead of array_ns.sum
nfarabullini Mar 9, 2026
26fd7db
edits to array_ns and ran pre-commit
nfarabullini Mar 9, 2026
53a2585
edits for offset declaration potential issue
nfarabullini Mar 9, 2026
d6d9f30
small edit to change args position
nfarabullini Mar 9, 2026
c958a6e
small fix to index
nfarabullini Mar 9, 2026
08cc652
small edits to offset provider spec
nfarabullini Mar 9, 2026
0279054
added cpu only marker
nfarabullini Mar 9, 2026
fd6034a
ran pre-commit
nfarabullini Mar 9, 2026
de2f7a5
edited ci time
nfarabullini Mar 10, 2026
7a8118a
removed backend customization
nfarabullini Mar 10, 2026
83de5f4
ran pre-commit
nfarabullini Mar 10, 2026
2e52f15
adjusted ci time and removed cp only constraint
nfarabullini Mar 10, 2026
3c7e718
increased ci time
nfarabullini Mar 10, 2026
6e900f9
Merge branch 'main' into ci_for_standalone_driver
nfarabullini Mar 10, 2026
8b5a614
increased ci time
nfarabullini Mar 10, 2026
b36637f
Merge branch 'ci_for_standalone_driver' of https://github.com/C2SM/ic…
nfarabullini Mar 10, 2026
b3cab13
code refactoring
nfarabullini Mar 10, 2026
71ccba5
further code refactoring
nfarabullini Mar 10, 2026
e154538
small fix
nfarabullini Mar 10, 2026
2158b61
small fix
nfarabullini Mar 10, 2026
9ab2b09
small fix
nfarabullini Mar 10, 2026
f17d6ab
ran pre-commit
nfarabullini Mar 10, 2026
f472324
added pytest.skip for dace_gpu backend
nfarabullini Mar 11, 2026
1fd7c16
Update model/standalone_driver/tests/standalone_driver/fixtures.py
nfarabullini Mar 11, 2026
d44d52f
Update model/standalone_driver/tests/standalone_driver/fixtures.py
nfarabullini Mar 11, 2026
71d5b0c
increased ci time for dace_gpu
nfarabullini Mar 12, 2026
f166144
Merge branch 'main' into ci_for_standalone_driver
nfarabullini Mar 12, 2026
210cc49
pre-commit edits
nfarabullini Mar 12, 2026
9eaae5a
further edits
nfarabullini Mar 12, 2026
3bc6b53
re-set ci time
nfarabullini Mar 12, 2026
37890b2
Merge branch 'ci_for_standalone_driver' of https://github.com/C2SM/ic…
nfarabullini Mar 12, 2026
1513703
minor edit to backend gen
nfarabullini Mar 12, 2026
169762a
set ci time limit to 4 hours and removed dace_gpu skip
nfarabullini Mar 12, 2026
8ed0d38
Update model/standalone_driver/src/icon4py/model/standalone_driver/te…
nfarabullini Mar 12, 2026
d5d8e79
other pre-commit edits
nfarabullini Mar 12, 2026
48d13b5
Merge branch 'main' into ci_for_standalone_driver
nfarabullini Mar 12, 2026
b31810a
Update model/standalone_driver/tests/standalone_driver/integration_te…
nfarabullini Mar 12, 2026
fdeb5eb
Update model/standalone_driver/tests/standalone_driver/integration_te…
nfarabullini Mar 12, 2026
9969ba4
Update model/standalone_driver/src/icon4py/model/standalone_driver/te…
nfarabullini Mar 12, 2026
66e4f19
Update model/standalone_driver/tests/standalone_driver/integration_te…
nfarabullini Mar 12, 2026
162900d
Update model/standalone_driver/tests/standalone_driver/integration_te…
nfarabullini Mar 12, 2026
71a0998
Update model/standalone_driver/src/icon4py/model/standalone_driver/ma…
nfarabullini Mar 12, 2026
0f4f666
Update model/standalone_driver/src/icon4py/model/standalone_driver/ma…
nfarabullini Mar 12, 2026
1a84377
Update model/standalone_driver/src/icon4py/model/standalone_driver/te…
nfarabullini Mar 12, 2026
476df49
Update model/standalone_driver/tests/standalone_driver/integration_te…
nfarabullini Mar 12, 2026
25288ab
Update model/standalone_driver/tests/standalone_driver/integration_te…
nfarabullini Mar 12, 2026
8b2cdf2
Update model/standalone_driver/tests/standalone_driver/integration_te…
nfarabullini Mar 12, 2026
0a3fba1
edits following review
nfarabullini Mar 12, 2026
31bb3b0
put time limit back to 45 and pytest.skip for dace_gpu
nfarabullini Mar 12, 2026
b6a1eeb
Merge branch 'main' into ci_for_standalone_driver
nfarabullini Mar 12, 2026
e794b4c
re-increased gpu time
nfarabullini Mar 12, 2026
28fb2bf
Merge branch 'ci_for_standalone_driver' of https://github.com/C2SM/ic…
nfarabullini Mar 12, 2026
d6359d3
re-increased gpu time
nfarabullini Mar 12, 2026
b027b4c
decreased gpu time
nfarabullini Mar 12, 2026
c7dc868
decreased gpu time
nfarabullini Mar 13, 2026
4e956a7
decreased gpu time
nfarabullini Mar 13, 2026
ea0d467
decreased gpu time
nfarabullini Mar 13, 2026
04e8ebe
Merge branch 'main' into ci_for_standalone_driver
nfarabullini Mar 13, 2026
f403618
Update model/standalone_driver/src/icon4py/model/standalone_driver/dr…
nfarabullini Mar 13, 2026
6084e39
re-adjusted time limit to 40 minutes
nfarabullini Mar 13, 2026
c91e097
Merge branch 'ci_for_standalone_driver' of https://github.com/C2SM/ic…
nfarabullini Mar 13, 2026
ad5f242
Update model/standalone_driver/tests/standalone_driver/integration_te…
nfarabullini Mar 13, 2026
0ac3125
Update model/standalone_driver/tests/standalone_driver/integration_te…
nfarabullini Mar 13, 2026
dbfc229
ci edit after discussion
nfarabullini Mar 13, 2026
6e2efd0
Update ci/default.yml
nfarabullini Mar 13, 2026
7bdd0b1
Merge branch 'main' into ci_for_standalone_driver
nfarabullini Mar 13, 2026
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
2 changes: 1 addition & 1 deletion .github/workflows/icon4py-test-model.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
matrix:
python-version: ["3.10", "3.11"]
backend: ["embedded", "dace_cpu", "gtfn_cpu"]
component: ["advection", "diffusion", "dycore", "microphysics", "muphys", "driver", "common"]
component: ["advection", "diffusion", "dycore", "microphysics", "muphys", "driver", "common", "standalone_driver"]
steps:
- name: Checkout
uses: actions/checkout@v6
Expand Down
3 changes: 3 additions & 0 deletions ci/default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ test_tools_datatests_aarch64:
- if: $COMPONENT == 'driver' || $COMPONENT == 'dycore' || $COMPONENT == 'muphys'
variables:
SLURM_TIMELIMIT: '00:30:00'
- if: $COMPONENT == 'standalone_driver'
variables:
SLURM_TIMELIMIT: '04:00:00' # TODO: reset to 45 minutes once time limit estimation for dace_gpu is complete
- when: on_success
variables:
SLURM_TIMELIMIT: '00:15:00'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,17 @@
@gtx.field_operator
def _apply_rayleigh_damping_mechanism(
z_raylfac: fa.KField[wpfloat],
w_1: fa.CellField[wpfloat],
w: fa.CellKField[wpfloat],
) -> fa.CellKField[wpfloat]:
"""Formerly known as _mo_solve_nonhydro_stencil_54."""
z_raylfac = broadcast(z_raylfac, (dims.CellDim, dims.KDim))
w_wp = z_raylfac * w + (wpfloat("1.0") - z_raylfac) * w_1
w_wp = z_raylfac * w
return w_wp


@gtx.program(grid_type=gtx.GridType.UNSTRUCTURED)
def apply_rayleigh_damping_mechanism(
z_raylfac: fa.KField[wpfloat],
w_1: fa.CellField[wpfloat],
w: fa.CellKField[wpfloat],
horizontal_start: gtx.int32,
horizontal_end: gtx.int32,
Expand All @@ -36,7 +34,6 @@ def apply_rayleigh_damping_mechanism(
) -> None:
_apply_rayleigh_damping_mechanism(
z_raylfac,
w_1,
w,
out=w,
domain={
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -343,13 +343,11 @@ def _vertically_implicit_solver_at_predictor_step(
cpd=dycore_consts.cpd,
)

w_1 = broadcast(wpfloat("0.0"), (dims.CellDim,))
if rayleigh_type == rayleigh_damping_options.KLEMP:
next_w = concat_where(
(dims.KDim > 0) & (dims.KDim < end_index_of_damping_layer + 1),
_apply_rayleigh_damping_mechanism(
z_raylfac=rayleigh_damping_factor,
w_1=w_1,
w=next_w,
),
next_w,
Expand Down Expand Up @@ -658,14 +656,11 @@ def _vertically_implicit_solver_at_corrector_step(
cpd=dycore_consts.cpd,
)

w_1 = broadcast(wpfloat("0.0"), (dims.CellDim,))

if rayleigh_type == rayleigh_damping_options.KLEMP:
next_w = concat_where(
(dims.KDim > 0) & (dims.KDim < end_index_of_damping_layer + 1),
_apply_rayleigh_damping_mechanism(
z_raylfac=rayleigh_damping_factor,
w_1=w_1,
w=next_w,
),
next_w,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,10 @@
def apply_rayleigh_damping_mechanism_numpy(
connectivities: dict[gtx.Dimension, np.ndarray],
z_raylfac: np.ndarray,
w_1: np.ndarray,
w: np.ndarray,
) -> np.ndarray:
z_raylfac = np.expand_dims(z_raylfac, axis=0)
w_1 = np.expand_dims(w_1, axis=-1)
w = z_raylfac * w + (1.0 - z_raylfac) * w_1
w = z_raylfac * w
return w


Expand All @@ -42,22 +40,19 @@ class TestApplyRayleighDampingMechanism(StencilTest):
def reference(
connectivities: dict[gtx.Dimension, np.ndarray],
z_raylfac: np.ndarray,
w_1: np.ndarray,
w: np.ndarray,
**kwargs: Any,
) -> dict:
w = apply_rayleigh_damping_mechanism_numpy(connectivities, z_raylfac, w_1, w)
w = apply_rayleigh_damping_mechanism_numpy(connectivities, z_raylfac, w)
return dict(w=w)

@pytest.fixture
def input_data(self, grid: base.Grid) -> dict[str, gtx.Field | state_utils.ScalarType]:
z_raylfac = random_field(grid, dims.KDim, dtype=wpfloat)
w = random_field(grid, dims.CellDim, dims.KDim, dtype=wpfloat)
w_1 = w[dims.KDim(0)]

return dict(
z_raylfac=z_raylfac,
w_1=w_1,
w=w,
horizontal_start=0,
horizontal_end=gtx.int32(grid.num_cells),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,6 @@ def reference(
next_w[:, :n_lev],
)

w_1 = next_w[:, 0]
if rayleigh_type == constants.RayleighType.KLEMP:
next_w[:, :n_lev] = np.where(
(horizontal_start <= horz_idx)
Expand All @@ -309,7 +308,6 @@ def reference(
apply_rayleigh_damping_mechanism_numpy(
connectivities=connectivities,
z_raylfac=rayleigh_damping_factor,
w_1=w_1,
w=next_w[:, :n_lev],
),
next_w[:, :n_lev],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,6 @@ def reference(
next_w[:, :n_lev],
)

w_1 = next_w[:, 0]
if rayleigh_type == constants.RayleighType.KLEMP:
next_w[:, :n_lev] = np.where(
(start_cell_index_nudging <= horz_idx)
Expand All @@ -338,7 +337,6 @@ def reference(
apply_rayleigh_damping_mechanism_numpy(
connectivities=connectivities,
z_raylfac=rayleigh_damping_factor,
w_1=w_1,
w=next_w[:, :n_lev],
),
next_w[:, :n_lev],
Expand Down
3 changes: 2 additions & 1 deletion model/common/src/icon4py/model/common/grid/vertical.py
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,8 @@ def _compute_vct_a_and_vct_b( # noqa: PLR0912 [too-many-branches]


def get_vct_a_and_vct_b(
vertical_config: VerticalGridConfig, allocator: gtx_typing.Allocator
vertical_config: VerticalGridConfig,
allocator: gtx_typing.Allocator,
) -> tuple[fa.KField, fa.KField]:
"""
get vct_a and vct_b.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
from typing import Final

import numpy as np
import scipy
from gt4py import next as gtx
from gt4py.next import where

Expand Down Expand Up @@ -1163,11 +1162,12 @@ def compute_lsq_pseudoinv(
min_rlcell_int: int,
lsq_dim_unk: int,
lsq_dim_c: int,
array_ns: ModuleType = np,
) -> data_alloc.NDArray:
for jjb in range(lsq_dim_c):
for jjk in range(lsq_dim_unk):
for jc in range(start_idx, min_rlcell_int):
u, s, v_t, _ = scipy.linalg.lapack.dgesdd(z_lsq_mat_c[jc, :, :])
u, s, v_t = array_ns.linalg.svd(z_lsq_mat_c[jc, :, :])
if cell_owner_mask[jc]:
lsq_pseudoinv[jc, :lsq_dim_unk, jjb] = (
lsq_pseudoinv[jc, :lsq_dim_unk, jjb]
Expand All @@ -1181,11 +1181,12 @@ def compute_lsq_weights_c(
lsq_weights_c_jc: data_alloc.NDArray,
lsq_dim_stencil: int,
lsq_wgt_exp: int,
array_ns: ModuleType = np,
) -> data_alloc.NDArray:
for js in range(lsq_dim_stencil):
z_norm = np.sqrt(np.dot(z_dist_g[js, :], z_dist_g[js, :]))
z_norm = array_ns.sqrt(array_ns.dot(z_dist_g[js, :], z_dist_g[js, :]))
lsq_weights_c_jc[js] = 1.0 / (z_norm**lsq_wgt_exp)
return lsq_weights_c_jc / np.max(lsq_weights_c_jc)
return lsq_weights_c_jc / array_ns.max(lsq_weights_c_jc)


def compute_z_lsq_mat_c(
Expand Down Expand Up @@ -1234,18 +1235,18 @@ def compute_lsq_coeffs(
match base_grid.GeometryType(geometry_type):
case base_grid.GeometryType.ICOSAHEDRON:
for js in range(lsq_dim_stencil):
z_dist_g[:, js, :] = np.asarray(
z_dist_g[:, js, :] = array_ns.asarray(
gnomonic_proj(
cell_lon[:], cell_lat[:], cell_lon[c2e2c[:, js]], cell_lat[c2e2c[:, js]]
cell_lon, cell_lat, cell_lon[c2e2c[:, js]], cell_lat[c2e2c[:, js]]
)
).T

z_dist_g *= grid_sphere_radius
min_lsq_bound = min(lsq_dim_unk, lsq_dim_c)

for jc in range(start_idx, min_rlcell_int):
if cell_owner_mask[jc]:
z_lsq_mat_c[jc, :min_lsq_bound, :min_lsq_bound] = 1.0

case base_grid.GeometryType.TORUS:
for jc in range(start_idx, min_rlcell_int):
ilc_s = c2e2c[jc, :lsq_dim_stencil]
Expand All @@ -1265,7 +1266,7 @@ def compute_lsq_coeffs(

for jc in range(start_idx, min_rlcell_int):
lsq_weights_c[jc, :] = compute_lsq_weights_c(
z_dist_g[jc, :, :], lsq_weights_c[jc, :], lsq_dim_stencil, lsq_wgt_exp
z_dist_g[jc, :, :], lsq_weights_c[jc, :], lsq_dim_stencil, lsq_wgt_exp, array_ns
)
z_lsq_mat_c[jc, js, :lsq_dim_unk] = compute_z_lsq_mat_c(
cell_owner_mask,
Expand All @@ -1288,6 +1289,7 @@ def compute_lsq_coeffs(
min_rlcell_int,
lsq_dim_unk,
lsq_dim_c,
array_ns,
)
exchange(lsq_pseudoinv[:, 0, :])
exchange(lsq_pseudoinv[:, 1, :])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@
from gt4py.next import neighbor_sum

from icon4py.model.common import dimension as dims, field_type_aliases as fa, type_alias as ta
from icon4py.model.common.dimension import C2E2C2E, C2E2C2EDim
from icon4py.model.common.dimension import C2E2C2E


@gtx.field_operator
def _edge_2_cell_vector_rbf_interpolation(
p_e_in: fa.EdgeKField[ta.wpfloat],
ptr_coeff_1: gtx.Field[gtx.Dims[dims.CellDim, C2E2C2EDim], ta.wpfloat],
ptr_coeff_2: gtx.Field[gtx.Dims[dims.CellDim, C2E2C2EDim], ta.wpfloat],
ptr_coeff_1: gtx.Field[gtx.Dims[dims.CellDim, dims.C2E2C2EDim], ta.wpfloat],
ptr_coeff_2: gtx.Field[gtx.Dims[dims.CellDim, dims.C2E2C2EDim], ta.wpfloat],
) -> tuple[fa.CellKField[ta.wpfloat], fa.CellKField[ta.wpfloat]]:
"""
Performs vector RBF reconstruction at cell center from edge center.
Expand All @@ -33,16 +33,16 @@ def _edge_2_cell_vector_rbf_interpolation(
Returns:
RBF reconstructed vector at cell center.
"""
p_u_out = neighbor_sum(ptr_coeff_1 * p_e_in(C2E2C2E), axis=C2E2C2EDim)
p_v_out = neighbor_sum(ptr_coeff_2 * p_e_in(C2E2C2E), axis=C2E2C2EDim)
p_u_out = neighbor_sum(ptr_coeff_1 * p_e_in(C2E2C2E), axis=dims.C2E2C2EDim)
p_v_out = neighbor_sum(ptr_coeff_2 * p_e_in(C2E2C2E), axis=dims.C2E2C2EDim)
return p_u_out, p_v_out


@gtx.program(grid_type=gtx.GridType.UNSTRUCTURED)
def edge_2_cell_vector_rbf_interpolation(
p_e_in: fa.EdgeKField[ta.wpfloat],
ptr_coeff_1: gtx.Field[gtx.Dims[dims.CellDim, C2E2C2EDim], ta.wpfloat],
ptr_coeff_2: gtx.Field[gtx.Dims[dims.CellDim, C2E2C2EDim], ta.wpfloat],
ptr_coeff_1: gtx.Field[gtx.Dims[dims.CellDim, dims.C2E2C2EDim], ta.wpfloat],
ptr_coeff_2: gtx.Field[gtx.Dims[dims.CellDim, dims.C2E2C2EDim], ta.wpfloat],
p_u_out: fa.CellKField[ta.wpfloat],
p_v_out: fa.CellKField[ta.wpfloat],
horizontal_start: gtx.int32,
Expand Down
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
24 changes: 21 additions & 3 deletions model/driver/tests/driver/integration_tests/test_icon4py.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,19 @@
False,
False,
),
(
definitions.Experiments.JW,
1,
2,
1,
5,
"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,
),
],
)
def test_run_timeloop_single_step(
Expand All @@ -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=9e-14,
)

assert test_utils.dallclose(
Expand Down
1 change: 1 addition & 0 deletions model/standalone_driver/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ dependencies = [
"icon4py-testing>=0.0.6", # TODO(): remove this dependency when driver is fully standalone
# external dependencies
"typer>=0.20.0",
"pytest",
"devtools>=0.12",
"gt4py==1.1.7",
"packaging>=20.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,10 +147,10 @@ def create_static_field_factories(
metadata=metrics_attributes.attrs,
rayleigh_type=constants.RayleighType.KLEMP,
rayleigh_coeff=0.1,
exner_expol=0.333,
vwind_offctr=0.2,
thslp_zdiffu=0.02,
thhgtd_zdiffu=125.0,
exner_expol=1.0 / 3.0,
vwind_offctr=0.15,
thslp_zdiffu=0.025,
thhgtd_zdiffu=200.0,
)

return driver_states.StaticFieldFactories(
Expand Down Expand Up @@ -579,7 +579,9 @@ def configure_logging(
display_icon4py_logo_in_log_file()


def get_backend_from_name(backend_name: str) -> model_backends.BackendLike:
def get_backend_from_name(
backend_name: str,
) -> model_backends.BackendLike:
if backend_name not in model_backends.BACKENDS:
raise ValueError(
f"Invalid driver backend: {backend_name}. \n"
Expand Down
Loading
Loading