/[MITgcm]/MITgcm/tools/OAD_support/ad_template.active_write_xy.F
ViewVC logotype

Diff of /MITgcm/tools/OAD_support/ad_template.active_write_xy.F

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

revision 1.1 by heimbach, Wed Feb 11 00:09:55 2015 UTC revision 1.3 by dgoldberg, Sun Apr 5 07:06:45 2015 UTC
# Line 36  C     !FUNCTIONS Line 36  C     !FUNCTIONS
36  #ifdef ALLOW_OPENAD_ACTIVE_WRITE  #ifdef ALLOW_OPENAD_ACTIVE_WRITE
37    
38        myNr = 1        myNr = 1
39          globalFile = .FALSE.
40        useCurrentDir = .FALSE.        useCurrentDir = .FALSE.
41    
42        if (our_rev_mode%plain) then        if (our_rev_mode%plain) then
# Line 61  C     !FUNCTIONS Line 62  C     !FUNCTIONS
62        if (our_rev_mode%tape) then        if (our_rev_mode%tape) then
63  ! taping  ! taping
64           our_orig_mode=our_rev_mode           our_orig_mode=our_rev_mode
65    ! original function
66             active_var_p = active_var%v
67           our_rev_mode%arg_store=.FALSE.           our_rev_mode%arg_store=.FALSE.
68           our_rev_mode%arg_restore=.FALSE.           our_rev_mode%arg_restore=.FALSE.
69           our_rev_mode%plain=.TRUE.           our_rev_mode%plain=.TRUE.
# Line 73  C     !FUNCTIONS Line 76  C     !FUNCTIONS
76           oad_it(oad_it_ptr) = iRec           oad_it(oad_it_ptr) = iRec
77           oad_it_ptr = oad_it_ptr+1           oad_it_ptr = oad_it_ptr+1
78           call ACTIVE_WRITE_3D_RL(           call ACTIVE_WRITE_3D_RL(
79       &        active_var_file, active_var, globalFile,       &        active_var_file, active_var_p, globalFile,
80       &        useCurrentDir, iRec, myNr,       &        useCurrentDir, iRec, myNr,
81       &        FORWARD_SIMULATION, myOptimIter, myThid )       &        FORWARD_SIMULATION, myOptimIter, myThid )
82           our_rev_mode=our_orig_mode           our_rev_mode=our_orig_mode
83    ! copy back
84             active_var%v = active_var_p
85        end if        end if
86    
87        if (our_rev_mode%adjoint) then        if (our_rev_mode%adjoint) then

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

  ViewVC Help
Powered by ViewVC 1.1.22