From 470a836b62354b6cb21a07b38fe2d8a29b10633a Mon Sep 17 00:00:00 2001 From: Daniel Hupp Date: Wed, 20 Dec 2023 15:59:04 +0100 Subject: [PATCH 01/15] add reuse --- .../model/atmosphere/dycore/mo_solve_nonhydro_stencil_30.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/model/atmosphere/dycore/src/icon4py/model/atmosphere/dycore/mo_solve_nonhydro_stencil_30.py b/model/atmosphere/dycore/src/icon4py/model/atmosphere/dycore/mo_solve_nonhydro_stencil_30.py index 3489658b53..fe4aa26700 100644 --- a/model/atmosphere/dycore/src/icon4py/model/atmosphere/dycore/mo_solve_nonhydro_stencil_30.py +++ b/model/atmosphere/dycore/src/icon4py/model/atmosphere/dycore/mo_solve_nonhydro_stencil_30.py @@ -17,6 +17,9 @@ from icon4py.model.common.dimension import E2C2E, E2C2EO, E2C2EDim, E2C2EODim, EdgeDim, KDim from icon4py.model.common.type_alias import vpfloat, wpfloat +from icon4py.model.atmosphere.dycore.mo_velocity_advection_stencil_01 import ( + _mo_velocity_advection_stencil_01, +) @field_operator @@ -32,7 +35,7 @@ def _mo_solve_nonhydro_stencil_30( ]: z_vn_avg_wp = neighbor_sum(e_flx_avg * vn(E2C2EO), axis=E2C2EODim) z_graddiv_vn_vp = astype(neighbor_sum(geofac_grdiv * vn(E2C2EO), axis=E2C2EODim), vpfloat) - vt_vp = astype(neighbor_sum(rbf_vec_coeff_e * vn(E2C2E), axis=E2C2EDim), vpfloat) + vt_vp = _mo_velocity_advection_stencil_01(vn=vn, rbf_vec_coeff_e=rbf_vec_coeff_e) return z_vn_avg_wp, z_graddiv_vn_vp, vt_vp From 4c86a8b1863b97b636f09a0e2d8673831ff36aaf Mon Sep 17 00:00:00 2001 From: Daniel Hupp Date: Wed, 20 Dec 2023 16:01:03 +0100 Subject: [PATCH 02/15] fix style --- .../model/atmosphere/dycore/mo_solve_nonhydro_stencil_30.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/model/atmosphere/dycore/src/icon4py/model/atmosphere/dycore/mo_solve_nonhydro_stencil_30.py b/model/atmosphere/dycore/src/icon4py/model/atmosphere/dycore/mo_solve_nonhydro_stencil_30.py index fe4aa26700..9257ca31de 100644 --- a/model/atmosphere/dycore/src/icon4py/model/atmosphere/dycore/mo_solve_nonhydro_stencil_30.py +++ b/model/atmosphere/dycore/src/icon4py/model/atmosphere/dycore/mo_solve_nonhydro_stencil_30.py @@ -15,11 +15,11 @@ from gt4py.next.ffront.decorator import field_operator, program from gt4py.next.ffront.fbuiltins import Field, astype, int32, neighbor_sum -from icon4py.model.common.dimension import E2C2E, E2C2EO, E2C2EDim, E2C2EODim, EdgeDim, KDim -from icon4py.model.common.type_alias import vpfloat, wpfloat from icon4py.model.atmosphere.dycore.mo_velocity_advection_stencil_01 import ( _mo_velocity_advection_stencil_01, ) +from icon4py.model.common.dimension import E2C2EO, E2C2EDim, E2C2EODim, EdgeDim, KDim +from icon4py.model.common.type_alias import vpfloat, wpfloat @field_operator From 1e2f8d77db566be3fc71faa50cfaf46da0ad521d Mon Sep 17 00:00:00 2001 From: Daniel Hupp Date: Wed, 20 Dec 2023 16:28:15 +0100 Subject: [PATCH 03/15] fuse --- .../dycore/mo_solve_nonhydro_stencil_36.py | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/model/atmosphere/dycore/src/icon4py/model/atmosphere/dycore/mo_solve_nonhydro_stencil_36.py b/model/atmosphere/dycore/src/icon4py/model/atmosphere/dycore/mo_solve_nonhydro_stencil_36.py index 6a54552db6..09034fc886 100644 --- a/model/atmosphere/dycore/src/icon4py/model/atmosphere/dycore/mo_solve_nonhydro_stencil_36.py +++ b/model/atmosphere/dycore/src/icon4py/model/atmosphere/dycore/mo_solve_nonhydro_stencil_36.py @@ -15,6 +15,12 @@ from gt4py.next.ffront.decorator import field_operator, program from gt4py.next.ffront.fbuiltins import Field, astype, int32 +from icon4py.model.atmosphere.dycore.mo_velocity_advection_stencil_02 import ( + _mo_velocity_advection_stencil_02, +) +from icon4py.model.atmosphere.dycore.mo_velocity_advection_stencil_03 import ( + _mo_velocity_advection_stencil_03, +) from icon4py.model.common.dimension import EdgeDim, KDim, Koff from icon4py.model.common.type_alias import vpfloat, wpfloat @@ -29,12 +35,11 @@ def _mo_solve_nonhydro_stencil_36( Field[[EdgeDim, KDim], vpfloat], Field[[EdgeDim, KDim], vpfloat], ]: - wgtfac_e_wp, vt_wp = astype((wgtfac_e, vt), wpfloat) + z_vt_ie = _mo_velocity_advection_stencil_03(wgtfac_e=wgtfac_e, vt=vt) + vn_ie, z_kin_hor_e = _mo_velocity_advection_stencil_02(wgtfac_e=wgtfac_e, vn=vn, vt=vt) + return vn_ie, z_vt_ie, z_kin_hor_e + - vn_ie_wp = wgtfac_e_wp * vn + (wpfloat("1.0") - wgtfac_e_wp) * vn(Koff[-1]) - z_vt_ie_wp = astype(wgtfac_e * vt, wpfloat) + (wpfloat("1.0") - wgtfac_e_wp) * vt_wp(Koff[-1]) - z_kin_hor_e_wp = wpfloat("0.5") * (vn * vn + astype(vt * vt, wpfloat)) - return astype((vn_ie_wp, z_vt_ie_wp, z_kin_hor_e_wp), vpfloat) @program(grid_type=GridType.UNSTRUCTURED) From 27a337f65774d92bf021b3ae90cf1400155b8c09 Mon Sep 17 00:00:00 2001 From: Daniel Hupp Date: Wed, 20 Dec 2023 16:29:54 +0100 Subject: [PATCH 04/15] fix style --- .../model/atmosphere/dycore/mo_solve_nonhydro_stencil_36.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/model/atmosphere/dycore/src/icon4py/model/atmosphere/dycore/mo_solve_nonhydro_stencil_36.py b/model/atmosphere/dycore/src/icon4py/model/atmosphere/dycore/mo_solve_nonhydro_stencil_36.py index 09034fc886..a20b752761 100644 --- a/model/atmosphere/dycore/src/icon4py/model/atmosphere/dycore/mo_solve_nonhydro_stencil_36.py +++ b/model/atmosphere/dycore/src/icon4py/model/atmosphere/dycore/mo_solve_nonhydro_stencil_36.py @@ -13,7 +13,7 @@ from gt4py.next.common import GridType from gt4py.next.ffront.decorator import field_operator, program -from gt4py.next.ffront.fbuiltins import Field, astype, int32 +from gt4py.next.ffront.fbuiltins import Field, int32 from icon4py.model.atmosphere.dycore.mo_velocity_advection_stencil_02 import ( _mo_velocity_advection_stencil_02, @@ -21,7 +21,7 @@ from icon4py.model.atmosphere.dycore.mo_velocity_advection_stencil_03 import ( _mo_velocity_advection_stencil_03, ) -from icon4py.model.common.dimension import EdgeDim, KDim, Koff +from icon4py.model.common.dimension import EdgeDim, KDim from icon4py.model.common.type_alias import vpfloat, wpfloat @@ -40,8 +40,6 @@ def _mo_solve_nonhydro_stencil_36( return vn_ie, z_vt_ie, z_kin_hor_e - - @program(grid_type=GridType.UNSTRUCTURED) def mo_solve_nonhydro_stencil_36( wgtfac_e: Field[[EdgeDim, KDim], vpfloat], From b14da940ba0ef9cc7a62a30e8f04627aec05e0c9 Mon Sep 17 00:00:00 2001 From: Daniel Hupp Date: Wed, 20 Dec 2023 16:51:51 +0100 Subject: [PATCH 05/15] more reuse --- .../atmosphere/dycore/mo_velocity_advection_stencil_02.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/model/atmosphere/dycore/src/icon4py/model/atmosphere/dycore/mo_velocity_advection_stencil_02.py b/model/atmosphere/dycore/src/icon4py/model/atmosphere/dycore/mo_velocity_advection_stencil_02.py index eedc4283b6..375627775d 100644 --- a/model/atmosphere/dycore/src/icon4py/model/atmosphere/dycore/mo_velocity_advection_stencil_02.py +++ b/model/atmosphere/dycore/src/icon4py/model/atmosphere/dycore/mo_velocity_advection_stencil_02.py @@ -15,6 +15,9 @@ from gt4py.next.ffront.decorator import field_operator, program from gt4py.next.ffront.fbuiltins import Field, astype, int32 +from icon4py.model.atmosphere.dycore.mo_velocity_advection_stencil_05 import ( + _mo_velocity_advection_stencil_05, +) from icon4py.model.common.dimension import EdgeDim, KDim, Koff from icon4py.model.common.type_alias import vpfloat, wpfloat @@ -28,9 +31,9 @@ def _mo_velocity_advection_stencil_02( wgtfac_e_wp = astype(wgtfac_e, wpfloat) vn_ie_wp = wgtfac_e_wp * vn + (wpfloat("1.0") - wgtfac_e_wp) * vn(Koff[-1]) - z_kin_hor_e_wp = wpfloat("0.5") * (vn * vn + astype(vt * vt, wpfloat)) + _,_,z_kin_hor_e = _mo_velocity_advection_stencil_05(vn=vn,vt=vt) - return astype((vn_ie_wp, z_kin_hor_e_wp), vpfloat) + return astype(vn_ie_wp, vpfloat), z_kin_hor_e @program(grid_type=GridType.UNSTRUCTURED) From 6281cb60dc155695c32d9535a04aa6498d73a700 Mon Sep 17 00:00:00 2001 From: Daniel Hupp Date: Wed, 20 Dec 2023 16:53:01 +0100 Subject: [PATCH 06/15] fix style --- .../model/atmosphere/dycore/mo_velocity_advection_stencil_02.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/model/atmosphere/dycore/src/icon4py/model/atmosphere/dycore/mo_velocity_advection_stencil_02.py b/model/atmosphere/dycore/src/icon4py/model/atmosphere/dycore/mo_velocity_advection_stencil_02.py index 375627775d..a154e64db2 100644 --- a/model/atmosphere/dycore/src/icon4py/model/atmosphere/dycore/mo_velocity_advection_stencil_02.py +++ b/model/atmosphere/dycore/src/icon4py/model/atmosphere/dycore/mo_velocity_advection_stencil_02.py @@ -31,7 +31,7 @@ def _mo_velocity_advection_stencil_02( wgtfac_e_wp = astype(wgtfac_e, wpfloat) vn_ie_wp = wgtfac_e_wp * vn + (wpfloat("1.0") - wgtfac_e_wp) * vn(Koff[-1]) - _,_,z_kin_hor_e = _mo_velocity_advection_stencil_05(vn=vn,vt=vt) + _, _, z_kin_hor_e = _mo_velocity_advection_stencil_05(vn=vn, vt=vt) return astype(vn_ie_wp, vpfloat), z_kin_hor_e From aa8795608b362419d8af75a4cfc1cb4c42e4ef42 Mon Sep 17 00:00:00 2001 From: Daniel Hupp Date: Wed, 20 Dec 2023 17:26:22 +0100 Subject: [PATCH 07/15] more reuse --- .../model/atmosphere/dycore/mo_solve_nonhydro_stencil_08.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/model/atmosphere/dycore/src/icon4py/model/atmosphere/dycore/mo_solve_nonhydro_stencil_08.py b/model/atmosphere/dycore/src/icon4py/model/atmosphere/dycore/mo_solve_nonhydro_stencil_08.py index 0825affdcc..0c2829e162 100644 --- a/model/atmosphere/dycore/src/icon4py/model/atmosphere/dycore/mo_solve_nonhydro_stencil_08.py +++ b/model/atmosphere/dycore/src/icon4py/model/atmosphere/dycore/mo_solve_nonhydro_stencil_08.py @@ -15,6 +15,9 @@ from gt4py.next.ffront.decorator import field_operator, program from gt4py.next.ffront.fbuiltins import Field, astype, int32 +from icon4py.model.atmosphere.dycore.mo_solve_nonhydro_stencil_07 import ( + _mo_solve_nonhydro_stencil_07, +) from icon4py.model.common.dimension import CellDim, KDim, Koff from icon4py.model.common.type_alias import vpfloat, wpfloat @@ -36,8 +39,7 @@ def _mo_solve_nonhydro_stencil_08( ) rho_ic = wgtfac_c_wp * rho + (wpfloat("1.0") - wgtfac_c_wp) * rho(Koff[-1]) - z_rth_pr_1 = astype(rho - rho_ref_mc_wp, vpfloat) - z_rth_pr_2 = astype(theta_v - theta_ref_mc_wp, vpfloat) + z_rth_pr_1, z_rth_pr_2 = _mo_solve_nonhydro_stencil_07(rho=rho, rho_ref_mc=rho_ref_mc, theta_v=theta_v, theta_ref_mc=theta_ref_mc) return rho_ic, z_rth_pr_1, z_rth_pr_2 From 362f59ee9c8b31a700b2ed189f4475ec8d171a9a Mon Sep 17 00:00:00 2001 From: Daniel Hupp Date: Wed, 20 Dec 2023 17:27:57 +0100 Subject: [PATCH 08/15] fix style --- .../model/atmosphere/dycore/mo_solve_nonhydro_stencil_08.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/model/atmosphere/dycore/src/icon4py/model/atmosphere/dycore/mo_solve_nonhydro_stencil_08.py b/model/atmosphere/dycore/src/icon4py/model/atmosphere/dycore/mo_solve_nonhydro_stencil_08.py index 0c2829e162..41e0ce556e 100644 --- a/model/atmosphere/dycore/src/icon4py/model/atmosphere/dycore/mo_solve_nonhydro_stencil_08.py +++ b/model/atmosphere/dycore/src/icon4py/model/atmosphere/dycore/mo_solve_nonhydro_stencil_08.py @@ -39,7 +39,9 @@ def _mo_solve_nonhydro_stencil_08( ) rho_ic = wgtfac_c_wp * rho + (wpfloat("1.0") - wgtfac_c_wp) * rho(Koff[-1]) - z_rth_pr_1, z_rth_pr_2 = _mo_solve_nonhydro_stencil_07(rho=rho, rho_ref_mc=rho_ref_mc, theta_v=theta_v, theta_ref_mc=theta_ref_mc) + z_rth_pr_1, z_rth_pr_2 = _mo_solve_nonhydro_stencil_07( + rho=rho, rho_ref_mc=rho_ref_mc, theta_v=theta_v, theta_ref_mc=theta_ref_mc + ) return rho_ic, z_rth_pr_1, z_rth_pr_2 From 2e34957c35c9ee1399f1609070c1b7cfee8c7f93 Mon Sep 17 00:00:00 2001 From: Daniel Hupp Date: Wed, 20 Dec 2023 17:31:44 +0100 Subject: [PATCH 09/15] rm unused variables --- .../model/atmosphere/dycore/mo_solve_nonhydro_stencil_08.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/model/atmosphere/dycore/src/icon4py/model/atmosphere/dycore/mo_solve_nonhydro_stencil_08.py b/model/atmosphere/dycore/src/icon4py/model/atmosphere/dycore/mo_solve_nonhydro_stencil_08.py index 41e0ce556e..58a5d6a78e 100644 --- a/model/atmosphere/dycore/src/icon4py/model/atmosphere/dycore/mo_solve_nonhydro_stencil_08.py +++ b/model/atmosphere/dycore/src/icon4py/model/atmosphere/dycore/mo_solve_nonhydro_stencil_08.py @@ -34,9 +34,7 @@ def _mo_solve_nonhydro_stencil_08( Field[[CellDim, KDim], vpfloat], Field[[CellDim, KDim], vpfloat], ]: - wgtfac_c_wp, rho_ref_mc_wp, theta_ref_mc_wp = astype( - (wgtfac_c, rho_ref_mc, theta_ref_mc), wpfloat - ) + wgtfac_c_wp = astype(wgtfac_c, wpfloat) rho_ic = wgtfac_c_wp * rho + (wpfloat("1.0") - wgtfac_c_wp) * rho(Koff[-1]) z_rth_pr_1, z_rth_pr_2 = _mo_solve_nonhydro_stencil_07( From 81f4ea684fc1f47d075b6a753f56101a5a5f9224 Mon Sep 17 00:00:00 2001 From: Daniel Hupp Date: Wed, 3 Jan 2024 14:30:24 +0100 Subject: [PATCH 10/15] reuse stencil --- .../model/atmosphere/dycore/mo_solve_nonhydro_stencil_61.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/model/atmosphere/dycore/src/icon4py/model/atmosphere/dycore/mo_solve_nonhydro_stencil_61.py b/model/atmosphere/dycore/src/icon4py/model/atmosphere/dycore/mo_solve_nonhydro_stencil_61.py index eca9cc8954..ca3c6b7e72 100644 --- a/model/atmosphere/dycore/src/icon4py/model/atmosphere/dycore/mo_solve_nonhydro_stencil_61.py +++ b/model/atmosphere/dycore/src/icon4py/model/atmosphere/dycore/mo_solve_nonhydro_stencil_61.py @@ -15,6 +15,9 @@ from gt4py.next.ffront.decorator import field_operator, program from gt4py.next.ffront.fbuiltins import Field, int32 +from icon4py.model.atmosphere.dycore.mo_solve_nonhydro_stencil_62 import ( + _mo_solve_nonhydro_stencil_62, +) from icon4py.model.common.dimension import CellDim, KDim from icon4py.model.common.type_alias import wpfloat @@ -35,7 +38,7 @@ def _mo_solve_nonhydro_stencil_61( ]: rho_new_wp = rho_now + dtime * grf_tend_rho exner_new_wp = theta_v_now + dtime * grf_tend_thv - w_new_wp = w_now + dtime * grf_tend_w + w_new_wp = _mo_solve_nonhydro_stencil_62(w_now, grf_tend_w, dtime) return rho_new_wp, exner_new_wp, w_new_wp From 4a959d999b6f5a6e7f03afce937728b905b41d5d Mon Sep 17 00:00:00 2001 From: Daniel Hupp Date: Wed, 3 Jan 2024 14:41:14 +0100 Subject: [PATCH 11/15] reuse stencil --- .../model/atmosphere/dycore/mo_solve_nonhydro_stencil_09.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/model/atmosphere/dycore/src/icon4py/model/atmosphere/dycore/mo_solve_nonhydro_stencil_09.py b/model/atmosphere/dycore/src/icon4py/model/atmosphere/dycore/mo_solve_nonhydro_stencil_09.py index 8f65ab9ef8..22138e7ab6 100644 --- a/model/atmosphere/dycore/src/icon4py/model/atmosphere/dycore/mo_solve_nonhydro_stencil_09.py +++ b/model/atmosphere/dycore/src/icon4py/model/atmosphere/dycore/mo_solve_nonhydro_stencil_09.py @@ -15,6 +15,9 @@ from gt4py.next.ffront.decorator import field_operator, program from gt4py.next.ffront.fbuiltins import Field, astype, int32 +from icon4py.model.atmosphere.dycore.mo_solve_nonhydro_stencil_05 import ( + _mo_solve_nonhydro_stencil_05, +) from icon4py.model.common.dimension import CellDim, KDim, Koff from icon4py.model.common.type_alias import vpfloat, wpfloat @@ -37,7 +40,7 @@ def _mo_solve_nonhydro_stencil_09( (wgtfac_c, z_rth_pr_2, d_exner_dz_ref_ic, ddqz_z_half), wpfloat ) - z_theta_v_pr_ic_vp = wgtfac_c * z_rth_pr_2 + (vpfloat("1.0") - wgtfac_c) * z_rth_pr_2(Koff[-1]) + z_theta_v_pr_ic_vp = _mo_solve_nonhydro_stencil_05(wgtfac_c=wgtfac_c, z_exner_ex_pr=z_rth_pr_2) theta_v_ic_wp = wgtfac_c_wp * theta_v + (wpfloat("1.0") - wgtfac_c_wp) * theta_v(Koff[-1]) z_th_ddz_exner_c_wp = vwind_expl_wgt * theta_v_ic_wp * ( exner_pr(Koff[-1]) - exner_pr From a473a9dd423f34534bffaf6fbd97aa42915b3921 Mon Sep 17 00:00:00 2001 From: Daniel Hupp Date: Wed, 3 Jan 2024 14:42:39 +0100 Subject: [PATCH 12/15] add named parameters --- .../model/atmosphere/dycore/mo_solve_nonhydro_stencil_61.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/model/atmosphere/dycore/src/icon4py/model/atmosphere/dycore/mo_solve_nonhydro_stencil_61.py b/model/atmosphere/dycore/src/icon4py/model/atmosphere/dycore/mo_solve_nonhydro_stencil_61.py index ca3c6b7e72..ef87f67c43 100644 --- a/model/atmosphere/dycore/src/icon4py/model/atmosphere/dycore/mo_solve_nonhydro_stencil_61.py +++ b/model/atmosphere/dycore/src/icon4py/model/atmosphere/dycore/mo_solve_nonhydro_stencil_61.py @@ -38,7 +38,7 @@ def _mo_solve_nonhydro_stencil_61( ]: rho_new_wp = rho_now + dtime * grf_tend_rho exner_new_wp = theta_v_now + dtime * grf_tend_thv - w_new_wp = _mo_solve_nonhydro_stencil_62(w_now, grf_tend_w, dtime) + w_new_wp = _mo_solve_nonhydro_stencil_62(w_now=w_now, grf_tend_w=grf_tend_w, dtime=dtime) return rho_new_wp, exner_new_wp, w_new_wp From 9bde27fce8cefbc51cb22a60fef4c0a015f5fd20 Mon Sep 17 00:00:00 2001 From: Daniel Hupp Date: Thu, 4 Jan 2024 09:49:30 +0100 Subject: [PATCH 13/15] reuse 31 --- .../model/atmosphere/dycore/mo_solve_nonhydro_stencil_30.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/model/atmosphere/dycore/src/icon4py/model/atmosphere/dycore/mo_solve_nonhydro_stencil_30.py b/model/atmosphere/dycore/src/icon4py/model/atmosphere/dycore/mo_solve_nonhydro_stencil_30.py index 9257ca31de..6762a42573 100644 --- a/model/atmosphere/dycore/src/icon4py/model/atmosphere/dycore/mo_solve_nonhydro_stencil_30.py +++ b/model/atmosphere/dycore/src/icon4py/model/atmosphere/dycore/mo_solve_nonhydro_stencil_30.py @@ -18,6 +18,9 @@ from icon4py.model.atmosphere.dycore.mo_velocity_advection_stencil_01 import ( _mo_velocity_advection_stencil_01, ) +from icon4py.model.atmosphere.dycore.mo_solve_nonhydro_stencil_31 import ( + _mo_solve_nonhydro_stencil_31, +) from icon4py.model.common.dimension import E2C2EO, E2C2EDim, E2C2EODim, EdgeDim, KDim from icon4py.model.common.type_alias import vpfloat, wpfloat @@ -33,7 +36,7 @@ def _mo_solve_nonhydro_stencil_30( Field[[EdgeDim, KDim], vpfloat], Field[[EdgeDim, KDim], vpfloat], ]: - z_vn_avg_wp = neighbor_sum(e_flx_avg * vn(E2C2EO), axis=E2C2EODim) + z_vn_avg_wp = _mo_solve_nonhydro_stencil_31(e_flx_avg=e_flx_avg, vn=vn) z_graddiv_vn_vp = astype(neighbor_sum(geofac_grdiv * vn(E2C2EO), axis=E2C2EODim), vpfloat) vt_vp = _mo_velocity_advection_stencil_01(vn=vn, rbf_vec_coeff_e=rbf_vec_coeff_e) return z_vn_avg_wp, z_graddiv_vn_vp, vt_vp From 63e252a6fab62d392d38769d17775869c86ee6e6 Mon Sep 17 00:00:00 2001 From: Daniel Hupp Date: Thu, 4 Jan 2024 14:23:30 +0100 Subject: [PATCH 14/15] fix style --- .../model/atmosphere/dycore/mo_solve_nonhydro_stencil_30.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/model/atmosphere/dycore/src/icon4py/model/atmosphere/dycore/mo_solve_nonhydro_stencil_30.py b/model/atmosphere/dycore/src/icon4py/model/atmosphere/dycore/mo_solve_nonhydro_stencil_30.py index 6762a42573..984df48742 100644 --- a/model/atmosphere/dycore/src/icon4py/model/atmosphere/dycore/mo_solve_nonhydro_stencil_30.py +++ b/model/atmosphere/dycore/src/icon4py/model/atmosphere/dycore/mo_solve_nonhydro_stencil_30.py @@ -15,12 +15,12 @@ from gt4py.next.ffront.decorator import field_operator, program from gt4py.next.ffront.fbuiltins import Field, astype, int32, neighbor_sum -from icon4py.model.atmosphere.dycore.mo_velocity_advection_stencil_01 import ( - _mo_velocity_advection_stencil_01, -) from icon4py.model.atmosphere.dycore.mo_solve_nonhydro_stencil_31 import ( _mo_solve_nonhydro_stencil_31, ) +from icon4py.model.atmosphere.dycore.mo_velocity_advection_stencil_01 import ( + _mo_velocity_advection_stencil_01, +) from icon4py.model.common.dimension import E2C2EO, E2C2EDim, E2C2EODim, EdgeDim, KDim from icon4py.model.common.type_alias import vpfloat, wpfloat From 2d3a31336cef217c784e007659fa05f9f707c08c Mon Sep 17 00:00:00 2001 From: Daniel Hupp Date: Fri, 5 Jan 2024 16:24:44 +0100 Subject: [PATCH 15/15] fix stencil name --- .../model/atmosphere/dycore/mo_solve_nonhydro_stencil_08.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/model/atmosphere/dycore/src/icon4py/model/atmosphere/dycore/mo_solve_nonhydro_stencil_08.py b/model/atmosphere/dycore/src/icon4py/model/atmosphere/dycore/mo_solve_nonhydro_stencil_08.py index 58a5d6a78e..1adbe47c2d 100644 --- a/model/atmosphere/dycore/src/icon4py/model/atmosphere/dycore/mo_solve_nonhydro_stencil_08.py +++ b/model/atmosphere/dycore/src/icon4py/model/atmosphere/dycore/mo_solve_nonhydro_stencil_08.py @@ -15,8 +15,8 @@ from gt4py.next.ffront.decorator import field_operator, program from gt4py.next.ffront.fbuiltins import Field, astype, int32 -from icon4py.model.atmosphere.dycore.mo_solve_nonhydro_stencil_07 import ( - _mo_solve_nonhydro_stencil_07, +from icon4py.model.atmosphere.dycore.compute_pertubation_of_rho_and_theta import ( + _compute_pertubation_of_rho_and_theta, ) from icon4py.model.common.dimension import CellDim, KDim, Koff from icon4py.model.common.type_alias import vpfloat, wpfloat @@ -37,7 +37,7 @@ def _mo_solve_nonhydro_stencil_08( wgtfac_c_wp = astype(wgtfac_c, wpfloat) rho_ic = wgtfac_c_wp * rho + (wpfloat("1.0") - wgtfac_c_wp) * rho(Koff[-1]) - z_rth_pr_1, z_rth_pr_2 = _mo_solve_nonhydro_stencil_07( + z_rth_pr_1, z_rth_pr_2 = _compute_pertubation_of_rho_and_theta( rho=rho, rho_ref_mc=rho_ref_mc, theta_v=theta_v, theta_ref_mc=theta_ref_mc ) return rho_ic, z_rth_pr_1, z_rth_pr_2