From adc18c45899d5a317275594947c523f9745334d3 Mon Sep 17 00:00:00 2001 From: Daniel Hupp Date: Mon, 5 Feb 2024 10:48:26 +0100 Subject: [PATCH] rename --- ... => add_analysis_increments_from_data_assimilation.py} | 7 ++++--- .../model/atmosphere/dycore/nh_solve/solve_nonhydro.py | 8 ++++---- ...est_add_analysis_increments_from_data_assimilation.py} | 6 +++--- 3 files changed, 11 insertions(+), 10 deletions(-) rename model/atmosphere/dycore/src/icon4py/model/atmosphere/dycore/{mo_solve_nonhydro_stencil_50.py => add_analysis_increments_from_data_assimilation.py} (90%) rename model/atmosphere/dycore/tests/dycore_stencil_tests/{test_mo_solve_nonhydro_stencil_50.py => test_add_analysis_increments_from_data_assimilation.py} (91%) diff --git a/model/atmosphere/dycore/src/icon4py/model/atmosphere/dycore/mo_solve_nonhydro_stencil_50.py b/model/atmosphere/dycore/src/icon4py/model/atmosphere/dycore/add_analysis_increments_from_data_assimilation.py similarity index 90% rename from model/atmosphere/dycore/src/icon4py/model/atmosphere/dycore/mo_solve_nonhydro_stencil_50.py rename to model/atmosphere/dycore/src/icon4py/model/atmosphere/dycore/add_analysis_increments_from_data_assimilation.py index d366c532cd..e1f6490c31 100644 --- a/model/atmosphere/dycore/src/icon4py/model/atmosphere/dycore/mo_solve_nonhydro_stencil_50.py +++ b/model/atmosphere/dycore/src/icon4py/model/atmosphere/dycore/add_analysis_increments_from_data_assimilation.py @@ -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 @@ -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], @@ -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, diff --git a/model/atmosphere/dycore/src/icon4py/model/atmosphere/dycore/nh_solve/solve_nonhydro.py b/model/atmosphere/dycore/src/icon4py/model/atmosphere/dycore/nh_solve/solve_nonhydro.py index d5f07b6eb5..256c35a984 100644 --- a/model/atmosphere/dycore/src/icon4py/model/atmosphere/dycore/nh_solve/solve_nonhydro.py +++ b/model/atmosphere/dycore/src/icon4py/model/atmosphere/dycore/nh_solve/solve_nonhydro.py @@ -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, @@ -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, @@ -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, diff --git a/model/atmosphere/dycore/tests/dycore_stencil_tests/test_mo_solve_nonhydro_stencil_50.py b/model/atmosphere/dycore/tests/dycore_stencil_tests/test_add_analysis_increments_from_data_assimilation.py similarity index 91% rename from model/atmosphere/dycore/tests/dycore_stencil_tests/test_mo_solve_nonhydro_stencil_50.py rename to model/atmosphere/dycore/tests/dycore_stencil_tests/test_add_analysis_increments_from_data_assimilation.py index 3d12c8b990..0fcf919916 100644 --- a/model/atmosphere/dycore/tests/dycore_stencil_tests/test_mo_solve_nonhydro_stencil_50.py +++ b/model/atmosphere/dycore/tests/dycore_stencil_tests/test_add_analysis_increments_from_data_assimilation.py @@ -15,8 +15,8 @@ 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 @@ -24,7 +24,7 @@ class TestMoSolveNonhydroStencil50(StencilTest): - PROGRAM = mo_solve_nonhydro_stencil_50 + PROGRAM = add_analysis_increments_from_data_assimilation OUTPUTS = ("z_rho_expl", "z_exner_expl") @staticmethod