Skip to content

Commit

Permalink
Update halos for damage before applying to stiffnessFactor
Browse files Browse the repository at this point in the history
Update halos for damage before applying to stiffnessFactor. Testing
showed imprinting of the decomposition on damage and stiffnessFactor
fields before applying this halo update.
  • Loading branch information
trhille committed Dec 16, 2022
1 parent fe6b0e8 commit aebdd62
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions components/mpas-albany-landice/src/mode_forward/mpas_li_calving.F
Original file line number Diff line number Diff line change
Expand Up @@ -3331,6 +3331,11 @@ subroutine li_calculate_damage(domain, err)
err = ior(err, 1)
endif
call mpas_timer_start("halo updates")
call mpas_dmpar_field_halo_exch(domain, 'damage')
call mpas_dmpar_field_halo_exch(domain, 'damageNye')
call mpas_timer_stop("halo updates")
if (config_print_calving_info) then
! End of routine accounting/reporting
localMinInfo(1) = minval(damageSource)
Expand Down Expand Up @@ -3538,6 +3543,13 @@ subroutine li_finalize_damage_after_advection(domain, err)
damage = 1.0_RKIND
end where
! Halo update for damage before applying to stiffnessFactor
! NOTE: THIS WILL NOT WORK ON MULTIPLE BLOCKS PER PROCESSOR
call mpas_timer_start("halo updates")
call mpas_dmpar_field_halo_exch(domain, 'damage')
call mpas_dmpar_field_halo_exch(domain, 'damageNye')
call mpas_timer_stop("halo updates")
if (config_damage_rheology_coupling) then
do iCell = 1, nCells
if (li_mask_is_floating_ice(cellMask(iCell))) then
Expand Down

0 comments on commit aebdd62

Please sign in to comment.