/[MITgcm]/MITgcm/verification/exp4/code/obcs_calc.F
ViewVC logotype

Contents of /MITgcm/verification/exp4/code/obcs_calc.F

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.2.6.1 - (show annotations) (download)
Thu Jul 11 21:54:28 2002 UTC (21 years, 9 months ago) by jmc
Branch: release1
CVS Tags: release1_p12, release1_p13, release1_p10, release1_p16, release1_p15, release1_p11, release1_p14, release1_p17, release1_p8, release1_p9, release1_p6, release1_p5, release1_p7, release1_p13_pre, release1_p12_pre
Branch point for: release1_50yr
Changes since 1.2: +18 -3 lines
o argument futureIter of S/R obcs_calc was missing
 (corresponds to checkpoint45a_post in MAIN branch)

1 C $Header: /u/gcmpack/MITgcm/verification/exp4/code/obcs_calc.F,v 1.4 2002/04/06 01:32:35 jmc Exp $
2 C $Name: $
3
4 #include "OBCS_OPTIONS.h"
5
6 SUBROUTINE OBCS_CALC( bi, bj, futureTime, futureIter,
7 & uVel, vVel, wVel, theta, salt,
8 & myThid )
9 C /==========================================================\
10 C | SUBROUTINE OBCS_CALC |
11 C | o Calculate future boundary data at open boundaries |
12 C | at time = futureTime |
13 C |==========================================================|
14 C | |
15 C \==========================================================/
16 IMPLICIT NONE
17
18 C === Global variables ===
19 #include "SIZE.h"
20 #include "EEPARAMS.h"
21 #include "PARAMS.h"
22 #include "OBCS.h"
23
24 C == Routine arguments ==
25 INTEGER bi, bj
26 INTEGER futureIter
27 _RL futureTime
28 _RL uVel (1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy)
29 _RL vVel (1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy)
30 _RL wVel (1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy)
31 _RL theta(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy)
32 _RL salt (1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy)
33 INTEGER myThid
34
35 #ifdef ALLOW_OBCS
36
37 C == Local variables ==
38 INTEGER I, J ,K
39 _RL recip_TimeScale,Uinflow
40 _RL EtaBC
41 c
42 recip_TimeScale=0./2000.
43 Uinflow = 0.25
44 EtaBC = 0.
45
46 C Eastern OB
47 IF (useOrlanskiEast) THEN
48 #ifdef ALLOW_ORLANSKI
49 CALL ORLANSKI_EAST(
50 & bi, bj, futureTime,
51 & uVel, vVel, wVel, theta, salt,
52 & myThid )
53 #endif
54 ELSE
55 DO K=1,Nr
56 DO J=1-Oly,sNy+Oly
57 OBEu(J,K,bi,bj)=Uinflow
58 & *cos(2.*PI*futureTime*recip_TimeScale)
59 & *max(futureTime*recip_TimeScale,1.)
60 OBEv(J,K,bi,bj)=0.
61 OBEt(J,K,bi,bj)=tRef(K)
62 OBEs(J,K,bi,bj)=sRef(K)
63 #ifdef ALLOW_NONHYDROSTATIC
64 OBEw(J,K,bi,bj)=0.
65 #endif
66 #ifdef NONLIN_FRSURF
67 OBEeta(J,bi,bj)=EtaBC
68 #endif
69 ENDDO
70 ENDDO
71 ENDIF
72
73 C Western OB
74 IF (useOrlanskiWest) THEN
75 #ifdef ALLOW_ORLANSKI
76 CALL ORLANSKI_WEST(
77 & bi, bj, futureTime,
78 & uVel, vVel, wVel, theta, salt,
79 & myThid )
80 #endif
81 ELSE
82 DO K=1,Nr
83 DO J=1-Oly,sNy+Oly
84 OBWu(J,K,bi,bj)=Uinflow
85 & *cos(2.*PI*futureTime*recip_TimeScale)
86 & *max(futureTime*recip_TimeScale,1.)
87 OBWv(J,K,bi,bj)=0.
88 OBWt(J,K,bi,bj)=tRef(K)
89 OBWs(J,K,bi,bj)=sRef(K)
90 #ifdef ALLOW_NONHYDROSTATIC
91 OBWw(J,K,bi,bj)=0.
92 #endif
93 #ifdef NONLIN_FRSURF
94 OBWeta(J,bi,bj)=EtaBC
95 #endif
96 ENDDO
97 ENDDO
98 ENDIF
99
100 C Northern OB, template for forcing
101 IF (useOrlanskiNorth) THEN
102 #ifdef ALLOW_ORLANSKI
103 CALL ORLANSKI_NORTH(
104 & bi, bj, futureTime,
105 & uVel, vVel, wVel, theta, salt,
106 & myThid )
107 #endif
108 ELSE
109 DO K=1,Nr
110 DO I=1-Olx,sNx+Olx
111 OBNu(I,K,bi,bj)=Uinflow
112 & *cos(2.*PI*futureTime*recip_TimeScale)
113 & *max(futureTime*recip_TimeScale,1.)
114 OBNv(I,K,bi,bj)=0.
115 OBNt(I,K,bi,bj)=tRef(K)
116 OBNs(I,K,bi,bj)=sRef(K)
117 #ifdef ALLOW_NONHYDROSTATIC
118 OBNw(I,K,bi,bj)=0.
119 #endif
120 #ifdef NONLIN_FRSURF
121 OBNeta(I,bi,bj)=0.
122 #endif
123 ENDDO
124 ENDDO
125 ENDIF
126
127 C Southern OB, template for forcing
128 IF (useOrlanskiSouth) THEN
129 #ifdef ALLOW_ORLANSKI
130 CALL ORLANSKI_SOUTH(
131 & bi, bj, futureTime,
132 & uVel, vVel, wVel, theta, salt,
133 & myThid )
134 #endif
135 ELSE
136 DO K=1,Nr
137 DO I=1-Olx,sNx+Olx
138 OBSu(I,K,bi,bj)=Uinflow
139 & *cos(2.*PI*futureTime*recip_TimeScale)
140 & *max(futureTime*recip_TimeScale,1.)
141 OBSv(I,K,bi,bj)=0.
142 OBSt(I,K,bi,bj)=tRef(K)
143 OBSs(I,K,bi,bj)=sRef(K)
144 #ifdef ALLOW_NONHYDROSTATIC
145 OBSw(I,K,bi,bj)=0.
146 #endif
147 #ifdef NONLIN_FRSURF
148 OBSeta(I,bi,bj)=0.
149 #endif
150 ENDDO
151 ENDDO
152 ENDIF
153
154 #endif /* ALLOW_OBCS */
155 RETURN
156 END

  ViewVC Help
Powered by ViewVC 1.1.22