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

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

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

revision 1.5 by heimbach, Thu Mar 23 23:06:47 2006 UTC revision 1.8 by heimbach, Fri Jun 20 21:43:18 2008 UTC
# Line 19  c     o  adactive_read_yz         - Adjo Line 19  c     o  adactive_read_yz         - Adjo
19  c     o  adactive_write_xz        - Adjoint of active_write_xz  c     o  adactive_write_xz        - Adjoint of active_write_xz
20  c     o  adactive_write_yz        - Adjoint of active_write_yz  c     o  adactive_write_yz        - Adjoint of active_write_yz
21  c  c
 c     o  adactive_read_tile_xy    - Adjoint of active_read_tile_xy  
 c     o  adactive_read_tile_xyz   - Adjoint of active_read_tile_xyz  
 c     o  adactive_write_tile_xy   - Adjoint of active_write_tile_xy  
 c     o  adactive_write_tile_xyz  - Adjoint of active_write_tile_xyz  
 c  
 c     o  adactive_read_profile      - Adjoint of active_read_profile  
 c     o  adactive_write_profile     - Adjoint of active_write_profile  
 c  
22  c        changed: Christian Eckert eckert@mit.edu 24-Apr-2000  c        changed: Christian Eckert eckert@mit.edu 24-Apr-2000
23  c                 - Added routines that do active writes on tiles  c                 - Added routines that do active writes on tiles
24  c                   instead of a whole thread.  c                   instead of a whole thread.
# Line 41  c     ================================== Line 33  c     ==================================
33  CBOP  CBOP
34  C     !ROUTINE: adactive_read_xy  C     !ROUTINE: adactive_read_xy
35  C     !INTERFACE:  C     !INTERFACE:
36    #ifdef AUTODIFF_TAMC_COMPATIBILITY
37        subroutine adactive_read_xy(        subroutine adactive_read_xy(
38       I                             active_var_file,       I                             active_var_file,
39       I                             irec,       I                             irec,
# Line 50  C     !INTERFACE: Line 43  C     !INTERFACE:
43       I                             mythid,       I                             mythid,
44       I                             adactive_var       I                             adactive_var
45       &                           )       &                           )
46    #else
47          subroutine adactive_read_xy(
48         I                             active_var_file,
49         I                             adactive_var,
50         I                             irec,
51         I                             doglobalread,
52         I                             lAdInit,
53         I                             myiter,
54         I                             mythid
55         &                           )
56    #endif
57    
58  C     !DESCRIPTION: \bv  C     !DESCRIPTION: \bv
59  c     ==================================================================  c     ==================================================================
# Line 58  c     ================================== Line 62  c     ==================================
62  c     o Adjoint of active_read_xy.  c     o Adjoint of active_read_xy.
63  c     started: Christian Eckert eckert@mit.edu 24-May-1999  c     started: Christian Eckert eckert@mit.edu 24-May-1999
64  c     ==================================================================  c     ==================================================================
 c     SUBROUTINE adactive_read_xy  
 c     ==================================================================  
65  C     \ev  C     \ev
66    
67  C     !USES:  C     !USES:
# Line 119  CEOP Line 121  CEOP
121  CBOP  CBOP
122  C     !ROUTINE: adactive_read_xyz  C     !ROUTINE: adactive_read_xyz
123  C     !INTERFACE:  C     !INTERFACE:
124    #ifdef AUTODIFF_TAMC_COMPATIBILITY
125        subroutine adactive_read_xyz(        subroutine adactive_read_xyz(
126       I                              active_var_file,       I                              active_var_file,
127       I                              irec,       I                              irec,
# Line 128  C     !INTERFACE: Line 131  C     !INTERFACE:
131       I                              mythid,       I                              mythid,
132       I                              adactive_var       I                              adactive_var
133       &                            )       &                            )
134    #else
135          subroutine adactive_read_xyz(
136         I                              active_var_file,
137         I                              adactive_var,
138         I                              irec,
139         I                              doglobalread,
140         I                              lAdInit,
141         I                              myiter,
142         I                              mythid
143         &                            )
144    #endif
145    
146  C     !DESCRIPTION: \bv  C     !DESCRIPTION: \bv
147  c     ==================================================================  c     ==================================================================
# Line 136  c     ================================== Line 150  c     ==================================
150  c     o Adjoint of active_read_xyz.  c     o Adjoint of active_read_xyz.
151  c     started: Christian Eckert eckert@mit.edu 24-May-1999  c     started: Christian Eckert eckert@mit.edu 24-May-1999
152  c     ==================================================================  c     ==================================================================
 c     SUBROUTINE adactive_read_xyz  
 c     ==================================================================  
