/[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.3.2.1 by adcroft, Thu Oct 2 18:30:05 2003 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 "AUTODIFF_OPTIONS.h"  #include "AUTODIFF_OPTIONS.h"
5    
6  c     ==================================================================  C     ==================================================================
7  c  C     active_file.F: Routines to handle the I/O of the active file for
8  c     active_file.F: Routines to handle the I/O of the active file for  C                    the adjoint calculations. All files are direct
9  c                    the adjoint calculations. All files are direct  C                    access files.
10  c                    access files.  C     Routines
11  c  C    o  active_read_xy         - Read  an active 2D variable from file.
12  c     Routines  C    o  active_read_xyz        - Read  an active 3D variable from file.
13  c  C    o  active_read_xz         - Read  an active 2D xz-slice from file.
14  c    o  active_read_xy         - Read  an active 2D variable from file.  C    o  active_read_yz         - Read  an active 2D yz-slice from file.
15  c    o  active_read_xyz        - Read  an active 3D variable from file.  C
16  c    o  active_read_xz         - Read  an active 2D xz-slice from file.  C    o  active_write_xy        - Write an active 2D variable to a file.
17  c    o  active_read_yz         - Read  an active 2D yz-slice from file.  C    o  active_write_xyz       - Write an active 3D variable to a file.
18  c  C    o  active_write_xz        - Write an active 2D xz-slice to a file.
19  c    o  active_write_xy        - Write an active 2D variable to a file.  C    o  active_write_yz        - Write an active 2D yz-slice to a file.
20  c    o  active_write_xyz       - Write an active 3D variable to a file.  C
21  c    o  active_write_xz        - Write an active 2D xz-slice to a file.  C        changed: Christian Eckert eckert@mit.edu 24-Apr-2000
22  c    o  active_write_yz        - Write an active 2D yz-slice to a file.  C                 - Added routines that do active writes on tiles
23  c  C                   instead of a whole thread.
24  c    o  active_read_tile_xy    - Read  an active 2D variable from file.  C        changed: heimbach@mit.edu 05-Mar-2001
25  c    o  active_read_tile_xyz   - Read  an active 3D variable from file.  C                 - added active file handling of xz-/yz-arrays
26  c  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                 - Added routines that do active writes on tiles  
 c                   instead of a whole thread.  
 c        changed: heimbach@mit.edu 05-Mar-2001  
 c                 - added active file handling of xz-/yz-arrays  
 c  
 c     ==================================================================  
   
27    
28    C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
29  CBOP  CBOP
30  C     !ROUTINE: active_read_xy  C     !ROUTINE: active_read_xy
31  C     !INTERFACE:  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     !DESCRIPTION: \bv  C     !DESCRIPTION: \bv
44  c     ==================================================================  C     ==================================================================
45  c     SUBROUTINE active_read_xy  C     SUBROUTINE active_read_xy
46  c     ==================================================================  C     ==================================================================
47  c     o Read an active 2D (XY) variable from file.  C     o Read an active 2D (XY) variable from file.
48  c     started: Christian Eckert eckert@mit.edu 30-Jun-1999  C     started: Christian Eckert eckert@mit.edu 30-Jun-1999
49  c     ==================================================================  C     ==================================================================
50  c     SUBROUTINE active_read_xy  C     SUBROUTINE active_read_xy
51  c     ==================================================================  C     ==================================================================
52  C     \ev  C     \ev
53    
54  C     !USES:  C     !USES:
55        implicit none        IMPLICIT NONE
56    
57  c     == global variables ==  C     == global variables ==
58  #include "EEPARAMS.h"  #include "EEPARAMS.h"
59  #include "SIZE.h"  #include "SIZE.h"
60    
61  C     !INPUT/OUTPUT PARAMETERS:  C     !INPUT/OUTPUT PARAMETERS:
62  c     == routine arguments ==  C     active_var_file: filename
63  c     active_var_file: filename  C     active_var:      array
64  c     active_var:      array  C     iRec:            record number
65  c     irec:            record number  C     myOptimIter:     number of optimization iteration (default: 0)
66  c     myOptimIter:     number of optimization iteration (default: 0)  C     myThid:          thread number for this instance
67  c     mythid:          thread number for this instance  C     doglobalread:    flag for global or local read/write
68  c     doglobalread:    flag for global or local read/write  C                      (default: .false.)
69  c                      (default: .false.)  C     lAdInit:         initialisation of corresponding adjoint
70  c     lAdInit:         initialisation of corresponding adjoint  C                      variable and write to active file
71  c                      variable and write to active file        CHARACTER*(*) active_var_file
72        character*(*) active_var_file        _RL     active_var(1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
73        _RL     active_var(1-olx:snx+olx,1-oly:sny+oly,nsx,nsy)        INTEGER iRec
74        integer irec        INTEGER myOptimIter
75        integer myOptimIter        INTEGER myThid
76        integer mythid        LOGICAL doglobalread
77        logical doglobalread        LOGICAL lAdInit
       logical lAdInit  
78        _RL     dummy        _RL     dummy
79    
80  C     !LOCAL VARIABLES:  C     !LOCAL VARIABLES:
81  c     == local variables ==        INTEGER myNr
82        integer mynr        LOGICAL useCurrentDir
   
 c     == end of interface ==  
83  CEOP  CEOP
84    
85        mynr = 1        myNr = 1
86        call active_read_rl( active_var_file, active_var, doglobalread,        useCurrentDir = .FALSE.
87       &                     lAdInit, irec, mynr,        CALL ACTIVE_READ_3D_RL(
88       &                     FORWARD_SIMULATION, myOptimIter, mythid)       &                 active_var_file, active_var, doglobalread,
89         &                 useCurrentDir, lAdInit, iRec, myNr,
90        return       &                 FORWARD_SIMULATION, myOptimIter, myThid )
       end  
91    
92  c     ==================================================================        RETURN
93          END
94    
95    C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
96  CBOP  CBOP
97  C     !ROUTINE: active_read_xyz  C     !ROUTINE: active_read_xyz
98  C     !INTERFACE:  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     !DESCRIPTION: \bv  C     !DESCRIPTION: \bv
111  c     ==================================================================  C     ==================================================================
112  c     SUBROUTINE active_read_xyz  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     started: Christian Eckert eckert@mit.edu 30-Jun-1999  C     started: Christian Eckert eckert@mit.edu 30-Jun-1999
116  c     ==================================================================  C     ==================================================================
117  c     SUBROUTINE active_read_xyz  C     SUBROUTINE active_read_xyz
118  c     ==================================================================  C     ==================================================================
119  C     \ev  C     \ev
120    
121  C     !USES:  C     !USES:
122        implicit none        IMPLICIT NONE
123    
124  c     == global variables ==  C     == global variables ==
125  #include "EEPARAMS.h"  #include "EEPARAMS.h"
126  #include "SIZE.h"  #include "SIZE.h"
127    
128  C     !INPUT/OUTPUT PARAMETERS:  C     !INPUT/OUTPUT PARAMETERS:
129  c     == routine arguments ==  C     active_var_file: filename
130  c     active_var_file: filename  C     active_var:      array
131  c     active_var:      array  C     iRec:            record number
132  c     irec:            record number  C     myOptimIter:     number of optimization iteration (default: 0)
133  c     myOptimIter:     number of optimization iteration (default: 0)  C     myThid:          thread number for this instance
134  c     mythid:          thread number for this instance  C     doglobalread:    flag for global or local read/write
135  c     doglobalread:    flag for global or local read/write  C                      (default: .false.)
136  c                      (default: .false.)  C     lAdInit:         initialisation of corresponding adjoint
137  c     lAdInit:         initialisation of corresponding adjoint  C                      variable and write to active file
138  c                      variable and write to active file        CHARACTER*(*) active_var_file
139        character*(*) active_var_file        _RL active_var(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy)
140        _RL active_var(1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy)        INTEGER iRec
141        integer irec        INTEGER myOptimIter
142        integer myOptimIter        INTEGER myThid
143        integer mythid        LOGICAL doglobalread
144        logical doglobalread        LOGICAL lAdInit
       logical lAdInit  
145        _RL     dummy        _RL     dummy
146    
147  C     !LOCAL VARIABLES:  C     !LOCAL VARIABLES:
148  c     == local variables ==        INTEGER myNr
149        integer mynr        LOGICAL useCurrentDir
   
 c     == end of interface ==  
150  CEOP  CEOP
151    
152        mynr = nr        myNr = Nr
153        call active_read_rl( active_var_file, active_var, doglobalread,        useCurrentDir = .FALSE.
154       &                     lAdInit, irec, mynr,        CALL ACTIVE_READ_3D_RL(
155       &                     FORWARD_SIMULATION, myOptimIter, mythid)       &                 active_var_file, active_var, doglobalread,
156         &                 useCurrentDir, lAdInit, iRec, myNr,
157        return       &                 FORWARD_SIMULATION, myOptimIter, myThid )
       end  
   
 c     ==================================================================  
158    
159          RETURN
160          END
161    
162    C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
163  CBOP  CBOP
164  C     !ROUTINE: active_read_xz  C     !ROUTINE: active_read_xz
165  C     !INTERFACE:  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     !DESCRIPTION: \bv  C     !DESCRIPTION: \bv
178  c     ==================================================================  C     ==================================================================
179  c     SUBROUTINE active_read_xz  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     started: heimbach@mit.edu 05-Mar-2001  C     started: heimbach@mit.edu 05-Mar-2001
183  c     ==================================================================  C     ==================================================================
184  c     SUBROUTINE active_read_xz  C     SUBROUTINE active_read_xz
185  c     ==================================================================  C     ==================================================================
186  C     \ev  C     \ev
187    
188  C     !USES:  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     !INPUT/OUTPUT PARAMETERS:  C     !INPUT/OUTPUT PARAMETERS:
196  c     == routine arguments ==  C     active_var_file: filename
197  c     active_var_file: filename  C     active_var:      array
198  c     active_var:      array  C     iRec:            record number
199  c     irec:            record number  C     myOptimIter:     number of optimization iteration (default: 0)
200  c     myOptimIter:     number of optimization iteration (default: 0)  C     myThid:          thread number for this instance
201  c     mythid:          thread number for this instance  C     doglobalread:    flag for global or local read/write
202  c     doglobalread:    flag for global or local read/write  C                      (default: .false.)
203  c                      (default: .false.)  C     lAdInit:         initialisation of corresponding adjoint
204  c     lAdInit:         initialisation of corresponding adjoint  C                      variable and write to active file
205  c                      variable and write to active file        CHARACTER*(*) active_var_file
206        character*(*) active_var_file        _RL     active_var(1-OLx:sNx+OLx,nSx,nSy)
207        _RL     active_var(1-olx:snx+olx,nsx,nsy)        INTEGER iRec
208        integer irec        INTEGER myOptimIter
209        integer myOptimIter        INTEGER myThid
210        integer mythid        LOGICAL doglobalread
211        logical doglobalread        LOGICAL lAdInit
       logical lAdInit  
212        _RL     dummy        _RL     dummy
213    
214  C     !LOCAL VARIABLES:  C     !LOCAL VARIABLES:
215  c     == local variables ==        INTEGER myNr
216        integer mynr        LOGICAL useCurrentDir
   
 c     == end of interface ==  
217  CEOP  CEOP
218    
219        mynr = nr        myNr = Nr
220        call active_read_xz_rl( active_var_file, active_var, doglobalread,        useCurrentDir = .FALSE.
221       &                     lAdInit, irec, mynr,        CALL ACTIVE_READ_XZ_RL(
222       &                     FORWARD_SIMULATION, myOptimIter, mythid)       &                 active_var_file, active_var, doglobalread,
223         &                 useCurrentDir, lAdInit, iRec, myNr,
224        return       &                 FORWARD_SIMULATION, myOptimIter, myThid )
       end  
   
 c     ==================================================================  
225    
226          RETURN
227          END
228    
229    C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
230  CBOP  CBOP
231  C     !ROUTINE: active_read_yz  C     !ROUTINE: active_read_yz
232  C     !INTERFACE:  C     !INTERFACE:
233         subroutine active_read_yz(         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     !DESCRIPTION: \bv  C     !DESCRIPTION: \bv
245  c     ==================================================================  C     ==================================================================
246  c     SUBROUTINE active_read_yz  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     started: heimbach@mit.edu 05-Mar-2001  C     started: heimbach@mit.edu 05-Mar-2001
250  c     ==================================================================  C     ==================================================================
251  c     SUBROUTINE active_read_yz  C     SUBROUTINE active_read_yz
252  c     ==================================================================  C     ==================================================================
253  C     \ev  C     \ev
254    
255  C     !USES:        IMPLICIT NONE
       implicit none  
256    
257  c     == global variables ==  C     == global variables ==
258  #include "EEPARAMS.h"  #include "EEPARAMS.h"
259  #include "SIZE.h"  #include "SIZE.h"
260    
261  C     !INPUT/OUTPUT PARAMETERS:  C     !INPUT/OUTPUT PARAMETERS:
262  c     == routine arguments ==  C     active_var_file: filename
263  c     active_var_file: filename  C     active_var:      array
264  c     active_var:      array  C     iRec:            record number
265  c     irec:            record number  C     myOptimIter:     number of optimization iteration (default: 0)
266  c     myOptimIter:     number of optimization iteration (default: 0)  C     myThid:          thread number for this instance
267  c     mythid:          thread number for this instance  C     doglobalread:    flag for global or local read/write
268  c     doglobalread:    flag for global or local read/write  C                      (default: .false.)
269  c                      (default: .false.)  C     lAdInit:         initialisation of corresponding adjoint
270  c     lAdInit:         initialisation of corresponding adjoint  C                      variable and write to active file
271  c                      variable and write to active file        CHARACTER*(*) active_var_file
272        character*(*) active_var_file        _RL     active_var(1-OLy:sNy+OLy,nSx,nSy)
273        _RL     active_var(1-oly:sny+oly,nsx,nsy)        INTEGER iRec
274        integer irec        INTEGER myOptimIter
275        integer myOptimIter        INTEGER myThid
276        integer mythid        LOGICAL doglobalread
277        logical doglobalread        LOGICAL lAdInit
       logical lAdInit  
278        _RL     dummy        _RL     dummy
279    
280  C     !LOCAL VARIABLES:  C     !LOCAL VARIABLES:
281  c     == local variables ==        INTEGER myNr
282        integer mynr        LOGICAL useCurrentDir
   
 c     == end of interface ==  
283  CEOP  CEOP
284    
285        mynr = nr        myNr = Nr
286        call active_read_yz_rl( active_var_file, active_var, doglobalread,        useCurrentDir = .FALSE.
287       &                     lAdInit, irec, mynr,        CALL ACTIVE_READ_YZ_RL(
288       &                     FORWARD_SIMULATION, myOptimIter, mythid)       &                 active_var_file, active_var, doglobalread,
289         &                 useCurrentDir, lAdInit, iRec, myNr,
290         &                 FORWARD_SIMULATION, myOptimIter, myThid )
291    
292        return        RETURN
293        end        END
   
 c     ==================================================================  
294    
295    C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
296  CBOP  CBOP
297  C     !ROUTINE: active_write_xy  C     !ROUTINE: active_write_xy
298  C     !INTERFACE:  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     !DESCRIPTION: \bv  C     !DESCRIPTION: \bv
309  c     ==================================================================  C     ==================================================================
310  c     SUBROUTINE active_write_xy  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     started: Christian Eckert eckert@mit.edu 30-Jun-1999  C     started: Christian Eckert eckert@mit.edu 30-Jun-1999
314  c     ==================================================================  C     ==================================================================
315  c     SUBROUTINE active_write_xy  C     SUBROUTINE active_write_xy
316  c     ==================================================================  C     ==================================================================
317  C     \ev  C     \ev
318    
319  C     !USES:  C     !USES:
320        implicit none        IMPLICIT NONE
321    
322  c     == global variables ==  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  C     active_var_file: filename
328  c     active_var:      array  C     active_var:      array
329  c     irec:            record number  C     iRec:            record number
330  c     myOptimIter:     number of optimization iteration (default: 0)  C     myOptimIter:     number of optimization iteration (default: 0)
331  c     mythid:          thread number for this instance  C     myThid:          thread number for this instance
332        character*(*) active_var_file        CHARACTER*(*) active_var_file
333        _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)
334        integer irec        INTEGER iRec
335        integer myOptimIter        INTEGER myOptimIter
336        integer mythid        INTEGER myThid
337        _RL     dummy        _RL     dummy
338    
339  C     !LOCAL VARIABLES:  C     !LOCAL VARIABLES:
340  c     == local variables ==        INTEGER myNr
341        integer mynr        LOGICAL globalFile
342        logical globalfile        LOGICAL useCurrentDir
   
 c     == end of interface ==  
343  CEOP  CEOP
344    
345        mynr = 1        myNr = 1
346        globalfile = .false.        globalFile = .FALSE.
347          useCurrentDir = .FALSE.
348        call active_write_rl( active_var_file, active_var, globalfile,        CALL ACTIVE_WRITE_3D_RL(
349       &                      irec, mynr,       &                 active_var_file, active_var, globalFile,
350       &                      FORWARD_SIMULATION, myOptimIter, mythid )       &                 useCurrentDir, iRec, myNr,
351         &                 FORWARD_SIMULATION, myOptimIter, myThid )
352    
353        return        RETURN
354        end        END
   
 c     ==================================================================  
355    
356    C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
357  CBOP  CBOP
358  C     !ROUTINE: active_write_xyz  C     !ROUTINE: active_write_xyz
359  C     !INTERFACE:  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     !DESCRIPTION: \bv  C     !DESCRIPTION: \bv
370  c     ==================================================================  C     ==================================================================
371  c     SUBROUTINE active_write_xyz  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     started: Christian Eckert eckert@mit.edu 30-Jun-1999  C     started: Christian Eckert eckert@mit.edu 30-Jun-1999
375  c     ==================================================================  C     ==================================================================
376  c     SUBROUTINE active_write_xyz  C     SUBROUTINE active_write_xyz
377  c     ==================================================================  C     ==================================================================
378  C     \ev  C     \ev
379    
380  C     !USES:  C     !USES:
381        implicit none        IMPLICIT NONE
382    
383  c     == global variables ==  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  C     active_var_file: filename
389  c     active_var:      array  C     active_var:      array
390  c     irec:            record number  C     iRec:            record number
391  c     myOptimIter:     number of optimization iteration (default: 0)  C     myOptimIter:     number of optimization iteration (default: 0)
392  c     mythid:          thread number for this instance  C     myThid:          thread number for this instance
393        character*(*) active_var_file        CHARACTER*(*) active_var_file
394        _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)
395        integer irec        INTEGER iRec
396        integer myOptimIter        INTEGER myOptimIter
397        integer mythid        INTEGER myThid
398        _RL     dummy        _RL     dummy
399    
400  C     !LOCAL VARIABLES:  C     !LOCAL VARIABLES:
401  c     == local variables ==        INTEGER myNr
402        integer mynr        LOGICAL globalFile
403        logical globalfile        LOGICAL useCurrentDir
   
 c     == end of interface ==  
404  CEOP  CEOP
405    
406        mynr = nr        myNr = Nr
407        globalfile = .false.        globalFile = .FALSE.
408        call active_write_rl(active_var_file, active_var, globalfile,        useCurrentDir = .FALSE.
409       &                     irec, mynr,        CALL ACTIVE_WRITE_3D_RL(
410       &                     FORWARD_SIMULATION, myOptimIter, mythid)       &                 active_var_file, active_var, globalFile,
411         &                 useCurrentDir, iRec, myNr,
412        return       &                 FORWARD_SIMULATION, myOptimIter, myThid )
       end  
413    
414  c     ==================================================================        RETURN
415          END
416    
417    C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
418  CBOP  CBOP
419  C     !ROUTINE: active_write_xz  C     !ROUTINE: active_write_xz
420  C     !INTERFACE:  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     !DESCRIPTION: \bv  C     !DESCRIPTION: \bv
431  c     ==================================================================  C     ==================================================================
432  c     SUBROUTINE active_write_xz  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     started: heimbach@mit.edu 05-Mar-2001  C     started: heimbach@mit.edu 05-Mar-2001
436  c     ==================================================================  C     ==================================================================
437  c     SUBROUTINE active_write_xz  C     SUBROUTINE active_write_xz
438  c     ==================================================================  C     ==================================================================
439  C     \ev  C     \ev
440    
441  C     !USES:  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  C     active_var_file: filename
450  c     active_var:      array  C     active_var:      array
451  c     irec:            record number  C     iRec:            record number
452  c     myOptimIter:     number of optimization iteration (default: 0)  C     myOptimIter:     number of optimization iteration (default: 0)
453  c     mythid:          thread number for this instance  C     myThid:          thread number for this instance
454        character*(*) active_var_file        CHARACTER*(*) active_var_file
455        _RL     active_var(1-olx:snx+olx,nsx,nsy)        _RL     active_var(1-OLx:sNx+OLx,nSx,nSy)
456        integer irec        INTEGER iRec
457        integer myOptimIter        INTEGER myOptimIter
458        integer mythid        INTEGER myThid
459        _RL     dummy        _RL     dummy
460    
461  C     !LOCAL VARIABLES:  C     !LOCAL VARIABLES:
462  c     == local variables ==        INTEGER myNr
463        integer mynr        LOGICAL globalFile
464        logical globalfile        LOGICAL useCurrentDir
   
 c     == end of interface ==  
465  CEOP  CEOP
466    
467        mynr = nr        myNr = Nr
468        globalfile = .false.        globalFile = .FALSE.
469          useCurrentDir = .FALSE.
470        call active_write_xz_rl( active_var_file, active_var, globalfile,        CALL ACTIVE_WRITE_XZ_RL(
471       &                      irec, mynr,       &                 active_var_file, active_var, globalFile,
472       &                      FORWARD_SIMULATION, myOptimIter, mythid )       &                 useCurrentDir, iRec, myNr,
473         &                 FORWARD_SIMULATION, myOptimIter, myThid )
474    
475        return        RETURN
476        end        END
   
 c     ==================================================================  
477    
478    C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
479  CBOP  CBOP
480  C     !ROUTINE: active_write_yz  C     !ROUTINE: active_write_yz
481  C     !INTERFACE:  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     !DESCRIPTION: \bv  C     !DESCRIPTION: \bv
492  c     ==================================================================  C     ==================================================================
493  c     SUBROUTINE active_write_yz  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     started: heimbach@mit.edu 05-Mar-2001  C     started: heimbach@mit.edu 05-Mar-2001
497  c     ==================================================================  C     ==================================================================
498  c     SUBROUTINE active_write_yz  C     SUBROUTINE active_write_yz
499  c     ==================================================================  C     ==================================================================
500  C     \ev  C     \ev
501    
502  C     !USES:  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  C     active_var_file: filename
511  c     active_var:      array  C     active_var:      array
512  c     irec:            record number  C     iRec:            record number
513  c     myOptimIter:     number of optimization iteration (default: 0)  C     myOptimIter:     number of optimization iteration (default: 0)
514  c     mythid:          thread number for this instance  C     myThid:          thread number for this instance
515        character*(*) active_var_file        CHARACTER*(*) active_var_file
516        _RL     active_var(1-oly:sny+oly,nsx,nsy)        _RL     active_var(1-OLy:sNy+OLy,nSx,nSy)
517        integer irec        INTEGER iRec
518        integer myOptimIter        INTEGER myOptimIter
519        integer mythid        INTEGER myThid
520        _RL     dummy        _RL     dummy
521    
522  C     !LOCAL VARIABLES:  C     !LOCAL VARIABLES:
523  c     == local variables ==        INTEGER myNr
524        integer mynr        LOGICAL globalFile
525        logical globalfile        LOGICAL useCurrentDir
   
 c     == end of interface ==  
526  CEOP  CEOP
527    
528        mynr = nr        myNr = Nr
529        globalfile = .false.        globalFile = .FALSE.
530          useCurrentDir = .FALSE.
531        call active_write_yz_rl( active_var_file, active_var, globalfile,        CALL ACTIVE_WRITE_YZ_RL(
532       &                      irec, mynr,       &                 active_var_file, active_var, globalFile,
533       &                      FORWARD_SIMULATION, myOptimIter, mythid )       &                 useCurrentDir, iRec, myNr,
534         &                 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.3.2.1  
changed lines
  Added in v.1.9

  ViewVC Help
Powered by ViewVC 1.1.22