/[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.5 by heimbach, Thu Mar 23 23:06:47 2006 UTC
# Line 1  Line 1 
1    
2  #include "CPP_OPTIONS.h"  #include "AUTODIFF_OPTIONS.h"
3    
4  c     ==================================================================  c     ==================================================================
5  c  c
# Line 25  c Line 25  c
25  c    o  active_write_tile_xy   - Write an active 2D variable to a file.  c    o  active_write_tile_xy   - Write an active 2D variable to a file.
26  c    o  active_write_tile_xyz  - Write an active 3D variable to a file.  c    o  active_write_tile_xyz  - Write an active 3D variable to a file.
27  c  c
28    c    o  active_read_profile       - Read  an active 1D record.
29    c    o  active_write_profile      - Write an active 1D record.
30  c  c
 c        changed: Christian Eckert eckert@mit.edu 24-Apr-2000  
31  c  c
32    c        changed: Christian Eckert eckert@mit.edu 24-Apr-2000
33  c                 - Added routines that do active writes on tiles  c                 - Added routines that do active writes on tiles
34  c                   instead of a whole thread.  c                   instead of a whole thread.
35    c        changed: heimbach@mit.edu 05-Mar-2001
36    c                 - added active file handling of xz-/yz-arrays
37  c  c
38  c     ==================================================================  c     ==================================================================
39    
40    
41    CBOP
42    C     !ROUTINE: active_read_xy
43    C     !INTERFACE:
44        subroutine active_read_xy(        subroutine active_read_xy(
45       I                           active_var_file,       I                           active_var_file,
46       O                           active_var,       O                           active_var,
# Line 45  c     ================================== Line 52  c     ==================================
52       I                         , dummy       I                         , dummy
53       &                         )       &                         )
54    
55    C     !DESCRIPTION: \bv
56  c     ==================================================================  c     ==================================================================
57  c     SUBROUTINE active_read_xy  c     SUBROUTINE active_read_xy
58  c     ==================================================================  c     ==================================================================
59  c  c     o Read an active 2D (XY) variable from file.
 c     o Read an active 2D variable from file.  
 c  
60  c     started: Christian Eckert eckert@mit.edu 30-Jun-1999  c     started: Christian Eckert eckert@mit.edu 30-Jun-1999
 c  
 c     changed: Christian Eckert eckert@mit.edu 11-Feb-2000  
 c  
 c              - Restructured the code in order to create a package  
 c                for the MITgcmUV.  
 c  
61  c     ==================================================================  c     ==================================================================
62  c     SUBROUTINE active_read_xy  c     SUBROUTINE active_read_xy
63  c     ==================================================================  c     ==================================================================
64    C     \ev
65    
66    C     !USES:
67        implicit none        implicit none
68    
69  c     == global variables ==  c     == global variables ==
   
70  #include "EEPARAMS.h"  #include "EEPARAMS.h"
71  #include "SIZE.h"  #include "SIZE.h"
72    
73    C     !INPUT/OUTPUT PARAMETERS:
74  c     == routine arguments ==  c     == routine arguments ==
75    c     active_var_file: filename
76    c     active_var:      array
77    c     irec:            record number
78    c     myOptimIter:     number of optimization iteration (default: 0)
79    c     mythid:          thread number for this instance
80    c     doglobalread:    flag for global or local read/write
81    c                      (default: .false.)
82    c     lAdInit:         initialisation of corresponding adjoint
83    c                      variable and write to active file
84        character*(*) active_var_file        character*(*) active_var_file
85        _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)
86        integer irec        integer irec
# Line 80  c     == routine arguments == Line 90  c     == routine arguments ==
90        logical lAdInit        logical lAdInit
91        _RL     dummy        _RL     dummy
92    
93    C     !LOCAL VARIABLES:
94  c     == local variables ==  c     == local variables ==
   
