3 |
|
|
4 |
#include "OBCS_OPTIONS.h" |
#include "OBCS_OPTIONS.h" |
5 |
|
|
6 |
SUBROUTINE OBCS_CALC( bi, bj, futureTime, futureIter, |
SUBROUTINE OBCS_CALC( futureTime, futureIter, |
7 |
& uVel, vVel, wVel, theta, salt, |
& uVel, vVel, wVel, theta, salt, |
8 |
& myThid ) |
& myThid ) |
9 |
C /==========================================================\ |
C *==========================================================* |
10 |
C | SUBROUTINE OBCS_CALC | |
C | SUBROUTINE OBCS_CALC |
11 |
C | o Calculate future boundary data at open boundaries | |
C | o Calculate future boundary data at open boundaries |
12 |
C | at time = futureTime | |
C | at time = futureTime |
13 |
C |==========================================================| |
C *==========================================================* |
|
C | | |
|
|
C \==========================================================/ |
|
14 |
IMPLICIT NONE |
IMPLICIT NONE |
15 |
|
|
16 |
C === Global variables === |
C === Global variables === |
17 |
#include "SIZE.h" |
#include "SIZE.h" |
18 |
#include "EEPARAMS.h" |
#include "EEPARAMS.h" |
19 |
#include "PARAMS.h" |
#include "PARAMS.h" |
20 |
#include "OBCS.h" |
#ifdef ALLOW_EXCH2 |
21 |
|
# include "W2_EXCH2_SIZE.h" |
22 |
|
#endif /* ALLOW_EXCH2 */ |
23 |
|
#include "SET_GRID.h" |
24 |
|
#include "GRID.h" |
25 |
|
#include "OBCS_PARAMS.h" |
26 |
|
#include "OBCS_GRID.h" |
27 |
|
#include "OBCS_FIELDS.h" |
28 |
|
#include "EOS.h" |
29 |
|
|
30 |
C == Routine arguments == |
C == Routine arguments == |
|
INTEGER bi, bj |
|
31 |
INTEGER futureIter |
INTEGER futureIter |
32 |
_RL futureTime |
_RL futureTime |
33 |
_RL uVel (1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy) |
_RL uVel (1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy) |
40 |
#ifdef ALLOW_OBCS |
#ifdef ALLOW_OBCS |
41 |
|
|
42 |
C == Local variables == |
C == Local variables == |
43 |
|
INTEGER bi, bj |
44 |
INTEGER I, J ,K |
INTEGER I, J ,K |
|
|
|
|
#include "GRID.h" |
|
45 |
_RL obTimeScale,Uinflow,rampTime2 |
_RL obTimeScale,Uinflow,rampTime2 |
46 |
_RL vertStructWst(Nr) |
_RL vertStructWst(Nr) |
47 |
_RL mz,strat,kx |
_RL mz,strat,kx |
48 |
_RL tmpsum |
_RL tmpsum |
49 |
|
|
50 |
|
C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----| |
51 |
|
|
52 |
|
#ifdef ALLOW_DEBUG |
53 |
|
IF (debugMode) CALL DEBUG_ENTER('OBCS_CALC',myThid) |
54 |
|
#endif |
55 |
|
|
56 |
C Vertical mode number |
C Vertical mode number |
57 |
mz=1.0 _d 0 |
mz=1.0 _d 0 |
58 |
C Stratification |
C Stratification |
80 |
C for smoother looking solutions. |
C for smoother looking solutions. |
81 |
rampTime2 = 4. _d 0*44567.0 _d 0 |
rampTime2 = 4. _d 0*44567.0 _d 0 |
82 |
|
|
83 |
|
DO bj=myByLo(myThid),myByHi(myThid) |
84 |
|
DO bi=myBxLo(myThid),myBxHi(myThid) |
85 |
|
|
86 |
C Eastern OB |
C Eastern OB |
87 |
IF (useOrlanskiEast) THEN |
IF (useOrlanskiEast) THEN |
88 |
CALL ORLANSKI_EAST( |
CALL ORLANSKI_EAST( |
89 |
& bi, bj, futureTime, |
& bi, bj, futureTime, |
90 |
& uVel, vVel, wVel, theta, salt, |
& uVel, vVel, wVel, theta, salt, |
91 |
& myThid ) |
& myThid ) |
92 |
ELSE |
ELSE |
93 |
DO K=1,Nr |
DO K=1,Nr |
106 |
C Western OB |
C Western OB |
107 |
IF (useOrlanskiWest) THEN |
IF (useOrlanskiWest) THEN |
108 |
CALL ORLANSKI_WEST( |
CALL ORLANSKI_WEST( |
109 |
& bi, bj, futureTime, |
& bi, bj, futureTime, |
110 |
& uVel, vVel, wVel, theta, salt, |
& uVel, vVel, wVel, theta, salt, |
111 |
& myThid ) |
& myThid ) |
112 |
ELSE |
ELSE |
113 |
DO K=1,Nr |
DO K=1,Nr |
159 |
C Northern OB, template for forcing |
C Northern OB, template for forcing |
160 |
IF (useOrlanskiNorth) THEN |
IF (useOrlanskiNorth) THEN |
161 |
CALL ORLANSKI_NORTH( |
CALL ORLANSKI_NORTH( |
162 |
& bi, bj, futureTime, |
& bi, bj, futureTime, |
163 |
& uVel, vVel, wVel, theta, salt, |
& uVel, vVel, wVel, theta, salt, |
164 |
& myThid ) |
& myThid ) |
165 |
ELSE |
ELSE |
166 |
DO K=1,Nr |
DO K=1,Nr |
177 |
ENDIF |
ENDIF |
178 |
|
|
179 |
C Southern OB, template for forcing |
C Southern OB, template for forcing |
180 |
IF (useOrlanskiSouth) THEN |
IF (useOrlanskiSouth) THEN |
181 |
CALL ORLANSKI_SOUTH( |
CALL ORLANSKI_SOUTH( |
182 |
& bi, bj, futureTime, |
& bi, bj, futureTime, |
183 |
& uVel, vVel, wVel, theta, salt, |
& uVel, vVel, wVel, theta, salt, |
184 |
& myThid ) |
& myThid ) |
185 |
ELSE |
ELSE |
186 |
DO K=1,Nr |
DO K=1,Nr |
196 |
ENDDO |
ENDDO |
197 |
ENDIF |
ENDIF |
198 |
|
|
199 |
|
C-- end bi,bj loops. |
200 |
|
ENDDO |
201 |
|
ENDDO |
202 |
|
|
203 |
|
#ifdef ALLOW_OBCS_BALANCE |
204 |
|
IF ( useOBCSbalance ) THEN |
205 |
|
CALL OBCS_BALANCE_FLOW( futureTime, futureIter, myThid ) |
206 |
|
ENDIF |
207 |
|
#endif /* ALLOW_OBCS_BALANCE */ |
208 |
|
|
209 |
|
#ifdef ALLOW_DEBUG |
210 |
|
IF (debugMode) CALL DEBUG_LEAVE('OBCS_CALC',myThid) |
211 |
|
#endif |
212 |
#endif /* ALLOW_OBCS */ |
#endif /* ALLOW_OBCS */ |
213 |
|
|
214 |
RETURN |
RETURN |
215 |
END |
END |