Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename set and copy stencils #347

Merged
merged 37 commits into from
Jan 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
438be18
rename stencil
huppd Jan 9, 2024
909f5d9
rename parameters
huppd Jan 9, 2024
7975bca
remove obsolete stencil
huppd Jan 9, 2024
472efad
rename stencil
huppd Jan 10, 2024
6769a20
fix + more reuse
huppd Jan 10, 2024
29ee314
add doc string
huppd Jan 10, 2024
1417844
more reuse
huppd Jan 10, 2024
e3ce410
rm unused stencil
huppd Jan 10, 2024
af4bc7a
rm another stencil
huppd Jan 10, 2024
8bbeb4a
clean style
huppd Jan 12, 2024
bf283ec
Merge branch 'cleanup_stencils' of github.com:C2SM/icon4py into clean…
huppd Jan 12, 2024
b51f45e
update
huppd Jan 12, 2024
30acf42
first draft
huppd Jan 15, 2024
8830f33
rename stencil
huppd Jan 15, 2024
ad0a8d9
new stencil
huppd Jan 15, 2024
4f5b0fe
cleanup code
huppd Jan 15, 2024
67a4eb7
rm stencil
huppd Jan 15, 2024
4d0a049
rm stencil+fixes
huppd Jan 15, 2024
d793f28
fix style
huppd Jan 15, 2024
a5aed15
new init stencil
huppd Jan 16, 2024
18d9d87
add numpy
huppd Jan 17, 2024
a530749
update name
huppd Jan 17, 2024
f390965
rm stencil
huppd Jan 17, 2024
9570f68
rename stencil
huppd Jan 17, 2024
0508a1c
update names
huppd Jan 17, 2024
53a31aa
update name
huppd Jan 17, 2024
33d7130
cleanup
huppd Jan 17, 2024
1664917
cleanup
huppd Jan 17, 2024
e79ebba
fix stye
huppd Jan 17, 2024
1a532f1
Merge remote-tracking branch 'origin/main' into cleanup_stencils
huppd Jan 17, 2024
91c7cd8
Merge remote-tracking branch 'origin/main' into cleanup_stencils
huppd Jan 22, 2024
ef71707
add skip
huppd Jan 22, 2024
a004e4e
fix style
huppd Jan 22, 2024
83e0099
fix solve_nohydro
huppd Jan 23, 2024
46c5e33
Merge branch 'cleanup_stencils' of github.com:C2SM/icon4py into clean…
huppd Jan 23, 2024
b42f9dc
Merge remote-tracking branch 'origin/main' into cleanup_stencils
huppd Jan 24, 2024
94cbf78
fix skip message
huppd Jan 25, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -20,25 +20,26 @@


@field_operator
def _mo_solve_nonhydro_stencil_59(
exner: Field[[CellDim, KDim], wpfloat],
def _copy_cell_kdim_field_to_vp(
field: Field[[CellDim, KDim], wpfloat]
) -> Field[[CellDim, KDim], vpfloat]:
exner_dyn_incr_wp = exner
return astype(exner_dyn_incr_wp, vpfloat)
"""Formerly known as _mo_velocity_advection_stencil_11 or _mo_solve_nonhydro_stencil_59."""
field_copy = astype(field, vpfloat)
return field_copy


@program(grid_type=GridType.UNSTRUCTURED)
def mo_solve_nonhydro_stencil_59(
exner: Field[[CellDim, KDim], wpfloat],
exner_dyn_incr: Field[[CellDim, KDim], vpfloat],
def copy_cell_kdim_field_to_vp(
field: Field[[CellDim, KDim], wpfloat],
field_copy: Field[[CellDim, KDim], vpfloat],
horizontal_start: int32,
horizontal_end: int32,
vertical_start: int32,
vertical_end: int32,
):
_mo_solve_nonhydro_stencil_59(
exner,
out=exner_dyn_incr,
_copy_cell_kdim_field_to_vp(
field,
out=field_copy,
domain={
CellDim: (horizontal_start, horizontal_end),
KDim: (vertical_start, vertical_end),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,22 +14,20 @@
from gt4py.next.ffront.decorator import field_operator, program
from gt4py.next.ffront.fbuiltins import int32, maximum, where

from icon4py.model.atmosphere.dycore.copy_cell_kdim_field_to_vp import _copy_cell_kdim_field_to_vp
from icon4py.model.atmosphere.dycore.interpolate_to_cell_center import _interpolate_to_cell_center
from icon4py.model.atmosphere.dycore.mo_velocity_advection_stencil_10 import (
_mo_velocity_advection_stencil_10,
)
from icon4py.model.atmosphere.dycore.mo_velocity_advection_stencil_11 import (
_mo_velocity_advection_stencil_11,
)
from icon4py.model.atmosphere.dycore.mo_velocity_advection_stencil_12 import (
_mo_velocity_advection_stencil_12,
)
from icon4py.model.atmosphere.dycore.mo_velocity_advection_stencil_13 import (
_mo_velocity_advection_stencil_13,
)
from icon4py.model.atmosphere.dycore.mo_velocity_advection_stencil_14 import (
_mo_velocity_advection_stencil_14,
)
from icon4py.model.atmosphere.dycore.set_cell_kdim_field_to_zero_vp import (
_set_cell_kdim_field_to_zero_vp,
)
from icon4py.model.common.dimension import CEDim, CellDim, EdgeDim, KDim
from icon4py.model.common.type_alias import vpfloat, wpfloat

Expand Down Expand Up @@ -91,8 +89,8 @@ def _fused_velocity_advection_stencil_8_to_14(

z_w_con_c = where(
k < nlevp1,
_mo_velocity_advection_stencil_11(w),
_mo_velocity_advection_stencil_12(),
_copy_cell_kdim_field_to_vp(w),
_set_cell_kdim_field_to_zero_vp(),
)

z_w_con_c = where(
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,11 @@

from gt4py.next.common import GridType
from gt4py.next.ffront.decorator import field_operator, program
from gt4py.next.ffront.fbuiltins import Field, astype, broadcast, int32
from gt4py.next.ffront.fbuiltins import Field, astype, int32

from icon4py.model.atmosphere.dycore.set_cell_kdim_field_to_zero_wp import (
_set_cell_kdim_field_to_zero_wp,
)
from icon4py.model.common.dimension import CellDim, KDim
from icon4py.model.common.type_alias import vpfloat, wpfloat

Expand All @@ -26,7 +29,7 @@ def _mo_solve_nonhydro_stencil_47(
w_concorr_c_wp = astype(w_concorr_c, wpfloat)

w_nnew_wp = w_concorr_c_wp
z_contr_w_fl_l_wp = broadcast(wpfloat("0.0"), (CellDim, KDim))
z_contr_w_fl_l_wp = _set_cell_kdim_field_to_zero_wp()
return w_nnew_wp, z_contr_w_fl_l_wp


Expand Down

This file was deleted.

Loading
Loading