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 d70bac0 commit adc18c4
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,14 @@


@field_operator
def _mo_solve_nonhydro_stencil_50(
def _add_analysis_increments_from_data_assimilation(
z_rho_expl: Field[[CellDim, KDim], wpfloat],
z_exner_expl: Field[[CellDim, KDim], wpfloat],
rho_incr: Field[[CellDim, KDim], vpfloat],
exner_incr: Field[[CellDim, KDim], vpfloat],
iau_wgt_dyn: wpfloat,
) -> tuple[Field[[CellDim, KDim], wpfloat], Field[[CellDim, KDim], wpfloat]]:
'''Formerly known as _mo_solve_nonhydro_stencil_50.'''
rho_incr_wp, exner_incr_wp = astype((rho_incr, exner_incr), wpfloat)

z_rho_expl_wp = z_rho_expl + iau_wgt_dyn * rho_incr_wp
Expand All @@ -35,7 +36,7 @@ def _mo_solve_nonhydro_stencil_50(


@program(grid_type=GridType.UNSTRUCTURED)
def mo_solve_nonhydro_stencil_50(
def add_analysis_increments_from_data_assimilation(
z_rho_expl: Field[[CellDim, KDim], wpfloat],
z_exner_expl: Field[[CellDim, KDim], wpfloat],
rho_incr: Field[[CellDim, KDim], vpfloat],
Expand All @@ -46,7 +47,7 @@ def mo_solve_nonhydro_stencil_50(
vertical_start: int32,
vertical_end: int32,
):
_mo_solve_nonhydro_stencil_50(
_add_analysis_increments_from_data_assimilation(
z_rho_expl,
z_exner_expl,
rho_incr,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@
from icon4py.model.atmosphere.dycore.mo_solve_nonhydro_4th_order_divdamp import (
mo_solve_nonhydro_4th_order_divdamp,
)
from icon4py.model.atmosphere.dycore.mo_solve_nonhydro_stencil_50 import (
mo_solve_nonhydro_stencil_50,
from icon4py.model.atmosphere.dycore.add_analysis_increments_from_data_assimilation import (
add_analysis_increments_from_data_assimilation,
)
from icon4py.model.atmosphere.dycore.solve_tridiagonal_matrix_for_w_forward_sweep import (
solve_tridiagonal_matrix_for_w_forward_sweep,
Expand Down Expand Up @@ -1265,7 +1265,7 @@ def run_predictor_step(
)

if self.config.is_iau_active:
mo_solve_nonhydro_stencil_50.with_backend(backend)(
add_analysis_increments_from_data_assimilation.with_backend(backend)(
z_fields.z_rho_expl,
z_fields.z_exner_expl,
diagnostic_state_nh.rho_incr,
Expand Down Expand Up @@ -1833,7 +1833,7 @@ def run_corrector_step(
# TODO: this is not tested in green line so far
if self.config.is_iau_active:
log.debug(f"corrector start stencil 50")
mo_solve_nonhydro_stencil_50(
add_analysis_increments_from_data_assimilation(
z_rho_expl=z_fields.z_rho_expl,
z_exner_expl=z_fields.z_exner_expl,
rho_incr=diagnostic_state_nh.rho_incr,
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_stencil_50 import (
mo_solve_nonhydro_stencil_50,
from icon4py.model.atmosphere.dycore.add_analysis_increments_from_data_assimilation import (
add_analysis_increments_from_data_assimilation,
)
from icon4py.model.common.dimension import CellDim, KDim
from icon4py.model.common.test_utils.helpers import StencilTest, random_field
from icon4py.model.common.type_alias import vpfloat, wpfloat


class TestMoSolveNonhydroStencil50(StencilTest):
PROGRAM = mo_solve_nonhydro_stencil_50
PROGRAM = add_analysis_increments_from_data_assimilation
OUTPUTS = ("z_rho_expl", "z_exner_expl")

@staticmethod
Expand Down

0 comments on commit adc18c4

Please sign in to comment.