/[MITgcm]/MITgcm/pkg/autodiff/active_file.F
ViewVC logotype

Contents of /MITgcm/pkg/autodiff/active_file.F

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


Revision 1.9 - (show annotations) (download)
Thu Aug 2 22:10:31 2012 UTC (12 years, 11 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint65z, checkpoint65x, checkpoint65y, checkpoint65r, checkpoint65s, checkpoint65p, checkpoint65q, checkpoint65v, checkpoint65w, checkpoint65t, checkpoint65u, checkpoint65j, checkpoint65k, checkpoint65h, checkpoint65i, checkpoint65n, checkpoint65l, checkpoint65m, checkpoint65b, checkpoint65c, checkpoint65a, checkpoint65f, checkpoint65g, checkpoint65d, checkpoint65e, checkpoint64, checkpoint65, checkpoint66g, checkpoint66f, checkpoint66e, checkpoint66d, checkpoint66c, checkpoint66b, checkpoint66a, checkpoint66o, checkpoint66n, checkpoint66m, checkpoint66l, checkpoint66k, checkpoint66j, checkpoint66i, checkpoint66h, checkpoint63r, checkpoint63s, checkpoint65o, checkpoint64y, checkpoint64x, checkpoint64z, checkpoint64q, checkpoint64p, checkpoint64s, checkpoint64r, checkpoint64u, checkpoint64t, checkpoint64w, checkpoint64v, checkpoint64i, checkpoint64h, checkpoint64k, checkpoint64j, checkpoint64m, checkpoint64l, checkpoint64o, checkpoint64n, checkpoint64a, checkpoint64c, checkpoint64b, checkpoint64e, checkpoint64d, checkpoint64g, checkpoint64f, HEAD
Changes since 1.8: +322 -343 lines
Error occurred while calculating annotation data.
update the calls after changing argument & name of high level (control)
 active I/O subroutine ACTIVE_READ/WRITE_3D/XZ/YZ_RL

1 C $Header: /u/gcmpack/MITgcm/pkg/autodiff/active_file.F,v 1.8 2011/11/05 19:20:42 heimbach Exp $
2 C $Name: $
3
4 #include "AUTODIFF_OPTIONS.h"
5
6 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
28 C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
29 CBOP
30 C !ROUTINE: active_read_xy
31 C !INTERFACE:
32 subroutine active_read_xy(
33 I active_var_file,
34 O active_var,
35 I iRec,
36 I doglobalread,
37 I lAdInit,
38 I myOptimIter,
39 I myThid
40 I , dummy
41 & )
42
43 C !DESCRIPTION: \bv
44 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 C \ev
53
54 C !USES:
55 IMPLICIT NONE
56
57 C == global variables ==
58 #include "EEPARAMS.h"
59 #include "SIZE.h"
60
61 C !INPUT/OUTPUT PARAMETERS:
62 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 _RL dummy
79
80 C !LOCAL VARIABLES:
81 INTEGER myNr
82 LOGICAL useCurrentDir
83 CEOP
84
85 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
92 RETURN
93 END
94
95 C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
96 CBOP
97 C !ROUTINE: active_read_xyz
98 C !INTERFACE:
99 subroutine active_read_xyz(
100 I active_var_file,
101 O active_var,
102 I iRec,
103 I doglobalread,
104 I lAdInit,
105 I myOptimIter,
106 I myThid
107 I , dummy
108 & )
109
110 C !DESCRIPTION: \bv
111 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 C \ev
120
121 C !USES:
122 IMPLICIT NONE
123
124 C == global variables ==
125 #include "EEPARAMS.h"
126 #include "SIZE.h"
127
128 C !INPUT/OUTPUT PARAMETERS:
129 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 _RL dummy
146
147 C !LOCAL VARIABLES:
148 INTEGER myNr
149 LOGICAL useCurrentDir
150 CEOP
151
152 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
159 RETURN
160 END
161
162 C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
163 CBOP
164 C !ROUTINE: active_read_xz
165 C !INTERFACE:
166 subroutine active_read_xz(
167 I active_var_file,
168 O active_var,
169 I iRec,
170 I doglobalread,
171 I lAdInit,
172 I myOptimIter,
173 I myThid
174 I , dummy
175 & )
176
177 C !DESCRIPTION: \bv
178 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 C \ev
187
188 C !USES:
189 IMPLICIT NONE
190
191 C == global variables ==
192 #include "EEPARAMS.h"
193 #include "SIZE.h"
194
195 C !INPUT/OUTPUT PARAMETERS:
196 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 _RL dummy
213
214 C !LOCAL VARIABLES:
215 INTEGER myNr
216 LOGICAL useCurrentDir
217 CEOP
218
219 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
226 RETURN
227 END
228
229 C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
230 CBOP
231 C !ROUTINE: active_read_yz
232 C !INTERFACE:
233 subroutine active_read_yz(
234 I active_var_file,
235 O active_var,
236 I iRec,
237 I doglobalread,
238 I lAdInit,
239 I myOptimIter,
240 I myThid
241 I , dummy
242 & )
243
244 C !DESCRIPTION: \bv
245 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 C \ev
254
255 IMPLICIT NONE
256
257 C == global variables ==
258 #include "EEPARAMS.h"
259 #include "SIZE.h"
260
261 C !INPUT/OUTPUT PARAMETERS:
262 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 _RL dummy
279
280 C !LOCAL VARIABLES:
281 INTEGER myNr
282 LOGICAL useCurrentDir
283 CEOP
284
285 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
292 RETURN
293 END
294
295 C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
296 CBOP
297 C !ROUTINE: active_write_xy
298 C !INTERFACE:
299 subroutine active_write_xy(
300 I active_var_file,
301 I active_var,
302 I iRec,
303 I myOptimIter,
304 I myThid
305 I , dummy
306 & )
307
308 C !DESCRIPTION: \bv
309 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 C \ev
318
319 C !USES:
320 IMPLICIT NONE
321
322 C == global variables ==
323 #include "EEPARAMS.h"
324 #include "SIZE.h"
325
326 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 _RL dummy
338
339 C !LOCAL VARIABLES:
340 INTEGER myNr
341 LOGICAL globalFile
342 LOGICAL useCurrentDir
343 CEOP
344
345 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
353 RETURN
354 END
355
356 C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
357 CBOP
358 C !ROUTINE: active_write_xyz
359 C !INTERFACE:
360 subroutine active_write_xyz(
361 I active_var_file,
362 I active_var,
363 I iRec,
364 I myOptimIter,
365 I myThid
366 I , dummy
367 & )
368
369 C !DESCRIPTION: \bv
370 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 C \ev
379
380 C !USES:
381 IMPLICIT NONE
382
383 C == global variables ==
384 #include "EEPARAMS.h"
385 #include "SIZE.h"
386
387 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 _RL dummy
399
400 C !LOCAL VARIABLES:
401 INTEGER myNr
402 LOGICAL globalFile
403 LOGICAL useCurrentDir
404 CEOP
405
406 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
414 RETURN
415 END
416
417 C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
418 CBOP
419 C !ROUTINE: active_write_xz
420 C !INTERFACE:
421 subroutine active_write_xz(
422 I active_var_file,
423 I active_var,
424 I iRec,
425 I myOptimIter,
426 I myThid
427 I , dummy
428 & )
429
430 C !DESCRIPTION: \bv
431 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 C \ev
440
441 C !USES:
442 IMPLICIT NONE
443
444 C == global variables ==
445 #include "EEPARAMS.h"
446 #include "SIZE.h"
447
448 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 _RL dummy
460
461 C !LOCAL VARIABLES:
462 INTEGER myNr
463 LOGICAL globalFile
464 LOGICAL useCurrentDir
465 CEOP
466
467 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
475 RETURN
476 END
477
478 C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
479 CBOP
480 C !ROUTINE: active_write_yz
481 C !INTERFACE:
482 subroutine active_write_yz(
483 I active_var_file,
484 I active_var,
485 I iRec,
486 I myOptimIter,
487 I myThid
488 I , dummy
489 & )
490
491 C !DESCRIPTION: \bv
492 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 C \ev
501
502 C !USES:
503 IMPLICIT NONE
504
505 C == global variables ==
506 #include "EEPARAMS.h"
507 #include "SIZE.h"
508
509 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 _RL dummy
521
522 C !LOCAL VARIABLES:
523 INTEGER myNr
524 LOGICAL globalFile
525 LOGICAL useCurrentDir
526 CEOP
527
528 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
536 RETURN
537 END

  ViewVC Help
Powered by ViewVC 1.1.22