--- MITgcm/verification/internal_wave/code/obcs_calc.F 2002/07/11 21:56:21 1.3.4.1 +++ MITgcm/verification/internal_wave/code/obcs_calc.F 2011/02/28 16:31:36 1.7 @@ -1,28 +1,27 @@ -C $Header: /home/ubuntu/mnt/e9_copy/MITgcm/verification/internal_wave/code/obcs_calc.F,v 1.3.4.1 2002/07/11 21:56:21 jmc Exp $ +C $Header: /home/ubuntu/mnt/e9_copy/MITgcm/verification/internal_wave/code/obcs_calc.F,v 1.7 2011/02/28 16:31:36 jmc Exp $ C $Name: $ #include "OBCS_OPTIONS.h" - SUBROUTINE OBCS_CALC( bi, bj, futureTime, futureIter, - & uVel, vVel, wVel, theta, salt, + SUBROUTINE OBCS_CALC( futureTime, futureIter, + & uVel, vVel, wVel, theta, salt, & myThid ) -C /==========================================================\ -C | SUBROUTINE OBCS_CALC | -C | o Calculate future boundary data at open boundaries | -C | at time = futureTime | -C |==========================================================| -C | | -C \==========================================================/ +C *==========================================================* +C | SUBROUTINE OBCS_CALC +C | o Calculate future boundary data at open boundaries +C | at time = futureTime +C *==========================================================* IMPLICIT NONE C === Global variables === #include "SIZE.h" #include "EEPARAMS.h" #include "PARAMS.h" +#include "GRID.h" #include "OBCS.h" +#include "EOS.h" C == Routine arguments == - INTEGER bi, bj INTEGER futureIter _RL futureTime _RL uVel (1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy) @@ -35,14 +34,19 @@ #ifdef ALLOW_OBCS C == Local variables == + INTEGER bi, bj INTEGER I, J ,K - -#include "GRID.h" _RL obTimeScale,Uinflow,rampTime2 _RL vertStructWst(Nr) _RL mz,strat,kx _RL tmpsum +C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----| + +#ifdef ALLOW_DEBUG + IF (debugMode) CALL DEBUG_ENTER('OBCS_CALC',myThid) +#endif + C Vertical mode number mz=1.0 _d 0 C Stratification @@ -70,12 +74,14 @@ C for smoother looking solutions. rampTime2 = 4. _d 0*44567.0 _d 0 + DO bj=myByLo(myThid),myByHi(myThid) + DO bi=myBxLo(myThid),myBxHi(myThid) C Eastern OB IF (useOrlanskiEast) THEN CALL ORLANSKI_EAST( - & bi, bj, futureTime, - & uVel, vVel, wVel, theta, salt, + & bi, bj, futureTime, + & uVel, vVel, wVel, theta, salt, & myThid ) ELSE DO K=1,Nr @@ -94,8 +100,8 @@ C Western OB IF (useOrlanskiWest) THEN CALL ORLANSKI_WEST( - & bi, bj, futureTime, - & uVel, vVel, wVel, theta, salt, + & bi, bj, futureTime, + & uVel, vVel, wVel, theta, salt, & myThid ) ELSE DO K=1,Nr @@ -147,8 +153,8 @@ C Northern OB, template for forcing IF (useOrlanskiNorth) THEN CALL ORLANSKI_NORTH( - & bi, bj, futureTime, - & uVel, vVel, wVel, theta, salt, + & bi, bj, futureTime, + & uVel, vVel, wVel, theta, salt, & myThid ) ELSE DO K=1,Nr @@ -165,10 +171,10 @@ ENDIF C Southern OB, template for forcing - IF (useOrlanskiSouth) THEN + IF (useOrlanskiSouth) THEN CALL ORLANSKI_SOUTH( - & bi, bj, futureTime, - & uVel, vVel, wVel, theta, salt, + & bi, bj, futureTime, + & uVel, vVel, wVel, theta, salt, & myThid ) ELSE DO K=1,Nr @@ -184,6 +190,20 @@ ENDDO ENDIF +C-- end bi,bj loops. + ENDDO + ENDDO + +#ifdef ALLOW_OBCS_BALANCE + IF ( useOBCSbalance ) THEN + CALL OBCS_BALANCE_FLOW( futureTime, futureIter, myThid ) + ENDIF +#endif /* ALLOW_OBCS_BALANCE */ + +#ifdef ALLOW_DEBUG + IF (debugMode) CALL DEBUG_LEAVE('OBCS_CALC',myThid) +#endif #endif /* ALLOW_OBCS */ + RETURN END