Skip to content

Add regional Thwaites mesh to global_ocean test group - #980

Draft
trhille wants to merge 8 commits into
MPAS-Dev:mainfrom
trhille:ocean/add_thwaites_grounding_zone_intrusion_mesh
Draft

Add regional Thwaites mesh to global_ocean test group#980
trhille wants to merge 8 commits into
MPAS-Dev:mainfrom
trhille:ocean/add_thwaites_grounding_zone_intrusion_mesh

Conversation

@trhille

@trhille trhille commented Sep 8, 2026

Copy link
Copy Markdown
Collaborator

Add a regional Thwaites mesh to the global_ocean test 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

  • User's Guide has been updated
  • Developer's Guide has been updated
  • API documentation in the Developer's Guide (api.rst) has any new or modified class, method and/or functions listed
  • Documentation has been built locally and changes look as expected
  • Document (in a comment titled Testing in this PR) any testing that was used to verify the changes

trhille and others added 8 commits September 8, 2026 11:07
- 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
trhille marked this pull request as draft September 8, 2026 17:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant