Skip to content

Commit

Permalink
Update masks before RK loop, but not at start of each advection stage.
Browse files Browse the repository at this point in the history
Update masks before RK loop, but not at start of each advection stage.
  • Loading branch information
trhille committed Aug 19, 2024
1 parent fdbbe73 commit be26a55
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -376,10 +376,6 @@ subroutine li_advection_thickness_tracers(&
! given the old thickness, compute the thickness in each layer
call li_calculate_layerThickness(meshPool, thickness, layerThickness)

! update masks
call li_calculate_mask(meshPool, velocityPool, geometryPool, err_tmp)
err = ior(err, err_tmp)

! Save copies of masks because we need to preserve mask
! states prior to advection for accurate time integration.
! A mask update is necessary to calculate grounding line flux,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -248,8 +248,6 @@ subroutine li_time_integrator_forwardeuler_rungekutta(domain, err)
err = ior(err, err_tmp)
call mpas_timer_stop("face melting for grounded ice")

! *** TODO: Should basal melt rate calculation and column physics go inside RK loop? ***

! === 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 @@ -362,7 +360,13 @@ subroutine li_time_integrator_forwardeuler_rungekutta(domain, err)
// ' is not supported with config_rk_order = $i', &
intArgs=(/config_rk_order/), messageType=MPAS_LOG_ERR)
return
endif
endif

! Calculate masks prior to RK loop, but do not update masks within the loop
! to preserve the accuracy of time integration.
call li_calculate_mask(meshPool, velocityPool, geometryPool, err_tmp)
err = ior(err, err_tmp)

! *** Start RK loop ***
do rkStage = 1, nRKstages
call mpas_log_write('beginning rk stage $i of $i', &
Expand Down

0 comments on commit be26a55

Please sign in to comment.