/[MITgcm]/MITgcm/model/src/ini_obcs.F
ViewVC logotype

Contents of /MITgcm/model/src/ini_obcs.F

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


Revision 1.3 - (show annotations) (download)
Mon Mar 22 16:46:58 1999 UTC (25 years, 3 months ago) by adcroft
Branch: MAIN
CVS Tags: checkpoint20, checkpoint21, checkpoint22
Changes since 1.2: +9 -1 lines
Added "hooks" for applying OBCs to vertical velocity. This
is only valid in N-H mode.

1 C $Header: /u/gcmpack/models/MITgcmUV/model/src/ini_obcs.F,v 1.2 1998/12/09 16:11:52 adcroft Exp $
2
3 #include "CPP_OPTIONS.h"
4
5 CStartOfInterface
6 SUBROUTINE INI_OBCS( myThid )
7 C /==========================================================\
8 C | SUBROUTINE INI_OBCS |
9 C | o Initialise OB arrays |
10 C |==========================================================|
11 C | |
12 C \==========================================================/
13 IMPLICIT NONE
14
15 C === Global variables ===
16 #include "SIZE.h"
17 #include "EEPARAMS.h"
18 #include "PARAMS.h"
19 #include "OBCS.h"
20
21 C == Routine arguments ==
22 C myThid - Number of this instance of INI_DEPTHS
23 INTEGER myThid
24 CEndOfInterface
25
26 C == Local variables ==
27 C xG, yG - Global coordinate location.
28 C zG
29 C zUpper - Work arrays for upper and lower
30 C zLower cell-face heights.
31 C phi - Temporary scalar
32 C iG, jG - Global coordinate index
33 C bi,bj - Loop counters
34 C zUpper - Temporary arrays holding z coordinates of
35 C zLower upper and lower faces.
36 C I,i,K
37 INTEGER iG, jG, iGm, jGm
38 INTEGER bi, bj
39 INTEGER I, J, K
40 c
41
42
43 DO bj = myByLo(myThid), myByHi(myThid)
44 DO bi = myBxLo(myThid), myBxHi(myThid)
45
46 DO I=1-Olx,sNx+Olx
47 OB_Jn(I,bi,bj)=0
48 OB_Js(I,bi,bj)=0
49 ENDDO
50
51 DO J=1-Oly,sNy+Oly
52 OB_Ie(J,bi,bj)=0
53 OB_Iw(J,bi,bj)=0
54 ENDDO
55
56 DO K=1,Nr
57 DO I=1-Olx,sNx+Olx
58 OBNu(I,K,bi,bj)=0.
59 OBNv(I,K,bi,bj)=0.
60 OBNt(I,K,bi,bj)=0.
61 OBSu(I,K,bi,bj)=0.
62 OBSv(I,K,bi,bj)=0.
63 OBSt(I,K,bi,bj)=0.
64 #ifdef ALLOW_NONHYDROSTATIC
65 OBNw(I,K,bi,bj)=0.
66 OBSw(I,K,bi,bj)=0.
67 #endif
68 ENDDO
69 DO J=1-Oly,sNy+Oly
70 OBEu(J,K,bi,bj)=0.
71 OBEv(J,K,bi,bj)=0.
72 OBEt(J,K,bi,bj)=0.
73 OBWu(J,K,bi,bj)=0.
74 OBWv(J,K,bi,bj)=0.
75 OBWt(J,K,bi,bj)=0.
76 #ifdef ALLOW_NONHYDROSTATIC
77 OBEw(J,K,bi,bj)=0.
78 OBWw(J,K,bi,bj)=0.
79 #endif
80 ENDDO
81 ENDDO
82
83 ENDDO
84 ENDDO
85
86
87 DO bj = myByLo(myThid), myByHi(myThid)
88 DO bi = myBxLo(myThid), myBxHi(myThid)
89 DO J=1-Oly,sNy+Oly
90 jG = myYGlobalLo-1+(bj-1)*sNy+J
91 jGm = 1+mod( jG-1+Ny , Ny )
92 DO I=1-Olx,sNx+Olx
93 iG = myXGlobalLo-1+(bi-1)*sNx+I
94 iGm = 1+mod( iG-1+Nx , Nx )
95 IF (jG.EQ.OB_Jnorth(iGm)) OB_Jn(I,bi,bj)=J
96 IF (jG.EQ.OB_Jsouth(iGm)) OB_Js(I,bi,bj)=J
97 IF (iG.EQ.OB_Ieast(jGm)) OB_Ie(J,bi,bj)=I
98 IF (iG.EQ.OB_Iwest(jGm)) OB_Iw(J,bi,bj)=I
99 ENDDO
100 ENDDO
101 ENDDO
102 ENDDO
103
104 RETURN
105 END

  ViewVC Help
Powered by ViewVC 1.1.22