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

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

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

revision 1.1 by heimbach, Sun Mar 25 22:33:53 2001 UTC revision 1.2 by heimbach, Fri Sep 28 04:19:27 2001 UTC
# Line 21  c                                 operat Line 21  c                                 operat
21  c  c
22  c  c
23  c        changed: Christian Eckert eckert@mit.edu 24-Apr-2000  c        changed: Christian Eckert eckert@mit.edu 24-Apr-2000
 c  
24  c                 - Added routines that do active writes on tiles  c                 - Added routines that do active writes on tiles
25  c                   instead of a whole thread.  c                   instead of a whole thread.
26  c  c
27  c     ==================================================================  c     ==================================================================
28    
29    
30    CBOP
31    C     !ROUTINE: active_read_rl
32    C     !INTERFACE:
33        subroutine active_read_rl(        subroutine active_read_rl(
34       I                           active_var_file,       I                           active_var_file,
35       O                           active_var,       O                           active_var,
# Line 40  c     ================================== Line 42  c     ==================================
42       I                           mythid       I                           mythid
43       &                         )       &                         )
44    
45    C     !DESCRIPTION: \bv
46  c     ==================================================================  c     ==================================================================
47  c     SUBROUTINE active_read_rl  c     SUBROUTINE active_read_rl
48  c     ==================================================================  c     ==================================================================
49  c  c     o Read an active _RL variable from file.
 c     o Read an active variable from file.  
 c  
50  c     The variable *globalfile* can be used as a switch, which allows  c     The variable *globalfile* can be used as a switch, which allows
51  c     to read from a global file. The adjoint files are, however, always  c     to read from a global file. The adjoint files are, however, always
52  c     treated as tiled files.  c     treated as tiled files.
 c  
53  c     started: Christian Eckert eckert@mit.edu    Jan-1999  c     started: Christian Eckert eckert@mit.edu    Jan-1999
 c  
 c     changed: Christian Eckert eckert@mit.edu 23-Nov-1999  
 c  
 c              - interchanged the i,j loops  
 c  
 c              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              Christian Eckert eckert@mit.edu 31-Mar-2000  
 c  
 c              - Added BEGIN/END_MASTER and BARRIER for multiple  
 c                threads and synchronisation, respectively. Added  
 c                logical lAdInit.  
 c  
54  c     ==================================================================  c     ==================================================================
55  c     SUBROUTINE active_read_rl  c     SUBROUTINE active_read_rl
56  c     ==================================================================  c     ==================================================================
57    C     \ev
58    
59    C     !USES:
60        implicit none        implicit none
61    
62  c     == global variables ==  c     == global variables ==
   
63  #include "EEPARAMS.h"  #include "EEPARAMS.h"
64  #include "SIZE.h"  #include "SIZE.h"
65  #include "PARAMS.h"  #include "PARAMS.h"
66    
67    C     !INPUT/OUTPUT PARAMETERS:
68  c     == routine arguments ==  c     == routine arguments ==
69    c     active_var_file: filename
70    c     active_var:      array
71    c     irec:            record number
72    c     myOptimIter:     number of optimization iteration (default: 0)
73    c     mythid:          thread number for this instance
74    c     doglobalread:    flag for global or local read/write
75    c                      (default: .false.)
76    c     lAdInit:         initialisation of corresponding adjoint
77    c                      variable and write to active file
78    c     mynr:            vertical array dimension
79    c     theSimulationMode: forward mode or reverse mode simulation
80        character*(*) active_var_file        character*(*) active_var_file
   
81        logical  globalfile        logical  globalfile
82        logical  lAdInit        logical  lAdInit
83        integer  irec        integer  irec
# Line 92  c     == routine arguments == Line 87  c     == routine arguments ==
87        integer  mythid        integer  mythid
88        _RL     active_var(1-olx:snx+olx,1-oly:sny+oly,mynr,nsx,nsy)        _RL     active_var(1-olx:snx+olx,1-oly:sny+oly,mynr,nsx,nsy)
89    
90    C     !LOCAL VARIABLES:
91  c     == local variables ==  c     == local variables ==
   
92        character*(2)  adpref        character*(2)  adpref
93        character*(80) adfname        character*(80) adfname
   
94        integer bi,bj        integer bi,bj
95        integer i,j,k        integer i,j,k
96        integer oldprec        integer oldprec
97        integer prec        integer prec
98        integer il        integer il
99        integer ilnblnk        integer ilnblnk
   
