Skip to content

Commit

Permalink
update segment htot
Browse files Browse the repository at this point in the history
  • Loading branch information
MJHarrison-GFDL committed May 10, 2018
1 parent a783d39 commit ffcb7e0
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions src/core/MOM_open_boundary.F90
Original file line number Diff line number Diff line change
Expand Up @@ -2440,28 +2440,30 @@ subroutine update_OBC_segment_data(G, GV, OBC, tv, h, Time)
do j=segment%HI%jsd,segment%HI%jed
segment%Cg(I,j) = sqrt(GV%g_prime(1)*G%bathyT(i+ishift,j))
! if (GV%Boussinesq) then
segment%Htot(I,j) = G%bathyT(i+ishift,j)*GV%m_to_H! + eta(i+ishift,j)
! segment%Htot(I,j) = G%bathyT(i+ishift,j)*GV%m_to_H! + eta(i+ishift,j)
! else
! segment%Htot(I,j) = eta(i+ishift,j)
! endif
segment%Htot(I,j)=0.0
do k=1,G%ke
segment%h(I,j,k) = h(i+ishift,j,k)
enddo
segment%h(I,j,k) = h(i+ishift,j,k)
segment%Htot(I,j)=segment%Htot(I,j)+segment%h(I,j,k)
enddo
enddo


else! (segment%direction == OBC_DIRECTION_N .or. segment%direction == OBC_DIRECTION_S)
if (segment%direction == OBC_DIRECTION_S) jshift=1
J=segment%HI%JsdB
do i=segment%HI%isd,segment%HI%ied
segment%Cg(i,J) = sqrt(GV%g_prime(1)*G%bathyT(i,j+jshift))
! if (GV%Boussinesq) then
segment%Htot(i,J) = G%bathyT(i,j+jshift)*GV%m_to_H! + eta(i,j+jshift)
! else
! segment%Htot(i,J) = eta(i,j+jshift)
! endif
! segment%Htot(i,J) = G%bathyT(i,j+jshift)*GV%m_to_H! + eta(i,j+jshift)
! else
! segment%Htot(i,J) = eta(i,j+jshift)
! endif
segment%Htot(i,J)=0.0
do k=1,G%ke
segment%h(i,J,k) = h(i,j+jshift,k)
segment%h(i,J,k) = h(i,j+jshift,k)
segment%Htot(i,J)=segment%Htot(i,J)+segment%h(i,J,k)
! segment%e(i,J,k) = e(i,j+jshift,k)
enddo
enddo
Expand Down

0 comments on commit ffcb7e0

Please sign in to comment.