Skip to content

Commit

Permalink
Add automatic grid download to grid_geometry (#650)
Browse files Browse the repository at this point in the history
  • Loading branch information
havogt authored Jan 30, 2025
1 parent c4a587a commit e6b9c6c
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions model/testing/src/icon4py/model/testing/grid_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ def _add_dimension(dim: gtx.Dimension):
return decomposition_info

def construct_grid_geometry(grid_file: str):
gm = _run_grid_manager_for_file(grid_file, backend=backend, num_levels=num_levels)
gm = _download_and_load_gridfile(grid_file, num_levels=num_levels, backend=backend)
grid = gm.grid
decomposition_info = construct_decomposition_info(grid)
geometry_source = geometry.GridGeometry(
Expand All @@ -160,7 +160,5 @@ def construct_grid_geometry(grid_file: str):
return geometry_source

if not grid_geometries.get(register_name):
grid_geometries[register_name] = construct_grid_geometry(
str(resolve_full_grid_file_name(grid_file))
)
grid_geometries[register_name] = construct_grid_geometry(grid_file)
return grid_geometries[register_name]

0 comments on commit e6b9c6c

Please sign in to comment.