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

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

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


Revision 1.18 - (hide annotations) (download)
Wed Sep 15 21:23:32 2004 UTC (19 years, 8 months ago) by edhill
Branch: MAIN
CVS Tags: checkpoint55, checkpoint54f_post, checkpoint55c_post, checkpoint55d_post, checkpoint55d_pre, checkpoint55b_post, checkpoint55a_post, checkpoint55e_post
Changes since 1.17: +90 -71 lines
 o fix name error: "monitor_mdsio" --> "monitor_stdio"
   - add "monitor_grid" output for ini_cori.F,ini_parms.F

1 edhill 1.18 C $Header: /u/gcmpack/MITgcm/model/src/ini_cori.F,v 1.17 2003/11/23 04:19:11 jmc Exp $
2 adcroft 1.10 C $Name: $
3 cnh 1.1
4 jmc 1.17 #include "PACKAGES_CONFIG.h"
5 cnh 1.6 #include "CPP_OPTIONS.h"
6 cnh 1.1
7 cnh 1.12 CBOP
8     C !ROUTINE: INI_CORI
9 edhill 1.18
10 cnh 1.12 C !INTERFACE:
11 cnh 1.1 SUBROUTINE INI_CORI( myThid )
12 edhill 1.18 C !DESCRIPTION:
13     C Initialise coriolis term.
14 cnh 1.12
15     C !USES:
16 adcroft 1.7 IMPLICIT NONE
17 cnh 1.1 #include "SIZE.h"
18     #include "EEPARAMS.h"
19     #include "PARAMS.h"
20     #include "GRID.h"
21     #include "DYNVARS.h"
22 edhill 1.18 #ifdef ALLOW_MONITOR
23     #include "MONITOR.h"
24     #endif
25     #ifdef ALLOW_MNC
26     #include "MNC_PARAMS.h"
27     #endif
28 cnh 1.1
29 cnh 1.12 C !INPUT/OUTPUT PARAMETERS:
30 cnh 1.1 INTEGER myThid
31 edhill 1.18 CEOP
32 cnh 1.1
33 cnh 1.12 C !LOCAL VARIABLES:
34 cnh 1.1 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 edhill 1.18 C Initialise coriolis parameter
42 cnh 1.3 IF ( useConstantF ) THEN
43 edhill 1.18 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 cnh 1.1 ENDDO
56     ENDDO
57 cnh 1.3 ELSEIF ( useBetaPlaneF ) THEN
58 edhill 1.18 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 cnh 1.3 ENDDO
73     ENDDO
74     ELSEIF ( useSphereF ) THEN
75 edhill 1.18 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 cnh 1.3 ENDDO
92     ENDDO
93     ELSE
94 edhill 1.18 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 cnh 1.3 ENDDO
107     ENDDO
108     ENDIF
109 edhill 1.18 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 adcroft 1.11
114 edhill 1.16 #ifdef ALLOW_MONITOR
115 edhill 1.18 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 adcroft 1.11 CALL MON_PRINTSTATS_RS(1,fCori,'fCori',myThid)
133     CALL MON_PRINTSTATS_RS(1,fCoriG,'fCoriG',myThid)
134 adcroft 1.15 CALL MON_PRINTSTATS_RS(1,fCoriCos,'fCoriCos',myThid)
135 edhill 1.18
136     mon_write_stdout = .FALSE.
137     mon_write_mnc = .FALSE.
138 heimbach 1.13 #endif
139 cnh 1.1
140     RETURN
141     END

  ViewVC Help
Powered by ViewVC 1.1.22