153  C     \ev  C     \ev
154    
155  C     !USES:  C     !USES:
# Line 196  CEOP Line 208  CEOP
208  CBOP  CBOP
209  C     !ROUTINE: adactive_read_xz  C     !ROUTINE: adactive_read_xz
210  C     !INTERFACE:  C     !INTERFACE:
211    #ifdef AUTODIFF_TAMC_COMPATIBILITY
212        subroutine adactive_read_xz(        subroutine adactive_read_xz(
213       I                              active_var_file,       I                              active_var_file,
214       I                              irec,       I                              irec,
# Line 205  C     !INTERFACE: Line 218  C     !INTERFACE:
218       I                              mythid,       I                              mythid,
219       I                              adactive_var       I                              adactive_var
220       &                            )       &                            )
221    #else
222          subroutine adactive_read_xz(
223         I                              active_var_file,
224         I                              adactive_var,
225         I                              irec,
226         I                              doglobalread,
227         I                              lAdInit,
228         I                              myiter,
229         I                              mythid
230         &                            )
231    #endif
232    
233  C     !DESCRIPTION: \bv  C     !DESCRIPTION: \bv
234  c     ==================================================================  c     ==================================================================
# Line 213  c     ================================== Line 237  c     ==================================
237  c     o Adjoint of active_read_xz.  c     o Adjoint of active_read_xz.
238  c     started: heimbach@mit.edu 05-Mar-2001  c     started: heimbach@mit.edu 05-Mar-2001
239  c     ==================================================================  c     ==================================================================
 c     SUBROUTINE adactive_read_xz  
 c     ==================================================================  
240  C     \ev  C     \ev
241    
242  C     !USES:  C     !USES:
# Line 273  CEOP Line 295  CEOP
295  CBOP  CBOP
296  C     !ROUTINE: adactive_read_yz  C     !ROUTINE: adactive_read_yz
297  C     !INTERFACE:  C     !INTERFACE:
298    #ifdef AUTODIFF_TAMC_COMPATIBILITY
299        subroutine adactive_read_yz(        subroutine adactive_read_yz(
300       I                              active_var_file,       I                              active_var_file,
301       I                              irec,       I                              irec,
# Line 282  C     !INTERFACE: Line 305  C     !INTERFACE:
305       I                              mythid,       I                              mythid,
306       I                              adactive_var       I                              adactive_var
307       &                            )       &                            )
308    #else
309          subroutine adactive_read_yz(
310         I                              active_var_file,
311         I                              adactive_var,
312         I                              irec,
313         I                              doglobalread,
314         I                              lAdInit,
315         I                              myiter,
316         I                              mythid
317         &                            )
318    #endif
319    
320  C     !DESCRIPTION: \bv  C     !DESCRIPTION: \bv
321  c     ==================================================================  c     ==================================================================
# Line 290  c     ================================== Line 324  c     ==================================
324  c     o Adjoint of active_read_yz.  c     o Adjoint of active_read_yz.
325  c     started: heimbach@mit.edu 05-Mar-2001  c     started: heimbach@mit.edu 05-Mar-2001
326  c     ==================================================================  c     ==================================================================
 c     SUBROUTINE adactive_read_yz  
 c     ==================================================================  
327  C     \ev  C     \ev
328    
329  C     !USES:  C     !USES:
# Line 350  CEOP Line 382  CEOP
382  CBOP  CBOP
383  C     !ROUTINE: adactive_read_xy  C     !ROUTINE: adactive_read_xy
384  C     !INTERFACE:  C     !INTERFACE:
385    #ifdef AUTODIFF_TAMC_COMPATIBILITY
386        subroutine adactive_write_xy(        subroutine adactive_write_xy(
387       I                              active_var_file,       I                              active_var_file,
388       I                              irec,       I                              irec,
# Line 358  C     !INTERFACE: Line 391  C     !INTERFACE:
391       U                              adactive_var,       U                              adactive_var,
392       I                              dummy       I                              dummy
393       &                            )       &                            )
394    #else
395          subroutine adactive_write_xy(
396         I                              active_var_file,
397         U                              adactive_var,
398         I                              irec,
399         I                              myiter,
400         I                              mythid,
401         I                              dummy
402         &                            )
403    #endif
404    
405    
406  C     !DESCRIPTION: \bv  C     !DESCRIPTION: \bv
# Line 367  c     ================================== Line 410  c     ==================================
410  c     o Adjoint of active_write_xy.  c     o Adjoint of active_write_xy.
411  c     started: Christian Eckert eckert@mit.edu 24-May-1999  c     started: Christian Eckert eckert@mit.edu 24-May-1999
412  c     ==================================================================  c     ==================================================================
 c     SUBROUTINE adactive_write_xy  
 c     ==================================================================  
