SemiImplicitModel now supports k-calving#1858
Open
bearecinos wants to merge 1 commit intoOGGM:masterfrom
Open
Conversation
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 k-calving support to
SemiImplicitModelThis PR extends
SemiImplicitModelto run tidewater (marine-terminating) experiments with k-calving, using the same retreat-based calving bucket logic asFluxBasedModel, while keeping the semi-implicit diffusivity matrix solve unchanged.Calving parametrization
The glacier thickness is first advanced by solving the semi-implicit diffusivity equation. After this update, the calving routine is applied as a post-step geometry modification.
If the glacier terminus is water-terminating (ice above water level with the bed below water), the last grid cell above the water level is identified and a calving flux is computed using the calving law. This flux is accumulated in a calving bucket (volume). The bucket is then used to remove ice starting with any ice below sea level and, if necessary, by retreating the terminus through partial or full removal of grid cells.
This approach keeps the semi-implicit solver unchanged and avoids introducing the highly nonlinear moving-boundary calving process into the linear matrix system. Instead, calving is treated as a mass-removal step applied after the thickness evolution, mirroring the implementation in
FluxBasedModel.Key design choices
FluxBasedModel.Changes in
flowline.py1. Calving parameters added to
SemiImplicitModel.__init__New parameters:
do_calvingcalving_kcalving_lawcalving_use_limitercalving_limiter_frac(currently only0supported)water_levelDiagnostics added:
self.calving_m3_since_y0self.calving_rate_myrThese follow the same bookkeeping used in the
FluxBasedModelcalving implementation.2. Flux gate support
SemiImplicitModelnow accepts either:flux_gateas a prescribed flux (m³ s⁻¹), optionally ramped withflux_gate_build_upflux_gate_thickness, which is converted to a theoretical flux (as inFluxBasedModel)The flux gate is not included in the matrix coefficients. Instead, it modifies the RHS of the first grid cell:
Test updates (
tests_numerics.pyand helper functions)1. Generalized tidewater test helpers
The helper functions used in tidewater tests were generalized so they can be used with both
FluxBasedModelandSemiImplicitModel. A new internal function_make_tw_flowlinewas introduced to build either:RectangularBedFlowlineTrapezoidalBedFlowlinefrom the same input arrays.
2. Flexible bed construction
The
bu_tidewater_bedhelper function now accepts:bed_shape("rectangular"or"trapezoidal")lambdasThis allows:
FluxBasedModelλ = 0forSemiImplicitModelUsing
λ = 0gives a rectangular cross-section while still using the trapezoidal flowline class required bySemiImplicitModel. Maybe we need to re-think bedshapes for TW glaciers.3. Parameterized calving tests
The k-calving tests were updated to run for both solvers via a parameterized
default_calvingfixture.The fixture:
This PR partially solves #1733