Add INIT_BOUNDARY_EXTRAP parameter and function to allow ALE boundary extrapolation behaviour to differ at initialisation and in model run #608
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.
Adds
INIT_BOUNDARY_EXTRAP
parameter and function, so thatREMAP_BOUNDARY_EXTRAP
can just be used in the initialisation and not in the model dynamics, as required for an ice shelf in ALE mode.Background:
When an ice shelf is initialised in ALE mode,
MOM_state_initialization
first initialises the ocean thickness and T/S with topography, but without an ice shelf. It then calls the functiontrim_for_ice
, which takes in input of the ice shelf pressure, and in turn callscut_off_column_top
which truncates the columns (and adds vanishing layers) to account for the pressure of the ice depressing the free surface. The output of this is a grid with the ice shelf boundary treated in a ALE z-coordinate fashion with vanishing layers at the surface, and @adcroft's upcoming changes will make T and S consistent to the grid. However, after adding the ice shelf, we still need to regrid and remap onto our desired ALE coordinate, for example sigma coordinates. This can be done withregrid_accelerate
inMOM_state_initialization
or by the block controlled byREMAP_AFTER_INITIALIZATION
inMOM.F90
We want the initialisation to use boundary extrapolation in the remapping so that the boundary cells preserve the desired initialisation profile when remapped to their target coordinate. This is controlled by
REMAP_BOUNDARY_EXTRAP
, except this runtime parameter modifies the control structure for the dynamic part of the model run too, which is bad because it means extrema are not preserved in the ALE remapping and can lead to non-sensible values of tracers.Changes:
INIT_BOUNDARY_EXTRAP
and set the ALE control structure to use that instead ofREMAP_BOUNDARY_EXTRAP
at first. The default ofINIT_BOUNDARY_EXTRAP
isREMAP_BOUNDARY_EXTRAP
to preserve answers (though it is not recommended to useREMAP_BOUNDARY_EXTRAP
during model dynamics...)MOM.F90
(final initialisation step using ALE), reset the boundary extrapolation flag in the ALE control structure to go back toREMAP_BOUNDARY_EXTRAP
.This PR combined with @adcroft's upcoming changes should make the initialisation of the ocean thickness and TS in an ALE ice shelf cavity perfect, when the new flag
INIT_BOUNDARY_EXTRAP = True
and old flagREMAP_BOUNDARY_EXTRAP = False
.