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

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

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


Revision 1.20 - (show annotations) (download)
Wed Oct 13 04:37:37 2004 UTC (19 years, 7 months ago) by edhill
Branch: MAIN
CVS Tags: checkpoint57b_post, checkpoint56b_post, checkpoint57, checkpoint56, checkpoint55i_post, checkpoint57a_post, checkpoint55g_post, checkpoint55j_post, checkpoint55h_post, checkpoint55f_post, checkpoint56a_post, checkpoint56c_post, checkpoint57a_pre
Changes since 1.19: +4 -1 lines
 o I am *sick* of moving these variables around.  But Jean-Michel has
   all but threatened a hissy fit if they aren't removed from PARAMS.h.
   So now here they are *back* in MNC_PARAMS.h where they were just a
   few days ago.

1 C $Header: /u/gcmpack/MITgcm/model/src/ini_cori.F,v 1.19 2004/10/10 06:08:47 edhill Exp $
2 C $Name: $
3
4 #include "PACKAGES_CONFIG.h"
5 #include "CPP_OPTIONS.h"
6
7 CBOP
8 C !ROUTINE: INI_CORI
9
10 C !INTERFACE:
11 SUBROUTINE INI_CORI( myThid )
12 C !DESCRIPTION:
13 C Initialise coriolis term.
14
15 C !USES:
16 IMPLICIT NONE
17 #include "SIZE.h"
18 #include "EEPARAMS.h"
19 #include "PARAMS.h"
20 #ifdef ALLOW_MNC
21 #include "MNC_PARAMS.h"
22 #endif
23 #include "GRID.h"
24 #include "DYNVARS.h"
25 #ifdef ALLOW_MONITOR
26 #include "MONITOR.h"
27 #endif
28
29 C !INPUT/OUTPUT PARAMETERS:
30 INTEGER myThid
31 CEOP
32
33 C !LOCAL VARIABLES:
34 C bi,bj - Loop counters
35 C I,J,K
36 C facGrid - Factor for grid to meter conversion
37 INTEGER bi, bj
38 INTEGER I, J, K
39 _RL facGrid
40
41 C Initialise coriolis parameter
42 IF ( useConstantF ) THEN
43 C Constant F case
44 DO bj = myByLo(myThid), myByHi(myThid)
45 DO bi = myBxLo(myThid), myBxHi(myThid)
46 DO K=1,Nr
47 DO J=1-Oly,sNy+Oly
48 DO I=1-Olx,sNx+Olx
49 fCori(i,j,bi,bj)=f0
50 fCoriG(i,j,bi,bj)=f0
51 fCoriCos(i,j,bi,bj)=0.
52 ENDDO
53 ENDDO
54 ENDDO
55 ENDDO
56 ENDDO
57 ELSEIF ( useBetaPlaneF ) THEN
58 C Beta plane case
59 facGrid = 1. _d 0
60 IF ( usingSphericalPolarGrid ) facGrid = deg2rad*rSphere
61 DO bj = myByLo(myThid), myByHi(myThid)
62 DO bi = myBxLo(myThid), myBxHi(myThid)
63 DO K=1,Nr
64 DO J=1-Oly,sNy+Oly
65 DO I=1-Olx,sNx+Olx
66 fCori(i,j,bi,bj)=f0+beta*_yC(i,j,bi,bj)*facGrid
67 fCoriG(i,j,bi,bj)=f0+beta*yG(i,j,bi,bj)*facGrid
68 fCoriCos(i,j,bi,bj)=0.
69 ENDDO
70 ENDDO
71 ENDDO
72 ENDDO
73 ENDDO
74 ELSEIF ( useSphereF ) THEN
75 C Spherical case
76 C Note in this case we assume yC is in degrees.
77 DO bj = myByLo(myThid), myByHi(myThid)
78 DO bi = myBxLo(myThid), myBxHi(myThid)
79 DO K=1,Nr
80 DO J=1-Oly,sNy+Oly
81 DO I=1-Olx,sNx+Olx
82 fCori(i,j,bi,bj)=
83 & 2. _d 0*omega*sin(_yC(i,j,bi,bj)*deg2rad)
84 fCoriG(i,j,bi,bj)=
85 & 2. _d 0*omega*sin(yG(i,j,bi,bj)*deg2rad)
86 fCoriCos(i,j,bi,bj)=
87 & 2. _d 0*omega*cos(_yC(i,j,bi,bj)*deg2rad)
88 ENDDO
89 ENDDO
90 ENDDO
91 ENDDO
92 ENDDO
93 ELSE
94 C Special custom form
95 DO bj = myByLo(myThid), myByHi(myThid)
96 DO bi = myBxLo(myThid), myBxHi(myThid)
97 DO K=1,Nr
98 DO J=1-Oly,sNy+Oly
99 DO I=1-Olx,sNx+Olx
100 fCori(i,j,bi,bj)=0.
101 fCoriG(i,j,bi,bj)=0.
102 fCoriCos(i,j,bi,bj)=0.
103 ENDDO
104 ENDDO
105 ENDDO
106 ENDDO
107 ENDDO
108 ENDIF
109 C
110 C _EXCH_XY_R4(fCori,myThid)
111 C CALL EXCH_Z_XY_RS(fCoriG,myThid)
112 C _EXCH_XY_R4(fCoriCos,myThid)
113
114 #ifdef ALLOW_MONITOR
115 mon_write_stdout = .FALSE.
116 mon_write_mnc = .FALSE.
117 IF (monitor_stdio) THEN
118 mon_write_stdout = .TRUE.
119 ENDIF
120
121 #ifdef ALLOW_MNC
122 IF (useMNC .AND. monitor_mnc) THEN
123 DO i = 1,MAX_LEN_MBUF
124 mon_fname(i:i) = ' '
125 ENDDO
126 mon_fname(1:12) = 'monitor_grid'
127 CALL MNC_CW_SET_UDIM(mon_fname, 1, myThid)
128 mon_write_mnc = .TRUE.
129 ENDIF
130 #endif /* ALLOW_MNC */
131
132 CALL MON_PRINTSTATS_RS(1,fCori,'fCori',myThid)
133 CALL MON_PRINTSTATS_RS(1,fCoriG,'fCoriG',myThid)
134 CALL MON_PRINTSTATS_RS(1,fCoriCos,'fCoriCos',myThid)
135
136 mon_write_stdout = .FALSE.
137 mon_write_mnc = .FALSE.
138 #endif
139
140 RETURN
141 END

  ViewVC Help
Powered by ViewVC 1.1.22