1 |
C $Header: /u/gcmpack/models/MITgcmUV/model/src/ini_dynvars.F,v 1.3 2001/07/13 14:26:57 heimbach Exp $ |
2 |
C $Name: $ |
3 |
|
4 |
#include "CPP_OPTIONS.h" |
5 |
|
6 |
SUBROUTINE INI_DYNVARS( myThid ) |
7 |
C /==========================================================\ |
8 |
C | SUBROUTINE INI_DYNVARS | |
9 |
C | o Initialise to zero all DYNVARS.h arrays | |
10 |
C \==========================================================/ |
11 |
IMPLICIT NONE |
12 |
|
13 |
C Sets all the State variables to zero. |
14 |
C Sets all the Gs (arrays used for multi-level time-stepping) |
15 |
C to zero. |
16 |
|
17 |
C === Global variables === |
18 |
#include "SIZE.h" |
19 |
#include "EEPARAMS.h" |
20 |
#include "PARAMS.h" |
21 |
#include "DYNVARS.h" |
22 |
#ifdef ALLOW_NONHYDROSTATIC |
23 |
#include "GW.h" |
24 |
#endif |
25 |
|
26 |
C == Routine arguments == |
27 |
C myThid - Number of this instance of INI_UVEL |
28 |
INTEGER myThid |
29 |
CEndOfInterface |
30 |
|
31 |
C == Local variables == |
32 |
C bi,bj - Loop counters |
33 |
C I,J,K |
34 |
INTEGER bi, bj |
35 |
INTEGER I, J, K |
36 |
|
37 |
C-- Over all tiles |
38 |
DO bj = myByLo(myThid), myByHi(myThid) |
39 |
DO bi = myBxLo(myThid), myBxHi(myThid) |
40 |
|
41 |
C- 3D arrays |
42 |
DO K=1,Nr |
43 |
DO J=1-Oly,sNy+Oly |
44 |
DO I=1-Olx,sNx+Olx |
45 |
|
46 |
uVel(I,J,K,bi,bj)=0. _d 0 |
47 |
vVel(I,J,K,bi,bj)=0. _d 0 |
48 |
wVel(I,J,K,bi,bj)=0. _d 0 |
49 |
theta(I,J,K,bi,bj)=0. _d 0 |
50 |
salt(I,J,K,bi,bj)=0. _d 0 |
51 |
|
52 |
gU(I,J,K,bi,bj)=0. _d 0 |
53 |
gV(I,J,K,bi,bj)=0. _d 0 |
54 |
gT(I,J,K,bi,bj)=0. _d 0 |
55 |
gS(I,J,K,bi,bj)=0. _d 0 |
56 |
gUnm1(I,J,K,bi,bj)=0. _d 0 |
57 |
gVnm1(I,J,K,bi,bj)=0. _d 0 |
58 |
gTnm1(I,J,K,bi,bj)=0. _d 0 |
59 |
gSnm1(I,J,K,bi,bj)=0. _d 0 |
60 |
|
61 |
#ifdef INCLUDE_CD_CODE |
62 |
guCD(I,J,K,bi,bj)=0. _d 0 |
63 |
gvCD(I,J,K,bi,bj)=0. _d 0 |
64 |
uNM1(I,J,K,bi,bj)=0. _d 0 |
65 |
vNM1(I,J,K,bi,bj)=0. _d 0 |
66 |
uVeld(I,J,K,bi,bj)=0. _d 0 |
67 |
vVeld(I,J,K,bi,bj)=0. _d 0 |
68 |
#endif |
69 |
|
70 |
#ifdef ALLOW_NONHYDROSTATIC |
71 |
gW(I,J,K,bi,bj)=0. _d 0 |
72 |
gWnm1(I,J,K,bi,bj)=0. _d 0 |
73 |
#endif |
74 |
|
75 |
ENDDO |
76 |
ENDDO |
77 |
ENDDO |
78 |
|
79 |
C- 2D arrays |
80 |
DO J=1-Oly,sNy+Oly |
81 |
DO I=1-Olx,sNx+Olx |
82 |
etaN(I,J,bi,bj)=0. _d 0 |
83 |
etaH(I,J,bi,bj)=0. _d 0 |
84 |
#ifdef INCLUDE_CD_CODE |
85 |
etaNm1(I,J,bi,bj)=0. _d 0 |
86 |
#endif |
87 |
ENDDO |
88 |
ENDDO |
89 |
|
90 |
ENDDO |
91 |
ENDDO |
92 |
|
93 |
RETURN |
94 |
END |