/[MITgcm]/MITgcm/pkg/obcs/obcs_prescribe_read.F
ViewVC logotype

Contents of /MITgcm/pkg/obcs/obcs_prescribe_read.F

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


Revision 1.8 - (show annotations) (download)
Thu Dec 15 00:48:16 2005 UTC (18 years, 6 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint58, checkpoint58a_post, checkpoint57z_post, checkpoint58b_post
Changes since 1.7: +3 -1 lines
remove unused variables (get less warnings when compiling)

1 C $Header: /u/gcmpack/MITgcm/pkg/obcs/obcs_prescribe_read.F,v 1.7 2005/10/10 05:53:48 mlosch Exp $
2 C $Name: $
3
4 # include "OBCS_OPTIONS.h"
5
6 subroutine obcs_prescribe_read (
7 I mycurrenttime
8 I , mycurrentiter
9 I , mythid
10 & )
11 c |==================================================================|
12 c | SUBROUTINE obcs_prescribe_read |
13 c |==================================================================|
14 c | read open boundary conditions from file |
15 c | N.B.: * uses exf and cal routines for file/record handling |
16 c | * uses ctrl routines for control variable handling |
17 c |==================================================================|
18
19 implicit none
20
21 c == global variables ==
22
23 #include "EEPARAMS.h"
24 #include "SIZE.h"
25 #include "GRID.h"
26 #include "OBCS.h"
27 #ifdef ALLOW_EXF
28 # include "exf_param.h"
29 #endif
30 #ifdef ALLOW_PTRACERS.h
31 # include "PTRACERS_SIZE.h"
32 # include "PTRACERS.h"
33 # include "OBCS_PTRACERS.h"
34 #endif /* ALLOW_PTRACERS */
35
36 c == routine arguments ==
37
38 _RL mycurrenttime
39 integer mycurrentiter
40 integer mythid
41
42 #if (defined (ALLOW_OBCS) && defined (ALLOW_OBCS_PRESCRIBE))
43
44 c == local variables ==
45
46 #ifdef ALLOW_EXF
47 logical first, changed
48 integer count0, count1
49 integer year0, year1
50 _RL fac
51 #ifdef ALLOW_PTRACERS
52 integer iTracer, i,j,k
53 #endif /* ALLOW_PTRACERS */
54 #endif /* ALLOW_EXF */
55
56 c == end of interface ==
57
58 #ifdef ALLOW_EXF
59 #ifdef ALLOW_OBCS_NORTH
60 call exf_getffieldrec(
61 I obcsNstartdate, obcsNperiod
62 I , obcsNstartdate1, obcsNstartdate2
63 I , .false.
64 O , fac, first, changed
65 O , count0, count1, year0, year1
66 I , mycurrenttime, mycurrentiter, mythid
67 & )
68
69 call exf_set_obcs_xz( OBNu, OBNu0, OBNu1, OBNufile, 'u'
70 I , fac, first, changed, count0, count1
71 I , mycurrenttime, mycurrentiter, mythid )
72 call exf_set_obcs_xz( OBNv, OBNv0, OBNv1, OBNvfile, 'v'
73 I , fac, first, changed, count0, count1
74 I , mycurrenttime, mycurrentiter, mythid )
75 call exf_set_obcs_xz( OBNt, OBNt0, OBNt1, OBNtfile, 's'
76 I , fac, first, changed, count0, count1
77 I , mycurrenttime, mycurrentiter, mythid )
78 call exf_set_obcs_xz( OBNs, OBNs0, OBNs1, OBNsfile, 's'
79 I , fac, first, changed, count0, count1
80 I , mycurrenttime, mycurrentiter, mythid )
81 #ifdef ALLOW_PTRACERS
82 if ( usePTRACERS ) then
83 do itracer = 1, PTRACERS_numInUse
84 call exf_set_obcs_xz( OBNptr (1-Olx,1,1,1,iTracer)
85 I , OBNptr0(1-Olx,1,1,1,iTracer)
86 I , OBNptr1(1-Olx,1,1,1,iTracer)
87 I , OBNptrFile(iTracer), 's'
88 I , fac, first, changed, count0, count1
89 I , mycurrenttime, mycurrentiter, mythid )
90 enddo
91 endif
92 #endif /* ALLOW_PTRACERS */
93 #endif
94
95 #ifdef ALLOW_OBCS_SOUTH
96 call exf_getffieldrec(
97 I obcsSstartdate, obcsSperiod
98 I , obcsSstartdate1, obcsSstartdate2
99 I , .false.
100 O , fac, first, changed
101 O , count0, count1, year0, year1
102 I , mycurrenttime, mycurrentiter, mythid
103 & )
104
105 call exf_set_obcs_xz( OBSu, OBSu0, OBSu1, OBSufile, 'u'
106 I , fac, first, changed, count0, count1
107 I , mycurrenttime, mycurrentiter, mythid )
108 call exf_set_obcs_xz( OBSv, OBSv0, OBSv1, OBSvfile, 'v'
109 I , fac, first, changed, count0, count1
110 I , mycurrenttime, mycurrentiter, mythid )
111 call exf_set_obcs_xz( OBSt, OBSt0, OBSt1, OBStfile, 's'
112 I , fac, first, changed, count0, count1
113 I , mycurrenttime, mycurrentiter, mythid )
114 call exf_set_obcs_xz( OBSs, OBSs0, OBSs1, OBSsfile, 's'
115 I , fac, first, changed, count0, count1
116 I , mycurrenttime, mycurrentiter, mythid )
117
118 #ifdef ALLOW_PTRACERS
119 if ( usePTRACERS ) then
120 do itracer = 1, PTRACERS_numInUse
121 call exf_set_obcs_xz( OBSptr (1-Olx,1,1,1,iTracer)
122 I , OBSptr0(1-Olx,1,1,1,iTracer)
123 I , OBSptr1(1-Olx,1,1,1,iTracer)
124 I , OBSptrFile(iTracer), 's'
125 I , fac, first, changed, count0, count1
126 I , mycurrenttime, mycurrentiter, mythid )
127 enddo
128 endif
129 #endif /* ALLOW_PTRACERS */
130 #endif
131
132 #ifdef ALLOW_OBCS_EAST
133 call exf_getffieldrec(
134 I obcsEstartdate, obcsEperiod
135 I , obcsEstartdate1, obcsEstartdate2
136 I , .false.
137 O , fac, first, changed
138 O , count0, count1, year0, year1
139 I , mycurrenttime, mycurrentiter, mythid
140 & )
141
142 call exf_set_obcs_yz( OBEu, OBEu0, OBEu1, OBEufile, 'u'
143 I , fac, first, changed, count0, count1
144 I , mycurrenttime, mycurrentiter, mythid )
145 call exf_set_obcs_yz( OBEv, OBEv0, OBEv1, OBEvfile, 'v'
146 I , fac, first, changed, count0, count1
147 I , mycurrenttime, mycurrentiter, mythid )
148 call exf_set_obcs_yz( OBEt, OBEt0, OBEt1, OBEtfile, 's'
149 I , fac, first, changed, count0, count1
150 I , mycurrenttime, mycurrentiter, mythid )
151 call exf_set_obcs_yz( OBEs, OBEs0, OBEs1, OBEsfile, 's'
152 I , fac, first, changed, count0, count1
153 I , mycurrenttime, mycurrentiter, mythid )
154 #ifdef ALLOW_PTRACERS
155 if ( usePTRACERS ) then
156 do itracer = 1, PTRACERS_numInUse
157 call exf_set_obcs_yz( OBEptr (1-Oly,1,1,1,iTracer)
158 I , OBEptr0(1-Oly,1,1,1,iTracer)
159 I , OBEptr1(1-Oly,1,1,1,iTracer)
160 I , OBEptrFile(iTracer), 's'
161 I , fac, first, changed, count0, count1
162 I , mycurrenttime, mycurrentiter, mythid )
163 enddo
164 endif
165 #endif /* ALLOW_PTRACERS */
166 #endif
167
168 #ifdef ALLOW_OBCS_WEST
169 call exf_getffieldrec(
170 I obcsWstartdate, obcsWperiod
171 I , obcsWstartdate1, obcsWstartdate2
172 I , .false.
173 O , fac, first, changed
174 O , count0, count1, year0, year1
175 I , mycurrenttime, mycurrentiter, mythid
176 & )
177
178 call exf_set_obcs_yz( OBWu, OBWu0, OBWu1, OBWufile, 'u'
179 I , fac, first, changed, count0, count1
180 I , mycurrenttime, mycurrentiter, mythid )
181 call exf_set_obcs_yz( OBWv, OBWv0, OBWv1, OBWvfile, 'v'
182 I , fac, first, changed, count0, count1
183 I , mycurrenttime, mycurrentiter, mythid )
184 call exf_set_obcs_yz( OBWt, OBWt0, OBWt1, OBWtfile, 's'
185 I , fac, first, changed, count0, count1
186 I , mycurrenttime, mycurrentiter, mythid )
187 call exf_set_obcs_yz( OBWs, OBWs0, OBWs1, OBWsfile, 's'
188 I , fac, first, changed, count0, count1
189 I , mycurrenttime, mycurrentiter, mythid )
190 #ifdef ALLOW_PTRACERS
191 if ( usePTRACERS ) then
192 do itracer = 1, PTRACERS_numInUse
193 call exf_set_obcs_yz( OBWptr (1-Oly,1,1,1,iTracer)
194 I , OBWptr0(1-Oly,1,1,1,iTracer)
195 I , OBWptr1(1-Oly,1,1,1,iTracer)
196 I , OBWptrFile(iTracer), 's'
197 I , fac, first, changed, count0, count1
198 I , mycurrenttime, mycurrentiter, mythid )
199 enddo
200 endif
201 #endif /* ALLOW_PTRACERS */
202 #endif
203
204 #ifdef ALLOW_OBCS_CONTROL
205 cgg WARNING: Assuming North Open Boundary exists and has same
206 cgg calendar information as other boundaries.
207 call ctrl_obcsbal ( mycurrenttime,mycurrentiter,mythid )
208 #endif
209
210 #ifdef ALLOW_OBCSN_CONTROL
211 call ctrl_getobcsn ( mycurrenttime, mycurrentiter, mythid )
212 #endif
213
214 #ifdef ALLOW_OBCSS_CONTROL
215 call ctrl_getobcss ( mycurrenttime, mycurrentiter, mythid )
216 #endif
217
218 #ifdef ALLOW_OBCSW_CONTROL
219 call ctrl_getobcsw ( mycurrenttime, mycurrentiter, mythid )
220 #endif
221
222 #ifdef ALLOW_OBCSE_CONTROL
223 call ctrl_getobcse ( mycurrenttime, mycurrentiter, mythid )
224 #endif
225
226 #else /* not ALLOW_EXF */
227 CALL OBCS_EXTERNAL_FIELDS_LOAD(
228 & myCurrentTime, myCurrentIter, myThid )
229 #endif /* ALLOw_EXF */
230
231 #endif /* ALLOW_OBCS */
232
233 RETURN
234 END

  ViewVC Help
Powered by ViewVC 1.1.22