Skip to content

Commit

Permalink
Do not zero out damage for grounded ice
Browse files Browse the repository at this point in the history
Do not zero out damage for grounded ice. Damage should remain small
anyway, but forcing damage to be zero on grounded ice can cause
unrealistically large gradients in damage at the grounding line.
  • Loading branch information
trhille committed Nov 13, 2023
1 parent bdda071 commit e8fa2c5
Showing 1 changed file with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3520,11 +3520,10 @@ subroutine li_calculate_damage(domain, err)
! damage is always larger than the Nye value for initialization of damage evolution.
do iCell = 1, nCells
if ((li_mask_is_grounded_ice(cellMask(iCell))) .or. (thickness(iCell) .eq. 0.0_RKIND)) then
if ( thickness(iCell) .eq. 0.0_RKIND ) then
damage(iCell) = 0.0_RKIND
end if
end do
! the damage of grounded ice is kept as 0, as the strain rate calculation is only valid for ice shelf
! Options for initializing damage where ice goes afloat:
if (trim(config_damage_gl_setting) == 'extrapolate') then
Expand Down Expand Up @@ -3557,7 +3556,7 @@ subroutine li_calculate_damage(domain, err)
if (li_mask_is_grounding_line(cellMask(iCell))) then
do iNeighbor = 1, nEdgesOnCell(iCell)
jCell = cellsOnCell(iNeighbor, iCell)
if (li_mask_is_floating_ice(cellMask(jCell))) then
if ( li_mask_is_floating_ice(cellMask(jCell)) .and. (damage(jCell) < damageNye(jCell)) ) then
damage(jCell) = damageNye(jCell)
end if
end do
Expand Down Expand Up @@ -3716,7 +3715,7 @@ subroutine li_finalize_damage_after_advection(domain, err)
do iCell = 1, nCells
if (li_mask_is_grounded_ice(cellMask(iCell)) .or. .not. li_mask_is_ice(cellMask(iCell))) then
if (.not. li_mask_is_ice(cellMask(iCell))) then
damage(iCell) = 0.0_RKIND
end if
end do
Expand Down Expand Up @@ -3752,7 +3751,7 @@ subroutine li_finalize_damage_after_advection(domain, err)
if (li_mask_is_grounding_line(cellMask(iCell))) then
do iNeighbor = 1, nEdgesOnCell(iCell)
jCell = cellsOnCell(iNeighbor, iCell)
if (li_mask_is_floating_ice(cellMask(jCell))) then
if ( li_mask_is_floating_ice(cellMask(jCell)) .and. (damage(jCell)<damageNye(jCell)) ) then
damage(jCell) = damageNye(jCell)
end if
end do
Expand Down

0 comments on commit e8fa2c5

Please sign in to comment.