413  C     \ev  C     \ev
414    
415  C     !USES:  C     !USES:
# Line 425  CEOP Line 466  CEOP
466  CBOP  CBOP
467  C     !ROUTINE: adactive_read_xyz  C     !ROUTINE: adactive_read_xyz
468  C     !INTERFACE:  C     !INTERFACE:
469    #ifdef AUTODIFF_TAMC_COMPATIBILITY
470        subroutine adactive_write_xyz(        subroutine adactive_write_xyz(
471       I                               active_var_file,       I                               active_var_file,
472       I                               irec,       I                               irec,
# Line 433  C     !INTERFACE: Line 475  C     !INTERFACE:
475       U                               adactive_var,       U                               adactive_var,
476       I                               dummy       I                               dummy
477       &                             )       &                             )
478    #else
479          subroutine adactive_write_xyz(
480         I                               active_var_file,
481         U                               adactive_var,
482         I                               irec,
483         I                               myiter,
484         I                               mythid,
485         I                               dummy
486         &                             )
487    #endif
488    
489    
490  C     !DESCRIPTION: \bv  C     !DESCRIPTION: \bv
# Line 442  c     ================================== Line 494  c     ==================================
494  c     o Adjoint of active_write_xyz.  c     o Adjoint of active_write_xyz.
495  c     started: Christian Eckert eckert@mit.edu 24-May-1999  c     started: Christian Eckert eckert@mit.edu 24-May-1999
496  c     ==================================================================  c     ==================================================================
 c     SUBROUTINE adactive_write_xyz  
 c     ==================================================================  
497  C     \ev  C     \ev
498    
499  C     !USES:  C     !USES:
# Line 500  CEOP Line 550  CEOP
550  CBOP  CBOP
551  C     !ROUTINE: adactive_read_xz  C     !ROUTINE: adactive_read_xz
552  C     !INTERFACE:  C     !INTERFACE:
553    #ifdef AUTODIFF_TAMC_COMPATIBILITY
554        subroutine adactive_write_xz(        subroutine adactive_write_xz(
555       I                               active_var_file,       I                               active_var_file,
556       I                               irec,       I                               irec,
# Line 508  C     !INTERFACE: Line 559  C     !INTERFACE:
559       U                               adactive_var,       U                               adactive_var,
560       I                               dummy       I                               dummy
561       &                             )       &                             )
562    #else
563          subroutine adactive_write_xz(
564         I                               active_var_file,
565         U                               adactive_var,
566         I                               irec,
567         I                               myiter,
568         I                               mythid,
569         I                               dummy
570         &                             )
571    #endif
572    
573  C     !DESCRIPTION: \bv  C     !DESCRIPTION: \bv
574  c     ==================================================================  c     ==================================================================
# Line 517  c     ================================== Line 577  c     ==================================
577  c     o Adjoint of active_write_xz.  c     o Adjoint of active_write_xz.
578  c     started: heimbach@mit.edu 05-Mar-2001  c     started: heimbach@mit.edu 05-Mar-2001
579  c     ==================================================================  c     ==================================================================
 c     SUBROUTINE adactive_write_xz  
 c     ==================================================================  
