diff --git a/components/mpas-ocean/src/shared/mpas_ocn_tendency.F b/components/mpas-ocean/src/shared/mpas_ocn_tendency.F index a16e52f14499..89cfa07ad2bf 100644 --- a/components/mpas-ocean/src/shared/mpas_ocn_tendency.F +++ b/components/mpas-ocean/src/shared/mpas_ocn_tendency.F @@ -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, & diff --git a/components/mpas-ocean/src/shared/mpas_ocn_vel_pressure_grad.F b/components/mpas-ocean/src/shared/mpas_ocn_vel_pressure_grad.F index b8f83cd01dce..f7e97aa13384 100644 --- a/components/mpas-ocean/src/shared/mpas_ocn_vel_pressure_grad.F +++ b/components/mpas-ocean/src/shared/mpas_ocn_vel_pressure_grad.F @@ -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, & @@ -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) :: & @@ -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