Skip to content

Commit

Permalink
Move calving and face-melting after velocity solve
Browse files Browse the repository at this point in the history
Move calving and face-melting after velocity solve. This is necessary
to close mass budgets when using face-melting, and makes stress and
strain rates used for calving calculation consistent with the geometry
used for velocity solve.
  • Loading branch information
trhille committed Oct 20, 2023
1 parent b43726e commit 250c916
Showing 1 changed file with 17 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -128,13 +128,6 @@ subroutine li_time_integrator_forwardeuler(domain, err)
err = ior(err, err_tmp)
call mpas_timer_stop("advancing clock")

!TODO: Determine whether grounded melting should in fact be called first
! === Face melting for grounded ice ===========
call mpas_timer_start("face melting for grounded ice")
call li_face_melt_grounded_ice(domain, err_tmp)
err = ior(err, err_tmp)
call mpas_timer_stop("face melting for grounded ice")

! === Basal melting for floating ice ===========
call mpas_timer_start("basal melting for floating ice")
call li_basal_melt_floating_ice(domain, err_tmp)
Expand Down Expand Up @@ -179,6 +172,18 @@ subroutine li_time_integrator_forwardeuler(domain, err)
err = ior(err, err_tmp)
call mpas_timer_stop("subglacial hydro")
! === Update bed topo =====================
! It's not clear when the best time to do this is.
! Seems cleaner to do it either before or after all of the time evolution of the ice
! is complete. Putting it after.
call li_bedtopo_solve(domain, err=err_tmp)
err = ior(err, err_tmp)

! === Solve Velocity =====================
! During time-stepping, we always solveVelo
call li_velocity_solve(domain, solveVelo=.true., err=err_tmp)
err = ior(err, err_tmp)

! === Calve ice ========================
call mpas_timer_start("calve_ice")

Expand All @@ -200,17 +205,12 @@ subroutine li_time_integrator_forwardeuler(domain, err)
call mpas_dmpar_field_halo_exch(domain, 'vertexMask')
call mpas_timer_stop("halo updates")

! === Update bed topo =====================
! It's not clear when the best time to do this is.
! Seems cleaner to do it either before or after all of the time evolution of the ice
! is complete. Putting it after.
call li_bedtopo_solve(domain, err=err_tmp)
err = ior(err, err_tmp)

! === Solve Velocity =====================
! During time-stepping, we always solveVelo
call li_velocity_solve(domain, solveVelo=.true., err=err_tmp)
!TODO: Determine whether grounded melting should in fact be called first
! === Face melting for grounded ice ===========
call mpas_timer_start("face melting for grounded ice")
call li_face_melt_grounded_ice(domain, err_tmp)
err = ior(err, err_tmp)
call mpas_timer_stop("face melting for grounded ice")

! === Calculate diagnostic variables for new state =====================

Expand Down

0 comments on commit 250c916

Please sign in to comment.