Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix landice/antarctica/mesh_gen #730

Merged
merged 1 commit into from
Nov 13, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions compass/landice/mesh.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Comment on lines +532 to +535
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand why the original change didn't work. I would think it would be identical to the following, which would be identical to the code after reversion.

    flood_mask = gridded_flood_fill(thk)
    mask = (flood_mask == 0)
    thk[mask] = 0.0
    vx[mask] = 0.0
    vy[mask] = 0.0

But it's not worth exploring further.


# Calculate distance from each grid point to ice edge
# and grounding line, for use in cell spacing functions.
Expand Down
Loading