[MITgcm-support] periodic but "closed" channel flow

Patrick Rosendahl Patrick.Rosendahl at zmaw.de
Wed Mar 5 08:53:40 EST 2008


Hello all,

this is code I use for simulating a infinite channel (periodic domain in 
EW-direction) with return flow (netflow in any section is 0).

It is currently hooked up in obcs_apply_uv.F via

         CALL OBCS_MODIFY( bi, bj, uFld, vFld, myThid )

and implemented like this in obcs_calc.F inside the 
IF-useOBCSbalance-THEN switch

C
C calculate the mass transfer across some section
C
         Tr_T = 0. _d 0
         Ar_T = 0. _d 0
         DO K=1,Nr
           DO J=1-Oly,sNy+Oly
              I_obc = sNx-5
              IF (I_obc.ne.0) THEN
               Ar = drF(k)*hFacC(I_obc,j,k,bi,bj)*dyG(I_obc,j,bi,bj) * 
_maskW(I_obc,J,K,bi,bj)
               Ar_T = Ar_T + Ar
               Tr_T = Tr_T + Ar * uVel(I_obc,J,K,bi,bj)
             ENDIF
           ENDDO
         ENDDO
         _GLOBAL_SUM_R8( Ar_T , myThid )
         _GLOBAL_SUM_R8( Tr_T , myThid )
         Tr_T = (0. - Tr_T)/Ar_T
C
C correct the entire u-field
C
         DO K=1,Nr
           DO J=1-Oly,sNy+Oly
             DO I=1-Olx,sNx+Olx
               uVel(I,J,K,bi,bj) = uVel(I,J,K,bi,bj) + Tr_T * 
_maskW(I_obc,J,K,bi,bj)
             ENDDO
           ENDDO
         ENDDO




I first tried the Orlanski-type BC, but it does not work very well. 
Probably there is a proper way to hook the code.

Patrick



More information about the MITgcm-support mailing list