Add regional Thwaites mesh to global_ocean test group - #980
Draft
trhille wants to merge 8 commits into
Draft
Conversation
- Copy FRIS01to60 as template - Create Thwaites01to60BaseMesh class with approximate Gaussian refinement - Add config file with resolution parameters - Register mesh in global_ocean mesh __init__.py Note: Currently uses simple Gaussian refinement around Thwaites location TODO: Replace with grounding-line-based refinement from geojson TODO: Add regional culling step (modify_land_mask) TODO: Add thin film support
This step will modify the land mask to add regional domain boundaries before the standard cull_mesh step runs. Cells outside the specified domain (via geojson or lat-lon bounds) are marked as land, causing them to be culled. TODO: Integrate this into the CullMeshStep workflow. The challenge is that land_mask.nc is created inside CullMeshStep, so we need to either: 1. Modify CullMeshStep to call modify_land_mask internally, or 2. Create a custom CullMeshStep subclass for Thwaites, or 3. Add hooks to CullMeshStep for pre-processing the land mask For now, this step exists as a standalone implementation that shows the logic needed for regional culling.
- Added hook point in cull.py to allow land mask modification - Created ThwaitesCullMeshStep that generates a hook file - Hook modifies land_mask.nc to mark cells outside regional domain as land - Wired ThwaitesCullMeshStep into Mesh test case for Thwaites* meshes - Supports both geojson polygon and lat-lon bounding box The hook runs after land_mask.nc is created but before culling, allowing regional boundaries to be added to the mask. Cells outside the specified domain are marked as land and get culled in the standard culling process. To use: uncomment lat_min/lat_max/lon_min/lon_max in thwaites01to60.cfg
Set default domain to Amundsen Sea sector (76-73°S, 116-98°W) This covers Thwaites, Pine Island, and surrounding continental shelf. Users can comment out these lines to get full global mesh.
Replace Gaussian approximation with real grounding line calculation: - Load BedMachine thickness and bed elevation data - Calculate flotation criterion: thickness > -bed × (ρ_ocean/ρ_ice) - Identify grounding line as boundary between grounded/floating ice - Convert to geojson feature collection - Use signed_distance_from_geojson for mesh refinement - Apply targeted refinement: ±15km GZ band, 100km cavity, 200km shelf - Falls back to Gaussian if BedMachine unavailable No manual geojson extraction required - fully automated from BedMachine. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
trhille
marked this pull request as draft
September 8, 2026 17:27
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add a regional Thwaites mesh to the
global_oceantest group for simulations of grounding-zone intrusion. This adds an additional step that marks cells for culling outside of a user-defined geojson (or lat-lon bounds) by adding them to the land mask. The cell culler is run only once. The ocean mesh is defined upstream of the grounding line (identified by floatation calculation on the gridded BedMachine data set) to enable simulation of the grounding zone intrusion.Checklist
api.rst) has any new or modified class, method and/or functions listedTestingin this PR) any testing that was used to verify the changes