Skip to content

Commit

Permalink
Use pressureAdjustedSSH with ssh_gradient pressure tendency
Browse files Browse the repository at this point in the history
  • Loading branch information
cbegeman committed Jun 12, 2024
1 parent d27f799 commit 678f5c6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion components/mpas-ocean/src/shared/mpas_ocn_tendency.F
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,7 @@ subroutine ocn_tend_vel(domain, tendPool, statePool, forcingPool, &
vertAleTransportTop, tendVel, err)

! Add pressure gradient
call ocn_vel_pressure_grad_tend(ssh, pressure, surfacePressure, &
call ocn_vel_pressure_grad_tend(ssh, gradSSH, pressure, surfacePressure, &
montgomeryPotential, zMid, &
density, potentialDensity, &
indxTemp, indxSalt, activeTracers, &
Expand Down
5 changes: 3 additions & 2 deletions components/mpas-ocean/src/shared/mpas_ocn_vel_pressure_grad.F
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ module ocn_vel_pressure_grad
!
!-----------------------------------------------------------------------

subroutine ocn_vel_pressure_grad_tend(ssh, pressure, surfacePressure, &
subroutine ocn_vel_pressure_grad_tend(ssh, gradSSH, pressure, surfacePressure, &
montgomeryPotential, zMid, &
density, potentialDensity, &
indxT, indxS, tracers, &
Expand All @@ -113,6 +113,7 @@ subroutine ocn_vel_pressure_grad_tend(ssh, pressure, surfacePressure, &

real (kind=RKIND), dimension(:), intent(in) :: &
ssh, &!< [in] sea surface height
gradSSH, &!< [in] sea surface height gradient on edges
surfacePressure !< [in] surface pressure

real (kind=RKIND), dimension(:,:), intent(in) :: &
Expand Down Expand Up @@ -241,7 +242,7 @@ subroutine ocn_vel_pressure_grad_tend(ssh, pressure, surfacePressure, &
do k=kMin,kMax
tend(k,iEdge) = tend(k,iEdge) - &
edgeMask(k,iEdge)*invdcEdge* &
( gravity*(ssh(cell2) - ssh(cell1)) &
( gravity*gradSSH(iEdge) &
+ density0Inv*( surfacePressure(cell2) &
- surfacePressure(cell1)) )
end do
Expand Down

0 comments on commit 678f5c6

Please sign in to comment.