Skip to content

Commit

Permalink
merge main
Browse files Browse the repository at this point in the history
  • Loading branch information
halungge committed Nov 30, 2024
2 parents 3ce3657 + 66452b9 commit 54abef8
Show file tree
Hide file tree
Showing 20 changed files with 512 additions and 535 deletions.
2 changes: 1 addition & 1 deletion jenkins/spack-PR
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ pipeline {
steps {
script{
sh """
. ./spack-c2sm/setup-env.sh
. ./spack-c2sm/setup-env.sh /mch-environment/v7
cd local_copy
spack env activate spack/gt4py-main
spack install -v --test=root
Expand Down
2 changes: 1 addition & 1 deletion jenkins/spack-PR-stable
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ pipeline {
steps {
script{
sh """
. ./spack-c2sm/setup-env.sh
. ./spack-c2sm/setup-env.sh /mch-environment/v7
cd local_copy
spack env activate spack/gt4py-stable
spack install -v --test=root
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def _construct_minimal_decomposition_info(grid: icon.IconGrid):
return decomposition_info

if not grid_functionality[experiment].get(name):
gm = grid_utils.get_icon_grid_from_gridfile(experiment, backend)
gm = grid_utils.get_grid_manager_for_experiment(experiment, backend)
grid = gm.grid
decomposition_info = _construct_minimal_decomposition_info(grid)
geometry_ = geometry.GridGeometry(
Expand Down
6 changes: 3 additions & 3 deletions model/common/src/icon4py/model/common/grid/grid_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ def __exit__(self, exc_type, exc_val, exc_tb):
if exc_type is FileNotFoundError:
raise FileNotFoundError(f"gridfile {self._file_name} not found, aborting")

def __call__(self, backend: gtx_backend.Backend, limited_area=True):
def __call__(self, backend: Optional[gtx_backend.Backend], limited_area=True):
if not self._reader:
self.open()
on_gpu = common_utils.gt4py_field_allocation.is_cupy_device(backend)
Expand All @@ -404,7 +404,7 @@ def __call__(self, backend: gtx_backend.Backend, limited_area=True):
self._coordinates = self._read_coordinates(backend)
self._geometry = self._read_geometry_fields(backend)

def _read_coordinates(self, backend: gtx_backend.Backend) -> CoordinateDict:
def _read_coordinates(self, backend: Optional[gtx_backend.Backend]) -> CoordinateDict:
return {
dims.CellDim: {
"lat": gtx.as_field(
Expand Down Expand Up @@ -450,7 +450,7 @@ def _read_coordinates(self, backend: gtx_backend.Backend) -> CoordinateDict:
},
}

def _read_geometry_fields(self, backend: gtx_backend.Backend):
def _read_geometry_fields(self, backend: Optional[gtx_backend.Backend]):
return {
# TODO (@halungge) still needs to ported, values from "our" grid files contains (wrong) values:
# based on bug in generator fixed with this [PR40](https://gitlab.dkrz.de/dwd-sw/dwd_icon_tools/-/merge_requests/40) .
Expand Down
Loading

0 comments on commit 54abef8

Please sign in to comment.