/[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.9 by jmc, Thu Aug 2 22:10:31 2012 UTC
# Line 1  Line 1 
1    C $Header$
2    C $Name$
3    
4  #include "CPP_OPTIONS.h"  #include "AUTODIFF_OPTIONS.h"
   
 c     ==================================================================  
 c  
 c     active_file.F: Routines to handle the I/O of the active file for  
 c                    the adjoint calculations. All files are direct  
 c                    access files.  
 c  
 c     Routines  
 c  
 c    o  active_read_xy         - Read  an active 2D variable from file.  
 c    o  active_read_xyz        - Read  an active 3D variable from file.  
 c    o  active_read_xz         - Read  an active 2D xz-slice from file.  
 c    o  active_read_yz         - Read  an active 2D yz-slice from file.  
 c  
 c    o  active_write_xy        - Write an active 2D variable to a file.  
 c    o  active_write_xyz       - Write an active 3D variable to a file.  
 c    o  active_write_xz        - Write an active 2D xz-slice to a file.  
 c    o  active_write_yz        - Write an active 2D yz-slice to a file.  
 c  
 c    o  active_read_tile_xy    - Read  an active 2D variable from file.  
 c    o  active_read_tile_xyz   - Read  an active 3D variable from file.  
 c  
 c    o  active_write_tile_xy   - Write an active 2D variable to a file.  
 c    o  active_write_tile_xyz  - Write an active 3D variable to a file.  
 c  
 c  
 c        changed: Christian Eckert eckert@mit.edu 24-Apr-2000  
 c  
 c                 - Added routines that do active writes on tiles  
 c                   instead of a whole thread.  
 c  
 c     ==================================================================  
   
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(        subroutine active_read_xy(
33       I                           active_var_file,       I                           active_var_file,
34       O                           active_var,       O                           active_var,
35       I                           irec,       I                           iRec,
36       I                           doglobalread,       I                           doglobalread,
37       I                           lAdInit,       I                           lAdInit,
38       I                           myOptimIter,       I                           myOptimIter,
39       I                           mythid       I                           myThid
40       I                         , dummy       I                         , dummy
41       &                         )       &                         )
42    
43  c     ==================================================================  C     !DESCRIPTION: \bv
44  c     SUBROUTINE active_read_xy  C     ==================================================================
45  c     ==================================================================  C     SUBROUTINE active_read_xy
46  c  C     ==================================================================
47  c     o Read an active 2D variable from file.  C     o Read an active 2D (XY) variable from file.
48  c  C     started: Christian Eckert eckert@mit.edu 30-Jun-1999
49  c     started: Christian Eckert eckert@mit.edu 30-Jun-1999  C     ==================================================================
50  c  C     SUBROUTINE active_read_xy
51  c     changed: Christian Eckert eckert@mit.edu 11-Feb-2000  C     ==================================================================
52  c  C     \ev
53  c              - Restructured the code in order to create a package  
54  c                for the MITgcmUV.  C     !USES:
55  c        IMPLICIT NONE
56  c     ==================================================================  
57  c     SUBROUTINE active_read_xy  C     == global variables ==
 c     ==================================================================  
   
       implicit none  
   
 c     == global variables ==  
   
58  #include "EEPARAMS.h"  #include "EEPARAMS.h"
59  #include "SIZE.h"  #include "SIZE.h"
60    
61  c     == routine arguments ==  C     !INPUT/OUTPUT PARAMETERS:
62    C     active_var_file: filename
63        character*(*) active_var_file  C     active_var:      array
64        _RL     active_var(1-olx:snx+olx,1-oly:sny+oly,nsx,nsy)  C     iRec:            record number
65        integer irec  C     myOptimIter:     number of optimization iteration (default: 0)
66        integer myOptimIter  C     myThid:          thread number for this instance
67        integer mythid  C     doglobalread:    flag for global or local read/write
68        logical doglobalread  C                      (default: .false.)
69        logical lAdInit  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        _RL     dummy
79    
80  c     == local variables ==  C     !LOCAL VARIABLES:
81          INTEGER myNr
82        integer mynr        LOGICAL useCurrentDir
83    CEOP
84  c     == end of interface ==  
85          myNr = 1
86        mynr = 1        useCurrentDir = .FALSE.
87        call active_read_rl( active_var_file, active_var, doglobalread,        CALL ACTIVE_READ_3D_RL(
88       &                     lAdInit, irec, mynr,       &                 active_var_file, active_var, doglobalread,
89       &                     FORWARD_SIMULATION, myOptimIter, mythid)       &                 useCurrentDir, lAdInit, iRec, myNr,
90         &                 FORWARD_SIMULATION, myOptimIter, myThid )
91        return  
92        end        RETURN
93          END
94  c     ==================================================================  
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(        subroutine active_read_xyz(
100       I                            active_var_file,       I                            active_var_file,
101       O                            active_var,       O                            active_var,
102       I                            irec,       I                            iRec,
103       I                            doglobalread,       I                            doglobalread,
104       I                            lAdInit,       I                            lAdInit,
105       I                            myOptimIter,       I                            myOptimIter,
106       I                            mythid       I                            myThid
107       I                         , dummy       I                         , dummy
108       &                           )       &                           )
109    
110  c     ==================================================================  C     !DESCRIPTION: \bv
111  c     SUBROUTINE active_read_xyz  C     ==================================================================
112  c     ==================================================================  C     SUBROUTINE active_read_xyz
113  c  C     ==================================================================
114  c     o Read an active 3D variable from file.  C     o Read an active 3D variable from file.
115  c  C     started: Christian Eckert eckert@mit.edu 30-Jun-1999
116  c     started: Christian Eckert eckert@mit.edu 30-Jun-1999  C     ==================================================================
117  c  C     SUBROUTINE active_read_xyz
118  c     changed: Christian Eckert eckert@mit.edu 11-Feb-2000  C     ==================================================================
119  c  C     \ev
120  c              - Restructured the code in order to create a package  
121  c                for the MITgcmUV.  C     !USES:
122  c        IMPLICIT NONE
123  c     ==================================================================  
124  c     SUBROUTINE active_read_xyz  C     == global variables ==
 c     ==================================================================  
   
       implicit none  
   
 c     == global variables ==  
   
125  #include "EEPARAMS.h"  #include "EEPARAMS.h"
126  #include "SIZE.h"  #include "SIZE.h"
127    
128  c     == routine arguments ==  C     !INPUT/OUTPUT PARAMETERS:
129    C     active_var_file: filename
130        character*(*) active_var_file  C     active_var:      array
131        _RL active_var(1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy)  C     iRec:            record number
132        integer irec  C     myOptimIter:     number of optimization iteration (default: 0)
133        integer myOptimIter  C     myThid:          thread number for this instance
134        integer mythid  C     doglobalread:    flag for global or local read/write
135        logical doglobalread  C                      (default: .false.)
136        logical lAdInit  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        _RL     dummy
146    
147  c     == local variables ==  C     !LOCAL VARIABLES:
148          INTEGER myNr
149        integer mynr        LOGICAL useCurrentDir
150    CEOP
151  c     == end of interface ==  
152          myNr = Nr
153        mynr = nr        useCurrentDir = .FALSE.
154        call active_read_rl( active_var_file, active_var, doglobalread,        CALL ACTIVE_READ_3D_RL(
155       &                     lAdInit, irec, mynr,       &                 active_var_file, active_var, doglobalread,
156       &                     FORWARD_SIMULATION, myOptimIter, mythid)       &                 useCurrentDir, lAdInit, iRec, myNr,
157         &                 FORWARD_SIMULATION, myOptimIter, myThid )
158        return  
159        end        RETURN
160          END
161  c     ==================================================================  
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(        subroutine active_read_xz(
167       I                           active_var_file,       I                           active_var_file,
168       O                           active_var,       O                           active_var,
169       I                           irec,       I                           iRec,
170       I                           doglobalread,       I                           doglobalread,
171       I                           lAdInit,       I                           lAdInit,
172       I                           myOptimIter,       I                           myOptimIter,
173       I                           mythid       I                           myThid
174       I                         , dummy       I                         , dummy
175       &                         )       &                         )
176    
177  c     ==================================================================  C     !DESCRIPTION: \bv
178  c     SUBROUTINE active_read_xz  C     ==================================================================
179  c     ==================================================================  C     SUBROUTINE active_read_xz
180  c  C     ==================================================================
181  c     o Read an active 2D xz-slice from file.  C     o Read an active 2D xz-slice from file.
182  c  C     started: heimbach@mit.edu 05-Mar-2001
183  c     started: heimbach@mit.edu 05-Mar-2001  C     ==================================================================
184  c  C     SUBROUTINE active_read_xz
185  c     ==================================================================  C     ==================================================================
186  c     SUBROUTINE active_read_xz  C     \ev
187  c     ==================================================================  
188    C     !USES:
189        implicit none        IMPLICIT NONE
190    
191  c     == global variables ==  C     == global variables ==
   
192  #include "EEPARAMS.h"  #include "EEPARAMS.h"
193  #include "SIZE.h"  #include "SIZE.h"
194    
195  c     == routine arguments ==  C     !INPUT/OUTPUT PARAMETERS:
196    C     active_var_file: filename
197        character*(*) active_var_file  C     active_var:      array
198        _RL     active_var(1-olx:snx+olx,nsx,nsy)  C     iRec:            record number
199        integer irec  C     myOptimIter:     number of optimization iteration (default: 0)
200        integer myOptimIter  C     myThid:          thread number for this instance
201        integer mythid  C     doglobalread:    flag for global or local read/write
202        logical doglobalread  C                      (default: .false.)
203        logical lAdInit  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        _RL     dummy
213    
214  c     == local variables ==  C     !LOCAL VARIABLES:
215          INTEGER myNr
216        integer mynr        LOGICAL useCurrentDir
217    CEOP
218  c     == end of interface ==  
219          myNr = Nr
220        mynr = 1        useCurrentDir = .FALSE.
221        call active_read_xz_rl( active_var_file, active_var, doglobalread,        CALL ACTIVE_READ_XZ_RL(
222       &                     lAdInit, irec, mynr,       &                 active_var_file, active_var, doglobalread,
223       &                     FORWARD_SIMULATION, myOptimIter, mythid)       &                 useCurrentDir, lAdInit, iRec, myNr,
224         &                 FORWARD_SIMULATION, myOptimIter, myThid )
225        return  
226        end        RETURN
227          END
228  c     ==================================================================  
229    C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
230    CBOP
231        subroutine active_read_yz(  C     !ROUTINE: active_read_yz
232    C     !INTERFACE:
233           subroutine active_read_yz(
234       I                           active_var_file,       I                           active_var_file,
235       O                           active_var,       O                           active_var,
236       I                           irec,       I                           iRec,
237       I                           doglobalread,       I                           doglobalread,
238       I                           lAdInit,       I                           lAdInit,
239       I                           myOptimIter,       I                           myOptimIter,
240       I                           mythid       I                           myThid
241       I                         , dummy       I                         , dummy
242       &                         )       &                         )
243    
244  c     ==================================================================  C     !DESCRIPTION: \bv
245  c     SUBROUTINE active_read_yz  C     ==================================================================
246  c     ==================================================================  C     SUBROUTINE active_read_yz
247  c  C     ==================================================================
248  c     o Read an active 2D yz-slice from file.  C     o Read an active 2D yz-slice from file.
249  c  C     started: heimbach@mit.edu 05-Mar-2001
250  c     started: heimbach@mit.edu 05-Mar-2001  C     ==================================================================
251  c  C     SUBROUTINE active_read_yz
252  c     ==================================================================  C     ==================================================================
253  c     SUBROUTINE active_read_yz  C     \ev
254  c     ==================================================================  
255          IMPLICIT NONE
256        implicit none  
257    C     == global variables ==
 c     == global variables ==  
   
258  #include "EEPARAMS.h"  #include "EEPARAMS.h"
259  #include "SIZE.h"  #include "SIZE.h"
260    
261  c     == routine arguments ==  C     !INPUT/OUTPUT PARAMETERS:
262    C     active_var_file: filename
263        character*(*) active_var_file  C     active_var:      array
264        _RL     active_var(1-oly:sny+oly,nsx,nsy)  C     iRec:            record number
265        integer irec  C     myOptimIter:     number of optimization iteration (default: 0)
266        integer myOptimIter  C     myThid:          thread number for this instance
267        integer mythid  C     doglobalread:    flag for global or local read/write
268        logical doglobalread  C                      (default: .false.)
269        logical lAdInit  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        _RL     dummy
279    
280  c     == local variables ==  C     !LOCAL VARIABLES:
281          INTEGER myNr
282        integer mynr        LOGICAL useCurrentDir
283    CEOP
284  c     == end of interface ==  
285          myNr = Nr
286        mynr = 1        useCurrentDir = .FALSE.
287        call active_read_yz_rl( active_var_file, active_var, doglobalread,        CALL ACTIVE_READ_YZ_RL(
288       &                     lAdInit, irec, mynr,       &                 active_var_file, active_var, doglobalread,
289       &                     FORWARD_SIMULATION, myOptimIter, mythid)       &                 useCurrentDir, lAdInit, iRec, myNr,
290         &                 FORWARD_SIMULATION, myOptimIter, myThid )
291        return  
292        end        RETURN
293          END
294  c     ==================================================================  
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(        subroutine active_write_xy(
300       I                            active_var_file,       I                            active_var_file,
301       I                            active_var,       I                            active_var,
302       I                            irec,       I                            iRec,
303       I                            myOptimIter,       I                            myOptimIter,
304       I                            mythid       I                            myThid
305       I                         , dummy       I                         , dummy
306       &                          )       &                          )
307    
308  c     ==================================================================  C     !DESCRIPTION: \bv
309  c     SUBROUTINE active_write_xy  C     ==================================================================
310  c     ==================================================================  C     SUBROUTINE active_write_xy
311  c  C     ==================================================================
312  c     o Write an active 2D variable to a file.  C     o Write an active 2D variable to a file.
313  c  C     started: Christian Eckert eckert@mit.edu 30-Jun-1999
314  c     started: Christian Eckert eckert@mit.edu 30-Jun-1999  C     ==================================================================
315  c  C     SUBROUTINE active_write_xy
316  c     changed: Christian Eckert eckert@mit.edu 11-Feb-2000  C     ==================================================================
317  c  C     \ev
318  c              - Restructured the code in order to create a package  
319  c                for the MITgcmUV.  C     !USES:
320  c        IMPLICIT NONE
321  c     ==================================================================  
322  c     SUBROUTINE active_write_xy  C     == global variables ==
 c     ==================================================================  
   
       implicit none  
   
 c     == global variables ==  
   
323  #include "EEPARAMS.h"  #include "EEPARAMS.h"
324  #include "SIZE.h"  #include "SIZE.h"
325    
326  c     == routine arguments ==  C     !INPUT/OUTPUT PARAMETERS:
327    C     active_var_file: filename
328        character*(*) active_var_file  C     active_var:      array
329        _RL     active_var(1-olx:snx+olx,1-oly:sny+oly,nsx,nsy)  C     iRec:            record number
330        integer irec  C     myOptimIter:     number of optimization iteration (default: 0)
331        integer myOptimIter  C     myThid:          thread number for this instance
332        integer mythid        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        _RL     dummy
338    
339  c     == local variables ==  C     !LOCAL VARIABLES:
340          INTEGER myNr
341        integer mynr        LOGICAL globalFile
342        logical globalfile        LOGICAL useCurrentDir
343    CEOP
344  c     == end of interface ==  
345          myNr = 1
346        mynr = 1        globalFile = .FALSE.
347        globalfile = .false.        useCurrentDir = .FALSE.
348          CALL ACTIVE_WRITE_3D_RL(
349        call active_write_rl( active_var_file, active_var, globalfile,       &                 active_var_file, active_var, globalFile,
350       &                      irec, mynr,       &                 useCurrentDir, iRec, myNr,
351       &                      FORWARD_SIMULATION, myOptimIter, mythid )       &                 FORWARD_SIMULATION, myOptimIter, myThid )
352    
353        return        RETURN
354        end        END
355    
356  c     ==================================================================  C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
357    CBOP
358    C     !ROUTINE: active_write_xyz
359    C     !INTERFACE:
360        subroutine active_write_xyz(        subroutine active_write_xyz(
361       I                             active_var_file,       I                             active_var_file,
362       I                             active_var,       I                             active_var,
363       I                             irec,       I                             iRec,
364       I                             myOptimIter,       I                             myOptimIter,
365       I                             mythid       I                             myThid
366       I                         , dummy       I                         , dummy
367       &                           )       &                           )
368    
369  c     ==================================================================  C     !DESCRIPTION: \bv
370  c     SUBROUTINE active_write_xyz  C     ==================================================================
371  c     ==================================================================  C     SUBROUTINE active_write_xyz
372  c  C     ==================================================================
373  c     o Write an active 3D variable to a file.  C     o Write an active 3D variable to a file.
374  c  C     started: Christian Eckert eckert@mit.edu 30-Jun-1999
375  c     started: Christian Eckert eckert@mit.edu 30-Jun-1999  C     ==================================================================
376  c  C     SUBROUTINE active_write_xyz
377  c     changed: Christian Eckert eckert@mit.edu 11-Feb-2000  C     ==================================================================
378  c  C     \ev
379  c              - Restructured the code in order to create a package  
380  c                for the MITgcmUV.  C     !USES:
381  c        IMPLICIT NONE
382  c     ==================================================================  
383  c     SUBROUTINE active_write_xyz  C     == global variables ==
 c     ==================================================================  
   
       implicit none  
   
 c     == global variables ==  
   
384  #include "EEPARAMS.h"  #include "EEPARAMS.h"
385  #include "SIZE.h"  #include "SIZE.h"
386    
387  c     == routine arguments ==  C     !INPUT/OUTPUT PARAMETERS:
388    C     active_var_file: filename
389        character*(*) active_var_file  C     active_var:      array
390        _RL active_var(1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy)  C     iRec:            record number
391        integer irec  C     myOptimIter:     number of optimization iteration (default: 0)
392        integer myOptimIter  C     myThid:          thread number for this instance
393        integer mythid        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        _RL     dummy
399    
400  c     == local variables ==  C     !LOCAL VARIABLES:
401          INTEGER myNr
402        integer mynr        LOGICAL globalFile
403        logical globalfile        LOGICAL useCurrentDir
404    CEOP
405  c     == end of interface ==  
406          myNr = Nr
407        mynr = nr        globalFile = .FALSE.
408        globalfile = .false.        useCurrentDir = .FALSE.
409        call active_write_rl(active_var_file, active_var, globalfile,        CALL ACTIVE_WRITE_3D_RL(
410       &                     irec, mynr,       &                 active_var_file, active_var, globalFile,
411       &                     FORWARD_SIMULATION, myOptimIter, mythid)       &                 useCurrentDir, iRec, myNr,
412         &                 FORWARD_SIMULATION, myOptimIter, myThid )
413        return  
414        end        RETURN
415          END
416  c     ==================================================================  
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(        subroutine active_write_xz(
422       I                            active_var_file,       I                            active_var_file,
423       I                            active_var,       I                            active_var,
424       I                            irec,       I                            iRec,
425       I                            myOptimIter,       I                            myOptimIter,
426       I                            mythid       I                            myThid
427       I                         , dummy       I                         , dummy
428       &                          )       &                          )
429    
430  c     ==================================================================  C     !DESCRIPTION: \bv
431  c     SUBROUTINE active_write_xz  C     ==================================================================
432  c     ==================================================================  C     SUBROUTINE active_write_xz
433  c  C     ==================================================================
434  c     o Write an active 2D xz-slice to a file.  C     o Write an active 2D xz-slice to a file.
435  c  C     started: heimbach@mit.edu 05-Mar-2001
436  c     started: heimbach@mit.edu 05-Mar-2001  C     ==================================================================
437  c  C     SUBROUTINE active_write_xz
438  c     ==================================================================  C     ==================================================================
439  c     SUBROUTINE active_write_xz  C     \ev
440  c     ==================================================================  
441    C     !USES:
442        implicit none        IMPLICIT NONE
443    
444  c     == global variables ==  C     == global variables ==
   
445  #include "EEPARAMS.h"  #include "EEPARAMS.h"
446  #include "SIZE.h"  #include "SIZE.h"
447    
448  c     == routine arguments ==  C     !INPUT/OUTPUT PARAMETERS:
449    C     active_var_file: filename
450        character*(*) active_var_file  C     active_var:      array
451        _RL     active_var(1-olx:snx+olx,nsx,nsy)  C     iRec:            record number
452        integer irec  C     myOptimIter:     number of optimization iteration (default: 0)
453        integer myOptimIter  C     myThid:          thread number for this instance
454        integer mythid        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        _RL     dummy
460    
461  c     == local variables ==  C     !LOCAL VARIABLES:
462          INTEGER myNr
463        integer mynr        LOGICAL globalFile
464        logical globalfile        LOGICAL useCurrentDir
465    CEOP
466  c     == end of interface ==  
467          myNr = Nr
468        mynr = 1        globalFile = .FALSE.
469        globalfile = .false.        useCurrentDir = .FALSE.
470          CALL ACTIVE_WRITE_XZ_RL(
471        call active_write_xz_rl( active_var_file, active_var, globalfile,       &                 active_var_file, active_var, globalFile,
472       &                      irec, mynr,       &                 useCurrentDir, iRec, myNr,
473       &                      FORWARD_SIMULATION, myOptimIter, mythid )       &                 FORWARD_SIMULATION, myOptimIter, myThid )
474    
475        return        RETURN
476        end        END
477    
478  c     ==================================================================  C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
479    CBOP
480    C     !ROUTINE: active_write_yz
481    C     !INTERFACE:
482        subroutine active_write_yz(        subroutine active_write_yz(
483       I                            active_var_file,       I                            active_var_file,
484       I                            active_var,       I                            active_var,
485       I                            irec,       I                            iRec,
486       I                            myOptimIter,       I                            myOptimIter,
487       I                            mythid       I                            myThid
488       I                         , dummy       I                         , dummy
489       &                          )       &                          )
490    
491  c     ==================================================================  C     !DESCRIPTION: \bv
492  c     SUBROUTINE active_write_yz  C     ==================================================================
493  c     ==================================================================  C     SUBROUTINE active_write_yz
494  c  C     ==================================================================
495  c     o Write an active 2D variable to a file.  C     o Write an active 2D variable to a file.
496  c  C     started: heimbach@mit.edu 05-Mar-2001
497  c     started: heimbach@mit.edu 05-Mar-2001  C     ==================================================================
498  c  C     SUBROUTINE active_write_yz
499  c     ==================================================================  C     ==================================================================
500  c     SUBROUTINE active_write_yz  C     \ev
501  c     ==================================================================  
502    C     !USES:
503        implicit none        IMPLICIT NONE
504    
505  c     == global variables ==  C     == global variables ==
   
506  #include "EEPARAMS.h"  #include "EEPARAMS.h"
507  #include "SIZE.h"  #include "SIZE.h"
508    
509  c     == routine arguments ==  C     !INPUT/OUTPUT PARAMETERS:
510    C     active_var_file: filename
511        character*(*) active_var_file  C     active_var:      array
512        _RL     active_var(1-oly:sny+oly,nsx,nsy)  C     iRec:            record number
513        integer irec  C     myOptimIter:     number of optimization iteration (default: 0)
514        integer myOptimIter  C     myThid:          thread number for this instance
515        integer mythid        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        _RL     dummy
521    
522  c     == local variables ==  C     !LOCAL VARIABLES:
523          INTEGER myNr
524        integer mynr        LOGICAL globalFile
525        logical globalfile        LOGICAL useCurrentDir
526    CEOP
527  c     == end of interface ==  
528          myNr = Nr
529        mynr = 1        globalFile = .FALSE.
530        globalfile = .false.        useCurrentDir = .FALSE.
531          CALL ACTIVE_WRITE_YZ_RL(
532        call active_write_yz_rl( active_var_file, active_var, globalfile,       &                 active_var_file, active_var, globalFile,
533       &                      irec, mynr,       &                 useCurrentDir, iRec, myNr,
534       &                      FORWARD_SIMULATION, myOptimIter, mythid )       &                 FORWARD_SIMULATION, myOptimIter, myThid )
   
       return  
       end  
   
 c     ==================================================================  
   
       subroutine active_read_tile_xy(  
      I                                active_var_file,  
      O                                active_var,  
      I                                irec,  
      I                                doglobalread,  
      I                                bi,  
      I                                bj,  
      I                                lAdInit,  
      I                                myOptimIter,  
      I                                mythid  
      &                              )  
   
 c     ==================================================================  
 c     SUBROUTINE active_read_tile_xy  
 c     ==================================================================  
 c  
 c     o Read an active 2D variable from file.  
 c  
 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     changed: Christian Eckert eckert@mit.edu 24-Apr-2000  
 c  
 c              - Added routines that do active writes on tiles  
 c                instead of a whole thread.  
 c  
 c     ==================================================================  
 c     SUBROUTINE active_read_tile_xy  
 c     ==================================================================  
   
       implicit none  
   
 c     == global variables ==  
   
 #include "EEPARAMS.h"  
 #include "SIZE.h"  
   
 c     == routine arguments ==  
   
       character*(*) active_var_file  
       _RL     active_var(1-olx:snx+olx,1-oly:sny+oly)  
       integer irec  
       integer myOptimIter  
       integer mythid  
       integer bi  
       integer bj  
       logical doglobalread  
       logical lAdInit  
   
 c     == local variables ==  
   
       integer mynr  
   
 c     == end of interface ==  
   
       mynr = 1  
       call active_read_tile_rl(  
      I                          active_var_file,  
      I                          active_var,  
      I                          doglobalread,  
      I                          lAdInit,  
      I                          irec,  
      I                          mynr,  
      I                          bi,  
      I                          bj,  
      I                          FORWARD_SIMULATION,  
      I                          myOptimIter,  
      I                          mythid  
      &                        )  
   
       return  
       end  
   
   
       subroutine active_read_tile_xyz(  
      I                                 active_var_file,  
      O                                 active_var,  
      I                                 irec,  
      I                                 doglobalread,  
      I                                 bi,  
      I                                 bj,  
      I                                 lAdInit,  
      I                                 myOptimIter,  
      I                                 mythid  
      &                               )  
   
 c     ==================================================================  
 c     SUBROUTINE active_read_tile_xyz  
 c     ==================================================================  
 c  
 c     o Read an active 3D variable from file.  
 c  
 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     changed: Christian Eckert eckert@mit.edu 24-Apr-2000  
 c  
 c              - Added routines that do active writes on tiles  
 c                instead of a whole thread.  
 c  
 c     ==================================================================  
 c     SUBROUTINE active_read_tile_xyz  
 c     ==================================================================  
   
       implicit none  
   
 c     == global variables ==  
   
 #include "EEPARAMS.h"  
 #include "SIZE.h"  
   
 c     == routine arguments ==  
   
       character*(*) active_var_file  
       _RL active_var(1-olx:snx+olx,1-oly:sny+oly,nr)  
       integer irec  
       integer myOptimIter  
       integer mythid  
       logical doglobalread  
       integer bi  
       integer bj  
       logical lAdInit  
   
 c     == local variables ==  
   
       integer mynr  
   
 c     == end of interface ==  
   
       mynr = nr  
   
       call active_read_tile_rl(  
      I                          active_var_file,  
      I                          active_var,  
      I                          doglobalread,  
      I                          lAdInit,  
      I                          irec,  
      I                          mynr,  
      I                          bi,  
      I                          bj,  
      I                          FORWARD_SIMULATION,  
      I                          myOptimIter,  
      I                          mythid  
      &                        )  
   
       return  
       end  
   
   
       subroutine active_write_tile_xy(  
      I                                 active_var_file,  
      I                                 active_var,  
      I                                 irec,  
      I                                 bi,  
      I                                 bj,  
      I                                 myOptimIter,  
      I                                 mythid  
      &                               )  
   
 c     ==================================================================  
 c     SUBROUTINE active_write_tile_xy  
 c     ==================================================================  
 c  
 c     o Write an active 2D variable to a file.  
 c  
 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     changed: Christian Eckert eckert@mit.edu 24-Apr-2000  
 c  
 c              - Added routines that do active writes on tiles  
 c                instead of a whole thread.  
 c  
 c     ==================================================================  
 c     SUBROUTINE active_write_tile_xy  
 c     ==================================================================  
   
       implicit none  
   
 c     == global variables ==  
   
 #include "EEPARAMS.h"  
 #include "SIZE.h"  
   
 c     == routine arguments ==  
   
       character*(*) active_var_file  
       _RL     active_var(1-olx:snx+olx,1-oly:sny+oly)  
       integer irec  
       integer bi  
       integer bj  
       integer myOptimIter  
       integer mythid  
   
 c     == local variables ==  
   
       integer mynr  
       logical globalfile  
   
 c     == end of interface ==  
   
       mynr = 1  
       globalfile = .false.  
   
       call active_write_tile_rl(  
      I                           active_var_file,  
      I                           active_var,  
      I                           globalfile,  
      I                           irec,  
      I                           mynr,  
      I                           bi,  
      I                           bj,  
      I                           FORWARD_SIMULATION,  
      I                           myOptimIter,  
      I                           mythid  
      &                         )  
   
       return  
       end  
   
   
       subroutine active_write_tile_xyz(  
      I                                  active_var_file,  
      I                                  active_var,  
      I                                  irec,  
      I                                  bi,  
      I                                  bj,  
      I                                  myOptimIter,  
      I                                  mythid  
      &                                )  
   
 c     ==================================================================  
 c     SUBROUTINE active_write_tile_xyz  
 c     ==================================================================  
 c  
 c     o Write an active 3D variable to a file.  
 c  
 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     changed: Christian Eckert eckert@mit.edu 24-Apr-2000  
 c  
 c              - Added routines that do active writes on tiles  
 c                instead of a whole thread.  
 c  
 c     ==================================================================  
 c     SUBROUTINE active_write_tile_xyz  
 c     ==================================================================  
   
       implicit none  
   
 c     == global variables ==  
   
 #include "EEPARAMS.h"  
 #include "SIZE.h"  
   
 c     == routine arguments ==  
   
       character*(*) active_var_file  
       _RL active_var(1-olx:snx+olx,1-oly:sny+oly,nr)  
       integer irec  
       integer bi  
       integer bj  
       integer myOptimIter  
       integer mythid  
   
 c     == local variables ==  
   
       integer mynr  
       logical globalfile  
   
 c     == end of interface ==  
   
       mynr = nr  
       globalfile = .false.  
       call active_write_tile_rl(  
      I                           active_var_file,  
      I                           active_var,  
      I                           globalfile,  
      I                           irec,  
      I                           mynr,  
      I                           bi,  
      I                           bj,  
      I                           FORWARD_SIMULATION,  
      I                           myOptimIter,  
      I                           mythid  
      &                         )  
535    
536        return        RETURN
537        end        END

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

  ViewVC Help
Powered by ViewVC 1.1.22