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

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

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

revision 1.1 by heimbach, Sun Mar 25 22:33:53 2001 UTC revision 1.2.6.2 by heimbach, Tue Jul 8 15:20:22 2003 UTC
# Line 27  c    o  active_write_tile_xyz  - Write a Line 27  c    o  active_write_tile_xyz  - Write a
27  c  c
28  c  c
29  c        changed: Christian Eckert eckert@mit.edu 24-Apr-2000  c        changed: Christian Eckert eckert@mit.edu 24-Apr-2000
 c  
30  c                 - Added routines that do active writes on tiles  c                 - Added routines that do active writes on tiles
31  c                   instead of a whole thread.  c                   instead of a whole thread.
32    c        changed: heimbach@mit.edu 05-Mar-2001
33    c                 - added active file handling of xz-/yz-arrays
34  c  c
35  c     ==================================================================  c     ==================================================================
36    
37    
38    CBOP
39    C     !ROUTINE: active_read_xy
40    C     !INTERFACE:
41        subroutine active_read_xy(        subroutine active_read_xy(
42       I                           active_var_file,       I                           active_var_file,
43       O                           active_var,       O                           active_var,
# Line 45  c     ================================== Line 49  c     ==================================
49       I                         , dummy       I                         , dummy
50       &                         )       &                         )
51    
52    C     !DESCRIPTION: \bv
53  c     ==================================================================  c     ==================================================================
54  c     SUBROUTINE active_read_xy  c     SUBROUTINE active_read_xy
55  c     ==================================================================  c     ==================================================================
56  c  c     o Read an active 2D (XY) variable from file.
 c     o Read an active 2D variable from file.  
 c  
57  c     started: Christian Eckert eckert@mit.edu 30-Jun-1999  c     started: Christian Eckert eckert@mit.edu 30-Jun-1999
 c  
 c     changed: Christian Eckert eckert@mit.edu 11-Feb-2000  
 c  
 c              - Restructured the code in order to create a package  
 c                for the MITgcmUV.  
 c  
 c     ==================================================================  
 c     SUBROUTINE active_read_xy  
58  c     ==================================================================  c     ==================================================================
59    C     \ev
60    
61    C     !USES:
62        implicit none        implicit none
63    
64  c     == global variables ==  c     == global variables ==
   
65  #include "EEPARAMS.h"  #include "EEPARAMS.h"
66  #include "SIZE.h"  #include "SIZE.h"
67    
68    C     !INPUT/OUTPUT PARAMETERS:
69  c     == routine arguments ==  c     == routine arguments ==
70    c     active_var_file: filename
71    c     active_var:      array
72    c     irec:            record number
73    c     myOptimIter:     number of optimization iteration (default: 0)
74    c     mythid:          thread number for this instance
75    c     doglobalread:    flag for global or local read/write
76    c                      (default: .false.)
77    c     lAdInit:         initialisation of corresponding adjoint
78    c                      variable and write to active file
79        character*(*) active_var_file        character*(*) active_var_file
80        _RL     active_var(1-olx:snx+olx,1-oly:sny+oly,nsx,nsy)        _RL     active_var(1-olx:snx+olx,1-oly:sny+oly,nsx,nsy)
81        integer irec        integer irec
# Line 80  c     == routine arguments == Line 85  c     == routine arguments ==
85        logical lAdInit        logical lAdInit
86        _RL     dummy        _RL     dummy
87    
88    C     !LOCAL VARIABLES:
89  c     == local variables ==  c     == local variables ==
   