580  C     \ev  C     \ev
581    
582  C     !USES:  C     !USES:
# Line 575  CEOP Line 633  CEOP
633  CBOP  CBOP
634  C     !ROUTINE: adactive_read_yz  C     !ROUTINE: adactive_read_yz
635  C     !INTERFACE:  C     !INTERFACE:
636    #ifdef AUTODIFF_TAMC_COMPATIBILITY
637        subroutine adactive_write_yz(        subroutine adactive_write_yz(
638       I                               active_var_file,       I                               active_var_file,
639       I                               irec,       I                               irec,
# Line 583  C     !INTERFACE: Line 642  C     !INTERFACE:
642       U                               adactive_var,       U                               adactive_var,
643       I                               dummy       I                               dummy
644       &                             )       &                             )
645    #else
646          subroutine adactive_write_yz(
647         I                               active_var_file,
648         U                               adactive_var,
649         I                               irec,
650         I                               myiter,
651         I                               mythid,
652         I                               dummy
653         &                             )
654    #endif
655    
656    
657  C     !DESCRIPTION: \bv  C     !DESCRIPTION: \bv
# Line 592  c     ================================== Line 661  c     ==================================
661  c     o Adjoint of active_write_yz.  c     o Adjoint of active_write_yz.
662  c     started: heimbach@mit.edu 05-Mar-2001  c     started: heimbach@mit.edu 05-Mar-2001
663  c     ==================================================================  c     ==================================================================
 c     SUBROUTINE adactive_write_yz  
 c     ==================================================================  
