Skip to content

Commit

Permalink
Merge pull request #787 from trhille/landice/fix_cull_distance_assertion
Browse files Browse the repository at this point in the history
Fix bug in limiting cull distance

This merge removes an unnecessary assertion about the value of cull_distance, since it is handled by other logic.
  • Loading branch information
matthewhoffman authored May 22, 2024
2 parents e2810ea + afd5423 commit a9d4b53
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions compass/landice/mesh.py
Original file line number Diff line number Diff line change
Expand Up @@ -369,12 +369,6 @@ def set_cell_width(self, section_name, thk, bed=None, vx=None, vy=None,
# cell size in the final mesh. There may be a more rigorous way to set
# that distance.
if dist_to_edge is not None:
assert (3. * cull_distance < max(high_dist, high_dist_bed)), \
('cull_distance is set to be larger than 3x the max of high_dist '
'and high_dist_bed, which means max_spac is not being applied to '
'the regions of the mesh that will be culled, which means the '
'mesh generation is likely to be substantially slower '
'than necessary. Please fix or relax this constraint.')
mask = np.logical_and(
thk == 0.0, dist_to_edge > (3. * cull_distance))
logger.info('Setting cell_width in outer regions to max_spac '
Expand Down

0 comments on commit a9d4b53

Please sign in to comment.