1 |
cnh |
1.6 |
C $Header: /u/gcmpack/models/MITgcmUV/model/src/ini_cori.F,v 1.5 1998/10/28 03:11:37 cnh Exp $ |
2 |
cnh |
1.1 |
|
3 |
cnh |
1.6 |
#include "CPP_OPTIONS.h" |
4 |
cnh |
1.1 |
|
5 |
|
|
CStartOfInterface |
6 |
|
|
SUBROUTINE INI_CORI( myThid ) |
7 |
|
|
C /==========================================================\ |
8 |
|
|
C | SUBROUTINE INI_CORI | |
9 |
|
|
C | o Initialise coriolis term. | |
10 |
|
|
C \==========================================================/ |
11 |
|
|
|
12 |
|
|
C === Global variables === |
13 |
|
|
#include "SIZE.h" |
14 |
|
|
#include "EEPARAMS.h" |
15 |
|
|
#include "PARAMS.h" |
16 |
|
|
#include "GRID.h" |
17 |
|
|
#include "DYNVARS.h" |
18 |
|
|
|
19 |
|
|
C == Routine arguments == |
20 |
|
|
C myThid - Number of this instance of INI_CORI |
21 |
|
|
INTEGER myThid |
22 |
|
|
CEndOfInterface |
23 |
|
|
|
24 |
|
|
C == Local variables == |
25 |
|
|
C iG, jG - Global coordinate index |
26 |
|
|
C bi,bj - Loop counters |
27 |
|
|
C I,J,K |
28 |
|
|
C facGrid - Factor for grid to meter conversion |
29 |
|
|
INTEGER iG, jG |
30 |
|
|
INTEGER bi, bj |
31 |
|
|
INTEGER I, J, K |
32 |
|
|
_RL facGrid |
33 |
|
|
|
34 |
cnh |
1.3 |
C-- Initialise coriolis parameter |
35 |
|
|
IF ( useConstantF ) THEN |
36 |
|
|
C o Constant F case |
37 |
|
|
DO bj = myByLo(myThid), myByHi(myThid) |
38 |
|
|
DO bi = myBxLo(myThid), myBxHi(myThid) |
39 |
cnh |
1.4 |
DO K=1,Nr |
40 |
cnh |
1.3 |
DO J=1,sNy |
41 |
|
|
DO I=1,sNx |
42 |
|
|
fCori(i,j,bi,bj)=f0 |
43 |
|
|
ENDDO |
44 |
cnh |
1.1 |
ENDDO |
45 |
|
|
ENDDO |
46 |
|
|
ENDDO |
47 |
|
|
ENDDO |
48 |
cnh |
1.3 |
ELSEIF ( useBetaPlaneF ) THEN |
49 |
|
|
C o Beta plane case |
50 |
|
|
facGrid = 1. _d 0 |
51 |
|
|
IF ( usingSphericalPolarGrid ) facGrid = deg2rad*rSphere |
52 |
|
|
DO bj = myByLo(myThid), myByHi(myThid) |
53 |
|
|
DO bi = myBxLo(myThid), myBxHi(myThid) |
54 |
cnh |
1.4 |
DO K=1,Nr |
55 |
cnh |
1.3 |
DO J=1,sNy |
56 |
|
|
DO I=1,sNx |
57 |
|
|
fCori(i,j,bi,bj)=f0+beta*_yC(i,j,bi,bj)*facGrid |
58 |
|
|
ENDDO |
59 |
|
|
ENDDO |
60 |
|
|
ENDDO |
61 |
|
|
ENDDO |
62 |
|
|
ENDDO |
63 |
|
|
ELSEIF ( useSphereF ) THEN |
64 |
|
|
C o Spherical case |
65 |
|
|
C Note in this case we assume yC is in degrees. |
66 |
|
|
DO bj = myByLo(myThid), myByHi(myThid) |
67 |
|
|
DO bi = myBxLo(myThid), myBxHi(myThid) |
68 |
cnh |
1.4 |
DO K=1,Nr |
69 |
cnh |
1.3 |
DO J=1,sNy |
70 |
|
|
DO I=1,sNx |
71 |
cnh |
1.5 |
fCori(i,j,bi,bj)= |
72 |
|
|
& 2. _d 0*omega*sin(_yC(i,j,bi,bj)*deg2rad) |
73 |
cnh |
1.3 |
ENDDO |
74 |
|
|
ENDDO |
75 |
|
|
ENDDO |
76 |
|
|
ENDDO |
77 |
|
|
ENDDO |
78 |
|
|
ELSE |
79 |
|
|
C o Special custom form |
80 |
|
|
DO bj = myByLo(myThid), myByHi(myThid) |
81 |
|
|
DO bi = myBxLo(myThid), myBxHi(myThid) |
82 |
cnh |
1.4 |
DO K=1,Nr |
83 |
cnh |
1.3 |
DO J=1,sNy |
84 |
|
|
DO I=1,sNx |
85 |
|
|
fCori(i,j,bi,bj)=0. |
86 |
|
|
ENDDO |
87 |
|
|
ENDDO |
88 |
|
|
ENDDO |
89 |
|
|
ENDDO |
90 |
|
|
ENDDO |
91 |
|
|
ENDIF |
92 |
cnh |
1.1 |
C |
93 |
|
|
_EXCH_XY_R4(fCori , myThid ) |
94 |
|
|
|
95 |
|
|
RETURN |
96 |
|
|
END |