I think there is a small bug in the file zetabc.f: on the lateral boundary conditions at the northern edge and for the clamped, gradient and closed boundary conditions, there is an incorrect designation of the edge:
(LBC(isouth,isFsur,ng)%clamped)
(LBC(isouth,isFsur,ng)%gradient)
(LBC(isouth,isFsur,ng)%closed)
that should be:
(LBC(inorth,isFsur,ng)%clamped)
(LBC(inorth,isFsur,ng)%gradient)
(LBC(inorth,isFsur,ng)%closed)
Best regards,
Sérgio Larangeiro
Code: Select all
! Northern edge, clamped boundary condition.
!
ELSE IF (LBC(isouth,isFsur,ng)%clamped) THEN
DO i=Istr,Iend
zeta(i,Jend+1,kout)=BOUNDARY(ng)%zeta_north(i)
#ifdef MASKING
zeta(i,Jend+1,kout)=zeta(i,Jend+1,kout)* &
& GRID(ng)%rmask(i,Jend+1)
#endif
END DO
!
! Northern edge, gradient boundary condition.
!
ELSE IF (LBC(isouth,isFsur,ng)%gradient) THEN
DO i=Istr,Iend
zeta(i,Jend+1,kout)=zeta(i,Jend,kout)
#ifdef MASKING
zeta(i,Jend+1,kout)=zeta(i,Jend+1,kout)* &
& GRID(ng)%rmask(i,Jend+1)
#endif
END DO
!
! Northern edge, closed boundary condition.
!
ELSE IF (LBC(isouth,isFsur,ng)%closed) THEN
DO i=Istr,Iend
zeta(i,Jend+1,kout)=zeta(i,Jend,kout)
#ifdef MASKING
zeta(i,Jend+1,kout)=zeta(i,Jend+1,kout)* &
& GRID(ng)%rmask(i,Jend+1)
#endif