From 7aae54d5eb7e2ab7cf5dacf9434bdab35eeec8a0 Mon Sep 17 00:00:00 2001 From: Trevor Hillebrand Date: Tue, 21 Jan 2025 19:08:45 -0800 Subject: [PATCH] Fix bug setting cell spacing outside cull distance Add a necessary absolute value when setting large cell spacing outside of cull distance. --- compass/landice/mesh.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compass/landice/mesh.py b/compass/landice/mesh.py index 0427e47556..5c57bdccda 100644 --- a/compass/landice/mesh.py +++ b/compass/landice/mesh.py @@ -372,7 +372,7 @@ def set_cell_width(self, section_name, thk, bed=None, vx=None, vy=None, # that distance. if dist_to_edge is not None: mask = np.logical_and( - thk == 0.0, dist_to_edge > (3. * cull_distance)) + thk == 0.0, dist_to_edge > np.abs(3. * cull_distance)) logger.info('Setting cell_width in outer regions to max_spac ' f'for {mask.sum()} cells') cell_width[mask] = max_spac