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

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

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

revision 1.2 by heimbach, Sat Dec 27 20:37:57 2014 UTC revision 1.3 by heimbach, Sat Jan 17 07:13:07 2015 UTC
# Line 42  C     !FUNCTIONS Line 42  C     !FUNCTIONS
42  ! original function  ! original function
43           active_var_p = active_var%v           active_var_p = active_var%v
44  ! set up for plain execution  ! set up for plain execution
          our_orig_mode=our_rev_mode  
45           our_rev_mode%arg_store=.FALSE.           our_rev_mode%arg_store=.FALSE.
46           our_rev_mode%arg_restore=.FALSE.           our_rev_mode%arg_restore=.FALSE.
47           our_rev_mode%plain=.TRUE.           our_rev_mode%plain=.TRUE.
# Line 66  C     !FUNCTIONS Line 65  C     !FUNCTIONS
65           our_rev_mode%plain=.TRUE.           our_rev_mode%plain=.TRUE.
66           our_rev_mode%tape=.FALSE.           our_rev_mode%tape=.FALSE.
67           our_rev_mode%adjoint=.FALSE.           our_rev_mode%adjoint=.FALSE.
68             if (oad_st_sz.lt.oad_st_ptr) call oad_st_grow()
69             oad_st(oad_st_ptr) = active_var_file
70             oad_st_ptr = oad_st_ptr+1
71             if (oad_it_sz.lt.oad_it_ptr) call oad_it_grow()
72             oad_it(oad_it_ptr) = iRec
73             oad_it_ptr = oad_it_ptr+1
74           call ACTIVE_READ_3D_RL(           call ACTIVE_READ_3D_RL(
75       &        active_var_file, active_var, doglobalread,       &        active_var_file, active_var, doglobalread,
76       &        useCurrentDir, lAdInit, iRec, myNr,       &        useCurrentDir, lAdInit, iRec, myNr,
77       &        FORWARD_SIMULATION, myOptimIter, myThid )       &        FORWARD_SIMULATION, myOptimIter, myThid )
78             our_rev_mode=our_orig_mode
79        end if        end if
80    
81        if (our_rev_mode%adjoint) then        if (our_rev_mode%adjoint) then
82  ! adjoint  ! adjoint
83             oad_st_ptr = oad_st_ptr-1
84             active_var_file = oad_st(oad_st_ptr)
85             oad_it_ptr = oad_it_ptr-1
86             iRec = oad_it(oad_it_ptr)
87           adpref = 'ad'           adpref = 'ad'
88           il   = ILNBLNK( active_var_file )           il   = ILNBLNK( active_var_file )
89           WRITE(fname(1:80),'(A)') ' '           WRITE(fname(1:80),'(A)') ' '
90  !         WRITE(fname(1:2+il),'(2A)') adpref, active_var_file(1:il)           WRITE(fname(1:2+il),'(2A)') adpref, active_var_file(1:il)
91           WRITE(fname(1:2+il),'(2A)') adpref, active_var_file  !         WRITE(fname(1:2+il),'(2A)') adpref, active_var_file
92           active_var_p = active_var%d           active_var_p = active_var%d
93  ! set up for plain execution  ! set up for plain execution
94           our_orig_mode=our_rev_mode           our_orig_mode=our_rev_mode

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

  ViewVC Help
Powered by ViewVC 1.1.22