Skip to content

Commit bfdd243

Browse files
committed
Pass center coordinates of AIS grid for flood fill
1 parent 03e9e25 commit bfdd243

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

  • compass/landice/tests/antarctica

compass/landice/tests/antarctica/mesh.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import netCDF4
2+
import xarray as xr
23
from mpas_tools.logging import check_call
34

45
from compass.landice.mesh import (
@@ -80,11 +81,15 @@ def run(self):
8081
else:
8182
bm_updated_gridded_dataset = source_gridded_dataset
8283

84+
ds = xr.open_dataset(bm_updated_gridded_dataset)
85+
nx, ny = ds.sizes["x1"], ds.sizes["y1"]
86+
ds.close()
8387
logger.info('calling build_cell_width')
8488
cell_width, x1, y1, geom_points, geom_edges, floodFillMask = \
8589
build_cell_width(
8690
self, section_name=section_name,
87-
gridded_dataset=bm_updated_gridded_dataset)
91+
gridded_dataset=bm_updated_gridded_dataset,
92+
flood_fill_start=[nx // 2, ny // 2])
8893

8994
# Now build the base mesh and perform the standard interpolation
9095
build_mali_mesh(

0 commit comments

Comments
 (0)