90        integer mynr        integer mynr
91    
92  c     == end of interface ==  c     == end of interface ==
93    CEOP
94    
95        mynr = 1        mynr = 1
96        call active_read_rl( active_var_file, active_var, doglobalread,        call active_read_rl( active_var_file, active_var, doglobalread,
# Line 96  c     == end of interface == Line 102  c     == end of interface ==
102    
103  c     ==================================================================  c     ==================================================================
104    
105    CBOP
106    C     !ROUTINE: active_read_xyz
107    C     !INTERFACE:
108        subroutine active_read_xyz(        subroutine active_read_xyz(
109       I                            active_var_file,       I                            active_var_file,
110       O                            active_var,       O                            active_var,
# Line 107  c     ================================== Line 116  c     ==================================
116       I                         , dummy       I                         , dummy
117       &                           )       &                           )
118    
119    C     !DESCRIPTION: \bv
120  c     ==================================================================  c     ==================================================================
121  c     SUBROUTINE active_read_xyz  c     SUBROUTINE active_read_xyz
122  c     ==================================================================  c     ==================================================================
 c  
123  c     o Read an active 3D variable from file.  c     o Read an active 3D variable from file.
 c  
124  c     started: Christian Eckert eckert@mit.edu 30-Jun-1999  c     started: Christian Eckert eckert@mit.edu 30-Jun-1999
 c  
 c     changed: Christian Eckert eckert@mit.edu 11-Feb-2000  
 c  
 c              - Restructured the code in order to create a package  
 c                for the MITgcmUV.  
 c  
 c     ==================================================================  
 c     SUBROUTINE active_read_xyz  
125  c     ==================================================================  c     ==================================================================
126    C     \ev
127    
128    C     !USES:
129        implicit none        implicit none
130    
131  c     == global variables ==  c     == global variables ==
   
132  #include "EEPARAMS.h"  #include "EEPARAMS.h"
133  #include "SIZE.h"  #include "SIZE.h"
134    
135    C     !INPUT/OUTPUT PARAMETERS:
136  c     == routine arguments ==  c     == routine arguments ==
137    c     active_var_file: filename
138    c     active_var:      array
139    c     irec:            record number
140    c     myOptimIter:     number of optimization iteration (default: 0)
141    c     mythid:          thread number for this instance
142    c     doglobalread:    flag for global or local read/write
143    c                      (default: .false.)
144    c     lAdInit:         initialisation of corresponding adjoint
145    c                      variable and write to active file
146        character*(*) active_var_file        character*(*) active_var_file
147        _RL active_var(1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy)        _RL active_var(1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy)
148        integer irec        integer irec
# Line 142  c     == routine arguments == Line 152  c     == routine arguments ==
152        logical lAdInit        logical lAdInit
153        _RL     dummy        _RL     dummy
154    
155    C     !LOCAL VARIABLES:
156  c     == local variables ==  c     == local variables ==
   
157        integer mynr        integer mynr
158    
159  c     == end of interface ==  c     == end of interface ==
160    CEOP
161    
162        mynr = nr        mynr = nr
163        call active_read_rl( active_var_file, active_var, doglobalread,        call active_read_rl( active_var_file, active_var, doglobalread,
# Line 159  c     == end of interface == Line 170  c     == end of interface ==
170  c     ==================================================================  c     ==================================================================
171    
172    
173    CBOP
174    C     !ROUTINE: active_read_xz
175    C     !INTERFACE:
176        subroutine active_read_xz(        subroutine active_read_xz(
177       I                           active_var_file,       I                           active_var_file,
178       O                           active_var,       O                           active_var,
# Line 170  c     ================================== Line 184  c     ==================================
184       I                         , dummy       I                         , dummy
185       &                         )       &                         )
186    
187    C     !DESCRIPTION: \bv
188  c     ==================================================================  c     ==================================================================
189  c     SUBROUTINE active_read_xz  c     SUBROUTINE active_read_xz
190  c     ==================================================================  c     ==================================================================
 c  
191  c     o Read an active 2D xz-slice from file.  c     o Read an active 2D xz-slice from file.
 c  
192  c     started: heimbach@mit.edu 05-Mar-2001  c     started: heimbach@mit.edu 05-Mar-2001
 c  
 c     ==================================================================  
 c     SUBROUTINE active_read_xz  
193  c     ==================================================================  c     ==================================================================
194    C     \ev
195    
196    C     !USES:
197        implicit none        implicit none
198    
199  c     == global variables ==  c     == global variables ==
   
200  #include "EEPARAMS.h"  #include "EEPARAMS.h"
201  #include "SIZE.h"  #include "SIZE.h"
202    
203    C     !INPUT/OUTPUT PARAMETERS:
204  c     == routine arguments ==  c     == routine arguments ==
205    c     active_var_file: filename
206    c     active_var:      array
207    c     irec:            record number
208    c     myOptimIter:     number of optimization iteration (default: 0)
209    c     mythid:          thread number for this instance
210    c     doglobalread:    flag for global or local read/write
211    c                      (default: .false.)
212    c     lAdInit:         initialisation of corresponding adjoint
213    c                      variable and write to active file
214        character*(*) active_var_file        character*(*) active_var_file
215        _RL     active_var(1-olx:snx+olx,nsx,nsy)        _RL     active_var(1-olx:snx+olx,nsx,nsy)
216        integer irec        integer irec
# Line 200  c     == routine arguments == Line 220  c     == routine arguments ==
220        logical lAdInit        logical lAdInit
221        _RL     dummy        _RL     dummy
222    
223    C     !LOCAL VARIABLES:
224  c     == local variables ==  c     == local variables ==
   
225        integer mynr        integer mynr
226    
227  c     == end of interface ==  c     == end of interface ==
228    CEOP
229    
230        mynr = 1        mynr = nr
231        call active_read_xz_rl( active_var_file, active_var, doglobalread,        call active_read_xz_rl( active_var_file, active_var, doglobalread,
232       &                     lAdInit, irec, mynr,       &                     lAdInit, irec, mynr,
233       &                     FORWARD_SIMULATION, myOptimIter, mythid)       &                     FORWARD_SIMULATION, myOptimIter, mythid)
# Line 217  c     == end of interface == Line 238  c     == end of interface ==
238  c     ==================================================================  c     ==================================================================
239    
240    
241        subroutine active_read_yz(  CBOP
242    C     !ROUTINE: active_read_yz
243    C     !INTERFACE:
244           subroutine active_read_yz(
245       I                           active_var_file,       I                           active_var_file,
246       O                           active_var,       O                           active_var,
247       I                           irec,       I                           irec,
# Line 228  c     ================================== Line 252  c     ==================================
252       I                         , dummy       I                         , dummy
253       &                         )       &                         )
254    
255    C     !DESCRIPTION: \bv
256  c     ==================================================================  c     ==================================================================
257  c     SUBROUTINE active_read_yz  c     SUBROUTINE active_read_yz
258  c     ==================================================================  c     ==================================================================
 c  
259  c     o Read an active 2D yz-slice from file.  c     o Read an active 2D yz-slice from file.
 c  
260  c     started: heimbach@mit.edu 05-Mar-2001  c     started: heimbach@mit.edu 05-Mar-2001
 c  
 c     ==================================================================  
 c     SUBROUTINE active_read_yz  
261  c     ==================================================================  c     ==================================================================
262    C     \ev
263    
264    C     !USES:
265        implicit none        implicit none
266    
267  c     == global variables ==  c     == global variables ==
   
268  #include "EEPARAMS.h"  #include "EEPARAMS.h"
269  #include "SIZE.h"  #include "SIZE.h"
270    
271    C     !INPUT/OUTPUT PARAMETERS:
272  c     == routine arguments ==  c     == routine arguments ==
273    c     active_var_file: filename
274    c     active_var:      array
275    c     irec:            record number
276    c     myOptimIter:     number of optimization iteration (default: 0)
277    c     mythid:          thread number for this instance
278    c     doglobalread:    flag for global or local read/write
279    c                      (default: .false.)
280    c     lAdInit:         initialisation of corresponding adjoint
281    c                      variable and write to active file
282        character*(*) active_var_file        character*(*) active_var_file
283        _RL     active_var(1-oly:sny+oly,nsx,nsy)        _RL     active_var(1-oly:sny+oly,nsx,nsy)
284        integer irec        integer irec
# Line 258  c     == routine arguments == Line 288  c     == routine arguments ==
288        logical lAdInit        logical lAdInit
289        _RL     dummy        _RL     dummy
290    
291    C     !LOCAL VARIABLES:
292  c     == local variables ==  c     == local variables ==
   
293        integer mynr        integer mynr
294    
295  c     == end of interface ==  c     == end of interface ==
296    CEOP
297    
298        mynr = 1        mynr = nr
299        call active_read_yz_rl( active_var_file, active_var, doglobalread,        call active_read_yz_rl( active_var_file, active_var, doglobalread,
300       &                     lAdInit, irec, mynr,       &                     lAdInit, irec, mynr,
301       &                     FORWARD_SIMULATION, myOptimIter, mythid)       &                     FORWARD_SIMULATION, myOptimIter, mythid)
# Line 274  c     == end of interface == Line 305  c     == end of interface ==
305    
306  c     ==================================================================  c     ==================================================================
307    
308    CBOP
309    C     !ROUTINE: active_write_xy
310    C     !INTERFACE:
311        subroutine active_write_xy(        subroutine active_write_xy(
312       I                            active_var_file,       I                            active_var_file,
313       I                            active_var,       I                            active_var,
# Line 283  c     ================================== Line 317  c     ==================================
317       I                         , dummy       I                         , dummy
318       &                          )       &                          )
319    
320    C     !DESCRIPTION: \bv
321  c     ==================================================================  c     ==================================================================
322  c     SUBROUTINE active_write_xy  c     SUBROUTINE active_write_xy
323  c     ==================================================================  c     ==================================================================
 c  
324  c     o Write an active 2D variable to a file.  c     o Write an active 2D variable to a file.
 c  
325  c     started: Christian Eckert eckert@mit.edu 30-Jun-1999  c     started: Christian Eckert eckert@mit.edu 30-Jun-1999
 c  
 c     changed: Christian Eckert eckert@mit.edu 11-Feb-2000  
 c  
 c              - Restructured the code in order to create a package  
 c                for the MITgcmUV.  
 c  
 c     ==================================================================  
 c     SUBROUTINE active_write_xy  
326  c     ==================================================================  c     ==================================================================
327    C     \ev
328    
329    C     !USES:
330        implicit none        implicit none
331    
332  c     == global variables ==  c     == global variables ==
   
333  #include "EEPARAMS.h"  #include "EEPARAMS.h"
334  #include "SIZE.h"  #include "SIZE.h"
335    
336  c     == routine arguments ==  c     == routine arguments ==
337    c     active_var_file: filename
338    c     active_var:      array
339    c     irec:            record number
340    c     myOptimIter:     number of optimization iteration (default: 0)
341    c     mythid:          thread number for this instance
342        character*(*) active_var_file        character*(*) active_var_file
343        _RL     active_var(1-olx:snx+olx,1-oly:sny+oly,nsx,nsy)        _RL     active_var(1-olx:snx+olx,1-oly:sny+oly,nsx,nsy)
344        integer irec        integer irec
# Line 316  c     == routine arguments == Line 346  c     == routine arguments ==
346        integer mythid        integer mythid
347        _RL     dummy        _RL     dummy
348    
349    C     !LOCAL VARIABLES:
350  c     == local variables ==  c     == local variables ==
   
351        integer mynr        integer mynr
352        logical globalfile        logical globalfile
353    
354  c     == end of interface ==  c     == end of interface ==
355    CEOP
356    
357        mynr = 1        mynr = 1
358        globalfile = .false.        globalfile = .false.
# Line 335  c     == end of interface == Line 366  c     == end of interface ==
366    
367  c     ==================================================================  c     ==================================================================
368    
369    CBOP
370    C     !ROUTINE: active_write_xyz
371    C     !INTERFACE:
372        subroutine active_write_xyz(        subroutine active_write_xyz(
373       I                             active_var_file,       I                             active_var_file,
374       I                             active_var,       I                             active_var,
# Line 344  c     ================================== Line 378  c     ==================================
378       I                         , dummy       I                         , dummy
379       &                           )       &                           )
380    
381    C     !DESCRIPTION: \bv
382  c     ==================================================================  c     ==================================================================
383  c     SUBROUTINE active_write_xyz  c     SUBROUTINE active_write_xyz
384  c     ==================================================================  c     ==================================================================
 c  
385  c     o Write an active 3D variable to a file.  c     o Write an active 3D variable to a file.
 c  
386  c     started: Christian Eckert eckert@mit.edu 30-Jun-1999  c     started: Christian Eckert eckert@mit.edu 30-Jun-1999
 c  
 c     changed: Christian Eckert eckert@mit.edu 11-Feb-2000  
 c  
 c              - Restructured the code in order to create a package  
 c                for the MITgcmUV.  
 c  
 c     ==================================================================  
 c     SUBROUTINE active_write_xyz  
387  c     ==================================================================  c     ==================================================================
388    C     \ev
389    
390    C     !USES:
391        implicit none        implicit none
392    
393  c     == global variables ==  c     == global variables ==
   
394  #include "EEPARAMS.h"  #include "EEPARAMS.h"
395  #include "SIZE.h"  #include "SIZE.h"
396    
397  c     == routine arguments ==  c     == routine arguments ==
398    c     active_var_file: filename
399    c     active_var:      array
400    c     irec:            record number
401    c     myOptimIter:     number of optimization iteration (default: 0)
402    c     mythid:          thread number for this instance
403        character*(*) active_var_file        character*(*) active_var_file
404        _RL active_var(1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy)        _RL active_var(1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy)
405        integer irec        integer irec
# Line 377  c     == routine arguments == Line 407  c     == routine arguments ==
407        integer mythid        integer mythid
408        _RL     dummy        _RL     dummy
409    
410    C     !LOCAL VARIABLES:
411  c     == local variables ==  c     == local variables ==
   
412        integer mynr        integer mynr
413        logical globalfile        logical globalfile
414    
415  c     == end of interface ==  c     == end of interface ==
416    CEOP
417    
418        mynr = nr        mynr = nr
419        globalfile = .false.        globalfile = .false.
# Line 395  c     == end of interface == Line 426  c     == end of interface ==
426    
427  c     ==================================================================  c     ==================================================================
428    
429    CBOP
430    C     !ROUTINE: active_write_xz
431    C     !INTERFACE:
432        subroutine active_write_xz(        subroutine active_write_xz(
433       I                            active_var_file,       I                            active_var_file,
434       I                            active_var,       I                            active_var,
# Line 404  c     ================================== Line 438  c     ==================================
438       I                         , dummy       I                         , dummy
439       &                          )       &                          )
440    
441    C     !DESCRIPTION: \bv
442  c     ==================================================================  c     ==================================================================
443  c     SUBROUTINE active_write_xz  c     SUBROUTINE active_write_xz
444  c     ==================================================================  c     ==================================================================
 c  
445  c     o Write an active 2D xz-slice to a file.  c     o Write an active 2D xz-slice to a file.
 c  
446  c     started: heimbach@mit.edu 05-Mar-2001  c     started: heimbach@mit.edu 05-Mar-2001
 c  
 c     ==================================================================  
 c     SUBROUTINE active_write_xz  
447  c     ==================================================================  c     ==================================================================
448    C     \ev
449    
450    C     !USES:
451        implicit none        implicit none
452    
453  c     == global variables ==  c     == global variables ==
   
454  #include "EEPARAMS.h"  #include "EEPARAMS.h"
455  #include "SIZE.h"  #include "SIZE.h"
456    
457  c     == routine arguments ==  c     == routine arguments ==
458    c     active_var_file: filename
459    c     active_var:      array
460    c     irec:            record number
461    c     myOptimIter:     number of optimization iteration (default: 0)
462    c     mythid:          thread number for this instance
463        character*(*) active_var_file        character*(*) active_var_file
464        _RL     active_var(1-olx:snx+olx,nsx,nsy)        _RL     active_var(1-olx:snx+olx,nsx,nsy)
465        integer irec        integer irec
# Line 432  c     == routine arguments == Line 467  c     == routine arguments ==
467        integer mythid        integer mythid
468        _RL     dummy        _RL     dummy
469    
470    C     !LOCAL VARIABLES:
471  c     == local variables ==  c     == local variables ==
   
472        integer mynr        integer mynr
473        logical globalfile        logical globalfile
474    
475  c     == end of interface ==  c     == end of interface ==
476    CEOP
477    
478        mynr = 1        mynr = nr
479        globalfile = .false.        globalfile = .false.
480    
481        call active_write_xz_rl( active_var_file, active_var, globalfile,        call active_write_xz_rl( active_var_file, active_var, globalfile,
# Line 451  c     == end of interface == Line 487  c     == end of interface ==
487    
488  c     ==================================================================  c     ==================================================================
489    
490    CBOP
491    C     !ROUTINE: active_write_yz
492    C     !INTERFACE:
493        subroutine active_write_yz(        subroutine active_write_yz(
494       I                            active_var_file,       I                            active_var_file,
495       I                            active_var,       I                            active_var,
# Line 460  c     ================================== Line 499  c     ==================================
499       I                         , dummy       I                         , dummy
500       &                          )       &                          )
501    
502    C     !DESCRIPTION: \bv
503  c     ==================================================================  c     ==================================================================
504  c     SUBROUTINE active_write_yz  c     SUBROUTINE active_write_yz
505  c     ==================================================================  c     ==================================================================
 c  
506  c     o Write an active 2D variable to a file.  c     o Write an active 2D variable to a file.
 c  
507  c     started: heimbach@mit.edu 05-Mar-2001  c     started: heimbach@mit.edu 05-Mar-2001
 c  
 c     ==================================================================  
 c     SUBROUTINE active_write_yz  
508  c     ==================================================================  c     ==================================================================
509    C     \ev
510    
511    C     !USES:
512        implicit none        implicit none
513    
514  c     == global variables ==  c     == global variables ==
   
515  #include "EEPARAMS.h"  #include "EEPARAMS.h"
516  #include "SIZE.h"  #include "SIZE.h"
517    
518  c     == routine arguments ==  c     == routine arguments ==
519    c     active_var_file: filename
520    c     active_var:      array
521    c     irec:            record number
522    c     myOptimIter:     number of optimization iteration (default: 0)
523    c     mythid:          thread number for this instance
524        character*(*) active_var_file        character*(*) active_var_file
525        _RL     active_var(1-oly:sny+oly,nsx,nsy)        _RL     active_var(1-oly:sny+oly,nsx,nsy)
526        integer irec        integer irec
# Line 488  c     == routine arguments == Line 528  c     == routine arguments ==
528        integer mythid        integer mythid
529        _RL     dummy        _RL     dummy
530    
531    C     !LOCAL VARIABLES:
532  c     == local variables ==  c     == local variables ==
   
533        integer mynr        integer mynr
534        logical globalfile        logical globalfile
535    
536  c     == end of interface ==  c     == end of interface ==
537    CEOP
538    
539        mynr = 1        mynr = nr
540        globalfile = .false.        globalfile = .false.
541    
542        call active_write_yz_rl( active_var_file, active_var, globalfile,        call active_write_yz_rl( active_var_file, active_var, globalfile,
# Line 538  c              - Added routines that do Line 579  c              - Added routines that do
579  c                instead of a whole thread.  c                instead of a whole thread.
580  c  c
581  c     ==================================================================  c     ==================================================================
 c     SUBROUTINE active_read_tile_xy  
 c     ==================================================================  
582    
583        implicit none        implicit none
584    
# Line 616  c              - Added routines that do Line 655  c              - Added routines that do
655  c                instead of a whole thread.  c                instead of a whole thread.
656  c  c
657  c     ==================================================================  c     ==================================================================
 c     SUBROUTINE active_read_tile_xyz  
 c     ==================================================================  
658    
659        implicit none        implicit none
660    
# Line 693  c              - Added routines that do Line 730  c              - Added routines that do
730  c                instead of a whole thread.  c                instead of a whole thread.
731  c  c
732  c     ==================================================================  c     ==================================================================
 c     SUBROUTINE active_write_tile_xy  
 c     ==================================================================  
733    
734        implicit none        implicit none
735    
# Line 769  c              - Added routines that do Line 804  c              - Added routines that do
804  c                instead of a whole thread.  c                instead of a whole thread.
805  c  c
806  c     ==================================================================  c     ==================================================================
 c     SUBROUTINE active_write_tile_xyz  
 c     ==================================================================  
807    
808        implicit none        implicit none
809    

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2.6.2

  ViewVC Help
Powered by ViewVC 1.1.22