Skip to content

Commit

Permalink
rename
Browse files Browse the repository at this point in the history
  • Loading branch information
huppd committed Feb 5, 2024
1 parent adc18c4 commit 7611b7f
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,20 @@


@field_operator
def _mo_solve_nonhydro_4th_order_divdamp(
def _apply_4th_order_divergence_damping(
scal_divdamp: Field[[KDim], wpfloat],
z_graddiv2_vn: Field[[EdgeDim, KDim], vpfloat],
vn: Field[[EdgeDim, KDim], wpfloat],
) -> Field[[EdgeDim, KDim], wpfloat]:
'''Formelry known as _mo_solve_nonhydro_4th_order_divdamp.'''
z_graddiv2_vn_wp = astype(z_graddiv2_vn, wpfloat)
scal_divdamp = broadcast(scal_divdamp, (EdgeDim, KDim))
vn_wp = vn + (scal_divdamp * z_graddiv2_vn_wp)
return vn_wp


@program(grid_type=GridType.UNSTRUCTURED)
def mo_solve_nonhydro_4th_order_divdamp(
def apply_4th_order_divergence_damping(
scal_divdamp: Field[[KDim], wpfloat],
z_graddiv2_vn: Field[[EdgeDim, KDim], vpfloat],
vn: Field[[EdgeDim, KDim], wpfloat],
Expand All @@ -41,7 +42,7 @@ def mo_solve_nonhydro_4th_order_divdamp(
vertical_start: int32,
vertical_end: int32,
):
_mo_solve_nonhydro_4th_order_divdamp(
_apply_4th_order_divergence_damping(
scal_divdamp,
z_graddiv2_vn,
vn,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,8 @@
from icon4py.model.atmosphere.dycore.mo_math_gradients_grad_green_gauss_cell_dsl import (
mo_math_gradients_grad_green_gauss_cell_dsl,
)
from icon4py.model.atmosphere.dycore.mo_solve_nonhydro_4th_order_divdamp import (
mo_solve_nonhydro_4th_order_divdamp,
from icon4py.model.atmosphere.dycore.apply_4th_order_divergence_damping import (
apply_4th_order_divergence_damping,
)
from icon4py.model.atmosphere.dycore.add_analysis_increments_from_data_assimilation import (
add_analysis_increments_from_data_assimilation,
Expand Down Expand Up @@ -1623,7 +1623,7 @@ def run_corrector_step(
)
else:
log.debug("corrector start stencil 4th order divdamp")
mo_solve_nonhydro_4th_order_divdamp.with_backend(backend)(
apply_4th_order_divergence_damping.with_backend(backend)(
scal_divdamp=self.scal_divdamp,
z_graddiv2_vn=self.z_graddiv2_vn,
vn=prognostic_state[nnew].vn,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,16 @@
import pytest
from gt4py.next.ffront.fbuiltins import int32

from icon4py.model.atmosphere.dycore.mo_solve_nonhydro_4th_order_divdamp import (
mo_solve_nonhydro_4th_order_divdamp,
from icon4py.model.atmosphere.dycore.apply_4th_order_divergence_damping import (
apply_4th_order_divergence_damping,
)
from icon4py.model.common.dimension import EdgeDim, KDim
from icon4py.model.common.test_utils.helpers import StencilTest, random_field
from icon4py.model.common.type_alias import vpfloat, wpfloat


class TestMoSolveNonhydro4thOrderDivdamp(StencilTest):
PROGRAM = mo_solve_nonhydro_4th_order_divdamp
PROGRAM = apply_4th_order_divergence_damping
OUTPUTS = ("vn",)

@staticmethod
Expand Down

0 comments on commit 7611b7f

Please sign in to comment.