1 |
jmc |
1.9 |
C $Header: /u/gcmpack/MITgcm/pkg/autodiff/active_file.F,v 1.8 2011/11/05 19:20:42 heimbach Exp $ |
2 |
jmc |
1.7 |
C $Name: $ |
3 |
heimbach |
1.1 |
|
4 |
edhill |
1.4 |
#include "AUTODIFF_OPTIONS.h" |
5 |
heimbach |
1.1 |
|
6 |
jmc |
1.9 |
C ================================================================== |
7 |
|
|
C active_file.F: Routines to handle the I/O of the active file for |
8 |
|
|
C the adjoint calculations. All files are direct |
9 |
|
|
C access files. |
10 |
|
|
C Routines |
11 |
|
|
C o active_read_xy - Read an active 2D variable from file. |
12 |
|
|
C o active_read_xyz - Read an active 3D variable from file. |
13 |
|
|
C o active_read_xz - Read an active 2D xz-slice from file. |
14 |
|
|
C o active_read_yz - Read an active 2D yz-slice from file. |
15 |
|
|
C |
16 |
|
|
C o active_write_xy - Write an active 2D variable to a file. |
17 |
|
|
C o active_write_xyz - Write an active 3D variable to a file. |
18 |
|
|
C o active_write_xz - Write an active 2D xz-slice to a file. |
19 |
|
|
C o active_write_yz - Write an active 2D yz-slice to a file. |
20 |
|
|
C |
21 |
|
|
C changed: Christian Eckert eckert@mit.edu 24-Apr-2000 |
22 |
|
|
C - Added routines that do active writes on tiles |
23 |
|
|
C instead of a whole thread. |
24 |
|
|
C changed: heimbach@mit.edu 05-Mar-2001 |
25 |
|
|
C - added active file handling of xz-/yz-arrays |
26 |
|
|
C ================================================================== |
27 |
heimbach |
1.1 |
|
28 |
jmc |
1.9 |
C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----| |
29 |
heimbach |
1.2 |
CBOP |
30 |
|
|
C !ROUTINE: active_read_xy |
31 |
|
|
C !INTERFACE: |
32 |
heimbach |
1.1 |
subroutine active_read_xy( |
33 |
|
|
I active_var_file, |
34 |
|
|
O active_var, |
35 |
jmc |
1.9 |
I iRec, |
36 |
heimbach |
1.1 |
I doglobalread, |
37 |
|
|
I lAdInit, |
38 |
|
|
I myOptimIter, |
39 |
jmc |
1.9 |
I myThid |
40 |
heimbach |
1.1 |
I , dummy |
41 |
|
|
& ) |
42 |
|
|
|
43 |
heimbach |
1.2 |
C !DESCRIPTION: \bv |
44 |
jmc |
1.9 |
C ================================================================== |
45 |
|
|
C SUBROUTINE active_read_xy |
46 |
|
|
C ================================================================== |
47 |
|
|
C o Read an active 2D (XY) variable from file. |
48 |
|
|
C started: Christian Eckert eckert@mit.edu 30-Jun-1999 |
49 |
|
|
C ================================================================== |
50 |
|
|
C SUBROUTINE active_read_xy |
51 |
|
|
C ================================================================== |
52 |
heimbach |
1.2 |
C \ev |
53 |
heimbach |
1.1 |
|
54 |
heimbach |
1.2 |
C !USES: |
55 |
jmc |
1.9 |
IMPLICIT NONE |
56 |
heimbach |
1.1 |
|
57 |
jmc |
1.9 |
C == global variables == |
58 |
heimbach |
1.1 |
#include "EEPARAMS.h" |
59 |
|
|
#include "SIZE.h" |
60 |
|
|
|
61 |
heimbach |
1.2 |
C !INPUT/OUTPUT PARAMETERS: |
62 |
jmc |
1.9 |
C active_var_file: filename |
63 |
|
|
C active_var: array |
64 |
|
|
C iRec: record number |
65 |
|
|
C myOptimIter: number of optimization iteration (default: 0) |
66 |
|
|
C myThid: thread number for this instance |
67 |
|
|
C doglobalread: flag for global or local read/write |
68 |
|
|
C (default: .false.) |
69 |
|
|
C lAdInit: initialisation of corresponding adjoint |
70 |
|
|
C variable and write to active file |
71 |
|
|
CHARACTER*(*) active_var_file |
72 |
|
|
_RL active_var(1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy) |
73 |
|
|
INTEGER iRec |
74 |
|
|
INTEGER myOptimIter |
75 |
|
|
INTEGER myThid |
76 |
|
|
LOGICAL doglobalread |
77 |
|
|
LOGICAL lAdInit |
78 |
heimbach |
1.1 |
_RL dummy |
79 |
|
|
|
80 |
heimbach |
1.2 |
C !LOCAL VARIABLES: |
81 |
jmc |
1.9 |
INTEGER myNr |
82 |
|
|
LOGICAL useCurrentDir |
83 |
heimbach |
1.2 |
CEOP |
84 |
heimbach |
1.1 |
|
85 |
jmc |
1.9 |
myNr = 1 |
86 |
|
|
useCurrentDir = .FALSE. |
87 |
|
|
CALL ACTIVE_READ_3D_RL( |
88 |
|
|
& active_var_file, active_var, doglobalread, |
89 |
|
|
& useCurrentDir, lAdInit, iRec, myNr, |
90 |
|
|
& FORWARD_SIMULATION, myOptimIter, myThid ) |
91 |
heimbach |
1.1 |
|
92 |
jmc |
1.9 |
RETURN |
93 |
|
|
END |
94 |
heimbach |
1.1 |
|
95 |
jmc |
1.9 |
C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----| |
96 |
heimbach |
1.2 |
CBOP |
97 |
|
|
C !ROUTINE: active_read_xyz |
98 |
|
|
C !INTERFACE: |
99 |
heimbach |
1.1 |
subroutine active_read_xyz( |
100 |
|
|
I active_var_file, |
101 |
|
|
O active_var, |
102 |
jmc |
1.9 |
I iRec, |
103 |
heimbach |
1.1 |
I doglobalread, |
104 |
|
|
I lAdInit, |
105 |
|
|
I myOptimIter, |
106 |
jmc |
1.9 |
I myThid |
107 |
heimbach |
1.1 |
I , dummy |
108 |
|
|
& ) |
109 |
|
|
|
110 |
heimbach |
1.2 |
C !DESCRIPTION: \bv |
111 |
jmc |
1.9 |
C ================================================================== |
112 |
|
|
C SUBROUTINE active_read_xyz |
113 |
|
|
C ================================================================== |
114 |
|
|
C o Read an active 3D variable from file. |
115 |
|
|
C started: Christian Eckert eckert@mit.edu 30-Jun-1999 |
116 |
|
|
C ================================================================== |
117 |
|
|
C SUBROUTINE active_read_xyz |
118 |
|
|
C ================================================================== |
119 |
heimbach |
1.2 |
C \ev |
120 |
heimbach |
1.1 |
|
121 |
heimbach |
1.2 |
C !USES: |
122 |
jmc |
1.9 |
IMPLICIT NONE |
123 |
heimbach |
1.1 |
|
124 |
jmc |
1.9 |
C == global variables == |
125 |
heimbach |
1.1 |
#include "EEPARAMS.h" |
126 |
|
|
#include "SIZE.h" |
127 |
|
|
|
128 |
heimbach |
1.2 |
C !INPUT/OUTPUT PARAMETERS: |
129 |
jmc |
1.9 |
C active_var_file: filename |
130 |
|
|
C active_var: array |
131 |
|
|
C iRec: record number |
132 |
|
|
C myOptimIter: number of optimization iteration (default: 0) |
133 |
|
|
C myThid: thread number for this instance |
134 |
|
|
C doglobalread: flag for global or local read/write |
135 |
|
|
C (default: .false.) |
136 |
|
|
C lAdInit: initialisation of corresponding adjoint |
137 |
|
|
C variable and write to active file |
138 |
|
|
CHARACTER*(*) active_var_file |
139 |
|
|
_RL active_var(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy) |
140 |
|
|
INTEGER iRec |
141 |
|
|
INTEGER myOptimIter |
142 |
|
|
INTEGER myThid |
143 |
|
|
LOGICAL doglobalread |
144 |
|
|
LOGICAL lAdInit |
145 |
heimbach |
1.1 |
_RL dummy |
146 |
|
|
|
147 |
heimbach |
1.2 |
C !LOCAL VARIABLES: |
148 |
jmc |
1.9 |
INTEGER myNr |
149 |
|
|
LOGICAL useCurrentDir |
150 |
heimbach |
1.2 |
CEOP |
151 |
heimbach |
1.1 |
|
152 |
jmc |
1.9 |
myNr = Nr |
153 |
|
|
useCurrentDir = .FALSE. |
154 |
|
|
CALL ACTIVE_READ_3D_RL( |
155 |
|
|
& active_var_file, active_var, doglobalread, |
156 |
|
|
& useCurrentDir, lAdInit, iRec, myNr, |
157 |
|
|
& FORWARD_SIMULATION, myOptimIter, myThid ) |
158 |
heimbach |
1.1 |
|
159 |
jmc |
1.9 |
RETURN |
160 |
|
|
END |
161 |
heimbach |
1.1 |
|
162 |
jmc |
1.9 |
C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----| |
163 |
heimbach |
1.2 |
CBOP |
164 |
|
|
C !ROUTINE: active_read_xz |
165 |
|
|
C !INTERFACE: |
166 |
heimbach |
1.1 |
subroutine active_read_xz( |
167 |
|
|
I active_var_file, |
168 |
|
|
O active_var, |
169 |
jmc |
1.9 |
I iRec, |
170 |
heimbach |
1.1 |
I doglobalread, |
171 |
|
|
I lAdInit, |
172 |
|
|
I myOptimIter, |
173 |
jmc |
1.9 |
I myThid |
174 |
heimbach |
1.1 |
I , dummy |
175 |
|
|
& ) |
176 |
|
|
|
177 |
heimbach |
1.2 |
C !DESCRIPTION: \bv |
178 |
jmc |
1.9 |
C ================================================================== |
179 |
|
|
C SUBROUTINE active_read_xz |
180 |
|
|
C ================================================================== |
181 |
|
|
C o Read an active 2D xz-slice from file. |
182 |
|
|
C started: heimbach@mit.edu 05-Mar-2001 |
183 |
|
|
C ================================================================== |
184 |
|
|
C SUBROUTINE active_read_xz |
185 |
|
|
C ================================================================== |
186 |
heimbach |
1.2 |
C \ev |
187 |
heimbach |
1.1 |
|
188 |
heimbach |
1.2 |
C !USES: |
189 |
jmc |
1.9 |
IMPLICIT NONE |
190 |
heimbach |
1.1 |
|
191 |
jmc |
1.9 |
C == global variables == |
192 |
heimbach |
1.1 |
#include "EEPARAMS.h" |
193 |
|
|
#include "SIZE.h" |
194 |
|
|
|
195 |
heimbach |
1.2 |
C !INPUT/OUTPUT PARAMETERS: |
196 |
jmc |
1.9 |
C active_var_file: filename |
197 |
|
|
C active_var: array |
198 |
|
|
C iRec: record number |
199 |
|
|
C myOptimIter: number of optimization iteration (default: 0) |
200 |
|
|
C myThid: thread number for this instance |
201 |
|
|
C doglobalread: flag for global or local read/write |
202 |
|
|
C (default: .false.) |
203 |
|
|
C lAdInit: initialisation of corresponding adjoint |
204 |
|
|
C variable and write to active file |
205 |
|
|
CHARACTER*(*) active_var_file |
206 |
|
|
_RL active_var(1-OLx:sNx+OLx,nSx,nSy) |
207 |
|
|
INTEGER iRec |
208 |
|
|
INTEGER myOptimIter |
209 |
|
|
INTEGER myThid |
210 |
|
|
LOGICAL doglobalread |
211 |
|
|
LOGICAL lAdInit |
212 |
heimbach |
1.1 |
_RL dummy |
213 |
|
|
|
214 |
heimbach |
1.2 |
C !LOCAL VARIABLES: |
215 |
jmc |
1.9 |
INTEGER myNr |
216 |
|
|
LOGICAL useCurrentDir |
217 |
heimbach |
1.2 |
CEOP |
218 |
heimbach |
1.1 |
|
219 |
jmc |
1.9 |
myNr = Nr |
220 |
|
|
useCurrentDir = .FALSE. |
221 |
|
|
CALL ACTIVE_READ_XZ_RL( |
222 |
|
|
& active_var_file, active_var, doglobalread, |
223 |
|
|
& useCurrentDir, lAdInit, iRec, myNr, |
224 |
|
|
& FORWARD_SIMULATION, myOptimIter, myThid ) |
225 |
heimbach |
1.1 |
|
226 |
jmc |
1.9 |
RETURN |
227 |
|
|
END |
228 |
heimbach |
1.1 |
|
229 |
jmc |
1.9 |
C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----| |
230 |
heimbach |
1.2 |
CBOP |
231 |
|
|
C !ROUTINE: active_read_yz |
232 |
|
|
C !INTERFACE: |
233 |
|
|
subroutine active_read_yz( |
234 |
heimbach |
1.1 |
I active_var_file, |
235 |
|
|
O active_var, |
236 |
jmc |
1.9 |
I iRec, |
237 |
heimbach |
1.1 |
I doglobalread, |
238 |
|
|
I lAdInit, |
239 |
|
|
I myOptimIter, |
240 |
jmc |
1.9 |
I myThid |
241 |
heimbach |
1.1 |
I , dummy |
242 |
|
|
& ) |
243 |
|
|
|
244 |
heimbach |
1.2 |
C !DESCRIPTION: \bv |
245 |
jmc |
1.9 |
C ================================================================== |
246 |
|
|
C SUBROUTINE active_read_yz |
247 |
|
|
C ================================================================== |
248 |
|
|
C o Read an active 2D yz-slice from file. |
249 |
|
|
C started: heimbach@mit.edu 05-Mar-2001 |
250 |
|
|
C ================================================================== |
251 |
|
|
C SUBROUTINE active_read_yz |
252 |
|
|
C ================================================================== |
253 |
heimbach |
1.2 |
C \ev |
254 |
heimbach |
1.1 |
|
255 |
jmc |
1.9 |
IMPLICIT NONE |
256 |
heimbach |
1.1 |
|
257 |
jmc |
1.9 |
C == global variables == |
258 |
heimbach |
1.1 |
#include "EEPARAMS.h" |
259 |
|
|
#include "SIZE.h" |
260 |
|
|
|
261 |
heimbach |
1.2 |
C !INPUT/OUTPUT PARAMETERS: |
262 |
jmc |
1.9 |
C active_var_file: filename |
263 |
|
|
C active_var: array |
264 |
|
|
C iRec: record number |
265 |
|
|
C myOptimIter: number of optimization iteration (default: 0) |
266 |
|
|
C myThid: thread number for this instance |
267 |
|
|
C doglobalread: flag for global or local read/write |
268 |
|
|
C (default: .false.) |
269 |
|
|
C lAdInit: initialisation of corresponding adjoint |
270 |
|
|
C variable and write to active file |
271 |
|
|
CHARACTER*(*) active_var_file |
272 |
|
|
_RL active_var(1-OLy:sNy+OLy,nSx,nSy) |
273 |
|
|
INTEGER iRec |
274 |
|
|
INTEGER myOptimIter |
275 |
|
|
INTEGER myThid |
276 |
|
|
LOGICAL doglobalread |
277 |
|
|
LOGICAL lAdInit |
278 |
heimbach |
1.1 |
_RL dummy |
279 |
|
|
|
280 |
heimbach |
1.2 |
C !LOCAL VARIABLES: |
281 |
jmc |
1.9 |
INTEGER myNr |
282 |
|
|
LOGICAL useCurrentDir |
283 |
heimbach |
1.2 |
CEOP |
284 |
heimbach |
1.1 |
|
285 |
jmc |
1.9 |
myNr = Nr |
286 |
|
|
useCurrentDir = .FALSE. |
287 |
|
|
CALL ACTIVE_READ_YZ_RL( |
288 |
|
|
& active_var_file, active_var, doglobalread, |
289 |
|
|
& useCurrentDir, lAdInit, iRec, myNr, |
290 |
|
|
& FORWARD_SIMULATION, myOptimIter, myThid ) |
291 |
heimbach |
1.1 |
|
292 |
jmc |
1.9 |
RETURN |
293 |
|
|
END |
294 |
heimbach |
1.1 |
|
295 |
jmc |
1.9 |
C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----| |
296 |
heimbach |
1.2 |
CBOP |
297 |
|
|
C !ROUTINE: active_write_xy |
298 |
|
|
C !INTERFACE: |
299 |
heimbach |
1.1 |
subroutine active_write_xy( |
300 |
|
|
I active_var_file, |
301 |
|
|
I active_var, |
302 |
jmc |
1.9 |
I iRec, |
303 |
heimbach |
1.1 |
I myOptimIter, |
304 |
jmc |
1.9 |
I myThid |
305 |
heimbach |
1.1 |
I , dummy |
306 |
|
|
& ) |
307 |
|
|
|
308 |
heimbach |
1.2 |
C !DESCRIPTION: \bv |
309 |
jmc |
1.9 |
C ================================================================== |
310 |
|
|
C SUBROUTINE active_write_xy |
311 |
|
|
C ================================================================== |
312 |
|
|
C o Write an active 2D variable to a file. |
313 |
|
|
C started: Christian Eckert eckert@mit.edu 30-Jun-1999 |
314 |
|
|
C ================================================================== |
315 |
|
|
C SUBROUTINE active_write_xy |
316 |
|
|
C ================================================================== |
317 |
heimbach |
1.2 |
C \ev |
318 |
heimbach |
1.1 |
|
319 |
heimbach |
1.2 |
C !USES: |
320 |
jmc |
1.9 |
IMPLICIT NONE |
321 |
heimbach |
1.1 |
|
322 |
jmc |
1.9 |
C == global variables == |
323 |
heimbach |
1.1 |
#include "EEPARAMS.h" |
324 |
|
|
#include "SIZE.h" |
325 |
|
|
|
326 |
jmc |
1.9 |
C !INPUT/OUTPUT PARAMETERS: |
327 |
|
|
C active_var_file: filename |
328 |
|
|
C active_var: array |
329 |
|
|
C iRec: record number |
330 |
|
|
C myOptimIter: number of optimization iteration (default: 0) |
331 |
|
|
C myThid: thread number for this instance |
332 |
|
|
CHARACTER*(*) active_var_file |
333 |
|
|
_RL active_var(1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy) |
334 |
|
|
INTEGER iRec |
335 |
|
|
INTEGER myOptimIter |
336 |
|
|
INTEGER myThid |
337 |
heimbach |
1.1 |
_RL dummy |
338 |
|
|
|
339 |
heimbach |
1.2 |
C !LOCAL VARIABLES: |
340 |
jmc |
1.9 |
INTEGER myNr |
341 |
|
|
LOGICAL globalFile |
342 |
|
|
LOGICAL useCurrentDir |
343 |
heimbach |
1.2 |
CEOP |
344 |
heimbach |
1.1 |
|
345 |
jmc |
1.9 |
myNr = 1 |
346 |
|
|
globalFile = .FALSE. |
347 |
|
|
useCurrentDir = .FALSE. |
348 |
|
|
CALL ACTIVE_WRITE_3D_RL( |
349 |
|
|
& active_var_file, active_var, globalFile, |
350 |
|
|
& useCurrentDir, iRec, myNr, |
351 |
|
|
& FORWARD_SIMULATION, myOptimIter, myThid ) |
352 |
heimbach |
1.1 |
|
353 |
jmc |
1.9 |
RETURN |
354 |
|
|
END |
355 |
heimbach |
1.1 |
|
356 |
jmc |
1.9 |
C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----| |
357 |
heimbach |
1.2 |
CBOP |
358 |
|
|
C !ROUTINE: active_write_xyz |
359 |
|
|
C !INTERFACE: |
360 |
heimbach |
1.1 |
subroutine active_write_xyz( |
361 |
|
|
I active_var_file, |
362 |
|
|
I active_var, |
363 |
jmc |
1.9 |
I iRec, |
364 |
heimbach |
1.1 |
I myOptimIter, |
365 |
jmc |
1.9 |
I myThid |
366 |
heimbach |
1.1 |
I , dummy |
367 |
|
|
& ) |
368 |
|
|
|
369 |
heimbach |
1.2 |
C !DESCRIPTION: \bv |
370 |
jmc |
1.9 |
C ================================================================== |
371 |
|
|
C SUBROUTINE active_write_xyz |
372 |
|
|
C ================================================================== |
373 |
|
|
C o Write an active 3D variable to a file. |
374 |
|
|
C started: Christian Eckert eckert@mit.edu 30-Jun-1999 |
375 |
|
|
C ================================================================== |
376 |
|
|
C SUBROUTINE active_write_xyz |
377 |
|
|
C ================================================================== |
378 |
heimbach |
1.2 |
C \ev |
379 |
heimbach |
1.1 |
|
380 |
heimbach |
1.2 |
C !USES: |
381 |
jmc |
1.9 |
IMPLICIT NONE |
382 |
heimbach |
1.1 |
|
383 |
jmc |
1.9 |
C == global variables == |
384 |
heimbach |
1.1 |
#include "EEPARAMS.h" |
385 |
|
|
#include "SIZE.h" |
386 |
|
|
|
387 |
jmc |
1.9 |
C !INPUT/OUTPUT PARAMETERS: |
388 |
|
|
C active_var_file: filename |
389 |
|
|
C active_var: array |
390 |
|
|
C iRec: record number |
391 |
|
|
C myOptimIter: number of optimization iteration (default: 0) |
392 |
|
|
C myThid: thread number for this instance |
393 |
|
|
CHARACTER*(*) active_var_file |
394 |
|
|
_RL active_var(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy) |
395 |
|
|
INTEGER iRec |
396 |
|
|
INTEGER myOptimIter |
397 |
|
|
INTEGER myThid |
398 |
heimbach |
1.1 |
_RL dummy |
399 |
|
|
|
400 |
heimbach |
1.2 |
C !LOCAL VARIABLES: |
401 |
jmc |
1.9 |
INTEGER myNr |
402 |
|
|
LOGICAL globalFile |
403 |
|
|
LOGICAL useCurrentDir |
404 |
heimbach |
1.2 |
CEOP |
405 |
heimbach |
1.1 |
|
406 |
jmc |
1.9 |
myNr = Nr |
407 |
|
|
globalFile = .FALSE. |
408 |
|
|
useCurrentDir = .FALSE. |
409 |
|
|
CALL ACTIVE_WRITE_3D_RL( |
410 |
|
|
& active_var_file, active_var, globalFile, |
411 |
|
|
& useCurrentDir, iRec, myNr, |
412 |
|
|
& FORWARD_SIMULATION, myOptimIter, myThid ) |
413 |
heimbach |
1.1 |
|
414 |
jmc |
1.9 |
RETURN |
415 |
|
|
END |
416 |
heimbach |
1.1 |
|
417 |
jmc |
1.9 |
C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----| |
418 |
heimbach |
1.2 |
CBOP |
419 |
|
|
C !ROUTINE: active_write_xz |
420 |
|
|
C !INTERFACE: |
421 |
heimbach |
1.1 |
subroutine active_write_xz( |
422 |
|
|
I active_var_file, |
423 |
|
|
I active_var, |
424 |
jmc |
1.9 |
I iRec, |
425 |
heimbach |
1.1 |
I myOptimIter, |
426 |
jmc |
1.9 |
I myThid |
427 |
heimbach |
1.1 |
I , dummy |
428 |
|
|
& ) |
429 |
|
|
|
430 |
heimbach |
1.2 |
C !DESCRIPTION: \bv |
431 |
jmc |
1.9 |
C ================================================================== |
432 |
|
|
C SUBROUTINE active_write_xz |
433 |
|
|
C ================================================================== |
434 |
|
|
C o Write an active 2D xz-slice to a file. |
435 |
|
|
C started: heimbach@mit.edu 05-Mar-2001 |
436 |
|
|
C ================================================================== |
437 |
|
|
C SUBROUTINE active_write_xz |
438 |
|
|
C ================================================================== |
439 |
heimbach |
1.2 |
C \ev |
440 |
heimbach |
1.1 |
|
441 |
heimbach |
1.2 |
C !USES: |
442 |
jmc |
1.9 |
IMPLICIT NONE |
443 |
heimbach |
1.1 |
|
444 |
jmc |
1.9 |
C == global variables == |
445 |
heimbach |
1.1 |
#include "EEPARAMS.h" |
446 |
|
|
#include "SIZE.h" |
447 |
|
|
|
448 |
jmc |
1.9 |
C !INPUT/OUTPUT PARAMETERS: |
449 |
|
|
C active_var_file: filename |
450 |
|
|
C active_var: array |
451 |
|
|
C iRec: record number |
452 |
|
|
C myOptimIter: number of optimization iteration (default: 0) |
453 |
|
|
C myThid: thread number for this instance |
454 |
|
|
CHARACTER*(*) active_var_file |
455 |
|
|
_RL active_var(1-OLx:sNx+OLx,nSx,nSy) |
456 |
|
|
INTEGER iRec |
457 |
|
|
INTEGER myOptimIter |
458 |
|
|
INTEGER myThid |
459 |
heimbach |
1.1 |
_RL dummy |
460 |
|
|
|
461 |
heimbach |
1.2 |
C !LOCAL VARIABLES: |
462 |
jmc |
1.9 |
INTEGER myNr |
463 |
|
|
LOGICAL globalFile |
464 |
|
|
LOGICAL useCurrentDir |
465 |
heimbach |
1.2 |
CEOP |
466 |
heimbach |
1.1 |
|
467 |
jmc |
1.9 |
myNr = Nr |
468 |
|
|
globalFile = .FALSE. |
469 |
|
|
useCurrentDir = .FALSE. |
470 |
|
|
CALL ACTIVE_WRITE_XZ_RL( |
471 |
|
|
& active_var_file, active_var, globalFile, |
472 |
|
|
& useCurrentDir, iRec, myNr, |
473 |
|
|
& FORWARD_SIMULATION, myOptimIter, myThid ) |
474 |
heimbach |
1.1 |
|
475 |
jmc |
1.9 |
RETURN |
476 |
|
|
END |
477 |
heimbach |
1.1 |
|
478 |
jmc |
1.9 |
C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----| |
479 |
heimbach |
1.2 |
CBOP |
480 |
|
|
C !ROUTINE: active_write_yz |
481 |
|
|
C !INTERFACE: |
482 |
heimbach |
1.1 |
subroutine active_write_yz( |
483 |
|
|
I active_var_file, |
484 |
|
|
I active_var, |
485 |
jmc |
1.9 |
I iRec, |
486 |
heimbach |
1.1 |
I myOptimIter, |
487 |
jmc |
1.9 |
I myThid |
488 |
heimbach |
1.1 |
I , dummy |
489 |
|
|
& ) |
490 |
|
|
|
491 |
heimbach |
1.2 |
C !DESCRIPTION: \bv |
492 |
jmc |
1.9 |
C ================================================================== |
493 |
|
|
C SUBROUTINE active_write_yz |
494 |
|
|
C ================================================================== |
495 |
|
|
C o Write an active 2D variable to a file. |
496 |
|
|
C started: heimbach@mit.edu 05-Mar-2001 |
497 |
|
|
C ================================================================== |
498 |
|
|
C SUBROUTINE active_write_yz |
499 |
|
|
C ================================================================== |
500 |
heimbach |
1.2 |
C \ev |
501 |
heimbach |
1.1 |
|
502 |
heimbach |
1.2 |
C !USES: |
503 |
jmc |
1.9 |
IMPLICIT NONE |
504 |
heimbach |
1.1 |
|
505 |
jmc |
1.9 |
C == global variables == |
506 |
heimbach |
1.1 |
#include "EEPARAMS.h" |
507 |
|
|
#include "SIZE.h" |
508 |
|
|
|
509 |
jmc |
1.9 |
C !INPUT/OUTPUT PARAMETERS: |
510 |
|
|
C active_var_file: filename |
511 |
|
|
C active_var: array |
512 |
|
|
C iRec: record number |
513 |
|
|
C myOptimIter: number of optimization iteration (default: 0) |
514 |
|
|
C myThid: thread number for this instance |
515 |
|
|
CHARACTER*(*) active_var_file |
516 |
|
|
_RL active_var(1-OLy:sNy+OLy,nSx,nSy) |
517 |
|
|
INTEGER iRec |
518 |
|
|
INTEGER myOptimIter |
519 |
|
|
INTEGER myThid |
520 |
heimbach |
1.1 |
_RL dummy |
521 |
|
|
|
522 |
heimbach |
1.2 |
C !LOCAL VARIABLES: |
523 |
jmc |
1.9 |
INTEGER myNr |
524 |
|
|
LOGICAL globalFile |
525 |
|
|
LOGICAL useCurrentDir |
526 |
heimbach |
1.2 |
CEOP |
527 |
heimbach |
1.1 |
|
528 |
jmc |
1.9 |
myNr = Nr |
529 |
|
|
globalFile = .FALSE. |
530 |
|
|
useCurrentDir = .FALSE. |
531 |
|
|
CALL ACTIVE_WRITE_YZ_RL( |
532 |
|
|
& active_var_file, active_var, globalFile, |
533 |
|
|
& useCurrentDir, iRec, myNr, |
534 |
|
|
& FORWARD_SIMULATION, myOptimIter, myThid ) |
535 |
heimbach |
1.1 |
|
536 |
jmc |
1.9 |
RETURN |
537 |
|
|
END |