95        integer mynr        integer mynr
96    
97  c     == end of interface ==  c     == end of interface ==
98    CEOP
99    
100        mynr = 1        mynr = 1
101        call active_read_rl( active_var_file, active_var, doglobalread,        call active_read_rl( active_var_file, active_var, doglobalread,
# Line 96  c     == end of interface == Line 107  c     == end of interface ==
107    
108  c     ==================================================================  c     ==================================================================
109    
110    CBOP
111    C     !ROUTINE: active_read_xyz
112    C     !INTERFACE:
113        subroutine active_read_xyz(        subroutine active_read_xyz(
114       I                            active_var_file,       I                            active_var_file,
115       O                            active_var,       O                            active_var,
# Line 107  c     ================================== Line 121  c     ==================================
121       I                         , dummy       I                         , dummy
122       &                           )       &                           )
123    
124    C     !DESCRIPTION: \bv
125  c     ==================================================================  c     ==================================================================
126  c     SUBROUTINE active_read_xyz  c     SUBROUTINE active_read_xyz
127  c     ==================================================================  c     ==================================================================
 c  
128  c     o Read an active 3D variable from file.  c     o Read an active 3D variable from file.
 c  
129  c     started: Christian Eckert eckert@mit.edu 30-Jun-1999  c     started: Christian Eckert eckert@mit.edu 30-Jun-1999
 c  
 c     changed: Christian Eckert eckert@mit.edu 11-Feb-2000  
 c  
 c              - Restructured the code in order to create a package  
 c                for the MITgcmUV.  
 c  
130  c     ==================================================================  c     ==================================================================
131  c     SUBROUTINE active_read_xyz  c     SUBROUTINE active_read_xyz
132  c     ==================================================================  c     ==================================================================
133    C     \ev
134    
135    C     !USES:
136        implicit none        implicit none
137    
138  c     == global variables ==  c     == global variables ==
   
139  #include "EEPARAMS.h"  #include "EEPARAMS.h"
140  #include "SIZE.h"  #include "SIZE.h"
141    
142    C     !INPUT/OUTPUT PARAMETERS:
143  c     == routine arguments ==  c     == routine arguments ==
144    c     active_var_file: filename
145    c     active_var:      array
146    c     irec:            record number
147    c     myOptimIter:     number of optimization iteration (default: 0)
148    c     mythid:          thread number for this instance
149    c     doglobalread:    flag for global or local read/write
150    c                      (default: .false.)
151    c     lAdInit:         initialisation of corresponding adjoint
152    c                      variable and write to active file
153        character*(*) active_var_file        character*(*) active_var_file
154        _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)
155        integer irec        integer irec
# Line 142  c     == routine arguments == Line 159  c     == routine arguments ==
159        logical lAdInit        logical lAdInit
160        _RL     dummy        _RL     dummy
161    
162    C     !LOCAL VARIABLES:
163  c     == local variables ==  c     == local variables ==
   
164        integer mynr        integer mynr
165    
166  c     == end of interface ==  c     == end of interface ==
167    CEOP
168    
169        mynr = nr        mynr = nr
170        call active_read_rl( active_var_file, active_var, doglobalread,        call active_read_rl( active_var_file, active_var, doglobalread,
# Line 159  c     == end of interface == Line 177  c     == end of interface ==
177  c     ==================================================================  c     ==================================================================
178    
179    
180    CBOP
181    C     !ROUTINE: active_read_xz
182    C     !INTERFACE:
183        subroutine active_read_xz(        subroutine active_read_xz(
184       I                           active_var_file,       I                           active_var_file,
185       O                           active_var,       O                           active_var,
# Line 170  c     ================================== Line 191  c     ==================================
191       I                         , dummy       I                         , dummy
192       &                         )       &                         )
193    
194    C     !DESCRIPTION: \bv
195  c     ==================================================================  c     ==================================================================
196  c     SUBROUTINE active_read_xz  c     SUBROUTINE active_read_xz
197  c     ==================================================================  c     ==================================================================
 c  
198  c     o Read an active 2D xz-slice from file.  c     o Read an active 2D xz-slice from file.
 c  
199  c     started: heimbach@mit.edu 05-Mar-2001  c     started: heimbach@mit.edu 05-Mar-2001
 c  
200  c     ==================================================================  c     ==================================================================
201  c     SUBROUTINE active_read_xz  c     SUBROUTINE active_read_xz
202  c     ==================================================================  c     ==================================================================
203    C     \ev
204    
205    C     !USES:
206        implicit none        implicit none
207    
208  c     == global variables ==  c     == global variables ==
   
209  #include "EEPARAMS.h"  #include "EEPARAMS.h"
210  #include "SIZE.h"  #include "SIZE.h"
211    
212    C     !INPUT/OUTPUT PARAMETERS:
213  c     == routine arguments ==  c     == routine arguments ==
214    c     active_var_file: filename
215    c     active_var:      array
216    c     irec:            record number
217    c     myOptimIter:     number of optimization iteration (default: 0)
218    c     mythid:          thread number for this instance
219    c     doglobalread:    flag for global or local read/write
220    c                      (default: .false.)
221    c     lAdInit:         initialisation of corresponding adjoint
222    c                      variable and write to active file
223        character*(*) active_var_file        character*(*) active_var_file
224        _RL     active_var(1-olx:snx+olx,nsx,nsy)        _RL     active_var(1-olx:snx+olx,nsx,nsy)
225        integer irec        integer irec
# Line 200  c     == routine arguments == Line 229  c     == routine arguments ==
229        logical lAdInit        logical lAdInit
230        _RL     dummy        _RL     dummy
231    
232    C     !LOCAL VARIABLES:
233  c     == local variables ==  c     == local variables ==
   
234        integer mynr        integer mynr
235    
236  c     == end of interface ==  c     == end of interface ==
237    CEOP
238    
239        mynr = 1        mynr = nr
240        call active_read_xz_rl( active_var_file, active_var, doglobalread,        call active_read_xz_rl( active_var_file, active_var, doglobalread,
241       &                     lAdInit, irec, mynr,       &                     lAdInit, irec, mynr,
242       &                     FORWARD_SIMULATION, myOptimIter, mythid)       &                     FORWARD_SIMULATION, myOptimIter, mythid)
# Line 217  c     == end of interface == Line 247  c     == end of interface ==
247  c     ==================================================================  c     ==================================================================
248    
249    
250        subroutine active_read_yz(  CBOP
251    C     !ROUTINE: active_read_yz
252    C     !INTERFACE:
253           subroutine active_read_yz(
254       I                           active_var_file,       I                           active_var_file,
255       O                           active_var,       O                           active_var,
256       I                           irec,       I                           irec,
# Line 228  c     ================================== Line 261  c     ==================================
261       I                         , dummy       I                         , dummy
262       &                         )       &                         )
263    
264    C     !DESCRIPTION: \bv
265  c     ==================================================================  c     ==================================================================
266  c     SUBROUTINE active_read_yz  c     SUBROUTINE active_read_yz
267  c     ==================================================================  c     ==================================================================
 c  
268  c     o Read an active 2D yz-slice from file.  c     o Read an active 2D yz-slice from file.
 c  
269  c     started: heimbach@mit.edu 05-Mar-2001  c     started: heimbach@mit.edu 05-Mar-2001
 c  
270  c     ==================================================================  c     ==================================================================
271  c     SUBROUTINE active_read_yz  c     SUBROUTINE active_read_yz
272  c     ==================================================================  c     ==================================================================
273    C     \ev
274    
275    C     !USES:
276        implicit none        implicit none
277    
278  c     == global variables ==  c     == global variables ==
   
279  #include "EEPARAMS.h"  #include "EEPARAMS.h"
280  #include "SIZE.h"  #include "SIZE.h"
281    
282    C     !INPUT/OUTPUT PARAMETERS:
283  c     == routine arguments ==  c     == routine arguments ==
284    c     active_var_file: filename
285    c     active_var:      array
286    c     irec:            record number
287    c     myOptimIter:     number of optimization iteration (default: 0)
288    c     mythid:          thread number for this instance
289    c     doglobalread:    flag for global or local read/write
290    c                      (default: .false.)
291    c     lAdInit:         initialisation of corresponding adjoint
292    c                      variable and write to active file
293        character*(*) active_var_file        character*(*) active_var_file
294        _RL     active_var(1-oly:sny+oly,nsx,nsy)        _RL     active_var(1-oly:sny+oly,nsx,nsy)
295        integer irec        integer irec
# Line 258  c     == routine arguments == Line 299  c     == routine arguments ==
299        logical lAdInit        logical lAdInit
300        _RL     dummy        _RL     dummy
301    
302    C     !LOCAL VARIABLES:
303  c     == local variables ==  c     == local variables ==
   
304        integer mynr        integer mynr
305    
306  c     == end of interface ==  c     == end of interface ==
307    CEOP
308    
309        mynr = 1        mynr = nr
310        call active_read_yz_rl( active_var_file, active_var, doglobalread,        call active_read_yz_rl( active_var_file, active_var, doglobalread,
311       &                     lAdInit, irec, mynr,       &                     lAdInit, irec, mynr,
312       &                     FORWARD_SIMULATION, myOptimIter, mythid)       &                     FORWARD_SIMULATION, myOptimIter, mythid)
# Line 274  c     == end of interface == Line 316  c     == end of interface ==
316    
317  c     ==================================================================  c     ==================================================================
318    
319    CBOP
320    C     !ROUTINE: active_write_xy
321    C     !INTERFACE:
322        subroutine active_write_xy(        subroutine active_write_xy(
323       I                            active_var_file,       I                            active_var_file,
324       I                            active_var,       I                            active_var,
# Line 283  c     ================================== Line 328  c     ==================================
328       I                         , dummy       I                         , dummy
329       &                          )       &                          )
330    
331    C     !DESCRIPTION: \bv
332  c     ==================================================================  c     ==================================================================
333  c     SUBROUTINE active_write_xy  c     SUBROUTINE active_write_xy
334  c     ==================================================================  c     ==================================================================
 c  
335  c     o Write an active 2D variable to a file.  c     o Write an active 2D variable to a file.
 c  
336  c     started: Christian Eckert eckert@mit.edu 30-Jun-1999  c     started: Christian Eckert eckert@mit.edu 30-Jun-1999
 c  
 c     changed: Christian Eckert eckert@mit.edu 11-Feb-2000  
 c  
 c              - Restructured the code in order to create a package  
 c                for the MITgcmUV.  
 c  
337  c     ==================================================================  c     ==================================================================
338  c     SUBROUTINE active_write_xy  c     SUBROUTINE active_write_xy
339  c     ==================================================================  c     ==================================================================
340    C     \ev
341    
342    C     !USES:
343        implicit none        implicit none
344    
345  c     == global variables ==  c     == global variables ==
   
346  #include "EEPARAMS.h"  #include "EEPARAMS.h"
347  #include "SIZE.h"  #include "SIZE.h"
348    
349  c     == routine arguments ==  c     == routine arguments ==
350    c     active_var_file: filename
351    c     active_var:      array
352    c     irec:            record number
353    c     myOptimIter:     number of optimization iteration (default: 0)
354    c     mythid:          thread number for this instance
355        character*(*) active_var_file        character*(*) active_var_file
356        _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)
357        integer irec        integer irec
# Line 316  c     == routine arguments == Line 359  c     == routine arguments ==
359        integer mythid        integer mythid
360        _RL     dummy        _RL     dummy
361    
362    C     !LOCAL VARIABLES:
363  c     == local variables ==  c     == local variables ==
   
364        integer mynr        integer mynr
365        logical globalfile        logical globalfile
366    
367  c     == end of interface ==  c     == end of interface ==
368    CEOP
369    
370        mynr = 1        mynr = 1
371        globalfile = .false.        globalfile = .false.
# Line 335  c     == end of interface == Line 379  c     == end of interface ==
379    
380  c     ==================================================================  c     ==================================================================
381    
382    CBOP
383    C     !ROUTINE: active_write_xyz
384    C     !INTERFACE:
385        subroutine active_write_xyz(        subroutine active_write_xyz(
386       I                             active_var_file,       I                             active_var_file,
387       I                             active_var,       I                             active_var,
# Line 344  c     ================================== Line 391  c     ==================================
391       I                         , dummy       I                         , dummy
392       &                           )       &                           )
393    
394    C     !DESCRIPTION: \bv
395  c     ==================================================================  c     ==================================================================
396  c     SUBROUTINE active_write_xyz  c     SUBROUTINE active_write_xyz
397  c     ==================================================================  c     ==================================================================
 c  
398  c     o Write an active 3D variable to a file.  c     o Write an active 3D variable to a file.
 c  
399  c     started: Christian Eckert eckert@mit.edu 30-Jun-1999  c     started: Christian Eckert eckert@mit.edu 30-Jun-1999
 c  
 c     changed: Christian Eckert eckert@mit.edu 11-Feb-2000  
 c  
 c              - Restructured the code in order to create a package  
 c                for the MITgcmUV.  
 c  
400  c     ==================================================================  c     ==================================================================
401  c     SUBROUTINE active_write_xyz  c     SUBROUTINE active_write_xyz
402  c     ==================================================================  c     ==================================================================
403    C     \ev
404    
405    C     !USES:
406        implicit none        implicit none
407    
408  c     == global variables ==  c     == global variables ==
   
409  #include "EEPARAMS.h"  #include "EEPARAMS.h"
410  #include "SIZE.h"  #include "SIZE.h"
411    
412  c     == routine arguments ==  c     == routine arguments ==
413    c     active_var_file: filename
414    c     active_var:      array
415    c     irec:            record number
416    c     myOptimIter:     number of optimization iteration (default: 0)
417    c     mythid:          thread number for this instance
418        character*(*) active_var_file        character*(*) active_var_file
419        _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)
420        integer irec        integer irec
# Line 377  c     == routine arguments == Line 422  c     == routine arguments ==
422        integer mythid        integer mythid
423        _RL     dummy        _RL     dummy
424    
425    C     !LOCAL VARIABLES:
426  c     == local variables ==  c     == local variables ==
   
427        integer mynr        integer mynr
428        logical globalfile        logical globalfile
429    
430  c     == end of interface ==  c     == end of interface ==
431    CEOP
432    
433        mynr = nr        mynr = nr
434        globalfile = .false.        globalfile = .false.
# Line 395  c     == end of interface == Line 441  c     == end of interface ==
441    
442  c     ==================================================================  c     ==================================================================
443    
444    CBOP
445    C     !ROUTINE: active_write_xz
446    C     !INTERFACE:
447        subroutine active_write_xz(        subroutine active_write_xz(
448       I                            active_var_file,       I                            active_var_file,
449       I                            active_var,       I                            active_var,
# Line 404  c     ================================== Line 453  c     ==================================
453       I                         , dummy       I                         , dummy
454       &                          )       &                          )
455    
456    C     !DESCRIPTION: \bv
457  c     ==================================================================  c     ==================================================================
458  c     SUBROUTINE active_write_xz  c     SUBROUTINE active_write_xz
459  c     ==================================================================  c     ==================================================================
 c  
460  c     o Write an active 2D xz-slice to a file.  c     o Write an active 2D xz-slice to a file.
 c  
461  c     started: heimbach@mit.edu 05-Mar-2001  c     started: heimbach@mit.edu 05-Mar-2001
 c  
462  c     ==================================================================  c     ==================================================================
463  c     SUBROUTINE active_write_xz  c     SUBROUTINE active_write_xz
464  c     ==================================================================  c     ==================================================================
465    C     \ev
466    
467    C     !USES:
468        implicit none        implicit none
469    
470  c     == global variables ==  c     == global variables ==
   
471  #include "EEPARAMS.h"  #include "EEPARAMS.h"
472  #include "SIZE.h"  #include "SIZE.h"
473    
474  c     == routine arguments ==  c     == routine arguments ==
475    c     active_var_file: filename
476    c     active_var:      array
477    c     irec:            record number
478    c     myOptimIter:     number of optimization iteration (default: 0)
479    c     mythid:          thread number for this instance
480        character*(*) active_var_file        character*(*) active_var_file
481        _RL     active_var(1-olx:snx+olx,nsx,nsy)        _RL     active_var(1-olx:snx+olx,nsx,nsy)
482        integer irec        integer irec
# Line 432  c     == routine arguments == Line 484  c     == routine arguments ==
484        integer mythid        integer mythid
485        _RL     dummy        _RL     dummy
486    
487    C     !LOCAL VARIABLES:
488  c     == local variables ==  c     == local variables ==
   
489        integer mynr        integer mynr
490        logical globalfile        logical globalfile
491    
492  c     == end of interface ==  c     == end of interface ==
493    CEOP
494    
495        mynr = 1        mynr = nr
496        globalfile = .false.        globalfile = .false.
497    
498        call active_write_xz_rl( active_var_file, active_var, globalfile,        call active_write_xz_rl( active_var_file, active_var, globalfile,
# Line 451  c     == end of interface == Line 504  c     == end of interface ==
504    
505  c     ==================================================================  c     ==================================================================
506    
507    CBOP
508    C     !ROUTINE: active_write_yz
509    C     !INTERFACE:
510        subroutine active_write_yz(        subroutine active_write_yz(
511       I                            active_var_file,       I                            active_var_file,
512       I                            active_var,       I                            active_var,
# Line 460  c     ================================== Line 516  c     ==================================
516       I                         , dummy       I                         , dummy
517       &                          )       &                          )
518    
519    C     !DESCRIPTION: \bv
520  c     ==================================================================  c     ==================================================================
521  c     SUBROUTINE active_write_yz  c     SUBROUTINE active_write_yz
522  c     ==================================================================  c     ==================================================================
 c  
523  c     o Write an active 2D variable to a file.  c     o Write an active 2D variable to a file.
 c  
524  c     started: heimbach@mit.edu 05-Mar-2001  c     started: heimbach@mit.edu 05-Mar-2001
 c  
525  c     ==================================================================  c     ==================================================================
526  c     SUBROUTINE active_write_yz  c     SUBROUTINE active_write_yz
527  c     ==================================================================  c     ==================================================================
528    C     \ev
529    
530    C     !USES:
531        implicit none        implicit none
532    
533  c     == global variables ==  c     == global variables ==
   
534  #include "EEPARAMS.h"  #include "EEPARAMS.h"
535  #include "SIZE.h"  #include "SIZE.h"
536    
537  c     == routine arguments ==  c     == routine arguments ==
538    c     active_var_file: filename
539    c     active_var:      array
540    c     irec:            record number
541    c     myOptimIter:     number of optimization iteration (default: 0)
542    c     mythid:          thread number for this instance
543        character*(*) active_var_file        character*(*) active_var_file
544        _RL     active_var(1-oly:sny+oly,nsx,nsy)        _RL     active_var(1-oly:sny+oly,nsx,nsy)
545        integer irec        integer irec
# Line 488  c     == routine arguments == Line 547  c     == routine arguments ==
547        integer mythid        integer mythid
548        _RL     dummy        _RL     dummy
549    
550    C     !LOCAL VARIABLES:
551  c     == local variables ==  c     == local variables ==
   
552        integer mynr        integer mynr
553        logical globalfile        logical globalfile
554    
555  c     == end of interface ==  c     == end of interface ==
556    CEOP
557    
558        mynr = 1        mynr = nr
559        globalfile = .false.        globalfile = .false.
560    
561        call active_write_yz_rl( active_var_file, active_var, globalfile,        call active_write_yz_rl( active_var_file, active_var, globalfile,
# Line 813  c     == end of interface == Line 873  c     == end of interface ==
873    
874        return        return
875        end        end
876    
877    C     !ROUTINE: active_read_profile
878    C     !INTERFACE:
879          subroutine active_read_profile(
880         I                           active_num_file,
881         I                           nactive_var,
882         O                           active_var,
883         I                           active_varnum,
884         I                           irec,
885         I                           lAdInit,
886         I                           myOptimIter,
887         I                           mythid,
888         I                           dummy
889         &                         )
890    
891    c     ==================================================================
892    c     SUBROUTINE active_read_profile
893    c     ==================================================================
894    c     o Read an active 1D record from an profile data file.
895    c     ==================================================================
896    
897          implicit none
898    c     == global variables ==
899    #include "EEPARAMS.h"
900    #include "SIZE.h"
901    #include "profiles.h"
902    
903    c     == routine arguments ==
904    c     active_var_file: filename
905    c     nactive_var:     integer size of active_var
906    c     active_var:      array
907    c     active_varname:      name fo the quantity to save
908    c     irec:            record number
909    c     myOptimIter:     number of optimization iteration (default: 0)
910    c     mythid:          thread number for this instance
911    c     lAdInit:         initialisation of corresponding adjoint
912    c                      variable and write to active file
913          integer  nactive_var,active_num_file
914          _RL   active_var(nactive_var)
915          integer  irec,active_varnum
916          integer  myOptimIter
917          integer  mythid
918          logical  lAdInit
919          _RL      dummy
920    
921    
922          call active_read_profile_rl( fidforward(active_num_file),
923         &     active_num_file,
924         &     nactive_var, active_var, active_varnum, lAdInit,
925         &     irec, prof_ind_glob(active_num_file,irec),
926         &     FORWARD_SIMULATION, myOptimIter, mythid)
927    
928          return
929          end
930    
931    c     ==================================================================
932    c     ==================================================================
933    c     ==================================================================
934    
935    C     !ROUTINE: active_write_profile
936    C     !INTERFACE:
937          subroutine active_write_profile(
938         I                           active_num_file,
939         I                           nactive_var,
940         I                           active_var,
941         I                           active_varnum,
942         I                           irec,
943         I                           myOptimIter,
944         I                           mythid,
945         I                           dummy
946         &                         )
947    
948    C     !DESCRIPTION: \bv
949    c     ==================================================================
950    c     SUBROUTINE active_write_profile
951    c     ==================================================================
952    c     o Write an active 1D record from file.
953    c     ==================================================================
954    
955    C     !USES:
956          implicit none
957    
958    c     == global variables ==
959    #include "EEPARAMS.h"
960    #include "SIZE.h"
961    #include "profiles.h"
962    
963    c     == routine arguments ==
964    c     active_var_file: filename
965    c     nactive_var:     integer size of active_var
966    c     active_var:      array
967    c     active_varname:      name fo the quantity to save
968    c     irec:            record number
969    c     myOptimIter:     number of optimization iteration (default: 0)
970    c     mythid:          thread number for this instance
971          integer  nactive_var,active_num_file, active_varnum
972          _RL   active_var(nactive_var)
973          integer  irec
974          integer  myOptimIter
975          integer  mythid
976          _RL      dummy
977    
978          call active_write_profile_rl( fidforward(active_num_file),
979         &     active_num_file,
980         &  nactive_var, active_var, active_varnum,
981         &     irec, prof_ind_glob(active_num_file,irec),
982         &  FORWARD_SIMULATION, myOptimIter, mythid)
983    
984          return
985          end
986    
987    c     ==================================================================
988    
989    

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

  ViewVC Help
Powered by ViewVC 1.1.22