MALI-Dev / E3SM

Repository for development of MPAS-Albany-Land Ice (MALI) model. MALI code is located in the `components/mpas-albany-landice` subdirectory of the Energy Exascale Earth System Model (E3SM) repository.
Other
4 stars 3 forks source link

update the clock early after adaptive deltat is calculated #83

Closed hollyhan closed 1 year ago

hollyhan commented 1 year ago

Previously the clock in MALI did not update with a newly calculated adaptive timestep deltatuntil the current timestep is complete, and this caused the SLM to be called for the first time at an incorrect timing when the MALI timestep config_dt and the SLM timestep config_coupling_interval are different to each other. This behavior resulted in wrong ice mass changes seen by the SLM in its first timestep and in turn ice-sheet contribution to sea-level change.

This PR fixes the problem by advancing the clock early in the current timestep once the adaptive timestep deltat is calculated before other physics are calculated including calling of the SLM.

Test results

  1. compass integration suite:
  1. idealized coupled ISM-SLM run with constant SMB (before the fix): run setup: constant SMB of 100m/yr, config_dt (mali timestep) = 6 months, config_coupling_interval (slm timestep) = 1 year. image (see the kink in the very first timestep)

image

  1. same run configuration as run 2 above but with the fix: image (the kink is gone)

image

hollyhan commented 1 year ago

Hi @matthewhoffman & @trhille,

I've removed the tag in progress, and this PR is now ready to be reviewed. The directories for the test runs can be found here in case you need:

  1. compass full integration test: /pscratch/sd/h/hollyhan/folder_fix_alarm_issue/test_compass_full_integration_fix_alarm_new
  2. coupled ISM-SLM run based off the head in the head 5ef118e71d0f689459ce836d3f2b5ffa84087742 in the origin/develop branch: /pscratch/sd/h/hollyhan/folder_fix_alarm_issue/test_PR_origin_develop
  3. coupled ISM-SLM run with the changes made in this PR: /pscratch/sd/h/hollyhan/folder_fix_alarm_issue/test_PR_after_fix

Thanks! Holly

trhille commented 1 year ago

@matthewhoffman This PR makes me realize that we don't have good regression testing for the adaptive time-stepper. The only test in full_integration that uses config_adaptive_timestep = .true. is eismint2/decomposition_test (restart uses a fixed time step, so I almost suspect that this is unintentional). Anyway, I'm running this through full_integration now, but I think we should add a test for the time stepper in the future.

trhille commented 1 year ago

All tests in full_integration pass baseline comparison when compiled with SLM=False.

trhille commented 1 year ago

All tests in full_integration pass baseline comparison when compiled with SLM=true.

trhille commented 1 year ago

I tested the landice/calving_dt_convergence/humboldt.von_Mises_stress.FO case with calving turned off to compare solutions with adaptive time stepping with and without this change (both compiled with SLM=false). Solution are identical and give the same time step lengths:

 xtime =
  "0000-01-01_00:00:00",
  "0003-02-15_16:11:06",
  "0006-07-28_18:32:13" ;

I'm approving based on this and the full_integration testing I documented above.

trhille commented 1 year ago

I re-ran full_integration just to be safe after the changes since my review. All tests passed validation and baseline comparison.