From 6ff265670dd6ba6fc9b44df5d08972aa2c7ffa06 Mon Sep 17 00:00:00 2001 From: Trevor Hillebrand Date: Mon, 13 Nov 2023 14:07:47 -0800 Subject: [PATCH] Revert "Small clean-up from code review" This reverts commit 8b327bd224c27d3590e247002588469544701c51, which inadvertently broke the `landice/antarctica/mesh_gen` case and could lead to unexpected behavior elsewhere. --- compass/landice/mesh.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/compass/landice/mesh.py b/compass/landice/mesh.py index 051683e313..19389b452c 100644 --- a/compass/landice/mesh.py +++ b/compass/landice/mesh.py @@ -529,10 +529,10 @@ def build_cell_width(self, section_name, gridded_dataset, geom_points, geom_edges = set_rectangular_geom_points_and_edges(*bnds) # Remove ice not connected to the ice sheet. - flood_mask = gridded_flood_fill(thk) == 0 - thk[flood_mask] = 0.0 - vx[flood_mask] = 0.0 - vy[flood_mask] = 0.0 + flood_mask = gridded_flood_fill(thk) + thk[flood_mask == 0] = 0.0 + vx[flood_mask == 0] = 0.0 + vy[flood_mask == 0] = 0.0 # Calculate distance from each grid point to ice edge # and grounding line, for use in cell spacing functions.