We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c06cf02 commit 82065a7Copy full SHA for 82065a7
test/core/test_api.py
@@ -217,6 +217,17 @@ def test_open_multigrid_with_masks(gridpath):
217
assert grids["atm"].n_face == 20
218
219
220
+def test_open_multigrid_mask_zero_faces(gridpath):
221
+ """Applying masks that deactivate an entire grid should not fail."""
222
+ grid_file = gridpath("scrip", "oasis", "grids.nc")
223
+ mask_file = gridpath("scrip", "oasis", "masks_no_atm.nc")
224
+
225
+ grids = ux.open_multigrid(grid_file, mask_filename=mask_file)
226
227
+ assert grids["ocn"].n_face == 8
228
+ assert grids["atm"].n_face == 0
229
230
231
def test_open_multigrid_missing_grid_error(gridpath):
232
"""Requesting a missing grid should raise."""
233
grid_file = gridpath("scrip", "oasis", "grids.nc")
0 commit comments