@@ -3520,11 +3520,10 @@ subroutine li_calculate_damage(domain, err)
35203520 ! damage is always larger than the Nye value for initialization of damage evolution.
35213521
35223522 do iCell = 1, nCells
3523- if ((li_mask_is_grounded_ice(cellMask(iCell))) .or. ( thickness(iCell) .eq. 0.0_RKIND) ) then
3523+ if ( thickness(iCell) .eq. 0.0_RKIND ) then
35243524 damage(iCell) = 0.0_RKIND
35253525 end if
35263526 end do
3527- ! the damage of grounded ice is kept as 0, as the strain rate calculation is only valid for ice shelf
35283527
35293528 ! Options for initializing damage where ice goes afloat:
35303529 if (trim(config_damage_gl_setting) == ' extrapolate' ) then
@@ -3557,7 +3556,7 @@ subroutine li_calculate_damage(domain, err)
35573556 if (li_mask_is_grounding_line(cellMask(iCell))) then
35583557 do iNeighbor = 1, nEdgesOnCell(iCell)
35593558 jCell = cellsOnCell(iNeighbor, iCell)
3560- if (li_mask_is_floating_ice(cellMask(jCell))) then
3559+ if ( li_mask_is_floating_ice(cellMask(jCell)) .and. (damage(jCell) < damageNye(jCell)) ) then
35613560 damage(jCell) = damageNye(jCell)
35623561 end if
35633562 end do
@@ -3716,7 +3715,7 @@ subroutine li_finalize_damage_after_advection(domain, err)
37163715
37173716
37183717 do iCell = 1, nCells
3719- if (li_mask_is_grounded_ice(cellMask(iCell)) .or. .not. li_mask_is_ice(cellMask(iCell))) then
3718+ if (.not. li_mask_is_ice(cellMask(iCell))) then
37203719 damage(iCell) = 0.0_RKIND
37213720 end if
37223721 end do
@@ -3752,7 +3751,7 @@ subroutine li_finalize_damage_after_advection(domain, err)
37523751 if (li_mask_is_grounding_line(cellMask(iCell))) then
37533752 do iNeighbor = 1, nEdgesOnCell(iCell)
37543753 jCell = cellsOnCell(iNeighbor, iCell)
3755- if (li_mask_is_floating_ice(cellMask(jCell))) then
3754+ if ( li_mask_is_floating_ice(cellMask(jCell)) .and. (damage(jCell)<damageNye(jCell)) ) then
37563755 damage(jCell) = damageNye(jCell)
37573756 end if
37583757 end do
0 commit comments