-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Do not update MPAS masks during advection #115
Do not update MPAS masks during advection #115
Conversation
@mperego, I believe this addresses your concerns about mask updates occurring within the RK loop. The code changes are straightforward, but we will have to carefully evaluate how it changes model behavior. It will very likely shift our regression testing baselines, and there may be issues with budgets closing. |
@@ -627,6 +643,9 @@ subroutine li_advection_thickness_tracers(& | |||
enddo | |||
endif | |||
|
|||
! We need an updated set of masks to calculate fluxAcrossGroundingLine, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why the flux at the grounding line is calculated at each stage? Also, if I understand correctly at this point the thickness is not consistent with the velocity. Wouldn't be better to move the calculation of the GL flux outside of this function?
components/mpas-albany-landice/src/mode_forward/mpas_li_advection.F
Outdated
Show resolved
Hide resolved
Remove calls to li_calculate_mask where possible within the RK loop. Where we need masks for budget calculations, reset masks to their pre-advection states once the necessary calculation is complete.
Remove cellMask from vertical_remap, as it is not used in that routine.
Update masks before RK loop, but not at start of each advection stage.
be26a55
to
f6a6653
Compare
When using forward Euler time integration, all |
I ran
All tests passed validation, except for
All tests pass baseline comparison except for the four greenland tests, as with forward Euler, which have diffs in the same very small range as reported for forward Euler above. |
components/mpas-albany-landice/src/mode_forward/mpas_li_time_integration_fe_rk.F
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@trhille , the implementation appears correct to me, so from here it comes down to how to test this, like the previous PR. I have a few ideas, but I'm not sure if they are each worth the effort and/or if they are sufficient.
- Halfar dome mesh convergence test - much like previous PR, it would be nice to confirm that this PR does not degrade the mesh convergence of the Halfar dome. This would again be a do-no-evil test as we can't expect to do better than 1st order with Halfar and we're already there. But Halfar at least will be affected by the mask calculations that indicate where ice exists.
- MISMIP+ mesh convergence test - this domain would be useful for considering floating/grounded mask changes. Without an analytical solution this will be challenging, but we could evaluate error relative to a high resolution reference solution. The other challenge is that different resolutions yield slightly different spun up states, but again, we can take the high resolution spin up as the reference initial condition. What I propose is:
- do a 500m spinup (no ice-shelf basal melting) to steady state. If it is truly at steady state, it should be independent of order of accuracy of advection and time stepping, but we could use 3rd order with this PR to be safe (our belief of our most accurate model)
- interpolate the SS ice thickness to 1, 2, 4, 8 km meshes
- run Ice1r experiment (draft-dependent melt rate applied for 100 years) for each resolution, repeated for ensembles with 1st, 2nd, and 3rd order methods, with and without this PR (a total of 6 ensembles x 5 resolutions = 30 runs)
- Evaluate convergence order of centerline GL position at year 100 (the primary metric from MISMIP+) relative to 500m reference solution for each ensemble. If this PR increases convergence or maintains similar convergence for each order of accuracy method, we approve the PR.
- Possibly repeat with a modification to the MISMIP+ protocol to use a uniform ice-shelf basal melt rate. The standard MISMIP+ melt parameterization has melt rate fall to zero near the GL, which would not stress test the grounded/floating masking very much. Imposing a strong uniform melt rate would ensure resolving the floating/grounded mask properly matters.
Thanks, @matthewhoffman. Here are the results of the Halfar test using RK2, 2nd order FCT: This is the some convergence order that we saw in #110 . |
Just a note to remind us that we don't actually expect this test to pass for RK2 or RK3. Here's the relevant information from the original Runge-Kutta PR: #86 (comment) "I also tested landice/humboldt/mesh-3km_restart_test/velo-none_calving-none_subglacialhydro using RK2 with config_SGH = .false.. This also failed validation, with the same thickness errors as before: 90: l1: 2.75890560397229e-11 l2: 2.08855832908240e-12 linf: 4.54747350886464e-13. Plotting up the differences between the first and last output times shows roundoff-level errors in both full_run and restart_run, but they are not the same. An equivalent run using forward Euler time stepping showed all zeros. So apparently there are two issues when using Runge-Kutta time stepping with advection turned off: round-off error in thickness and a non-BFB restart. |
Thanks for working on this @trhille. I'm OK with merging this PR. |
@mperego, calculating the GL flux in this way is necessary to close the mass budgets, but I think you're correct that it won't be consistent with the thickness and velocity that get stored. I can look further into that, but it's outside the realm of this PR. Regarding where the flux is stored, all the mass budget terms get updated each RK stage here: https://github.com/trhille/E3SM/blob/mali/remove_mask_updates_in_RK_loop/components/mpas-albany-landice/src/mode_forward/mpas_li_time_integration_fe_rk.F#L473-L480 And then they are finalized here after the RK loop: https://github.com/trhille/E3SM/blob/mali/remove_mask_updates_in_RK_loop/components/mpas-albany-landice/src/mode_forward/mpas_li_time_integration_fe_rk.F#L533-L539 |
Thanks. Why the mass budget needs to be consistent at each stage? Anyway, we can talk about this in a different venue. |
Given there is an ongoing PR to deal with closing the mass budget (#38), I feel ok leaving the sort of incomplete handling of the grounding line flux calculation as it is in thiS PR. I will proceed with merging this. |
I reran the default
|
Remove updates of MPAS masks during advection and within Runge-Kutta loop for more accurate time integration.