Reduce number of empty cells in extended high-resolution Greenland Ice Sheet mesh#937
Conversation
Add option to set resolution in ocean based on distance from coast.
Fix coast mask definition
Remove constraint that forces maximum resolution everywhere on bare land, which leads to enormous numbers of wasted cells in Greenland.
Create a separate .cfg file for the 1–10km Greenland mesh, and change the default resolution from 3–30km to 4–40km to avoid out-of-memory errors when running ESMF_RegridWeightGen on a single Perlmutter node.
b26249d to
a02af8d
Compare
Fix unconditional reads from config file in set_cell_width, so that the config file does not need to have high_dist_coast if use_dist_to_coast == False, for example.
Remove mention of using scikit-fmm to calculate distances to grounding line, coast, and margin, since this algorithm is now very fast.
|
All |
|
docs can be found here: https://portal.nersc.gov/cfs/fanssie/trhille/compass_docs_PR937/html/ |
There was a problem hiding this comment.
Pull request overview
This PR updates the Greenland high-resolution mesh-generation workflow to reduce “wasted” (empty) cells in an extended 1–10 km mesh by refining ocean resolution near the coast while allowing coarser resolution farther offshore and over bare land.
Changes:
- Add a new coast-based mesh-density control (
use_dist_to_coast,high_dist_coast,low_dist_coast) and propagate it through cell-width generation. - Update Greenland mesh-gen defaults (e.g.,
cull_distance, min/max spacing) and add an alternativemesh_gen_1to10km.cfg. - Update Users/Developers documentation (including BedMachine v6 references and new config guidance).
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 9 comments.
Show a summary per file
| File | Description |
|---|---|
| docs/users_guide/landice/test_groups/greenland.rst | Updates user-facing config snippet and documents the new 1–10 km alternative config and coast refinement option |
| docs/developers_guide/landice/test_groups/greenland.rst | Updates developer description to BedMachine v6 and mentions the alternative 1–10 km config |
| docs/developers_guide/landice/framework.rst | Documents new/conditional mesh-density options including use_dist_to_coast |
| compass/landice/tests/greenland/mesh_gen/mesh_gen_1to10km.cfg | Adds an alternative Greenland mesh-gen config targeting a finer 1–10 km mesh |
| compass/landice/tests/greenland/mesh_gen/mesh_gen.cfg | Updates Greenland mesh-gen defaults and adds coast-distance parameters |
| compass/landice/mesh.py | Implements coast-distance-based spacing and returns distance-to-coast from distance computation routine |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Define coast mask as last land or ice cell adjacent to ocean, rather than last ocean cell adjacent to land or ice. Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Fix minor typos. Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Make `bed` required input argument for set_cell_width(), in keeping with new land and ocean masks that use `bed` for calculations. Also some minor cleanup from code review: fix typo and set `interpolate_data` in greenland 1-10km .cfg file.
Update framework in users and developers guides to explain which .cfg settings are required and which are optional.
This PR does not set maximum resolution in the ocean, so if that's really a desirable feature to have then this does not supersede that PR. I think 894 still needs a lot of cleanup before it can be merged, though, and I don't see an immediate use for it. Some features (like the preliminary culling) might still be useful in general. |



This merge includes changes needed for a new high-resolution (1–10 km) extended Greenland mesh with variable mesh resolution in the ocean and bare land. The goal is to have high enough resolution in the ocean to resolve fjords for coupling with the ocean, but to use lower resolution where possible to reduce wasted cells. The extended 1–10km without these changes contains 1.4 million cells, only ~350k of which contain ice. With these changes, the extended 1–10km mesh is 870k cells.
Checklist
Testingin this PR) any testing that was used to verify the changes