Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions examples/notebook/test_functionality.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@
" layout=layout,\n",
" tile_partitioner=partitioner.tile,\n",
" tile_rank=cs_communicator.tile.rank,\n",
" backend=backend,\n",
")\n",
"\n",
"# useful for easily allocating distributed data storages (fields)\n",
Expand Down
6 changes: 3 additions & 3 deletions pyfv3/stencils/a2b_ord4.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from ndsl.dsl.gt4py import horizontal, interval, region, sin, sqrt
from ndsl.dsl.typing import Float, FloatField, FloatFieldI, FloatFieldIJ
from ndsl.grid import GridData
from ndsl.stencils.basic_operations import copy_defn
from ndsl.stencils.basic_operations import copy


# compact 4-pt cubic interpolation
Expand Down Expand Up @@ -665,7 +665,7 @@ def __init__(
a2b_interpolation, externals=ax_offsets, origin=origin, domain=domain
)
self._copy_stencil = stencil_factory.from_dims_halo(
copy_defn, compute_dims=[X_INTERFACE_DIM, Y_INTERFACE_DIM, z_dim]
copy, compute_dims=[X_INTERFACE_DIM, Y_INTERFACE_DIM, z_dim]
)

else: # grid type >= 3:
Expand All @@ -675,7 +675,7 @@ def __init__(
)
if self.replace:
self._copy_stencil = stencil_factory.from_dims_halo(
copy_defn, compute_dims=[X_INTERFACE_DIM, Y_INTERFACE_DIM, z_dim]
copy, compute_dims=[X_INTERFACE_DIM, Y_INTERFACE_DIM, z_dim]
)

def _exclude_tile_edges(self, origin, domain, dims=("x", "y")):
Expand Down
4 changes: 2 additions & 2 deletions pyfv3/stencils/del2cubed.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from ndsl.dsl.stencil import get_stencils_with_varied_bounds
from ndsl.dsl.typing import Float, FloatField, FloatFieldIJ, cast_to_index3d
from ndsl.grid import DampingCoefficients
from ndsl.stencils.basic_operations import copy_defn
from ndsl.stencils.basic_operations import copy
from pyfv3.stencils.copy_corners import CopyCornersX, CopyCornersY


Expand Down Expand Up @@ -155,7 +155,7 @@ def __init__(

"""Stencil responsible for doing corners updates in x-direction."""
self._copy_stencil = stencil_factory.from_dims_halo(
func=copy_defn,
func=copy,
compute_dims=[X_DIM, Y_DIM, Z_DIM],
compute_halos=(3, 3),
)
Expand Down
4 changes: 2 additions & 2 deletions pyfv3/stencils/divergence_damping.py
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,7 @@ def __init__(
)

self._copy_computeplus = high_k_stencil_factory.from_dims_halo(
func=basic.copy_defn,
func=basic.copy,
compute_dims=[X_INTERFACE_DIM, Y_INTERFACE_DIM, Z_DIM],
compute_halos=(0, 0),
)
Expand Down Expand Up @@ -474,7 +474,7 @@ def __init__(
)

self._set_value = high_k_stencil_factory.from_dims_halo(
func=basic.set_value_defn,
func=basic.set_value,
compute_dims=[X_INTERFACE_DIM, Y_INTERFACE_DIM, Z_DIM],
compute_halos=(self.grid_indexing.n_halo, self.grid_indexing.n_halo),
)
Expand Down
2 changes: 1 addition & 1 deletion pyfv3/stencils/dyn_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -628,7 +628,7 @@ def __init__(
)
self._pk3_halo = PK3Halo(stencil_factory, quantity_factory)
self._copy_stencil = stencil_factory.from_origin_domain(
basic.copy_defn,
basic.copy,
origin=grid_indexing.origin_full(),
domain=grid_indexing.domain_full(add=(0, 0, 1)),
)
Expand Down
4 changes: 2 additions & 2 deletions pyfv3/stencils/fv_dynamics.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
from ndsl.grid import DampingCoefficients, GridData
from ndsl.logging import ndsl_log
from ndsl.performance import NullTimer, Timer
from ndsl.stencils.basic_operations import copy_defn
from ndsl.stencils.basic_operations import copy
from ndsl.stencils.c2l_ord import CubedToLatLon
from ndsl.typing import Checkpointer, Communicator
from pyfv3._config import DynamicalCoreConfig
Expand Down Expand Up @@ -258,7 +258,7 @@ def __init__(
domain=grid_indexing.domain_compute(),
)
self._copy_stencil = stencil_factory.from_origin_domain(
copy_defn,
copy,
origin=grid_indexing.origin_full(),
domain=grid_indexing.domain_full(),
)
Expand Down
4 changes: 2 additions & 2 deletions pyfv3/stencils/map_single.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from ndsl.constants import X_DIM, Y_DIM, Z_DIM
from ndsl.dsl.gt4py import FORWARD, PARALLEL, computation, interval
from ndsl.dsl.typing import Float, FloatField, FloatFieldIJ, IntFieldIJ # noqa: F401
from ndsl.stencils.basic_operations import copy_defn
from ndsl.stencils.basic_operations import copy
from pyfv3.stencils.remap_profile import RemapProfile


Expand Down Expand Up @@ -120,7 +120,7 @@ def make_quantity():
self._lev = quantity_factory.zeros([X_DIM, Y_DIM], units="", dtype=int)

self._copy_stencil = stencil_factory.from_dims_halo(
copy_defn,
copy,
compute_dims=dims,
)

Expand Down
5 changes: 4 additions & 1 deletion pyfv3/wrappers/geos_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,10 @@ def __init__(
)

sizer = SubtileGridSizer.from_namelist(
self.namelist, partitioner.tile, self.communicator.tile.rank
self.namelist,
partitioner.tile,
self.communicator.tile.rank,
backend=backend,
)
quantity_factory = QuantityFactory(sizer=sizer, backend=backend)

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ extras = [
"pyfv3[ndsl]",
"pyfv3[test]"
]
ndsl = ["ndsl @ git+https://github.com/NOAA-GFDL/NDSL.git@develop"]
ndsl = ["ndsl @ git+https://github.com/NOAA-GFDL/NDSL.git@2026.01.00"]
test = [
"coverage",
"pytest",
Expand Down
1 change: 1 addition & 0 deletions tests/mpi/test_doubly_periodic.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ def test_dycore_runs_one_step() -> None:
layout=config.layout,
tile_partitioner=partitioner,
tile_rank=communicator.rank,
backend=backend,
)
grid_indexing = GridIndexing.from_sizer_and_communicator(
sizer=sizer, comm=communicator
Expand Down
1 change: 1 addition & 0 deletions tests/savepoint/translate/translate_init_case.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,7 @@ def compute_parallel(self, inputs, communicator):
layout=self.config.layout,
tile_partitioner=communicator.partitioner.tile,
tile_rank=communicator.tile.rank,
backend=self.stencil_factory.backend,
)

quantity_factory = QuantityFactory(sizer, backend=self.stencil_factory.backend)
Expand Down