Interpolate subglacial hydrology forcing fields in time#163
Open
matthewhoffman wants to merge 8 commits into
Open
Interpolate subglacial hydrology forcing fields in time#163matthewhoffman wants to merge 8 commits into
matthewhoffman wants to merge 8 commits into
Conversation
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.
These are not longer used.
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.
5aafb5e to
5263cb7
Compare
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.
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