664  C     \ev  C     \ev
665    
666  C     !USES:  C     !USES:
# Line 648  CEOP Line 715  CEOP
715        end        end
716    
717    
   
       subroutine adactive_read_tile_xy(  
      I                                  active_var_file,  
      I                                  irec,  
      I                                  doglobalread,  
      I                                  bi,  
      I                                  bj,  
      I                                  lAdInit,  
      I                                  myOptimIter,  
      I                                  mythid,  
      U                                  adactive_var  
      &                                )  
   
 c     ==================================================================  
 c     SUBROUTINE active_read_tile_xy  
 c     ==================================================================  
 c  
 c     o Adjoint of active_read_tile_xy.  
 c  
 c     started: Christian Eckert eckert@mit.edu 24-May-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     changed: Patrick Heimbach heimbach@mit.edu 27-May-2000  
 c  
 c              - changed suboutine argument list:  
 c                dropped mycurrentiter, mycurrenttime  
 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     adactive_var(1-olx:snx+olx,1-oly:sny+oly,nsx,nsy)  
       integer irec  
       integer myOptimIter  
       integer mythid  
       integer bi  
       integer bj  
       logical doglobalread  
       logical lAdInit  
   
 c     == local variables ==  
   
       integer mynr  
       integer il  
       integer ilnblnk  
       character*(2) adpref  
       character*(80) fname  
   
 c     == functions ==  
   
       external ilnblnk  
   
 c     == end of interface ==  
   
       mynr   = 1  
       adpref = 'ad'  
       write(fname(1:80),'(a)') ' '  
   
       il     = ilnblnk(active_var_file)  
   
       write(fname(1:2),   '(a)') adpref  
       write(fname(3:2+il),'(a)') active_var_file(1:il)  
   
       call active_read_tile_rl(  
      I                          fname,  
      U                          adactive_var,  
      I                          doglobalread,  
      I                          lAdInit,  
      I                          irec,  
      I                          mynr,  
      I                          bi,  
      I                          bj,  
      I                          REVERSE_SIMULATION,  
      I                          myOptimIter,  
      I                          mythid  
      &                        )  
   
       end  
   
   
       subroutine adactive_read_tile_xyz(  
      I                                   active_var_file,  
      I                                   irec,  
      I                                   doglobalread,  
      I                                   bi,  
      I                                   bj,  
      I                                   lAdInit,  
      I                                   myOptimIter,  
      I                                   mythid,  
      U                                   adactive_var  
      &                                 )  
   
 c     ==================================================================  
 c     SUBROUTINE adactive_read_tile_xyz  
 c     ==================================================================  
 c  
 c     o Adjoint of active_read_tile_xyz.  
 c  
 c     started: Christian Eckert eckert@mit.edu 24-May-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     changed: Patrick Heimbach heimbach@mit.edu 27-May-2000  
 c  
 c              - changed suboutine argument list:  
 c                dropped mycurrentiter, mycurrenttime  
 c  
 c     ==================================================================  
 c     SUBROUTINE adactive_read_tile_xyz  
 c     ==================================================================  
   
       implicit none  
   
 c     == global variables ==  
   
 #include "EEPARAMS.h"  
 #include "SIZE.h"  
   
 c     == routine arguments ==  
   
       character*(*) active_var_file  
       _RL     adactive_var(1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy)  
       integer irec  
       integer myOptimIter  
       integer mythid  
       integer bi  
       integer bj  
       logical doglobalread  
       logical lAdInit  
   
 c     == local variables ==  
   
       integer mynr  
       integer il  
       integer ilnblnk  
       character*(2) adpref  
       character*(80) fname  
   
 c     == functions ==  
   
       external ilnblnk  
   
 c     == end of interface ==  
   
       mynr   = nr  
       adpref = 'ad'  
       write(fname(1:80),'(a)') ' '  
   
       il     = ilnblnk(active_var_file)  
   
       write(fname(1:2),   '(a)') adpref  
       write(fname(3:2+il),'(a)') active_var_file(1:il)  
   
       call active_read_tile_rl(  
      I                          fname,  
      U                          adactive_var,  
      I                          doglobalread,  
      I                          lAdInit,  
      I                          irec,  
      I                          mynr,  
      I                          bi,  
      I                          bj,  
      I                          REVERSE_SIMULATION,  
      I                          myOptimIter,  
      I                          mythid  
      &                        )  
   
       end  
   
   
       subroutine adactive_write_tile_xy(  
      I                                   active_var_file,  
      I                                   irec,  
      I                                   bi,  
      I                                   bj,  
      I                                   myOptimIter,  
      I                                   mythid,  
      U                                   adactive_var  
      &                                 )  
   
   
 c     ==================================================================  
 c     SUBROUTINE adactive_write_tile_xy  
 c     ==================================================================  
 c  
 c     o Adjoint of active_write_tile_xy.  
 c  
 c     started: Christian Eckert eckert@mit.edu 24-May-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     changed: Patrick Heimbach heimbach@mit.edu 27-May-2000  
 c  
 c              - changed suboutine argument list:  
 c                dropped mycurrentiter, mycurrenttime  
 c  
 c     ==================================================================  
 c     SUBROUTINE adactive_write_tile_xy  
 c     ==================================================================  
   
       implicit none  
   
 c     == global variables ==  
   
 #include "EEPARAMS.h"  
 #include "SIZE.h"  
   
 c     == routine arguments ==  
   
       character*(*) active_var_file  
       _RL     adactive_var(1-olx:snx+olx,1-oly:sny+oly,nsx,nsy)  
       integer irec  
       integer bi  
       integer bj  
       integer myOptimIter  
       integer mythid  
   
 c     == local variables ==  
   
       integer mynr  
       integer il  
       integer ilnblnk  
       character*(2) adpref  
       character*(80) fname  
       logical globalfile  
   
 c     == functions ==  
   
       external ilnblnk  
   
 c     == end of interface ==  
   
       mynr   = 1  
       adpref = 'ad'  
       write(fname(1:80),'(a)') ' '  
   
       il     = ilnblnk(active_var_file)  
   
       write(fname(1:2),   '(a)') adpref  
       write(fname(3:2+il),'(a)') active_var_file(1:il)  
   
       globalfile = .false.  
   
       call active_write_tile_rl(  
      I                           fname,  
      U                           adactive_var,  
      I                           globalfile,  
      I                           irec,  
      I                           mynr,  
      I                           bi,  
      I                           bj,  
      I                           REVERSE_SIMULATION,  
      I                           myOptimIter,  
      I                           mythid  
      &                         )  
   
       end  
   
   
       subroutine adactive_write_tile_xyz(  
      I                                    active_var_file,  
      I                                    irec,  
      I                                    bi,  
      I                                    bj,  
      I                                    myOptimIter,  
      I                                    mythid,  
      U                                    adactive_var  
      &                                  )  
   
   
 c     ==================================================================  
 c     SUBROUTINE adactive_write_tile_xyz  
 c     ==================================================================  
 c  
 c     o Adjoint of active_write_tile_xyz.  
 c  
 c     started: Christian Eckert eckert@mit.edu 24-May-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     changed: Patrick Heimbach heimbach@mit.edu 27-May-2000  
 c  
 c              - changed suboutine argument list:  
 c                dropped mycurrentiter, mycurrenttime  
 c  
 c     ==================================================================  
 c     SUBROUTINE adactive_write_tile_xyz  
 c     ==================================================================  
   
       implicit none  
   
 c     == global variables ==  
   
 #include "EEPARAMS.h"  
 #include "SIZE.h"  
   
 c     == routine arguments ==  
   
       character*(*) active_var_file  
       _RL     adactive_var(1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy)  
       integer irec  
       integer bi  
       integer bj  
       integer myOptimIter  
       integer mythid  
   
 c     == local variables ==  
   
       integer mynr  
       integer il  
       integer ilnblnk  
       character*(2) adpref  
       character*(80) fname  
       logical globalfile  
   
 c     == functions ==  
   
       external ilnblnk  
   
 c     == end of interface ==  
   
       mynr   = nr  
       adpref = 'ad'  
       write(fname(1:80),'(a)') ' '  
   
       il     = ilnblnk(active_var_file)  
   
       write(fname(1:2),'(a)') adpref  
       write(fname(3:2+il),'(a)') active_var_file(1:il)  
   
       globalfile = .false.  
   
       call active_write_tile_rl(  
      I                           fname,  
      U                           adactive_var,  
      I                           globalfile,  
      I                           irec,  
      I                           mynr,  
      I                           bi,  
      I                           bj,  
      I                           REVERSE_SIMULATION,  
      I                           myOptimIter,  
      I                           mythid  
      &                         )  
   
       end  
   
       subroutine adactive_read_profile(  
      I                              active_num_file,  
      I                              nadactive_var,  
      I                           active_varnum,  
      I                              irec,  
      I                              lAdInit,  
      I                              myiter,  
      I                              mythid,  
      I                              adactive_var  
      &                            )  
   
 C     !DESCRIPTION: \bv  
 c     ==================================================================  
 c     SUBROUTINE adactive_read_profile  
 c     ==================================================================  
 c     o Adjoint of active_read_profile.  
 c     ==================================================================  
       implicit none  
   
 c     == global variables ==  
 #include "EEPARAMS.h"  
 #include "SIZE.h"  
 #include "profiles.h"  
   
 c     == routine arguments ==  
 c     active_var_file: filename  
 c     nadactive_var:   integer size of adactive_var  
 c     adactive_var:    array  
 c     irec:            record number  
 c     myIter:          number of optimization iteration (default: 0)  
 c     mythid:          thread number for this instance  
 c     doglobalread:    flag for global or local read/write  
 c                      (default: .false.)  
 c     lAdInit:         initialisation of corresponding adjoint  
 c                      variable and write to active file  
       integer nadactive_var,active_num_file  
       _RL    adactive_var(nadactive_var)  
       integer irec,active_varnum  
       integer myiter  
       integer mythid  
       logical lAdInit  
   
       call active_read_profile_rl( fidadjoint(active_num_file) ,  
      &     active_num_file,  
      &  nadactive_var, adactive_var, active_varnum, lAdInit,  
      &     irec, prof_ind_glob(active_num_file,irec),  
      &  REVERSE_SIMULATION, myiter, mythid)  
   
       end  
   
 c     ==================================================================  
 c     ==================================================================  
 c     ==================================================================  
   
   
       subroutine adactive_write_profile(  
      I                              active_num_file,  
      I                              nadactive_var,  
      I                           active_varnum,  
      I                              irec,  
      I                              myiter,  
      I                              mythid,  
      I                              adactive_var,  
      I                              dummy  
      &                            )  
   
 C     !DESCRIPTION: \bv  
 c     ==================================================================  
 c     SUBROUTINE adactive_write_profile  
 c     ==================================================================  
 c     o Adjoint of active_write_profile.  
 c     ==================================================================  
   
       implicit none  
   
 c     == global variables ==  
 #include "EEPARAMS.h"  
 #include "SIZE.h"  
 #include "profiles.h"  
   
 c     == routine arguments ==  
 c     active_var_file: filename  
 c     nadactive_var:   integer size of adactive_var  
 c     adactive_var:    array  
 c     irec:            record number  
 c     myIter:          number of optimization iteration (default: 0)  
 c     mythid:          thread number for this instance  
 c     doglobalread:    flag for global or local read/write  
 c                      (default: .false.)  
 c     lAdInit:         initialisation of corresponding adjoint  
 c                      variable and write to active file  
       integer nadactive_var,active_num_file  
       _RL    adactive_var(nadactive_var)  
       integer irec,active_varnum  
       integer myiter  
       integer mythid  
       _RL     dummy  
   
   
 c     == end of interface ==  
   
       call active_write_profile_rl( fidadjoint(active_num_file) ,  
      &     active_num_file,  
      &  nadactive_var, adactive_var, active_varnum,  
      &     irec, prof_ind_glob(active_num_file,irec),  
      &  REVERSE_SIMULATION, myiter, mythid)  
   
       end  
   
 c     ==================================================================  
   
   

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

  ViewVC Help
Powered by ViewVC 1.1.22