100        logical writeglobalfile        logical writeglobalfile
   
101        _RL  active_data_t(1-olx:snx+olx,1-oly:sny+oly,nsx,nsy)        _RL  active_data_t(1-olx:snx+olx,1-oly:sny+oly,nsx,nsy)
102    
103  c     == functions ==  c     == functions ==
   
104        external ilnblnk        external ilnblnk
105    
106  c     == end of interface ==  c     == end of interface ==
107    CEOP
108    
109  c     force 64-bit io  c     force 64-bit io
110        oldPrec        = readBinaryPrec        oldPrec        = readBinaryPrec
# Line 249  c     Reset default io precision. Line 241  c     Reset default io precision.
241        end        end
242    
243    
244    CBOP
245    C     !ROUTINE: active_write_rl
246    C     !INTERFACE:
247        subroutine active_write_rl(        subroutine active_write_rl(
248       I                            active_var_file,       I                            active_var_file,
249       I                            active_var,       I                            active_var,
# Line 260  c     Reset default io precision. Line 255  c     Reset default io precision.
255       I                            mythid       I                            mythid
256       &                          )       &                          )
257    
258    C     !DESCRIPTION: \bv
259  c     ==================================================================  c     ==================================================================
260  c     SUBROUTINE active_write_rl  c     SUBROUTINE active_write_rl
261  c     ==================================================================  c     ==================================================================
262  c  c     o Write an active _RL variable to a file.
 c     o Write an active variable to a file.  
 c  
263  c     started: Christian Eckert eckert@mit.edu    Jan-1999  c     started: Christian Eckert eckert@mit.edu    Jan-1999
 c  
 c     changed: Christian Eckert eckert@mit.edu 23-Nov-1999  
 c  
 c              - interchanged the i,j loops  
 c  
 c              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              Christian Eckert eckert@mit.edu 31-Mar-2000  
 c  
 c              - Added BEGIN/END_MASTER and BARRIER for multiple  
 c                threads and synchronisation, respectively.  
 c  
264  c     ==================================================================  c     ==================================================================
265  c     SUBROUTINE active_write_rl  c     SUBROUTINE active_write_rl
266  c     ==================================================================  c     ==================================================================
267    C     \ev
268    
269    C     !USES:
270        implicit none        implicit none
271    
272  c     == global variables ==  c     == global variables ==
   
273  #include "EEPARAMS.h"  #include "EEPARAMS.h"
274  #include "SIZE.h"  #include "SIZE.h"
275  #include "PARAMS.h"  #include "PARAMS.h"
276    
277    C     !INPUT/OUTPUT PARAMETERS:
278  c     == routine arguments ==  c     == routine arguments ==
279    c     active_var_file: filename
280    c     active_var:      array
281    c     irec:            record number
282    c     myOptimIter:     number of optimization iteration (default: 0)
283    c     mythid:          thread number for this instance
284    c     doglobalread:    flag for global or local read/write
285    c                      (default: .false.)
286    c     lAdInit:         initialisation of corresponding adjoint
287    c                      variable and write to active file
288    c     mynr:            vertical array dimension
289    c     theSimulationMode: forward mode or reverse mode simulation
290        character*(*) active_var_file        character*(*) active_var_file
   
291        integer  mynr        integer  mynr
292        logical  globalfile        logical  globalfile
293        integer  irec        integer  irec
# Line 306  c     == routine arguments == Line 296  c     == routine arguments ==
296        integer  mythid        integer  mythid
297        _RL     active_var(1-olx:snx+olx,1-oly:sny+oly,mynr,nsx,nsy)        _RL     active_var(1-olx:snx+olx,1-oly:sny+oly,mynr,nsx,nsy)
298    
299    C     !LOCAL VARIABLES:
300  c     == local variables ==  c     == local variables ==
   
301        integer  i,j,k        integer  i,j,k
302        integer  bi,bj        integer  bi,bj
303        _RL  active_data_t(1-olx:snx+olx,1-oly:sny+oly,nsx,nsy)        _RL  active_data_t(1-olx:snx+olx,1-oly:sny+oly,nsx,nsy)
# Line 315  c     == local variables == Line 305  c     == local variables ==
305        integer  prec        integer  prec
306    
307  c     == end of interface ==  c     == end of interface ==
308    CEOP
309    
310  c     force 64-bit io  c     force 64-bit io
311        oldPrec        = readBinaryPrec        oldPrec        = readBinaryPrec

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

  ViewVC Help
Powered by ViewVC 1.1.22