Skip to content

Commit

Permalink
fix typo in turbulence (#164)
Browse files Browse the repository at this point in the history
  • Loading branch information
abishekg7 authored Feb 20, 2023
1 parent 01b5816 commit 686e5aa
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@


@field_operator
def _calculate_diagnostics_for_turbulance(
def _calculate_diagnostics_for_turbulence(
div: Field[[CellDim, KDim], float],
kh_c: Field[[CellDim, KDim], float],
wgtfac_c: Field[[CellDim, KDim], float],
Expand All @@ -29,11 +29,11 @@ def _calculate_diagnostics_for_turbulance(


@program
def calculate_diagnostics_for_turbulance(
def calculate_diagnostics_for_turbulence(
div: Field[[CellDim, KDim], float],
kh_c: Field[[CellDim, KDim], float],
wgtfac_c: Field[[CellDim, KDim], float],
div_ic: Field[[CellDim, KDim], float],
hdef_ic: Field[[CellDim, KDim], float],
):
_calculate_diagnostics_for_turbulance(div, kh_c, wgtfac_c, out=(div_ic, hdef_ic))
_calculate_diagnostics_for_turbulence(div, kh_c, wgtfac_c, out=(div_ic, hdef_ic))
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@


@field_operator
def _calculate_horizontal_gradients_for_turbulance(
def _calculate_horizontal_gradients_for_turbulence(
w: Field[[CellDim, KDim], float],
geofac_grg_x: Field[[CellDim, C2E2CODim], float],
geofac_grg_y: Field[[CellDim, C2E2CODim], float],
Expand All @@ -29,13 +29,13 @@ def _calculate_horizontal_gradients_for_turbulance(


@program
def calculate_horizontal_gradients_for_turbulance(
def calculate_horizontal_gradients_for_turbulence(
w: Field[[CellDim, KDim], float],
geofac_grg_x: Field[[CellDim, C2E2CODim], float],
geofac_grg_y: Field[[CellDim, C2E2CODim], float],
dwdx: Field[[CellDim, KDim], float],
dwdy: Field[[CellDim, KDim], float],
):
_calculate_horizontal_gradients_for_turbulance(
_calculate_horizontal_gradients_for_turbulence(
w, geofac_grg_x, geofac_grg_y, out=(dwdx, dwdy)
)
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@


@field_operator
def _temporary_fields_for_turbulance_diagnostics(
def _temporary_fields_for_turbulence_diagnostics(
kh_smag_ec: Field[[EdgeDim, KDim], float],
vn: Field[[EdgeDim, KDim], float],
e_bln_c_s: Field[[CellDim, C2EDim], float],
Expand All @@ -31,7 +31,7 @@ def _temporary_fields_for_turbulance_diagnostics(


@program
def temporary_fields_for_turbulance_diagnostics(
def temporary_fields_for_turbulence_diagnostics(
kh_smag_ec: Field[[EdgeDim, KDim], float],
vn: Field[[EdgeDim, KDim], float],
e_bln_c_s: Field[[CellDim, C2EDim], float],
Expand All @@ -40,6 +40,6 @@ def temporary_fields_for_turbulance_diagnostics(
kh_c: Field[[CellDim, KDim], float],
div: Field[[CellDim, KDim], float],
):
_temporary_fields_for_turbulance_diagnostics(
_temporary_fields_for_turbulence_diagnostics(
kh_smag_ec, vn, e_bln_c_s, geofac_div, diff_multfac_smag, out=(kh_c, div)
)
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@

import numpy as np

from icon4py.atm_dyn_iconam.calculate_diagnostics_for_turbulance import (
calculate_diagnostics_for_turbulance,
from icon4py.atm_dyn_iconam.calculate_diagnostics_for_turbulence import (
calculate_diagnostics_for_turbulence,
)
from icon4py.common.dimension import CellDim, KDim
from icon4py.testutils.simple_mesh import SimpleMesh
from icon4py.testutils.utils import random_field, zero_field


def calculate_diagnostics_for_turbulance_numpy(
def calculate_diagnostics_for_turbulence_numpy(
div: np.array,
k_hc: np.array,
wgtfac_c: np.array,
Expand All @@ -33,7 +33,7 @@ def calculate_diagnostics_for_turbulance_numpy(
return div_ic, hdef_ic


def test_calculate_diagnostics_for_turbulance():
def test_calculate_diagnostics_for_turbulence():
mesh = SimpleMesh()

wgtfac_c = random_field(mesh, CellDim, KDim)
Expand All @@ -43,13 +43,13 @@ def test_calculate_diagnostics_for_turbulance():
div_ic = zero_field(mesh, CellDim, KDim)
hdef_ic = zero_field(mesh, CellDim, KDim)

div_ref, kh_c_ref = calculate_diagnostics_for_turbulance_numpy(
div_ref, kh_c_ref = calculate_diagnostics_for_turbulence_numpy(
np.asarray(div),
np.asarray(kh_c),
np.asarray(wgtfac_c),
)

calculate_diagnostics_for_turbulance(
calculate_diagnostics_for_turbulence(
div,
kh_c,
wgtfac_c,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@

import numpy as np

from icon4py.atm_dyn_iconam.calculate_horizontal_gradients_for_turbulance import (
calculate_horizontal_gradients_for_turbulance,
from icon4py.atm_dyn_iconam.calculate_horizontal_gradients_for_turbulence import (
calculate_horizontal_gradients_for_turbulence,
)
from icon4py.common.dimension import C2E2CODim, CellDim, KDim
from icon4py.testutils.simple_mesh import SimpleMesh
from icon4py.testutils.utils import random_field, zero_field


def calculate_horizontal_gradients_for_turbulance_numpy(
def calculate_horizontal_gradients_for_turbulence_numpy(
c2e2c0: np.array,
w: np.array,
geofac_grg_x: np.array,
Expand All @@ -35,7 +35,7 @@ def calculate_horizontal_gradients_for_turbulance_numpy(
return dwdx, dwdy


def test_calculate_horizontal_gradients_for_turbulance():
def test_calculate_horizontal_gradients_for_turbulence():
mesh = SimpleMesh()

w = random_field(mesh, CellDim, KDim)
Expand All @@ -44,10 +44,10 @@ def test_calculate_horizontal_gradients_for_turbulance():
dwdx = zero_field(mesh, CellDim, KDim)
dwdy = zero_field(mesh, CellDim, KDim)

dwdx_ref, dwdy_ref = calculate_horizontal_gradients_for_turbulance_numpy(
dwdx_ref, dwdy_ref = calculate_horizontal_gradients_for_turbulence_numpy(
mesh.c2e2cO, np.asarray(w), np.asarray(geofac_grg_x), np.asarray(geofac_grg_y)
)
calculate_horizontal_gradients_for_turbulance(
calculate_horizontal_gradients_for_turbulence(
w,
geofac_grg_x,
geofac_grg_y,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@

import numpy as np

from icon4py.atm_dyn_iconam.temporary_fields_for_turbulance_diagnostics import (
temporary_fields_for_turbulance_diagnostics,
from icon4py.atm_dyn_iconam.temporary_fields_for_turbulence_diagnostics import (
temporary_fields_for_turbulence_diagnostics,
)
from icon4py.common.dimension import C2EDim, CellDim, EdgeDim, KDim
from icon4py.testutils.simple_mesh import SimpleMesh
Expand Down Expand Up @@ -63,7 +63,7 @@ def test_mo_nh_diffusion_stencil_02():
np.asarray(diff_multfac_smag),
)

temporary_fields_for_turbulance_diagnostics(
temporary_fields_for_turbulence_diagnostics(
kh_smag_ec,
vn,
e_bln_c_s,
Expand Down

0 comments on commit 686e5aa

Please sign in to comment.