Skip to content

Commit

Permalink
fix style
Browse files Browse the repository at this point in the history
  • Loading branch information
huppd committed Feb 5, 2024
1 parent 7611b7f commit fbc392e
Show file tree
Hide file tree
Showing 7 changed files with 30 additions and 28 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def _add_analysis_increments_from_data_assimilation(
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.'''
"""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 Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def _apply_4th_order_divergence_damping(
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.'''
"""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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def _apply_rayleigh_damping_mechanism(
w_1: Field[[CellDim], wpfloat],
w: Field[[CellDim, KDim], wpfloat],
) -> Field[[CellDim, KDim], wpfloat]:
'''Formerly known as _mo_solve_nonhydro_stencil_54.'''
"""Formerly known as _mo_solve_nonhydro_stencil_54."""
z_raylfac = broadcast(z_raylfac, (CellDim, KDim))
w_wp = z_raylfac * w + (wpfloat("1.0") - z_raylfac) * w_1
return w_wp
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def _compute_results_for_thermodynamic_variables(
Field[[CellDim, KDim], wpfloat],
Field[[CellDim, KDim], wpfloat],
]:
'''Formerly known as _mo_solve_nonhydro_stencil_55.'''
"""Formerly known as _mo_solve_nonhydro_stencil_55."""
inv_ddqz_z_full_wp, exner_ref_mc_wp, z_alpha_wp, z_beta_wp = astype(
(inv_ddqz_z_full, exner_ref_mc, z_alpha, z_beta), wpfloat
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@
import icon4py.model.atmosphere.dycore.nh_solve.solve_nonhydro_program as nhsolve_prog
import icon4py.model.common.constants as constants
from icon4py.model.atmosphere.dycore.accumulate_prep_adv_fields import accumulate_prep_adv_fields
from icon4py.model.atmosphere.dycore.add_analysis_increments_from_data_assimilation import (
add_analysis_increments_from_data_assimilation,
)
from icon4py.model.atmosphere.dycore.add_analysis_increments_to_vn import (
add_analysis_increments_to_vn,
)
Expand All @@ -37,9 +40,15 @@
from icon4py.model.atmosphere.dycore.apply_2nd_order_divergence_damping import (
apply_2nd_order_divergence_damping,
)
from icon4py.model.atmosphere.dycore.apply_4th_order_divergence_damping import (
apply_4th_order_divergence_damping,
)
from icon4py.model.atmosphere.dycore.apply_hydrostatic_correction_to_horizontal_gradient_of_exner_pressure import (
apply_hydrostatic_correction_to_horizontal_gradient_of_exner_pressure,
)
from icon4py.model.atmosphere.dycore.apply_rayleigh_damping_mechanism import (
apply_rayleigh_damping_mechanism,
)
from icon4py.model.atmosphere.dycore.apply_weighted_2nd_and_4th_order_divergence_damping import (
apply_weighted_2nd_and_4th_order_divergence_damping,
)
Expand All @@ -53,6 +62,9 @@
from icon4py.model.atmosphere.dycore.compute_divergence_of_fluxes_of_rho_and_theta import (
compute_divergence_of_fluxes_of_rho_and_theta,
)
from icon4py.model.atmosphere.dycore.compute_dwdz_for_divergence_damping import (
compute_dwdz_for_divergence_damping,
)
from icon4py.model.atmosphere.dycore.compute_exner_from_rhotheta import compute_exner_from_rhotheta
from icon4py.model.atmosphere.dycore.compute_graddiv2_of_vn import compute_graddiv2_of_vn
from icon4py.model.atmosphere.dycore.compute_horizontal_gradient_of_exner_pressure_for_flat_coordinates import (
Expand All @@ -71,6 +83,9 @@
from icon4py.model.atmosphere.dycore.compute_pertubation_of_rho_and_theta import (
compute_pertubation_of_rho_and_theta,
)
from icon4py.model.atmosphere.dycore.compute_results_for_thermodynamic_variables import (
compute_results_for_thermodynamic_variables,
)
from icon4py.model.atmosphere.dycore.compute_rho_virtual_potential_temperatures_and_pressure_gradient import (
compute_rho_virtual_potential_temperatures_and_pressure_gradient,
)
Expand All @@ -85,27 +100,6 @@
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.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,
)
from icon4py.model.atmosphere.dycore.solve_tridiagonal_matrix_for_w_forward_sweep import (
solve_tridiagonal_matrix_for_w_forward_sweep,
)
from icon4py.model.atmosphere.dycore.solve_tridiagonal_matrix_for_w_back_substitution import (
solve_tridiagonal_matrix_for_w_back_substitution,
)
from icon4py.model.atmosphere.dycore.apply_rayleigh_damping_mechanism import (
apply_rayleigh_damping_mechanism,
)
from icon4py.model.atmosphere.dycore.compute_results_for_thermodynamic_variables import (
compute_results_for_thermodynamic_variables,
)
from icon4py.model.atmosphere.dycore.compute_dwdz_for_divergence_damping import (
compute_dwdz_for_divergence_damping,
)
from icon4py.model.atmosphere.dycore.set_two_cell_kdim_fields_to_zero_vp import (
set_two_cell_kdim_fields_to_zero_vp,
)
Expand All @@ -115,6 +109,12 @@
from icon4py.model.atmosphere.dycore.set_two_edge_kdim_fields_to_zero_wp import (
set_two_edge_kdim_fields_to_zero_wp,
)
from icon4py.model.atmosphere.dycore.solve_tridiagonal_matrix_for_w_back_substitution import (
solve_tridiagonal_matrix_for_w_back_substitution,
)
from icon4py.model.atmosphere.dycore.solve_tridiagonal_matrix_for_w_forward_sweep import (
solve_tridiagonal_matrix_for_w_forward_sweep,
)
from icon4py.model.atmosphere.dycore.state_utils.states import (
DiagnosticStateNonHydro,
InterpolationState,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,10 @@


@scan_operator(axis=KDim, forward=False, init=wpfloat("0.0"))
def _solve_tridiagonal_matrix_for_w_back_substitution_scan(w_state: wpfloat, z_q: vpfloat, w: wpfloat) -> wpfloat:
'''Formerly known as _mo_solve_nonhydro_stencil_53_scan.'''
def _solve_tridiagonal_matrix_for_w_back_substitution_scan(
w_state: wpfloat, z_q: vpfloat, w: wpfloat
) -> wpfloat:
"""Formerly known as _mo_solve_nonhydro_stencil_53_scan."""
return w + w_state * astype(z_q, wpfloat)


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def _solve_tridiagonal_matrix_for_w_forward_sweep(
dtime: wpfloat,
cpd: wpfloat,
) -> tuple[Field[[CellDim, KDim], vpfloat], Field[[CellDim, KDim], wpfloat]]:
'''Formerly known as _mo_solve_nonhydro_stencil_52.'''
"""Formerly known as _mo_solve_nonhydro_stencil_52."""
ddqz_z_half_wp = astype(ddqz_z_half, wpfloat)

z_gamma_vp = astype(dtime * cpd * vwind_impl_wgt * theta_v_ic / ddqz_z_half_wp, vpfloat)
Expand Down

0 comments on commit fbc392e

Please sign in to comment.