1 |
|
2 |
#include "CPP_OPTIONS.h" |
3 |
#include "OFFLINE_OPTIONS.h" |
4 |
|
5 |
C !ROUTINE: OFFLINE_FIELDS_LOAD |
6 |
C !INTERFACE: |
7 |
SUBROUTINE OFFLINE_FIELDS_LOAD( myTime, myIter, myThid ) |
8 |
C *==========================================================* |
9 |
C | SUBROUTINE OFFLINE_FIELDS_LOAD |
10 |
C | o Control reading of fields from external source. |
11 |
C *==========================================================* |
12 |
C | Offline External source field loading routine. |
13 |
C | This routine is called every time we want to |
14 |
C | load a a set of external fields. The routine decides |
15 |
C | which fields to load and then reads them in. |
16 |
C | This routine needs to be customised for particular |
17 |
C | experiments. |
18 |
C | Notes |
19 |
C | ===== |
20 |
C | currently the file names need to be specific lengths |
21 |
C | would like to make this more flexible QQ |
22 |
C *==========================================================* |
23 |
|
24 |
C !USES: |
25 |
IMPLICIT NONE |
26 |
C === Global variables === |
27 |
#include "SIZE.h" |
28 |
#include "EEPARAMS.h" |
29 |
#include "PARAMS.h" |
30 |
#include "FFIELDS.h" |
31 |
#include "GRID.h" |
32 |
#include "DYNVARS.h" |
33 |
#ifdef ALLOW_GMREDI |
34 |
#include "GMREDI.h" |
35 |
#include "GMREDI_DIAGS.h" |
36 |
#endif |
37 |
#ifdef ALLOW_OFFLINE |
38 |
#include "OFFLINE.h" |
39 |
#endif |
40 |
|
41 |
C !INPUT/OUTPUT PARAMETERS: |
42 |
C === Routine arguments === |
43 |
C myThid - Thread no. that called this routine. |
44 |
C myTime - Simulation time |
45 |
C myIter - Simulation timestep number |
46 |
INTEGER myThid |
47 |
_RL myTime |
48 |
INTEGER myIter |
49 |
|
50 |
c fn :: Temp. for building file name. |
51 |
CHARACTER*(MAX_LEN_FNAM) fn |
52 |
CHARACTER*(MAX_LEN_FNAM) fn2 |
53 |
INTEGER prec |
54 |
|
55 |
|
56 |
|
57 |
C !LOCAL VARIABLES: |
58 |
C === Local arrays === |
59 |
C uvel[01] :: Temp. for u |
60 |
C vvel[01] :: Temp. for v |
61 |
C wvel[01] :: Temp. for w |
62 |
c conv[01] :: Temp for Convection Count |
63 |
C [01] :: End points for interpolation |
64 |
C Above use static heap storage to allow exchange. |
65 |
C aWght, bWght :: Interpolation weights |
66 |
COMMON /OFFLINEFFIELDS/ |
67 |
& uvel0, vvel0, wvel0, tave0, save0, |
68 |
& conv0, gmkx0, gmky0, gmkz0, hflx0, |
69 |
& sflx0, |
70 |
& uvel1, vvel1, wvel1, tave1, save1, |
71 |
& conv1, gmkx1, gmky1, gmkz1, hflx1, |
72 |
& sflx1 |
73 |
_RS uvel0 (1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy) |
74 |
_RS uvel1 (1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy) |
75 |
_RS vvel0 (1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy) |
76 |
_RS vvel1 (1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy) |
77 |
_RS wvel0 (1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy) |
78 |
_RS wvel1 (1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy) |
79 |
_RS tave0 (1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy) |
80 |
_RS tave1 (1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy) |
81 |
_RS save0 (1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy) |
82 |
_RS save1 (1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy) |
83 |
_RS conv0 (1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy) |
84 |
_RS conv1 (1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy) |
85 |
_RS gmkx0 (1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy) |
86 |
_RS gmkx1 (1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy) |
87 |
_RS gmky0 (1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy) |
88 |
_RS gmky1 (1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy) |
89 |
_RS gmkz0 (1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy) |
90 |
_RS gmkz1 (1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy) |
91 |
_RS hflx0 (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy) |
92 |
_RS hflx1 (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy) |
93 |
_RS sflx0 (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy) |
94 |
_RS sflx1 (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy) |
95 |
c _RS tmp (1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy) |
96 |
_RL tmp |
97 |
_RL sfac (1-OLy:sNy+OLy,nSy) |
98 |
|
99 |
|
100 |
INTEGER bi,bj,i,j,k,intime0,intime1 |
101 |
_RL aWght,bWght,rdt, KGM |
102 |
INTEGER nForcingPeriods,Imytm,Ifprd,Ifcyc,Iftm |
103 |
INTEGER I1, I2 |
104 |
INTEGER IFNBLNK, ILNBLNK |
105 |
EXTERNAL IFNBLNK, ILNBLNK |
106 |
|
107 |
#ifdef ALLOW_OFFLINE |
108 |
CALL TIMER_START('OFFLINE_FIELDS_LOAD [I/O]', myThid) |
109 |
prec = precFloat32 |
110 |
KGM=1.d0 |
111 |
|
112 |
IF ( periodicExternalForcing ) THEN |
113 |
|
114 |
C First call requires that we initialize everything to zero for safety |
115 |
IF ( myIter .EQ. nIter0 ) THEN |
116 |
CALL LEF_ZERO3( uvel0 ,myThid ) |
117 |
CALL LEF_ZERO3( vvel0 ,myThid ) |
118 |
CALL LEF_ZERO3( wvel0 ,myThid ) |
119 |
CALL LEF_ZERO3( tave0 ,myThid ) |
120 |
CALL LEF_ZERO3( save0 ,myThid ) |
121 |
CALL LEF_ZERO3( conv0 ,myThid ) |
122 |
CALL LEF_ZERO3( gmkx0 ,myThid ) |
123 |
CALL LEF_ZERO3( gmky0 ,myThid ) |
124 |
CALL LEF_ZERO3( gmkz0 ,myThid ) |
125 |
CALL LEF_ZERO2( hflx0 ,myThid ) |
126 |
CALL LEF_ZERO2( sflx0 ,myThid ) |
127 |
CALL LEF_ZERO3( uvel1 ,myThid ) |
128 |
CALL LEF_ZERO3( vvel1 ,myThid ) |
129 |
CALL LEF_ZERO3( wvel1 ,myThid ) |
130 |
CALL LEF_ZERO3( tave1 ,myThid ) |
131 |
CALL LEF_ZERO3( save1 ,myThid ) |
132 |
CALL LEF_ZERO3( conv1 ,myThid ) |
133 |
CALL LEF_ZERO3( gmkx1 ,myThid ) |
134 |
CALL LEF_ZERO3( gmky1 ,myThid ) |
135 |
CALL LEF_ZERO3( gmkz1 ,myThid ) |
136 |
CALL LEF_ZERO2( hflx1 ,myThid ) |
137 |
CALL LEF_ZERO2( sflx1 ,myThid ) |
138 |
ENDIF |
139 |
|
140 |
C Now calculate whether it is time to update the forcing arrays |
141 |
rdt=1. _d 0 / deltaTclock |
142 |
nForcingPeriods=int(offlineForcingCycle/offlineForcingPeriod+0.5) |
143 |
Imytm=int(myTime*rdt+0.5) |
144 |
Ifprd=int(offlineForcingPeriod*rdt+0.5) |
145 |
Ifcyc=int(offlineForcingCycle*rdt+0.5) |
146 |
Iftm=mod( Imytm+Ifcyc-Ifprd/2 ,Ifcyc) |
147 |
|
148 |
intime0=int(Iftm/Ifprd) |
149 |
intime1=mod(intime0+1,nForcingPeriods) |
150 |
aWght=float( Iftm-Ifprd*intime0 )/float( Ifprd ) |
151 |
bWght=1.-aWght |
152 |
|
153 |
intime0=intime0+1 |
154 |
INTIME1=intime1+1 |
155 |
|
156 |
IF ( |
157 |
& Iftm-Ifprd*(intime0-1) .EQ. 0 |
158 |
& .OR. myIter .EQ. nIter0 |
159 |
& ) THEN |
160 |
|
161 |
_BEGIN_MASTER(myThid) |
162 |
|
163 |
C If the above condition is met then we need to read in |
164 |
C data for the period ahead and the period behind myTime. |
165 |
WRITE(*,*) |
166 |
& 'S/R OFFLINE_FIELDS_LOAD: Reading new data',myTime,myIter |
167 |
& , nIter0, intime0,intime1 |
168 |
|
169 |
#ifdef NOT_MODEL_FILES |
170 |
c if reading own files setup reading here |
171 |
#else |
172 |
c |
173 |
IF ( Uvelfile .NE. ' ' ) THEN |
174 |
WRITE(fn2,'(A)') Uvelfile |
175 |
I1=IFNBLNK(fn2) |
176 |
I2=ILNBLNK(fn2) |
177 |
WRITE(fn,'(A,A,I10.10)') fn2(I1:I2),'.', |
178 |
& intime0*Ifprd+offlineIter0 |
179 |
CALL MDSREADFIELD(fn,prec,'RL',Nr,uvel0, 1,myThid) |
180 |
WRITE(fn,'(A,A,I10.10)') fn2(I1:I2),'.', |
181 |
& intime1*Ifprd+offlineIter0 |
182 |
CALL MDSREADFIELD(fn,prec,'RL',Nr,uvel1, 1,myThid) |
183 |
ENDIF |
184 |
c |
185 |
IF ( Vvelfile .NE. ' ' ) THEN |
186 |
WRITE(fn2,'(A)') Vvelfile |
187 |
I1=IFNBLNK(fn2) |
188 |
I2=ILNBLNK(fn2) |
189 |
WRITE(fn,'(A,A,I10.10)') fn2(I1:I2),'.', |
190 |
& intime0*Ifprd+offlineIter0 |
191 |
CALL MDSREADFIELD(fn,prec,'RL',Nr,vvel0, 1,myThid) |
192 |
WRITE(fn,'(A,A,I10.10)') fn2(I1:I2),'.', |
193 |
& intime1*Ifprd+offlineIter0 |
194 |
CALL MDSREADFIELD(fn,prec,'RL',Nr,vvel1, 1,myThid) |
195 |
ENDIF |
196 |
c |
197 |
IF (Wvelfile .NE. ' ' ) THEN |
198 |
WRITE(fn2,'(A)') Wvelfile |
199 |
I1=IFNBLNK(fn2) |
200 |
I2=ILNBLNK(fn2) |
201 |
WRITE(fn,'(A,A,I10.10)') fn2(I1:I2),'.', |
202 |
& intime0*Ifprd+offlineIter0 |
203 |
CALL MDSREADFIELD(fn,prec,'RL',Nr,wvel0, 1,myThid) |
204 |
WRITE(fn,'(A,A,I10.10)') fn2(I1:I2),'.', |
205 |
& intime1*Ifprd+offlineIter0 |
206 |
CALL MDSREADFIELD(fn,prec,'RL',Nr,wvel1, 1,myThid) |
207 |
ENDIF |
208 |
|
209 |
IF (Thetfile .NE. ' ' ) THEN |
210 |
WRITE(fn2,'(A)') Thetfile |
211 |
I1=IFNBLNK(fn2) |
212 |
I2=ILNBLNK(fn2) |
213 |
WRITE(fn,'(A,A,I10.10)') fn2(I1:I2),'.', |
214 |
& intime0*Ifprd+offlineIter0 |
215 |
CALL MDSREADFIELD(fn,prec,'RL',Nr,tave0, 1,myThid) |
216 |
WRITE(fn,'(A,A,I10.10)') fn2(I1:I2),'.', |
217 |
& intime1*Ifprd+offlineIter0 |
218 |
CALL MDSREADFIELD(fn,prec,'RL',Nr,tave1, 1,myThid) |
219 |
ENDIF |
220 |
|
221 |
IF (Saltfile .NE. ' ' ) THEN |
222 |
WRITE(fn2,'(A)') Saltfile |
223 |
I1=IFNBLNK(fn2) |
224 |
I2=ILNBLNK(fn2) |
225 |
WRITE(fn,'(A,A,I10.10)') fn2(I1:I2),'.', |
226 |
& intime0*Ifprd+offlineIter0 |
227 |
CALL MDSREADFIELD(fn,prec,'RL',Nr,save0, 1,myThid) |
228 |
WRITE(fn,'(A,A,I10.10)') fn2(I1:I2),'.', |
229 |
& intime1*Ifprd+offlineIter0 |
230 |
CALL MDSREADFIELD(fn,prec,'RL',Nr,save1, 1,myThid) |
231 |
ENDIF |
232 |
|
233 |
IF (ConvFile .NE. ' ' ) THEN |
234 |
WRITE(fn2,'(A)') ConvFile |
235 |
I1=IFNBLNK(fn2) |
236 |
I2=ILNBLNK(fn2) |
237 |
WRITE(fn,'(A,A,I10.10)') fn2(I1:I2),'.', |
238 |
& intime0*Ifprd+offlineIter0 |
239 |
CALL MDSREADFIELD(fn,prec,'RL',Nr,conv0, 1,myThid) |
240 |
WRITE(fn,'(A,A,I10.10)') fn2(I1:I2),'.', |
241 |
& intime1*Ifprd+offlineIter0 |
242 |
CALL MDSREADFIELD(fn,prec,'RL',Nr,conv1, 1,myThid) |
243 |
ENDIF |
244 |
c |
245 |
|
246 |
IF (GMwxFile .NE. ' ' ) THEN |
247 |
WRITE(fn2,'(A)') GMwxFile |
248 |
I1=IFNBLNK(fn2) |
249 |
I2=ILNBLNK(fn2) |
250 |
WRITE(fn,'(A,A,I10.10)') fn2(I1:I2),'.', |
251 |
& intime0*Ifprd+offlineIter0 |
252 |
CALL MDSREADFIELD(fn,prec,'RL',Nr,gmkx0, 1,myThid) |
253 |
WRITE(fn,'(A,A,I10.10)') fn2(I1:I2),'.', |
254 |
& intime1*Ifprd+offlineIter0 |
255 |
CALL MDSREADFIELD(fn,prec,'RL',Nr,gmkx1, 1,myThid) |
256 |
ENDIF |
257 |
|
258 |
IF (GMwyFile .NE. ' ') THEN |
259 |
WRITE(fn2,'(A)') GMwyFile |
260 |
I1=IFNBLNK(fn2) |
261 |
I2=ILNBLNK(fn2) |
262 |
WRITE(fn,'(A,A,I10.10)') fn2(I1:I2),'.', |
263 |
& intime0*Ifprd+offlineIter0 |
264 |
CALL MDSREADFIELD(fn,prec,'RL',Nr,gmky0, 1,myThid) |
265 |
WRITE(fn,'(A,A,I10.10)') fn2(I1:I2),'.', |
266 |
& intime1*Ifprd+offlineIter0 |
267 |
CALL MDSREADFIELD(fn,prec,'RL',Nr,gmky1, 1,myThid) |
268 |
ENDIF |
269 |
c |
270 |
IF (GMwzFile .NE. ' ') THEN |
271 |
WRITE(fn2,'(A)') GMwzFile |
272 |
I1=IFNBLNK(fn2) |
273 |
I2=ILNBLNK(fn2) |
274 |
WRITE(fn,'(A,A,I10.10)') fn2(I1:I2),'.', |
275 |
& intime0*Ifprd+offlineIter0 |
276 |
CALL MDSREADFIELD(fn,prec,'RL',Nr,gmkz0, 1,myThid) |
277 |
WRITE(fn,'(A,A,I10.10)') fn2(I1:I2),'.', |
278 |
& intime1*Ifprd+offlineIter0 |
279 |
CALL MDSREADFIELD(fn,prec,'RL',Nr,gmkz1, 1,myThid) |
280 |
ENDIF |
281 |
c |
282 |
IF (HFluxFile .NE. ' ') THEN |
283 |
WRITE(fn2,'(A)') HFluxFile |
284 |
I1=IFNBLNK(fn2) |
285 |
I2=ILNBLNK(fn2) |
286 |
WRITE(fn,'(A,A,I10.10)') fn2(I1:I2),'.', |
287 |
& intime0*Ifprd+offlineIter0 |
288 |
CALL MDSREADFIELD(fn,prec,'RL',1,hflx0, 1,myThid) |
289 |
WRITE(fn,'(A,A,I10.10)') fn2(I1:I2),'.', |
290 |
& intime1*Ifprd+offlineIter0 |
291 |
CALL MDSREADFIELD(fn,prec,'RL',1,hflx1, 1,myThid) |
292 |
ENDIF |
293 |
c |
294 |
IF (SFluxFile .NE. ' ') THEN |
295 |
WRITE(fn2,'(A)') SFluxFile |
296 |
I1=IFNBLNK(fn2) |
297 |
I2=ILNBLNK(fn2) |
298 |
WRITE(fn,'(A,A,I10.10)') fn2(I1:I2),'.', |
299 |
& intime0*Ifprd+offlineIter0 |
300 |
CALL MDSREADFIELD(fn,prec,'RL',1,sflx0, 1,myThid) |
301 |
WRITE(fn,'(A,A,I10.10)') fn2(I1:I2),'.', |
302 |
& intime1*Ifprd+offlineIter0 |
303 |
CALL MDSREADFIELD(fn,prec,'RL',1,sflx1, 1,myThid) |
304 |
ENDIF |
305 |
c |
306 |
#endif /* else NOT_MODEL_FILES */ |
307 |
|
308 |
_END_MASTER(myThid) |
309 |
|
310 |
C |
311 |
_EXCH_XYZ_R4(uvel0 , myThid ) |
312 |
_EXCH_XYZ_R4(uvel1 , myThid ) |
313 |
_EXCH_XYZ_R4(vvel0 , myThid ) |
314 |
_EXCH_XYZ_R4(vvel1 , myThid ) |
315 |
_EXCH_XYZ_R4(wvel0, myThid ) |
316 |
_EXCH_XYZ_R4(wvel1, myThid ) |
317 |
_EXCH_XYZ_R4(tave0 , myThid ) |
318 |
_EXCH_XYZ_R4(tave1 , myThid ) |
319 |
_EXCH_XYZ_R4(save0, myThid ) |
320 |
_EXCH_XYZ_R4(save1, myThid ) |
321 |
_EXCH_XYZ_R4(conv0, myThid ) |
322 |
_EXCH_XYZ_R4(conv1, myThid ) |
323 |
_EXCH_XYZ_R4(gmkx0, myThid ) |
324 |
_EXCH_XYZ_R4(gmkx1, myThid ) |
325 |
_EXCH_XYZ_R4(gmky0 , myThid ) |
326 |
_EXCH_XYZ_R4(gmky1 , myThid ) |
327 |
_EXCH_XYZ_R4(gmkz0, myThid ) |
328 |
_EXCH_XYZ_R4(gmkz1, myThid ) |
329 |
_EXCH_XY_R4(hflx0 , myThid ) |
330 |
_EXCH_XY_R4(hflx1 , myThid ) |
331 |
_EXCH_XY_R4(sflx0, myThid ) |
332 |
_EXCH_XY_R4(sflx1, myThid ) |
333 |
|
334 |
|
335 |
c |
336 |
ENDIF |
337 |
c |
338 |
|
339 |
C-- Interpolate uvel, vvel, wvel |
340 |
DO bj = myByLo(myThid), myByHi(myThid) |
341 |
DO bi = myBxLo(myThid), myBxHi(myThid) |
342 |
do k=1,Nr |
343 |
DO j=1-Oly,sNy+Oly |
344 |
DO i=1-Olx,sNx+Olx |
345 |
Uvel(i,j,k,bi,bj) = bWght*uvel0(i,j,k,bi,bj) |
346 |
& +aWght*uvel1(i,j,k,bi,bj) |
347 |
Vvel(i,j,k,bi,bj) = bWght*vvel0(i,j,k,bi,bj) |
348 |
& +aWght*vvel1(i,j,k,bi,bj) |
349 |
Wvel(i,j,k,bi,bj) = bWght*wvel0(i,j,k,bi,bj) |
350 |
& +aWght*wvel1(i,j,k,bi,bj) |
351 |
theta(i,j,k,bi,bj) = bWght*tave0(i,j,k,bi,bj) |
352 |
& +aWght*tave1(i,j,k,bi,bj) |
353 |
salt(i,j,k,bi,bj) = bWght*save0(i,j,k,bi,bj) |
354 |
& +aWght*save1(i,j,k,bi,bj) |
355 |
ConvectCount(i,j,k,bi,bj) = bWght*conv0(i,j,k,bi,bj) |
356 |
& +aWght*conv1(i,j,k,bi,bj) |
357 |
IVDConvCount(i,j,k,bi,bj) = bWght*conv0(i,j,k,bi,bj) |
358 |
& +aWght*conv1(i,j,k,bi,bj) |
359 |
#ifdef ALLOW_GMREDI |
360 |
Kwx(i,j,k,bi,bj) = bWght*gmkx0(i,j,k,bi,bj) |
361 |
& +aWght*gmkx1(i,j,k,bi,bj) |
362 |
Kwy(i,j,k,bi,bj) = bWght*gmky0(i,j,k,bi,bj) |
363 |
& +aWght*gmky1(i,j,k,bi,bj) |
364 |
Kwz(i,j,k,bi,bj) = bWght*gmkz0(i,j,k,bi,bj) |
365 |
& +aWght*gmkz1(i,j,k,bi,bj) |
366 |
#endif |
367 |
surfaceForcingT(i,j,bi,bj) = bWght*hflx0(i,j,bi,bj) |
368 |
& +aWght*hflx1(i,j,bi,bj) |
369 |
surfaceForcingT(i,j,bi,bj) = surfaceForcingT(i,j,bi,bj)/ |
370 |
& (HeatCapacity_Cp*recip_horiVertRatio*rhoConst) |
371 |
surfaceForcingS(i,j,bi,bj) = bWght*sflx0(i,j,bi,bj) |
372 |
& +aWght*sflx1(i,j,bi,bj) |
373 |
surfaceForcingS(i,j,bi,bj) = surfaceForcingS(i,j,bi,bj)/ |
374 |
& (recip_horiVertRatio*rhoConst) |
375 |
ENDDO |
376 |
ENDDO |
377 |
ENDDO |
378 |
ENDDO |
379 |
ENDDO |
380 |
|
381 |
CC-- Diagnostics |
382 |
C IF (myThid.EQ.1 .AND. myTime.LT.62208000.) THEN |
383 |
C write(*,'(a,1p5e12.4,3i6,2e12.4)') |
384 |
C & 'time,U,V,W,i0,i1,a,b = ', |
385 |
C & myTime, |
386 |
C & Uvel(1,sNy,1,1,1),Vvel(1,sNy,1,1,1), |
387 |
C & Wvel(1,sNy,1,1,1), |
388 |
C & intime0,intime1,aWght,bWght |
389 |
C write(*,'(a,1p4e12.4,2e12.4)') |
390 |
C & 'time,uvel0,uvel1,U = ', |
391 |
C & myTime, |
392 |
C & uvel0(1,sNy,1,1,1),uvel1(1,sNy,1,1,1),Uvel(1,sNy,1,1,1), |
393 |
C & aWght,bWght |
394 |
C ENDIF |
395 |
|
396 |
C endif for periodicForcing |
397 |
ENDIF |
398 |
|
399 |
#endif |
400 |
c! ALLOW_OFFLINE |
401 |
|
402 |
RETURN |
403 |
END |
404 |
|
405 |
C !ROUTINE: LEF_ZERO3 |
406 |
C !INTERFACE: |
407 |
SUBROUTINE LEF_ZERO3( arr ,myThid ) |
408 |
C !DESCRIPTION: \bv |
409 |
C This routine simply sets the argument array to zero |
410 |
C Used only by EXTERNAL_FIELDS_LOAD |
411 |
C \ev |
412 |
C !USES: |
413 |
IMPLICIT NONE |
414 |
C === Global variables === |
415 |
#include "SIZE.h" |
416 |
#include "EEPARAMS.h" |
417 |
C !INPUT/OUTPUT PARAMETERS: |
418 |
C === Arguments === |
419 |
_RS arr (1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy) |
420 |
INTEGER myThid |
421 |
C !LOCAL VARIABLES: |
422 |
C === Local variables === |
423 |
INTEGER i,j,bi,bj,k |
424 |
CEOP |
425 |
|
426 |
DO bj = myByLo(myThid), myByHi(myThid) |
427 |
DO bi = myBxLo(myThid), myBxHi(myThid) |
428 |
do k=1,Nr |
429 |
DO j=1-Oly,sNy+Oly |
430 |
DO i=1-Olx,sNx+Olx |
431 |
arr(i,j,k,bi,bj)=0. |
432 |
ENDDO |
433 |
ENDDO |
434 |
enddo |
435 |
ENDDO |
436 |
ENDDO |
437 |
CALL TIMER_STOP ('OFFLINE_FIELDS_LOAD [I/O]', myThid) |
438 |
|
439 |
RETURN |
440 |
END |
441 |
|
442 |
C !ROUTINE: LEF_ZERO2 |
443 |
C !INTERFACE: |
444 |
SUBROUTINE LEF_ZERO2( arr ,myThid ) |
445 |
C !DESCRIPTION: \bv |
446 |
C This routine simply sets the argument array to zero |
447 |
C Used only by EXTERNAL_FIELDS_LOAD |
448 |
C \ev |
449 |
C !USES: |
450 |
IMPLICIT NONE |
451 |
C === Global variables === |
452 |
#include "SIZE.h" |
453 |
#include "EEPARAMS.h" |
454 |
C !INPUT/OUTPUT PARAMETERS: |
455 |
C === Arguments === |
456 |
_RS arr (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy) |
457 |
INTEGER myThid |
458 |
C !LOCAL VARIABLES: |
459 |
C === Local variables === |
460 |
INTEGER i,j,bi,bj |
461 |
CEOP |
462 |
DO bj = myByLo(myThid), myByHi(myThid) |
463 |
DO bi = myBxLo(myThid), myBxHi(myThid) |
464 |
DO j=1-Oly,sNy+Oly |
465 |
DO i=1-Olx,sNx+Olx |
466 |
arr(i,j,bi,bj)=0. |
467 |
ENDDO |
468 |
ENDDO |
469 |
ENDDO |
470 |
ENDDO |
471 |
CALL TIMER_STOP ('OFFLINE_FIELDS_LOAD [I/O]', myThid) |
472 |
|
473 |
RETURN |
474 |
END |
475 |
|