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