Skip to content

Commit fc31e1c

Browse files
Merge pull request #887 from trhille/fix_landice_cull_distance_bug
Fix bug setting cell spacing outside cull distance Add a necessary absolute value when setting large cell spacing outside of cull distance. Otherwise, this causes problems when using a negative cull distance to indicate culling to a geojson file.
2 parents d93dc3c + 7aae54d commit fc31e1c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

compass/landice/mesh.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,7 @@ def set_cell_width(self, section_name, thk, bed=None, vx=None, vy=None,
372372
# that distance.
373373
if dist_to_edge is not None:
374374
mask = np.logical_and(
375-
thk == 0.0, dist_to_edge > (3. * cull_distance))
375+
thk == 0.0, dist_to_edge > np.abs(3. * cull_distance))
376376
logger.info('Setting cell_width in outer regions to max_spac '
377377
f'for {mask.sum()} cells')
378378
cell_width[mask] = max_spac

0 commit comments

Comments
 (0)