Skip to content

Interpolate subglacial hydrology forcing fields in time#163

Open
matthewhoffman wants to merge 8 commits into
developfrom
matthewhoffman/mali/sgh-forcing-interp
Open

Interpolate subglacial hydrology forcing fields in time#163
matthewhoffman wants to merge 8 commits into
developfrom
matthewhoffman/mali/sgh-forcing-interp

Conversation

@matthewhoffman
Copy link
Copy Markdown

@matthewhoffman matthewhoffman commented Feb 2, 2026

This PR adds the option to interpolate the forcing fields to the subglacial hydrology model in time. The purpose is to avoid stepwise shocks in the hydrology evolution.

Work in progress

@matthewhoffman matthewhoffman added the in progress Still being worked on, don't merge yet! label Feb 2, 2026
This commit replaces all uses of cellMask and edgeMask in the subglacial hydro module with new hydro-specific masks called hydroDomainCell, hydroDomainEdge.  This in preparation for interpolation in time.  This commit should be BFB with previous behavior.
This commit adds variables and subroutines to support interpolation of
subglacial hydrology forcings during subcycling.  The set_up and clean_up
routines are called, but they don't change any functionality yet.
This commit moves any forcing fields that are derived into
set_up_hydro_forcing() and calls the interpolation function.  It does
not yet change the forcing fields that are used in the hydro timestep,
so the intent is this still does not change answers.
I did this a little tricksy: I kept the standard variable names in the
calculations (e.g. basalMeltInput), but changed the mpas_pool_get_array
calls to retrieve the version that is interpolated in time (e.g.
basalMeltInputNow).  This could potentially be confusing but hopefully
makes the code easier to read and is less invasive.  This could be
rectified later if desired.
The grounded ice domain may change during subcycling due to ice going
afloat or grounding, so we need to recalculate the masks every subcycle
now.  Hopefully this isn't too expensive!

Note that I'm currently doing this with iceThicknessHydro, which might
have been smoothed relative to the default ice thickness.  This could
potentially lead to strange edge cases where the grounding or floating
happens differently than with the default ice thickness.
Fields in the hydro pool cannot be made scratch because the hydro pool
has a package and fields cannot have both attributes.  So I moved the
hydro fields that we need to be allocatable to a new pool called
hydroScratch.  This required updating a bunch of accessor calls.  I also
corrected a couple errors in getting arrays from the wrong pools that I
noticed while I made these changes.
@matthewhoffman matthewhoffman force-pushed the matthewhoffman/mali/sgh-forcing-interp branch from 5aafb5e to 5263cb7 Compare February 20, 2026 00:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

in progress Still being worked on, don't merge yet!

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant