Skip to content

Commit

Permalink
Compute zstar with sum restingThickness
Browse files Browse the repository at this point in the history
  • Loading branch information
cbegeman committed Oct 20, 2022
1 parent 719a98f commit 38431f9
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions components/mpas-ocean/src/shared/mpas_ocn_thick_ale.F
Original file line number Diff line number Diff line change
Expand Up @@ -125,10 +125,11 @@ subroutine ocn_ALE_thickness(verticalMeshPool, SSH, ALE_thickness, &
nCells ! number of cells

real (kind=RKIND) :: &
weightSum, &! sum of weights in vertical
thicknessSum, &! total thickness
remainder, &! track remainder in mix/max alteration
newThickness ! temp used during min/max adjustment
weightSum, &! sum of weights in vertical
columnThickness, &! total thickness from bottomDepth, SSH
thicknessSum, &! total resting thickness
remainder, &! track remainder in mix/max alteration
newThickness ! temp used during min/max adjustment

real (kind=RKIND), dimension(:), allocatable :: &
prelim_ALE_thickness, & ! ALE thickness at new time
Expand Down Expand Up @@ -188,15 +189,16 @@ subroutine ocn_ALE_thickness(verticalMeshPool, SSH, ALE_thickness, &
+ vertCoordMovementWeights(k) &
* restingThickness(k,iCell)
end do
columnThickness = bottomDepth(iCell) + SSH(iCell)

! Note that restingThickness is nonzero, and remaining
! terms are perturbations about zero.
! This is equation 4 and 6 in Petersen et al 2015,
! but with eqn 6
do k = kMin, kMax
ALE_thickness(k,iCell) = restingThickness(k,iCell) &
+ (SSH(iCell)*vertCoordMovementWeights(k)* &
restingThickness(k,iCell) )/thicknessSum
ALE_thickness(k, iCell) = restingThickness(k, iCell) &
+ ( (columnThickness - thicknessSum) * vertCoordMovementWeights(k) * &
restingThickness(k, iCell) ) / thicknessSum
end do
enddo
#ifndef MPAS_OPENACC
Expand Down

0 comments on commit 38431f9

Please sign in to comment.