       subroutine box_forward(ILEV1)
          use OpenAD_tape
          use OpenAD_rev

          ! original arguments get inserted before version
          ! and declared here together with all local variables
          ! generated by xaifBooster

      use w2f__types
      use active_module
      use all_globals_mod
      use all_globals_mod
      IMPLICIT NONE
C
C     **** Global Variables ****
C
      INTEGER(w2f__i8) OpenAD_Symbol_570
      INTEGER(w2f__i8) OpenAD_Symbol_571
      INTEGER(w2f__i8) OpenAD_Symbol_572
      INTEGER(w2f__i8) OpenAD_Symbol_573
      INTEGER(w2f__i8) OpenAD_Symbol_574
      INTEGER(w2f__i8) OpenAD_Symbol_575
C
C     **** Parameters and Result ****
C
      INTEGER(w2f__i4) ILEV1
C
C     **** Local Variables and functions ****
C
      EXTERNAL box_cycle_fields
      EXTERNAL box_density
      EXTERNAL box_robert_filter
      EXTERNAL box_timestep
      EXTERNAL box_transport
      INTEGER(w2f__i4) IKEY
      INTEGER(w2f__i4) ISBYTE
      PARAMETER ( ISBYTE = 8)
      INTEGER(w2f__i4) L
      INTEGER(w2f__i4) NLEV1
      PARAMETER ( NLEV1 = 73)
      INTEGER(w2f__i4) NLEV2
      PARAMETER ( NLEV2 = 50)
      INTEGER(w2f__i8) OpenAD_Symbol_576
C
C     **** statements ****
C

          integer iaddr
          external iaddr

         if (our_rev_mode%plain) then
! original function
      IKEY = ILEV1
      CALL box_density(TNOW,SNOW,RHO)
      CALL box_transport(RHO,UVEL)
      CALL box_timestep(GAMMA_T,TSTAR,NULLFORCE,UVEL,TNOW,TOLD,TNEW)
      CALL box_timestep(GAMMA_S,SSTAR,FW,UVEL,SNOW,SOLD,SNEW)
      CALL box_robert_filter(TNOW,TOLD,TNEW)
      CALL box_robert_filter(SNOW,SOLD,SNEW)
      CALL box_cycle_fields()
      DO L = 1, 3, 1
        IF (TNOW(L)%v .LT. (-2.0D00)) THEN
          TNOW(INT(L))%v = 2.0D00
        ENDIF
      END DO
      
          end if
          if (our_rev_mode%tape) then
! taping
      IKEY = ILEV1
      CALL box_density(TNOW,SNOW,RHO)
      CALL box_transport(RHO,UVEL)
      CALL box_timestep(GAMMA_T,TSTAR,NULLFORCE,UVEL,TNOW,TOLD,TNEW)
      CALL box_timestep(GAMMA_S,SSTAR,FW,UVEL,SNOW,SOLD,SNEW)
      CALL box_robert_filter(TNOW,TOLD,TNEW)
      CALL box_robert_filter(SNOW,SOLD,SNEW)
      CALL box_cycle_fields()
      OpenAD_Symbol_573 = 0_w2f__i8
      DO L = 1, 3, 1
        IF (TNOW(L)%v .LT. (-2.0D00)) THEN
          TNOW(INT(L))%v = 2.0D00
          integer_tape(integer_tape_pointer) = L
          integer_tape_pointer = integer_tape_pointer+1
          OpenAD_Symbol_574 = 1_w2f__i8
          integer_tape(integer_tape_pointer) = OpenAD_Symbol_574
          integer_tape_pointer = integer_tape_pointer+1
        ELSE
          OpenAD_Symbol_575 = 0_w2f__i8
          integer_tape(integer_tape_pointer) = OpenAD_Symbol_575
          integer_tape_pointer = integer_tape_pointer+1
        ENDIF
        OpenAD_Symbol_573 = (INT(OpenAD_Symbol_573) + INT(1_w2f__i8))
      END DO
          integer_tape(integer_tape_pointer) = OpenAD_Symbol_573
          integer_tape_pointer = integer_tape_pointer+1
      
          end if 
          if (our_rev_mode%adjoint) then
! adjoint
          integer_tape_pointer = integer_tape_pointer-1
          OpenAD_Symbol_570 = integer_tape(integer_tape_pointer)
      OpenAD_Symbol_571 = 1
      DO WHILE(INT(OpenAD_Symbol_571) .LE. INT(OpenAD_Symbol_570))
          integer_tape_pointer = integer_tape_pointer-1
          OpenAD_Symbol_572 = integer_tape(integer_tape_pointer)
        IF(OpenAD_Symbol_572 .ne. 0) THEN
          integer_tape_pointer = integer_tape_pointer-1
          OpenAD_Symbol_576 = integer_tape(integer_tape_pointer)
          TNOW(INT(OpenAD_Symbol_576))%d = 0.0d0
        ENDIF
        OpenAD_Symbol_571 = INT(OpenAD_Symbol_571) + 1
      END DO
      CALL box_cycle_fields()
      CALL box_robert_filter(SNOW,SOLD,SNEW)
      CALL box_robert_filter(TNOW,TOLD,TNEW)
      CALL box_timestep(GAMMA_S,SSTAR,FW,UVEL,SNOW,SOLD,SNEW)
      CALL box_timestep(GAMMA_T,TSTAR,NULLFORCE,UVEL,TNOW,TOLD,TNEW)
      CALL box_transport(RHO,UVEL)
      CALL box_density(TNOW,SNOW,RHO)
          end if 
        end subroutine box_forward
       subroutine box_final_state()
          use OpenAD_tape
          use OpenAD_rev

          ! original arguments get inserted before version
          ! and declared here together with all local variables
          ! generated by xaifBooster

      use w2f__types
      use active_module
      use all_globals_mod
      use all_globals_mod
      IMPLICIT NONE
C
C     **** Global Variables ****
C
      INTEGER(w2f__i8) OpenAD_Symbol_670
      INTEGER(w2f__i8) OpenAD_Symbol_671
      INTEGER(w2f__i8) OpenAD_Symbol_672
      INTEGER(w2f__i8) OpenAD_Symbol_673
      INTEGER(w2f__i8) OpenAD_Symbol_674
      INTEGER(w2f__i8) OpenAD_Symbol_675
C
C     **** Local Variables and functions ****
C
      INTEGER(w2f__i4) ISBYTE
      PARAMETER ( ISBYTE = 8)
      INTEGER(w2f__i4) L
      INTEGER(w2f__i4) NLEV1
      PARAMETER ( NLEV1 = 73)
      INTEGER(w2f__i4) NLEV2
      PARAMETER ( NLEV2 = 50)
      INTEGER(w2f__i8) OpenAD_Symbol_680
      INTEGER(w2f__i8) OpenAD_Symbol_681
      INTEGER(w2f__i8) OpenAD_Symbol_676
      INTEGER(w2f__i8) OpenAD_Symbol_677
      INTEGER(w2f__i8) OpenAD_Symbol_678
      INTEGER(w2f__i8) OpenAD_Symbol_679
C
C     **** statements ****
C

          integer iaddr
          external iaddr

         if (our_rev_mode%plain) then
! original function
      DO L = 1, 6, 1
        TSVEC(INT(L))%v = 0.0D00
      END DO
      DO L = 1, 3, 1
        TSVEC(INT(L))%v = TNOW(L)%v
        TSVEC(INT(L+3))%v = SNOW(L)%v
      END DO
      
          end if
          if (our_rev_mode%tape) then
! taping
      OpenAD_Symbol_674 = 0_w2f__i8
      DO L = 1, 6, 1
        TSVEC(INT(L))%v = 0.0D00
          integer_tape(integer_tape_pointer) = L
          integer_tape_pointer = integer_tape_pointer+1
        OpenAD_Symbol_674 = (INT(OpenAD_Symbol_674) + INT(1_w2f__i8))
      END DO
          integer_tape(integer_tape_pointer) = OpenAD_Symbol_674
          integer_tape_pointer = integer_tape_pointer+1
      OpenAD_Symbol_675 = 0_w2f__i8
      DO L = 1, 3, 1
        TSVEC(INT(L))%v = TNOW(L)%v
          integer_tape(integer_tape_pointer) = L
          integer_tape_pointer = integer_tape_pointer+1
          integer_tape(integer_tape_pointer) = L
          integer_tape_pointer = integer_tape_pointer+1
        TSVEC(INT(L+3))%v = SNOW(L)%v
          integer_tape(integer_tape_pointer) = L
          integer_tape_pointer = integer_tape_pointer+1
        OpenAD_Symbol_677 = (L + INT(3_w2f__i8))
          integer_tape(integer_tape_pointer) = OpenAD_Symbol_677
          integer_tape_pointer = integer_tape_pointer+1
        OpenAD_Symbol_675 = (INT(OpenAD_Symbol_675) + INT(1_w2f__i8))
      END DO
          integer_tape(integer_tape_pointer) = OpenAD_Symbol_675
          integer_tape_pointer = integer_tape_pointer+1
      
          end if 
          if (our_rev_mode%adjoint) then
! adjoint
          integer_tape_pointer = integer_tape_pointer-1
          OpenAD_Symbol_670 = integer_tape(integer_tape_pointer)
      OpenAD_Symbol_671 = 1
      DO WHILE(INT(OpenAD_Symbol_671) .LE. INT(OpenAD_Symbol_670))
          integer_tape_pointer = integer_tape_pointer-1
          OpenAD_Symbol_678 = integer_tape(integer_tape_pointer)
          integer_tape_pointer = integer_tape_pointer-1
          OpenAD_Symbol_679 = integer_tape(integer_tape_pointer)
          if (iaddr(TSVEC(INT(OpenAD_Symbol_678))) .ne. iaddr(SNOW(INT(O
     +penAD_Symbol_679)))) then
            SNOW(INT(OpenAD_Symbol_679))%d = SNOW(INT(OpenAD_Symbol_679)
     +)%d+TSVEC(INT(OpenAD_Symbol_678))%d
            TSVEC(INT(OpenAD_Symbol_678))%d = 0
          end if
          integer_tape_pointer = integer_tape_pointer-1
          OpenAD_Symbol_680 = integer_tape(integer_tape_pointer)
          integer_tape_pointer = integer_tape_pointer-1
          OpenAD_Symbol_681 = integer_tape(integer_tape_pointer)
          if (iaddr(TSVEC(INT(OpenAD_Symbol_680))) .ne. iaddr(TNOW(INT(O
     +penAD_Symbol_681)))) then
            TNOW(INT(OpenAD_Symbol_681))%d = TNOW(INT(OpenAD_Symbol_681)
     +)%d+TSVEC(INT(OpenAD_Symbol_680))%d
            TSVEC(INT(OpenAD_Symbol_680))%d = 0
          end if
        OpenAD_Symbol_671 = INT(OpenAD_Symbol_671) + 1
      END DO
          integer_tape_pointer = integer_tape_pointer-1
          OpenAD_Symbol_672 = integer_tape(integer_tape_pointer)
      OpenAD_Symbol_673 = 1
      DO WHILE(INT(OpenAD_Symbol_673) .LE. INT(OpenAD_Symbol_672))
          integer_tape_pointer = integer_tape_pointer-1
          OpenAD_Symbol_676 = integer_tape(integer_tape_pointer)
          TSVEC(INT(OpenAD_Symbol_676))%d = 0.0d0
        OpenAD_Symbol_673 = INT(OpenAD_Symbol_673) + 1
      END DO
          end if 
        end subroutine box_final_state
       subroutine box_ini_fields()
          use OpenAD_tape
          use OpenAD_rev

          ! original arguments get inserted before version
          ! and declared here together with all local variables
          ! generated by xaifBooster

      use w2f__types
      use active_module
      use all_globals_mod
      use all_globals_mod
      IMPLICIT NONE
C
C     **** Global Variables ****
C
      REAL(w2f__8) OpenAD_Symbol_140
      REAL(w2f__8) OpenAD_Symbol_141
      REAL(w2f__8) OpenAD_Symbol_142
      REAL(w2f__8) OpenAD_Symbol_138
      REAL(w2f__8) OpenAD_Symbol_144
      REAL(w2f__8) OpenAD_Symbol_139
      REAL(w2f__8) OpenAD_Symbol_150
      REAL(w2f__8) OpenAD_Symbol_145
      REAL(w2f__8) OpenAD_Symbol_151
      REAL(w2f__8) OpenAD_Symbol_146
      REAL(w2f__8) OpenAD_Symbol_152
      REAL(w2f__8) OpenAD_Symbol_147
      REAL(w2f__8) OpenAD_Symbol_153
      REAL(w2f__8) OpenAD_Symbol_148
      REAL(w2f__8) OpenAD_Symbol_154
      type(active) :: OpenAD_Symbol_440
      REAL(w2f__8) OpenAD_Symbol_441
      REAL(w2f__8) OpenAD_Symbol_436
      type(active) :: OpenAD_Symbol_442
      REAL(w2f__8) OpenAD_Symbol_437
      REAL(w2f__8) OpenAD_Symbol_443
      type(active) :: OpenAD_Symbol_438
      type(active) :: OpenAD_Symbol_444
      REAL(w2f__8) OpenAD_Symbol_439
      type(active) :: OpenAD_Symbol_450
      REAL(w2f__8) OpenAD_Symbol_445
      REAL(w2f__8) OpenAD_Symbol_451
      type(active) :: OpenAD_Symbol_446
      type(active) :: OpenAD_Symbol_452
      REAL(w2f__8) OpenAD_Symbol_447
      REAL(w2f__8) OpenAD_Symbol_453
      type(active) :: OpenAD_Symbol_448
      type(active) :: OpenAD_Symbol_454
      REAL(w2f__8) OpenAD_Symbol_449
      INTEGER(w2f__i8) OpenAD_Symbol_682
      INTEGER(w2f__i8) OpenAD_Symbol_683
      INTEGER(w2f__i8) OpenAD_Symbol_684
      INTEGER(w2f__i8) OpenAD_Symbol_690
      INTEGER(w2f__i8) OpenAD_Symbol_685
      INTEGER(w2f__i8) OpenAD_Symbol_686
      INTEGER(w2f__i8) OpenAD_Symbol_687
      INTEGER(w2f__i8) OpenAD_Symbol_688
      INTEGER(w2f__i8) OpenAD_Symbol_689
C
C     **** Local Variables and functions ****
C
      INTEGER(w2f__i4) ISBYTE
      PARAMETER ( ISBYTE = 8)
      INTEGER(w2f__i4) L
      INTEGER(w2f__i4) NLEV1
      PARAMETER ( NLEV1 = 73)
      INTEGER(w2f__i4) NLEV2
      PARAMETER ( NLEV2 = 50)
      INTEGER(w2f__i8) OpenAD_Symbol_700
      REAL(w2f__8) OpenAD_Symbol_701
      INTEGER(w2f__i8) OpenAD_Symbol_702
      INTEGER(w2f__i8) OpenAD_Symbol_703
      INTEGER(w2f__i8) OpenAD_Symbol_704
      INTEGER(w2f__i8) OpenAD_Symbol_710
      REAL(w2f__8) OpenAD_Symbol_705
      INTEGER(w2f__i8) OpenAD_Symbol_711
      INTEGER(w2f__i8) OpenAD_Symbol_706
      INTEGER(w2f__i8) OpenAD_Symbol_712
      REAL(w2f__8) OpenAD_Symbol_707
      INTEGER(w2f__i8) OpenAD_Symbol_713
      INTEGER(w2f__i8) OpenAD_Symbol_708
      INTEGER(w2f__i8) OpenAD_Symbol_714
      INTEGER(w2f__i8) OpenAD_Symbol_709
      INTEGER(w2f__i8) OpenAD_Symbol_720
      INTEGER(w2f__i8) OpenAD_Symbol_715
      INTEGER(w2f__i8) OpenAD_Symbol_721
      INTEGER(w2f__i8) OpenAD_Symbol_716
      INTEGER(w2f__i8) OpenAD_Symbol_717
      INTEGER(w2f__i8) OpenAD_Symbol_718
      INTEGER(w2f__i8) OpenAD_Symbol_719
      REAL(w2f__8) OpenAD_Symbol_691
      REAL(w2f__8) OpenAD_Symbol_692
      REAL(w2f__8) OpenAD_Symbol_693
      REAL(w2f__8) OpenAD_Symbol_694
      REAL(w2f__8) OpenAD_Symbol_695
      INTEGER(w2f__i8) OpenAD_Symbol_696
      INTEGER(w2f__i8) OpenAD_Symbol_697
      INTEGER(w2f__i8) OpenAD_Symbol_698
      REAL(w2f__8) OpenAD_Symbol_699
C
C     **** statements ****
C

          integer iaddr
          external iaddr

         if (our_rev_mode%plain) then
! original function
      THC_TOT%v = 0.0D00
      THC_T%v = 0.0D00
      THC_S%v = 0.0D00
      METRIC1%v = 0.0D00
      METRIC2%v = 0.0D00
      METRIC%v = 0.0D00
      NULLFORCE(1)%v = 0.0D00
      NULLFORCE(2)%v = 0.0D00
      FW(1)%v = (AREA(1)%v*(HUNDRED%v/YEAR%v)*3.5D+01)
      FW(2)%v = (-FW(1)%v)
      TSTAR(1)%v = 2.2D+01
      TSTAR(2)%v = 0.0D00
      SSTAR(1)%v = 3.6D+01
      SSTAR(2)%v = 3.4D+01
      UBAR%v = (SV%v*2.0D+01)
      T(1)%v = 2.0D+01
      T(2)%v = 1.0D00
      T(3)%v = 1.0D00
      S(1)%v = 3.55D+01
      S(2)%v = 3.45D+01
      S(3)%v = 3.45D+01
      DO L = 1, 6, 1
        TSVEC(INT(L))%v = 0.0D00
      END DO
      DO L = 1, 3, 1
        T(INT(L))%v = (T(L)%v+XX(L)%v)
        S(INT(L))%v = (S(L)%v+XX(L+3)%v)
      END DO
      DO L = 1, 3, 1
        TNEW(INT(L))%v = T(L)%v
        SNEW(INT(L))%v = S(L)%v
        TOLD(INT(L))%v = T(L)%v
        SOLD(INT(L))%v = S(L)%v
        TNOW(INT(L))%v = T(L)%v
        SNOW(INT(L))%v = S(L)%v
      END DO
      UVEL%v = UBAR%v
      
          end if
          if (our_rev_mode%tape) then
! taping
      THC_TOT%v = 0.0D00
      THC_T%v = 0.0D00
      THC_S%v = 0.0D00
      METRIC1%v = 0.0D00
      METRIC2%v = 0.0D00
      METRIC%v = 0.0D00
      NULLFORCE(1)%v = 0.0D00
      NULLFORCE(2)%v = 0.0D00
      OpenAD_Symbol_141 = (HUNDRED%v/YEAR%v)
      OpenAD_Symbol_138 = (OpenAD_Symbol_141 * 3.5D+01)
      OpenAD_Symbol_146 = (AREA(1)%v*OpenAD_Symbol_138)
      OpenAD_Symbol_139 = OpenAD_Symbol_138
      OpenAD_Symbol_144 = (INT(1 _w2f__i8)/YEAR%v)
      OpenAD_Symbol_145 = (-(HUNDRED%v/(YEAR%v*YEAR%v)))
      OpenAD_Symbol_142 = 3.5D+01
      OpenAD_Symbol_140 = AREA(1)%v
      FW(1)%v = OpenAD_Symbol_146
      OpenAD_Symbol_436 = (OpenAD_Symbol_142 * OpenAD_Symbol_140)
      OpenAD_Symbol_437 = (OpenAD_Symbol_144 * OpenAD_Symbol_436)
      OpenAD_Symbol_439 = (OpenAD_Symbol_145 * OpenAD_Symbol_436)
      OpenAD_Symbol_441 = OpenAD_Symbol_139
          double_tape(double_tape_pointer) = OpenAD_Symbol_437
          double_tape_pointer = double_tape_pointer+1
          double_tape(double_tape_pointer) = OpenAD_Symbol_439
          double_tape_pointer = double_tape_pointer+1
          double_tape(double_tape_pointer) = OpenAD_Symbol_441
          double_tape_pointer = double_tape_pointer+1
      FW(2)%v = (-FW(1)%v)
      OpenAD_Symbol_147 = (-1_w2f__i8)
      TSTAR(1)%v = 2.2D+01
      TSTAR(2)%v = 0.0D00
      SSTAR(1)%v = 3.6D+01
      SSTAR(2)%v = 3.4D+01
      OpenAD_Symbol_443 = OpenAD_Symbol_147
          double_tape(double_tape_pointer) = OpenAD_Symbol_443
          double_tape_pointer = double_tape_pointer+1
      OpenAD_Symbol_150 = (SV%v*2.0D+01)
      OpenAD_Symbol_148 = 2.0D+01
      UBAR%v = OpenAD_Symbol_150
      T(1)%v = 2.0D+01
      T(2)%v = 1.0D00
      T(3)%v = 1.0D00
      S(1)%v = 3.55D+01
      S(2)%v = 3.45D+01
      S(3)%v = 3.45D+01
      OpenAD_Symbol_445 = OpenAD_Symbol_148
          double_tape(double_tape_pointer) = OpenAD_Symbol_445
          double_tape_pointer = double_tape_pointer+1
      OpenAD_Symbol_688 = 0_w2f__i8
      DO L = 1, 6, 1
        TSVEC(INT(L))%v = 0.0D00
          integer_tape(integer_tape_pointer) = L
          integer_tape_pointer = integer_tape_pointer+1
        OpenAD_Symbol_688 = (INT(OpenAD_Symbol_688) + INT(1_w2f__i8))
      END DO
          integer_tape(integer_tape_pointer) = OpenAD_Symbol_688
          integer_tape_pointer = integer_tape_pointer+1
      OpenAD_Symbol_689 = 0_w2f__i8
      DO L = 1, 3, 1
        T(INT(L))%v = (T(L)%v+XX(L)%v)
        OpenAD_Symbol_151 = 1_w2f__i8
        OpenAD_Symbol_152 = 1_w2f__i8
        OpenAD_Symbol_447 = OpenAD_Symbol_151
        OpenAD_Symbol_449 = OpenAD_Symbol_152
          integer_tape(integer_tape_pointer) = L
          integer_tape_pointer = integer_tape_pointer+1
          integer_tape(integer_tape_pointer) = L
          integer_tape_pointer = integer_tape_pointer+1
          double_tape(double_tape_pointer) = OpenAD_Symbol_447
          double_tape_pointer = double_tape_pointer+1
          integer_tape(integer_tape_pointer) = L
          integer_tape_pointer = integer_tape_pointer+1
          double_tape(double_tape_pointer) = OpenAD_Symbol_449
          double_tape_pointer = double_tape_pointer+1
          integer_tape(integer_tape_pointer) = L
          integer_tape_pointer = integer_tape_pointer+1
        S(INT(L))%v = (S(L)%v+XX(L+3)%v)
        OpenAD_Symbol_153 = 1_w2f__i8
        OpenAD_Symbol_154 = 1_w2f__i8
        OpenAD_Symbol_451 = OpenAD_Symbol_153
        OpenAD_Symbol_453 = OpenAD_Symbol_154
        OpenAD_Symbol_697 = (L + INT(3_w2f__i8))
          integer_tape(integer_tape_pointer) = OpenAD_Symbol_697
          integer_tape_pointer = integer_tape_pointer+1
          integer_tape(integer_tape_pointer) = L
          integer_tape_pointer = integer_tape_pointer+1
          double_tape(double_tape_pointer) = OpenAD_Symbol_451
          double_tape_pointer = double_tape_pointer+1
          integer_tape(integer_tape_pointer) = L
          integer_tape_pointer = integer_tape_pointer+1
          double_tape(double_tape_pointer) = OpenAD_Symbol_453
          double_tape_pointer = double_tape_pointer+1
          integer_tape(integer_tape_pointer) = L
          integer_tape_pointer = integer_tape_pointer+1
        OpenAD_Symbol_689 = (INT(OpenAD_Symbol_689) + INT(1_w2f__i8))
      END DO
          integer_tape(integer_tape_pointer) = OpenAD_Symbol_689
          integer_tape_pointer = integer_tape_pointer+1
      OpenAD_Symbol_690 = 0_w2f__i8
      DO L = 1, 3, 1
        TNEW(INT(L))%v = T(L)%v
          integer_tape(integer_tape_pointer) = L
          integer_tape_pointer = integer_tape_pointer+1
          integer_tape(integer_tape_pointer) = L
          integer_tape_pointer = integer_tape_pointer+1
        SNEW(INT(L))%v = S(L)%v
          integer_tape(integer_tape_pointer) = L
          integer_tape_pointer = integer_tape_pointer+1
          integer_tape(integer_tape_pointer) = L
          integer_tape_pointer = integer_tape_pointer+1
        TOLD(INT(L))%v = T(L)%v
          integer_tape(integer_tape_pointer) = L
          integer_tape_pointer = integer_tape_pointer+1
          integer_tape(integer_tape_pointer) = L
          integer_tape_pointer = integer_tape_pointer+1
        SOLD(INT(L))%v = S(L)%v
          integer_tape(integer_tape_pointer) = L
          integer_tape_pointer = integer_tape_pointer+1
          integer_tape(integer_tape_pointer) = L
          integer_tape_pointer = integer_tape_pointer+1
        TNOW(INT(L))%v = T(L)%v
          integer_tape(integer_tape_pointer) = L
          integer_tape_pointer = integer_tape_pointer+1
          integer_tape(integer_tape_pointer) = L
          integer_tape_pointer = integer_tape_pointer+1
        SNOW(INT(L))%v = S(L)%v
          integer_tape(integer_tape_pointer) = L
          integer_tape_pointer = integer_tape_pointer+1
          integer_tape(integer_tape_pointer) = L
          integer_tape_pointer = integer_tape_pointer+1
        OpenAD_Symbol_690 = (INT(OpenAD_Symbol_690) + INT(1_w2f__i8))
      END DO
          integer_tape(integer_tape_pointer) = OpenAD_Symbol_690
          integer_tape_pointer = integer_tape_pointer+1
      UVEL%v = UBAR%v
      
          end if 
          if (our_rev_mode%adjoint) then
! adjoint
          if (iaddr(UVEL) .ne. iaddr(UBAR)) then
            UBAR%d = UBAR%d+UVEL%d
            UVEL%d = 0
          end if
          integer_tape_pointer = integer_tape_pointer-1
          OpenAD_Symbol_682 = integer_tape(integer_tape_pointer)
      OpenAD_Symbol_683 = 1
      DO WHILE(INT(OpenAD_Symbol_683) .LE. INT(OpenAD_Symbol_682))
          integer_tape_pointer = integer_tape_pointer-1
          OpenAD_Symbol_710 = integer_tape(integer_tape_pointer)
          integer_tape_pointer = integer_tape_pointer-1
          OpenAD_Symbol_711 = integer_tape(integer_tape_pointer)
          if (iaddr(SNOW(INT(OpenAD_Symbol_710))) .ne. iaddr(S(INT(OpenA
     +D_Symbol_711)))) then
            S(INT(OpenAD_Symbol_711))%d = S(INT(OpenAD_Symbol_711))%d+SN
     +OW(INT(OpenAD_Symbol_710))%d
            SNOW(INT(OpenAD_Symbol_710))%d = 0
          end if
          integer_tape_pointer = integer_tape_pointer-1
          OpenAD_Symbol_712 = integer_tape(integer_tape_pointer)
          integer_tape_pointer = integer_tape_pointer-1
          OpenAD_Symbol_713 = integer_tape(integer_tape_pointer)
          if (iaddr(TNOW(INT(OpenAD_Symbol_712))) .ne. iaddr(T(INT(OpenA
     +D_Symbol_713)))) then
            T(INT(OpenAD_Symbol_713))%d = T(INT(OpenAD_Symbol_713))%d+TN
     +OW(INT(OpenAD_Symbol_712))%d
            TNOW(INT(OpenAD_Symbol_712))%d = 0
          end if
          integer_tape_pointer = integer_tape_pointer-1
          OpenAD_Symbol_714 = integer_tape(integer_tape_pointer)
          integer_tape_pointer = integer_tape_pointer-1
          OpenAD_Symbol_715 = integer_tape(integer_tape_pointer)
          if (iaddr(SOLD(INT(OpenAD_Symbol_714))) .ne. iaddr(S(INT(OpenA
     +D_Symbol_715)))) then
            S(INT(OpenAD_Symbol_715))%d = S(INT(OpenAD_Symbol_715))%d+SO
     +LD(INT(OpenAD_Symbol_714))%d
            SOLD(INT(OpenAD_Symbol_714))%d = 0
          end if
          integer_tape_pointer = integer_tape_pointer-1
          OpenAD_Symbol_716 = integer_tape(integer_tape_pointer)
          integer_tape_pointer = integer_tape_pointer-1
          OpenAD_Symbol_717 = integer_tape(integer_tape_pointer)
          if (iaddr(TOLD(INT(OpenAD_Symbol_716))) .ne. iaddr(T(INT(OpenA
     +D_Symbol_717)))) then
            T(INT(OpenAD_Symbol_717))%d = T(INT(OpenAD_Symbol_717))%d+TO
     +LD(INT(OpenAD_Symbol_716))%d
            TOLD(INT(OpenAD_Symbol_716))%d = 0
          end if
          integer_tape_pointer = integer_tape_pointer-1
          OpenAD_Symbol_718 = integer_tape(integer_tape_pointer)
          integer_tape_pointer = integer_tape_pointer-1
          OpenAD_Symbol_719 = integer_tape(integer_tape_pointer)
          if (iaddr(SNEW(INT(OpenAD_Symbol_718))) .ne. iaddr(S(INT(OpenA
     +D_Symbol_719)))) then
            S(INT(OpenAD_Symbol_719))%d = S(INT(OpenAD_Symbol_719))%d+SN
     +EW(INT(OpenAD_Symbol_718))%d
            SNEW(INT(OpenAD_Symbol_718))%d = 0
          end if
          integer_tape_pointer = integer_tape_pointer-1
          OpenAD_Symbol_720 = integer_tape(integer_tape_pointer)
          integer_tape_pointer = integer_tape_pointer-1
          OpenAD_Symbol_721 = integer_tape(integer_tape_pointer)
          if (iaddr(TNEW(INT(OpenAD_Symbol_720))) .ne. iaddr(T(INT(OpenA
     +D_Symbol_721)))) then
            T(INT(OpenAD_Symbol_721))%d = T(INT(OpenAD_Symbol_721))%d+TN
     +EW(INT(OpenAD_Symbol_720))%d
            TNEW(INT(OpenAD_Symbol_720))%d = 0
          end if
        OpenAD_Symbol_683 = INT(OpenAD_Symbol_683) + 1
      END DO
          integer_tape_pointer = integer_tape_pointer-1
          OpenAD_Symbol_684 = integer_tape(integer_tape_pointer)
      OpenAD_Symbol_685 = 1
      DO WHILE(INT(OpenAD_Symbol_685) .LE. INT(OpenAD_Symbol_684))
          integer_tape_pointer = integer_tape_pointer-1
          OpenAD_Symbol_698 = integer_tape(integer_tape_pointer)
          double_tape_pointer = double_tape_pointer-1
          OpenAD_Symbol_699 = double_tape(double_tape_pointer)
          OpenAD_Symbol_454%d = OpenAD_Symbol_454%d+S(INT(OpenAD_Symbol_
     +698))%d*OpenAD_Symbol_699
          integer_tape_pointer = integer_tape_pointer-1
          OpenAD_Symbol_700 = integer_tape(integer_tape_pointer)
          double_tape_pointer = double_tape_pointer-1
          OpenAD_Symbol_701 = double_tape(double_tape_pointer)
          OpenAD_Symbol_452%d = OpenAD_Symbol_452%d+S(INT(OpenAD_Symbol_
     +700))%d*OpenAD_Symbol_701
          S(INT(OpenAD_Symbol_700))%d = 0.0d0
          integer_tape_pointer = integer_tape_pointer-1
          OpenAD_Symbol_702 = integer_tape(integer_tape_pointer)
          S(INT(OpenAD_Symbol_702))%d = S(INT(OpenAD_Symbol_702))%d+Open
     +AD_Symbol_452%d
          OpenAD_Symbol_452%d = 0.0d0
          integer_tape_pointer = integer_tape_pointer-1
          OpenAD_Symbol_703 = integer_tape(integer_tape_pointer)
          XX(INT(OpenAD_Symbol_703))%d = XX(INT(OpenAD_Symbol_703))%d+Op
     +enAD_Symbol_454%d
          OpenAD_Symbol_454%d = 0.0d0
          integer_tape_pointer = integer_tape_pointer-1
          OpenAD_Symbol_704 = integer_tape(integer_tape_pointer)
          double_tape_pointer = double_tape_pointer-1
          OpenAD_Symbol_705 = double_tape(double_tape_pointer)
          OpenAD_Symbol_450%d = OpenAD_Symbol_450%d+T(INT(OpenAD_Symbol_
     +704))%d*OpenAD_Symbol_705
          integer_tape_pointer = integer_tape_pointer-1
          OpenAD_Symbol_706 = integer_tape(integer_tape_pointer)
          double_tape_pointer = double_tape_pointer-1
          OpenAD_Symbol_707 = double_tape(double_tape_pointer)
          OpenAD_Symbol_448%d = OpenAD_Symbol_448%d+T(INT(OpenAD_Symbol_
     +706))%d*OpenAD_Symbol_707
          T(INT(OpenAD_Symbol_706))%d = 0.0d0
          integer_tape_pointer = integer_tape_pointer-1
          OpenAD_Symbol_708 = integer_tape(integer_tape_pointer)
          T(INT(OpenAD_Symbol_708))%d = T(INT(OpenAD_Symbol_708))%d+Open
     +AD_Symbol_448%d
          OpenAD_Symbol_448%d = 0.0d0
          integer_tape_pointer = integer_tape_pointer-1
          OpenAD_Symbol_709 = integer_tape(integer_tape_pointer)
          XX(INT(OpenAD_Symbol_709))%d = XX(INT(OpenAD_Symbol_709))%d+Op
     +enAD_Symbol_450%d
          OpenAD_Symbol_450%d = 0.0d0
        OpenAD_Symbol_685 = INT(OpenAD_Symbol_685) + 1
      END DO
          integer_tape_pointer = integer_tape_pointer-1
          OpenAD_Symbol_686 = integer_tape(integer_tape_pointer)
      OpenAD_Symbol_687 = 1
      DO WHILE(INT(OpenAD_Symbol_687) .LE. INT(OpenAD_Symbol_686))
          integer_tape_pointer = integer_tape_pointer-1
          OpenAD_Symbol_696 = integer_tape(integer_tape_pointer)
          TSVEC(INT(OpenAD_Symbol_696))%d = 0.0d0
        OpenAD_Symbol_687 = INT(OpenAD_Symbol_687) + 1
      END DO
          double_tape_pointer = double_tape_pointer-1
          OpenAD_Symbol_691 = double_tape(double_tape_pointer)
          OpenAD_Symbol_446%d = OpenAD_Symbol_446%d+UBAR%d*OpenAD_Symbol
     +_691
          UBAR%d = 0.0d0
          S(3)%d = 0.0d0
          S(2)%d = 0.0d0
          S(1)%d = 0.0d0
          T(3)%d = 0.0d0
          T(2)%d = 0.0d0
          T(1)%d = 0.0d0
          SV%d = SV%d+OpenAD_Symbol_446%d
          OpenAD_Symbol_446%d = 0.0d0
          double_tape_pointer = double_tape_pointer-1
          OpenAD_Symbol_692 = double_tape(double_tape_pointer)
          OpenAD_Symbol_444%d = OpenAD_Symbol_444%d+FW(2)%d*OpenAD_Symbo
     +l_692
          FW(2)%d = 0.0d0
          SSTAR(2)%d = 0.0d0
          SSTAR(1)%d = 0.0d0
          TSTAR(2)%d = 0.0d0
          TSTAR(1)%d = 0.0d0
          FW(1)%d = FW(1)%d+OpenAD_Symbol_444%d
          OpenAD_Symbol_444%d = 0.0d0
          double_tape_pointer = double_tape_pointer-1
          OpenAD_Symbol_693 = double_tape(double_tape_pointer)
          OpenAD_Symbol_442%d = OpenAD_Symbol_442%d+FW(1)%d*OpenAD_Symbo
     +l_693
          double_tape_pointer = double_tape_pointer-1
          OpenAD_Symbol_694 = double_tape(double_tape_pointer)
          OpenAD_Symbol_440%d = OpenAD_Symbol_440%d+FW(1)%d*OpenAD_Symbo
     +l_694
          double_tape_pointer = double_tape_pointer-1
          OpenAD_Symbol_695 = double_tape(double_tape_pointer)
          OpenAD_Symbol_438%d = OpenAD_Symbol_438%d+FW(1)%d*OpenAD_Symbo
     +l_695
          FW(1)%d = 0.0d0
          HUNDRED%d = HUNDRED%d+OpenAD_Symbol_438%d
          OpenAD_Symbol_438%d = 0.0d0
          YEAR%d = YEAR%d+OpenAD_Symbol_440%d
          OpenAD_Symbol_440%d = 0.0d0
          AREA(1)%d = AREA(1)%d+OpenAD_Symbol_442%d
          OpenAD_Symbol_442%d = 0.0d0
          NULLFORCE(2)%d = 0.0d0
          NULLFORCE(1)%d = 0.0d0
          METRIC%d = 0.0d0
          METRIC2%d = 0.0d0
          METRIC1%d = 0.0d0
          THC_S%d = 0.0d0
          THC_T%d = 0.0d0
          THC_TOT%d = 0.0d0
          end if 
        end subroutine box_ini_fields
       subroutine box_ini_params()
          use OpenAD_tape
          use OpenAD_rev

          ! original arguments get inserted before version
          ! and declared here together with all local variables
          ! generated by xaifBooster

      use w2f__types
      use active_module
      use all_globals_mod
      use all_globals_mod
      IMPLICIT NONE
C
C     **** Global Variables ****
C
      REAL(w2f__8) OpenAD_Symbol_201
      REAL(w2f__8) OpenAD_Symbol_202
      REAL(w2f__8) OpenAD_Symbol_203
      REAL(w2f__8) OpenAD_Symbol_204
      REAL(w2f__8) OpenAD_Symbol_210
      REAL(w2f__8) OpenAD_Symbol_205
      REAL(w2f__8) OpenAD_Symbol_160
      REAL(w2f__8) OpenAD_Symbol_155
      REAL(w2f__8) OpenAD_Symbol_211
      REAL(w2f__8) OpenAD_Symbol_206
      REAL(w2f__8) OpenAD_Symbol_161
      REAL(w2f__8) OpenAD_Symbol_156
      REAL(w2f__8) OpenAD_Symbol_162
      REAL(w2f__8) OpenAD_Symbol_157
      REAL(w2f__8) OpenAD_Symbol_213
      REAL(w2f__8) OpenAD_Symbol_208
      REAL(w2f__8) OpenAD_Symbol_163
      REAL(w2f__8) OpenAD_Symbol_158
      REAL(w2f__8) OpenAD_Symbol_214
      REAL(w2f__8) OpenAD_Symbol_209
      REAL(w2f__8) OpenAD_Symbol_164
      REAL(w2f__8) OpenAD_Symbol_159
      REAL(w2f__8) OpenAD_Symbol_220
      REAL(w2f__8) OpenAD_Symbol_170
      REAL(w2f__8) OpenAD_Symbol_165
      REAL(w2f__8) OpenAD_Symbol_216
      REAL(w2f__8) OpenAD_Symbol_171
      REAL(w2f__8) OpenAD_Symbol_166
      REAL(w2f__8) OpenAD_Symbol_222
      REAL(w2f__8) OpenAD_Symbol_217
      REAL(w2f__8) OpenAD_Symbol_172
      REAL(w2f__8) OpenAD_Symbol_167
      REAL(w2f__8) OpenAD_Symbol_223
      REAL(w2f__8) OpenAD_Symbol_173
      REAL(w2f__8) OpenAD_Symbol_168
      REAL(w2f__8) OpenAD_Symbol_219
      REAL(w2f__8) OpenAD_Symbol_174
      REAL(w2f__8) OpenAD_Symbol_169
      REAL(w2f__8) OpenAD_Symbol_225
      REAL(w2f__8) OpenAD_Symbol_180
      REAL(w2f__8) OpenAD_Symbol_175
      REAL(w2f__8) OpenAD_Symbol_231
      REAL(w2f__8) OpenAD_Symbol_226
      REAL(w2f__8) OpenAD_Symbol_181
      REAL(w2f__8) OpenAD_Symbol_176
      REAL(w2f__8) OpenAD_Symbol_232
      REAL(w2f__8) OpenAD_Symbol_182
      REAL(w2f__8) OpenAD_Symbol_177
      REAL(w2f__8) OpenAD_Symbol_228
      REAL(w2f__8) OpenAD_Symbol_183
      REAL(w2f__8) OpenAD_Symbol_178
      REAL(w2f__8) OpenAD_Symbol_234
      REAL(w2f__8) OpenAD_Symbol_229
      REAL(w2f__8) OpenAD_Symbol_184
      REAL(w2f__8) OpenAD_Symbol_179
      REAL(w2f__8) OpenAD_Symbol_240
      REAL(w2f__8) OpenAD_Symbol_235
      REAL(w2f__8) OpenAD_Symbol_190
      REAL(w2f__8) OpenAD_Symbol_241
      REAL(w2f__8) OpenAD_Symbol_186
      REAL(w2f__8) OpenAD_Symbol_242
      REAL(w2f__8) OpenAD_Symbol_237
      REAL(w2f__8) OpenAD_Symbol_192
      REAL(w2f__8) OpenAD_Symbol_187
      REAL(w2f__8) OpenAD_Symbol_243
      REAL(w2f__8) OpenAD_Symbol_238
      REAL(w2f__8) OpenAD_Symbol_193
      REAL(w2f__8) OpenAD_Symbol_188
      REAL(w2f__8) OpenAD_Symbol_244
      REAL(w2f__8) OpenAD_Symbol_239
      REAL(w2f__8) OpenAD_Symbol_250
      REAL(w2f__8) OpenAD_Symbol_195
      REAL(w2f__8) OpenAD_Symbol_251
      REAL(w2f__8) OpenAD_Symbol_246
      REAL(w2f__8) OpenAD_Symbol_196
      REAL(w2f__8) OpenAD_Symbol_252
      REAL(w2f__8) OpenAD_Symbol_247
      REAL(w2f__8) OpenAD_Symbol_253
      REAL(w2f__8) OpenAD_Symbol_248
      REAL(w2f__8) OpenAD_Symbol_198
      REAL(w2f__8) OpenAD_Symbol_254
      REAL(w2f__8) OpenAD_Symbol_249
      REAL(w2f__8) OpenAD_Symbol_199
      REAL(w2f__8) OpenAD_Symbol_260
      REAL(w2f__8) OpenAD_Symbol_255
      REAL(w2f__8) OpenAD_Symbol_261
      REAL(w2f__8) OpenAD_Symbol_262
      REAL(w2f__8) OpenAD_Symbol_257
      REAL(w2f__8) OpenAD_Symbol_263
      REAL(w2f__8) OpenAD_Symbol_258
      REAL(w2f__8) OpenAD_Symbol_264
      REAL(w2f__8) OpenAD_Symbol_259
      REAL(w2f__8) OpenAD_Symbol_270
      REAL(w2f__8) OpenAD_Symbol_265
      REAL(w2f__8) OpenAD_Symbol_271
      REAL(w2f__8) OpenAD_Symbol_266
      REAL(w2f__8) OpenAD_Symbol_272
      REAL(w2f__8) OpenAD_Symbol_267
      REAL(w2f__8) OpenAD_Symbol_273
      REAL(w2f__8) OpenAD_Symbol_268
      REAL(w2f__8) OpenAD_Symbol_274
      REAL(w2f__8) OpenAD_Symbol_269
      REAL(w2f__8) OpenAD_Symbol_275
      type(active) :: OpenAD_Symbol_500
      REAL(w2f__8) OpenAD_Symbol_501
      type(active) :: OpenAD_Symbol_502
      REAL(w2f__8) OpenAD_Symbol_503
      type(active) :: OpenAD_Symbol_504
      REAL(w2f__8) OpenAD_Symbol_510
      REAL(w2f__8) OpenAD_Symbol_505
      type(active) :: OpenAD_Symbol_460
      REAL(w2f__8) OpenAD_Symbol_455
      type(active) :: OpenAD_Symbol_511
      type(active) :: OpenAD_Symbol_506
      REAL(w2f__8) OpenAD_Symbol_461
      type(active) :: OpenAD_Symbol_456
      REAL(w2f__8) OpenAD_Symbol_512
      REAL(w2f__8) OpenAD_Symbol_507
      type(active) :: OpenAD_Symbol_462
      REAL(w2f__8) OpenAD_Symbol_457
      type(active) :: OpenAD_Symbol_513
      REAL(w2f__8) OpenAD_Symbol_508
      REAL(w2f__8) OpenAD_Symbol_463
      type(active) :: OpenAD_Symbol_458
      REAL(w2f__8) OpenAD_Symbol_514
      type(active) :: OpenAD_Symbol_509
      type(active) :: OpenAD_Symbol_464
      REAL(w2f__8) OpenAD_Symbol_459
      REAL(w2f__8) OpenAD_Symbol_520
      type(active) :: OpenAD_Symbol_515
      type(active) :: OpenAD_Symbol_470
      REAL(w2f__8) OpenAD_Symbol_465
      type(active) :: OpenAD_Symbol_521
      REAL(w2f__8) OpenAD_Symbol_516
      REAL(w2f__8) OpenAD_Symbol_471
      type(active) :: OpenAD_Symbol_466
      REAL(w2f__8) OpenAD_Symbol_522
      type(active) :: OpenAD_Symbol_517
      type(active) :: OpenAD_Symbol_472
      REAL(w2f__8) OpenAD_Symbol_467
      type(active) :: OpenAD_Symbol_523
      REAL(w2f__8) OpenAD_Symbol_518
      REAL(w2f__8) OpenAD_Symbol_473
      type(active) :: OpenAD_Symbol_468
      REAL(w2f__8) OpenAD_Symbol_524
      type(active) :: OpenAD_Symbol_519
      type(active) :: OpenAD_Symbol_474
      REAL(w2f__8) OpenAD_Symbol_469
      REAL(w2f__8) OpenAD_Symbol_530
      type(active) :: OpenAD_Symbol_525
      type(active) :: OpenAD_Symbol_480
      REAL(w2f__8) OpenAD_Symbol_475
      type(active) :: OpenAD_Symbol_531
      REAL(w2f__8) OpenAD_Symbol_526
      REAL(w2f__8) OpenAD_Symbol_481
      type(active) :: OpenAD_Symbol_476
      REAL(w2f__8) OpenAD_Symbol_532
      type(active) :: OpenAD_Symbol_527
      type(active) :: OpenAD_Symbol_482
      REAL(w2f__8) OpenAD_Symbol_477
      type(active) :: OpenAD_Symbol_533
      REAL(w2f__8) OpenAD_Symbol_528
      REAL(w2f__8) OpenAD_Symbol_483
      type(active) :: OpenAD_Symbol_478
      REAL(w2f__8) OpenAD_Symbol_534
      type(active) :: OpenAD_Symbol_529
      type(active) :: OpenAD_Symbol_484
      REAL(w2f__8) OpenAD_Symbol_479
      type(active) :: OpenAD_Symbol_540
      type(active) :: OpenAD_Symbol_535
      type(active) :: OpenAD_Symbol_490
      REAL(w2f__8) OpenAD_Symbol_485
      REAL(w2f__8) OpenAD_Symbol_541
      REAL(w2f__8) OpenAD_Symbol_536
      REAL(w2f__8) OpenAD_Symbol_491
      type(active) :: OpenAD_Symbol_486
      type(active) :: OpenAD_Symbol_542
      REAL(w2f__8) OpenAD_Symbol_537
      type(active) :: OpenAD_Symbol_492
      REAL(w2f__8) OpenAD_Symbol_487
      REAL(w2f__8) OpenAD_Symbol_543
      type(active) :: OpenAD_Symbol_538
      REAL(w2f__8) OpenAD_Symbol_493
      type(active) :: OpenAD_Symbol_488
      type(active) :: OpenAD_Symbol_544
      REAL(w2f__8) OpenAD_Symbol_539
      type(active) :: OpenAD_Symbol_494
      REAL(w2f__8) OpenAD_Symbol_489
      type(active) :: OpenAD_Symbol_550
      REAL(w2f__8) OpenAD_Symbol_545
      REAL(w2f__8) OpenAD_Symbol_495
      REAL(w2f__8) OpenAD_Symbol_551
      type(active) :: OpenAD_Symbol_546
      type(active) :: OpenAD_Symbol_496
      type(active) :: OpenAD_Symbol_552
      REAL(w2f__8) OpenAD_Symbol_547
      REAL(w2f__8) OpenAD_Symbol_497
      REAL(w2f__8) OpenAD_Symbol_553
      type(active) :: OpenAD_Symbol_548
      REAL(w2f__8) OpenAD_Symbol_498
      type(active) :: OpenAD_Symbol_554
      REAL(w2f__8) OpenAD_Symbol_549
      REAL(w2f__8) OpenAD_Symbol_499
      type(active) :: OpenAD_Symbol_560
      REAL(w2f__8) OpenAD_Symbol_555
      REAL(w2f__8) OpenAD_Symbol_561
      type(active) :: OpenAD_Symbol_556
      type(active) :: OpenAD_Symbol_562
      REAL(w2f__8) OpenAD_Symbol_557
      type(active) :: OpenAD_Symbol_558
      REAL(w2f__8) OpenAD_Symbol_559
      INTEGER(w2f__i8) OpenAD_Symbol_722
      INTEGER(w2f__i8) OpenAD_Symbol_723
      INTEGER(w2f__i8) OpenAD_Symbol_724
      INTEGER(w2f__i8) OpenAD_Symbol_730
      INTEGER(w2f__i8) OpenAD_Symbol_725
      INTEGER(w2f__i8) OpenAD_Symbol_731
      INTEGER(w2f__i8) OpenAD_Symbol_726
      INTEGER(w2f__i8) OpenAD_Symbol_732
      INTEGER(w2f__i8) OpenAD_Symbol_727
      INTEGER(w2f__i8) OpenAD_Symbol_733
      INTEGER(w2f__i8) OpenAD_Symbol_728
      INTEGER(w2f__i8) OpenAD_Symbol_734
      INTEGER(w2f__i8) OpenAD_Symbol_729
      INTEGER(w2f__i8) OpenAD_Symbol_740
      INTEGER(w2f__i8) OpenAD_Symbol_735
      INTEGER(w2f__i8) OpenAD_Symbol_741
      INTEGER(w2f__i8) OpenAD_Symbol_736
      INTEGER(w2f__i8) OpenAD_Symbol_742
      INTEGER(w2f__i8) OpenAD_Symbol_737
      INTEGER(w2f__i8) OpenAD_Symbol_743
      INTEGER(w2f__i8) OpenAD_Symbol_738
      INTEGER(w2f__i8) OpenAD_Symbol_744
      INTEGER(w2f__i8) OpenAD_Symbol_739
      INTEGER(w2f__i8) OpenAD_Symbol_745
C
C     **** Local Variables and functions ****
C
      INTEGER(w2f__i4) I
      INTEGER(w2f__i4) ISBYTE
      PARAMETER ( ISBYTE = 8)
      INTEGER(w2f__i4) J
      INTEGER(w2f__i4) L
      INTEGER(w2f__i4) NLEV1
      PARAMETER ( NLEV1 = 73)
      INTEGER(w2f__i4) NLEV2
      PARAMETER ( NLEV2 = 50)
      REAL(w2f__8) OpenAD_Symbol_800
      REAL(w2f__8) OpenAD_Symbol_750
      INTEGER(w2f__i8) OpenAD_Symbol_801
      REAL(w2f__8) OpenAD_Symbol_751
      REAL(w2f__8) OpenAD_Symbol_746
      REAL(w2f__8) OpenAD_Symbol_802
      REAL(w2f__8) OpenAD_Symbol_752
      REAL(w2f__8) OpenAD_Symbol_747
      INTEGER(w2f__i8) OpenAD_Symbol_803
      REAL(w2f__8) OpenAD_Symbol_753
      REAL(w2f__8) OpenAD_Symbol_748
      INTEGER(w2f__i8) OpenAD_Symbol_804
      REAL(w2f__8) OpenAD_Symbol_754
      REAL(w2f__8) OpenAD_Symbol_749
      INTEGER(w2f__i8) OpenAD_Symbol_810
      INTEGER(w2f__i8) OpenAD_Symbol_805
      REAL(w2f__8) OpenAD_Symbol_760
      REAL(w2f__8) OpenAD_Symbol_755
      INTEGER(w2f__i8) OpenAD_Symbol_811
      REAL(w2f__8) OpenAD_Symbol_806
      REAL(w2f__8) OpenAD_Symbol_761
      REAL(w2f__8) OpenAD_Symbol_756
      INTEGER(w2f__i8) OpenAD_Symbol_812
      INTEGER(w2f__i8) OpenAD_Symbol_807
      REAL(w2f__8) OpenAD_Symbol_762
      REAL(w2f__8) OpenAD_Symbol_757
      REAL(w2f__8) OpenAD_Symbol_813
      REAL(w2f__8) OpenAD_Symbol_808
      REAL(w2f__8) OpenAD_Symbol_763
      REAL(w2f__8) OpenAD_Symbol_758
      INTEGER(w2f__i8) OpenAD_Symbol_814
      INTEGER(w2f__i8) OpenAD_Symbol_809
      REAL(w2f__8) OpenAD_Symbol_764
      REAL(w2f__8) OpenAD_Symbol_759
      INTEGER(w2f__i8) OpenAD_Symbol_820
      INTEGER(w2f__i8) OpenAD_Symbol_815
      REAL(w2f__8) OpenAD_Symbol_770
      REAL(w2f__8) OpenAD_Symbol_765
      REAL(w2f__8) OpenAD_Symbol_821
      REAL(w2f__8) OpenAD_Symbol_816
      REAL(w2f__8) OpenAD_Symbol_771
      REAL(w2f__8) OpenAD_Symbol_766
      INTEGER(w2f__i8) OpenAD_Symbol_822
      INTEGER(w2f__i8) OpenAD_Symbol_817
      REAL(w2f__8) OpenAD_Symbol_772
      REAL(w2f__8) OpenAD_Symbol_767
      INTEGER(w2f__i8) OpenAD_Symbol_823
      INTEGER(w2f__i8) OpenAD_Symbol_818
      REAL(w2f__8) OpenAD_Symbol_773
      REAL(w2f__8) OpenAD_Symbol_768
      REAL(w2f__8) OpenAD_Symbol_824
      INTEGER(w2f__i8) OpenAD_Symbol_819
      REAL(w2f__8) OpenAD_Symbol_774
      REAL(w2f__8) OpenAD_Symbol_769
      INTEGER(w2f__i8) OpenAD_Symbol_825
      REAL(w2f__8) OpenAD_Symbol_780
      REAL(w2f__8) OpenAD_Symbol_775
      INTEGER(w2f__i8) OpenAD_Symbol_826
      REAL(w2f__8) OpenAD_Symbol_781
      REAL(w2f__8) OpenAD_Symbol_776
      REAL(w2f__8) OpenAD_Symbol_782
      REAL(w2f__8) OpenAD_Symbol_777
      REAL(w2f__8) OpenAD_Symbol_783
      REAL(w2f__8) OpenAD_Symbol_778
      REAL(w2f__8) OpenAD_Symbol_784
      REAL(w2f__8) OpenAD_Symbol_779
      INTEGER(w2f__i8) OpenAD_Symbol_790
      REAL(w2f__8) OpenAD_Symbol_785
      REAL(w2f__8) OpenAD_Symbol_791
      REAL(w2f__8) OpenAD_Symbol_786
      INTEGER(w2f__i8) OpenAD_Symbol_792
      REAL(w2f__8) OpenAD_Symbol_787
      REAL(w2f__8) OpenAD_Symbol_793
      INTEGER(w2f__i8) OpenAD_Symbol_788
      INTEGER(w2f__i8) OpenAD_Symbol_794
      REAL(w2f__8) OpenAD_Symbol_789
      INTEGER(w2f__i8) OpenAD_Symbol_795
      INTEGER(w2f__i8) OpenAD_Symbol_796
      INTEGER(w2f__i8) OpenAD_Symbol_797
      INTEGER(w2f__i8) OpenAD_Symbol_798
      INTEGER(w2f__i8) OpenAD_Symbol_799
C
C     **** statements ****
C

          integer iaddr
          external iaddr

         if (our_rev_mode%plain) then
! original function
      VERBMODE = .FALSE.
      BLENGTH(1)%v = 5.0D+08
      BLENGTH(2)%v = 1.0D+08
      BLENGTH(3)%v = BLENGTH(1)%v
      BHEIGHT(1)%v = 1.0D+05
      BHEIGHT(3)%v = 4.0D+05
      BHEIGHT(2)%v = (BHEIGHT(1)%v+BHEIGHT(3)%v)
      DELTA%v = (BHEIGHT(1)%v/(BHEIGHT(1)%v+BHEIGHT(3)%v))
      BWIDTH%v = 4.0D+08
      AREA(1)%v = (BLENGTH(1)%v*BWIDTH%v)
      AREA(2)%v = (BLENGTH(2)%v*BWIDTH%v)
      AREA(3)%v = (BLENGTH(3)%v*BWIDTH%v)
      VOL(1)%v = (AREA(1)%v*BHEIGHT(1)%v)
      VOL(2)%v = (AREA(2)%v*(BHEIGHT(1)%v+BHEIGHT(3)%v))
      VOL(3)%v = (AREA(3)%v*BHEIGHT(3)%v)
      ROBERT_FILTER_COEFF%v = 2.5D-01
      HUNDRED%v = 1.0D+02
      THOUSAND%v = 1.0D+03
      DAY%v = 8.64D+04
      YEAR%v = (DAY%v*3.65D+02)
      SV%v = 1.0D+12
      U0%v = ((SV%v*1.6D+01)/4.00000000000000019169D-04)
      ALPHA%v = 1.6679999999999998864D-04
      BETA%v = 7.81000000000000010186D-04
      DAYS_PER_50M_MIXED_LAYER%v = 5.0D+01
      GAMMA_T%v = (1.0D00/(DAY%v*3.0D+02))
      GAMMA_S%v = (0.0D00/((BHEIGHT(1)%v/5.0D+03)*DAY%v*DAYS_PER_50M_MIX
     +ED_LAYER%v))
      EPSILON_IC%v = (-1.00000000000000004792D-04)
      NOISE_CORRELATION_TIME%v = (DAY%v*1.5D+01)
      DELTA_T%v = (DAY%v*5.0D00)
      INTEGRATION_TIME%v = (YEAR%v*5.0D+01)
      N_MAX = INT((INTEGRATION_TIME%v/DELTA_T%v))
      FDEPS%v = 9.99999999999999954748D-07
      Y(1)%v = (THOUSAND%v/3.2680000000000000715D-02)
      Y(2)%v = (THOUSAND%v/7.9399999999999991418D-03)
      Y(3)%v = (THOUSAND%v/1.39999999999999998578D-03)
      Y(4)%v = (THOUSAND%v/1.41699999999999992628D-01)
      Y(5)%v = (THOUSAND%v/1.28599999999999992095D-01)
      Y(6)%v = (THOUSAND%v/8.7800000000000003042D-02)
      R(1)%v = (ALPHA%v*DELTA%v)
      R(2)%v = (-ALPHA%v)
      R(3)%v = (ALPHA%v*(1.0D00-DELTA%v))
      R(4)%v = (-(BETA%v*DELTA%v))
      R(5)%v = BETA%v
      R(6)%v = (-(BETA%v*(1.0D00-DELTA%v)))
      DO L = 1, 6, 1
        R(INT(L))%v = ((R(L)%v*U0%v)/SV%v)
      END DO
      DO L = 1, 6, 1
        IF(L .LE. INT(3_w2f__i8)) THEN
          PROJ_T(INT(L))%v = 1.0D00
          PROJ_S(INT(L))%v = 0.0D00
        ELSE
          PROJ_T(INT(L))%v = 0.0D00
          PROJ_S(INT(L))%v = 1.0D00
        ENDIF
      END DO
      DO L = 1, 6, 1
        R_T(INT(L))%v = (PROJ_T(L)%v*R(L)%v)
        R_S(INT(L))%v = (PROJ_S(L)%v*R(L)%v)
      END DO
      R1(1)%v = 1.0D00
      R1(2)%v = (-1.0D00)
      R1(3)%v = 0.0D00
      R1(4)%v = 0.0D00
      R1(5)%v = 0.0D00
      R1(6)%v = 0.0D00
      DO J = 1, 6, 1
        DO I = 1, 6, 1
          X(INT(I),INT(J))%v = (R(I)%v*R(J)%v)
        END DO
      END DO
      EPSILON_REGULARIZE%v = 1.00000000000000002092D-08
      DO J = 1, 6, 1
        DO I = 1, 6, 1
          X(INT(I),INT(J))%v = (X(I,J)%v+EPSILON_REGULARIZE%v)
        END DO
      END DO
      
          end if
          if (our_rev_mode%tape) then
! taping
      VERBMODE = .FALSE.
      BLENGTH(1)%v = 5.0D+08
      BLENGTH(2)%v = 1.0D+08
      BLENGTH(3)%v = BLENGTH(1)%v
      BHEIGHT(1)%v = 1.0D+05
      BHEIGHT(3)%v = 4.0D+05
      BHEIGHT(2)%v = (BHEIGHT(1)%v+BHEIGHT(3)%v)
      OpenAD_Symbol_155 = 1_w2f__i8
      OpenAD_Symbol_156 = 1_w2f__i8
      OpenAD_Symbol_455 = OpenAD_Symbol_155
      OpenAD_Symbol_457 = OpenAD_Symbol_156
          double_tape(double_tape_pointer) = OpenAD_Symbol_455
          double_tape_pointer = double_tape_pointer+1
          double_tape(double_tape_pointer) = OpenAD_Symbol_457
          double_tape_pointer = double_tape_pointer+1
      OpenAD_Symbol_157 = (BHEIGHT(1)%v+BHEIGHT(3)%v)
      OpenAD_Symbol_162 = (BHEIGHT(1)%v/OpenAD_Symbol_157)
      OpenAD_Symbol_158 = (INT(1_w2f__i8) / OpenAD_Symbol_157)
      OpenAD_Symbol_160 = 1_w2f__i8
      OpenAD_Symbol_161 = 1_w2f__i8
      OpenAD_Symbol_159 = (-(BHEIGHT(1)%v/(OpenAD_Symbol_157*OpenAD_Symb
     +ol_157)))
      DELTA%v = OpenAD_Symbol_162
      BWIDTH%v = 4.0D+08
      OpenAD_Symbol_459 = (OpenAD_Symbol_160 * OpenAD_Symbol_159)
      OpenAD_Symbol_461 = (OpenAD_Symbol_161 * OpenAD_Symbol_159)
      OpenAD_Symbol_463 = OpenAD_Symbol_158
          double_tape(double_tape_pointer) = OpenAD_Symbol_459
          double_tape_pointer = double_tape_pointer+1
          double_tape(double_tape_pointer) = OpenAD_Symbol_461
          double_tape_pointer = double_tape_pointer+1
          double_tape(double_tape_pointer) = OpenAD_Symbol_463
          double_tape_pointer = double_tape_pointer+1
      OpenAD_Symbol_165 = (BLENGTH(1)%v*BWIDTH%v)
      OpenAD_Symbol_163 = BWIDTH%v
      OpenAD_Symbol_164 = BLENGTH(1)%v
      AREA(1)%v = OpenAD_Symbol_165
      OpenAD_Symbol_465 = OpenAD_Symbol_163
      OpenAD_Symbol_467 = OpenAD_Symbol_164
          double_tape(double_tape_pointer) = OpenAD_Symbol_465
          double_tape_pointer = double_tape_pointer+1
          double_tape(double_tape_pointer) = OpenAD_Symbol_467
          double_tape_pointer = double_tape_pointer+1
      OpenAD_Symbol_168 = (BLENGTH(2)%v*BWIDTH%v)
      OpenAD_Symbol_166 = BWIDTH%v
      OpenAD_Symbol_167 = BLENGTH(2)%v
      AREA(2)%v = OpenAD_Symbol_168
      OpenAD_Symbol_469 = OpenAD_Symbol_166
      OpenAD_Symbol_471 = OpenAD_Symbol_167
          double_tape(double_tape_pointer) = OpenAD_Symbol_469
          double_tape_pointer = double_tape_pointer+1
          double_tape(double_tape_pointer) = OpenAD_Symbol_471
          double_tape_pointer = double_tape_pointer+1
      OpenAD_Symbol_171 = (BLENGTH(3)%v*BWIDTH%v)
      OpenAD_Symbol_169 = BWIDTH%v
      OpenAD_Symbol_170 = BLENGTH(3)%v
      AREA(3)%v = OpenAD_Symbol_171
      OpenAD_Symbol_473 = OpenAD_Symbol_169
      OpenAD_Symbol_475 = OpenAD_Symbol_170
          double_tape(double_tape_pointer) = OpenAD_Symbol_473
          double_tape_pointer = double_tape_pointer+1
          double_tape(double_tape_pointer) = OpenAD_Symbol_475
          double_tape_pointer = double_tape_pointer+1
      OpenAD_Symbol_174 = (AREA(1)%v*BHEIGHT(1)%v)
      OpenAD_Symbol_172 = BHEIGHT(1)%v
      OpenAD_Symbol_173 = AREA(1)%v
      VOL(1)%v = OpenAD_Symbol_174
      OpenAD_Symbol_477 = OpenAD_Symbol_172
      OpenAD_Symbol_479 = OpenAD_Symbol_173
          double_tape(double_tape_pointer) = OpenAD_Symbol_477
          double_tape_pointer = double_tape_pointer+1
          double_tape(double_tape_pointer) = OpenAD_Symbol_479
          double_tape_pointer = double_tape_pointer+1
      OpenAD_Symbol_175 = (BHEIGHT(1)%v+BHEIGHT(3)%v)
      OpenAD_Symbol_180 = (AREA(2)%v*OpenAD_Symbol_175)
      OpenAD_Symbol_176 = OpenAD_Symbol_175
      OpenAD_Symbol_178 = 1_w2f__i8
      OpenAD_Symbol_179 = 1_w2f__i8
      OpenAD_Symbol_177 = AREA(2)%v
      VOL(2)%v = OpenAD_Symbol_180
      OpenAD_Symbol_481 = (OpenAD_Symbol_178 * OpenAD_Symbol_177)
      OpenAD_Symbol_483 = (OpenAD_Symbol_179 * OpenAD_Symbol_177)
      OpenAD_Symbol_485 = OpenAD_Symbol_176
          double_tape(double_tape_pointer) = OpenAD_Symbol_481
          double_tape_pointer = double_tape_pointer+1
          double_tape(double_tape_pointer) = OpenAD_Symbol_483
          double_tape_pointer = double_tape_pointer+1
          double_tape(double_tape_pointer) = OpenAD_Symbol_485
          double_tape_pointer = double_tape_pointer+1
      OpenAD_Symbol_183 = (AREA(3)%v*BHEIGHT(3)%v)
      OpenAD_Symbol_181 = BHEIGHT(3)%v
      OpenAD_Symbol_182 = AREA(3)%v
      VOL(3)%v = OpenAD_Symbol_183
      ROBERT_FILTER_COEFF%v = 2.5D-01
      HUNDRED%v = 1.0D+02
      THOUSAND%v = 1.0D+03
      DAY%v = 8.64D+04
      OpenAD_Symbol_487 = OpenAD_Symbol_181
      OpenAD_Symbol_489 = OpenAD_Symbol_182
          double_tape(double_tape_pointer) = OpenAD_Symbol_487
          double_tape_pointer = double_tape_pointer+1
          double_tape(double_tape_pointer) = OpenAD_Symbol_489
          double_tape_pointer = double_tape_pointer+1
      OpenAD_Symbol_186 = (DAY%v*3.65D+02)
      OpenAD_Symbol_184 = 3.65D+02
      YEAR%v = OpenAD_Symbol_186
      SV%v = 1.0D+12
      OpenAD_Symbol_491 = OpenAD_Symbol_184
          double_tape(double_tape_pointer) = OpenAD_Symbol_491
          double_tape_pointer = double_tape_pointer+1
      OpenAD_Symbol_187 = (SV%v*1.6D+01)
      OpenAD_Symbol_192 = (OpenAD_Symbol_187 /  4.00000000000000019169D-
     +04)
      OpenAD_Symbol_190 = 1.6D+01
      OpenAD_Symbol_188 = (INT(1_w2f__i8) / 4.00000000000000019169D-04)
      U0%v = OpenAD_Symbol_192
      ALPHA%v = 1.6679999999999998864D-04
      BETA%v = 7.81000000000000010186D-04
      DAYS_PER_50M_MIXED_LAYER%v = 5.0D+01
      OpenAD_Symbol_493 = (OpenAD_Symbol_190 * OpenAD_Symbol_188)
          double_tape(double_tape_pointer) = OpenAD_Symbol_493
          double_tape_pointer = double_tape_pointer+1
      OpenAD_Symbol_193 = (DAY%v*3.0D+02)
      OpenAD_Symbol_198 = (1.0D00 / OpenAD_Symbol_193)
      OpenAD_Symbol_196 = 3.0D+02
      OpenAD_Symbol_195 = (-(1.0D00 /(OpenAD_Symbol_193 *  OpenAD_Symbol
     +_193)))
      GAMMA_T%v = OpenAD_Symbol_198
      OpenAD_Symbol_495 = (OpenAD_Symbol_196 * OpenAD_Symbol_195)
          double_tape(double_tape_pointer) = OpenAD_Symbol_495
          double_tape_pointer = double_tape_pointer+1
      OpenAD_Symbol_202 = (BHEIGHT(1)%v/5.0D+03)
      OpenAD_Symbol_203 = (DAY%v*DAYS_PER_50M_MIXED_LAYER%v)
      OpenAD_Symbol_199 = (OpenAD_Symbol_202 * OpenAD_Symbol_203)
      OpenAD_Symbol_210 = (0.0D00 / OpenAD_Symbol_199)
      OpenAD_Symbol_206 = (INT(1_w2f__i8) / 5.0D+03)
      OpenAD_Symbol_204 = OpenAD_Symbol_203
      OpenAD_Symbol_208 = DAYS_PER_50M_MIXED_LAYER%v
      OpenAD_Symbol_209 = DAY%v
      OpenAD_Symbol_205 = OpenAD_Symbol_202
      OpenAD_Symbol_201 = (-(0.0D00 /(OpenAD_Symbol_199 *  OpenAD_Symbol
     +_199)))
      GAMMA_S%v = OpenAD_Symbol_210
      EPSILON_IC%v = (-1.00000000000000004792D-04)
      OpenAD_Symbol_497 = (OpenAD_Symbol_204 * OpenAD_Symbol_201)
      OpenAD_Symbol_498 = (OpenAD_Symbol_205 * OpenAD_Symbol_201)
      OpenAD_Symbol_499 = (OpenAD_Symbol_208 * OpenAD_Symbol_498)
      OpenAD_Symbol_501 = (OpenAD_Symbol_209 * OpenAD_Symbol_498)
      OpenAD_Symbol_503 = (OpenAD_Symbol_206 * OpenAD_Symbol_497)
          double_tape(double_tape_pointer) = OpenAD_Symbol_499
          double_tape_pointer = double_tape_pointer+1
          double_tape(double_tape_pointer) = OpenAD_Symbol_501
          double_tape_pointer = double_tape_pointer+1
          double_tape(double_tape_pointer) = OpenAD_Symbol_503
          double_tape_pointer = double_tape_pointer+1
      OpenAD_Symbol_213 = (DAY%v*1.5D+01)
      OpenAD_Symbol_211 = 1.5D+01
      NOISE_CORRELATION_TIME%v = OpenAD_Symbol_213
      OpenAD_Symbol_216 = (DAY%v*5.0D00)
      OpenAD_Symbol_214 = 5.0D00
      DELTA_T%v = OpenAD_Symbol_216
      OpenAD_Symbol_219 = (YEAR%v*5.0D+01)
      OpenAD_Symbol_217 = 5.0D+01
      INTEGRATION_TIME%v = OpenAD_Symbol_219
      OpenAD_Symbol_505 = OpenAD_Symbol_211
      OpenAD_Symbol_507 = OpenAD_Symbol_214
      OpenAD_Symbol_508 = OpenAD_Symbol_217
          double_tape(double_tape_pointer) = OpenAD_Symbol_505
          double_tape_pointer = double_tape_pointer+1
          double_tape(double_tape_pointer) = OpenAD_Symbol_507
          double_tape_pointer = double_tape_pointer+1
          double_tape(double_tape_pointer) = OpenAD_Symbol_508
          double_tape_pointer = double_tape_pointer+1
      N_MAX = INT((INTEGRATION_TIME%v/DELTA_T%v))
      FDEPS%v = 9.99999999999999954748D-07
      OpenAD_Symbol_222 = (THOUSAND%v/3.2680000000000000715D-02)
      OpenAD_Symbol_220 = (INT(1_w2f__i8) / 3.2680000000000000715D-02)
      Y(1)%v = OpenAD_Symbol_222
      OpenAD_Symbol_510 = OpenAD_Symbol_220
          double_tape(double_tape_pointer) = OpenAD_Symbol_510
          double_tape_pointer = double_tape_pointer+1
      OpenAD_Symbol_225 = (THOUSAND%v/7.9399999999999991418D-03)
      OpenAD_Symbol_223 = (INT(1_w2f__i8) / 7.9399999999999991418D-03)
      Y(2)%v = OpenAD_Symbol_225
      OpenAD_Symbol_512 = OpenAD_Symbol_223
          double_tape(double_tape_pointer) = OpenAD_Symbol_512
          double_tape_pointer = double_tape_pointer+1
      OpenAD_Symbol_228 = (THOUSAND%v/1.39999999999999998578D-03)
      OpenAD_Symbol_226 = (INT(1_w2f__i8) / 1.39999999999999998578D-03)
      Y(3)%v = OpenAD_Symbol_228
      OpenAD_Symbol_514 = OpenAD_Symbol_226
          double_tape(double_tape_pointer) = OpenAD_Symbol_514
          double_tape_pointer = double_tape_pointer+1
      OpenAD_Symbol_231 = (THOUSAND%v/1.41699999999999992628D-01)
      OpenAD_Symbol_229 = (INT(1_w2f__i8) / 1.41699999999999992628D-01)
      Y(4)%v = OpenAD_Symbol_231
      OpenAD_Symbol_516 = OpenAD_Symbol_229
          double_tape(double_tape_pointer) = OpenAD_Symbol_516
          double_tape_pointer = double_tape_pointer+1
      OpenAD_Symbol_234 = (THOUSAND%v/1.28599999999999992095D-01)
      OpenAD_Symbol_232 = (INT(1_w2f__i8) / 1.28599999999999992095D-01)
      Y(5)%v = OpenAD_Symbol_234
      OpenAD_Symbol_518 = OpenAD_Symbol_232
          double_tape(double_tape_pointer) = OpenAD_Symbol_518
          double_tape_pointer = double_tape_pointer+1
      OpenAD_Symbol_237 = (THOUSAND%v/8.7800000000000003042D-02)
      OpenAD_Symbol_235 = (INT(1_w2f__i8) / 8.7800000000000003042D-02)
      Y(6)%v = OpenAD_Symbol_237
      OpenAD_Symbol_520 = OpenAD_Symbol_235
          double_tape(double_tape_pointer) = OpenAD_Symbol_520
          double_tape_pointer = double_tape_pointer+1
      OpenAD_Symbol_240 = (ALPHA%v*DELTA%v)
      OpenAD_Symbol_238 = DELTA%v
      OpenAD_Symbol_239 = ALPHA%v
      R(1)%v = OpenAD_Symbol_240
      OpenAD_Symbol_522 = OpenAD_Symbol_238
      OpenAD_Symbol_524 = OpenAD_Symbol_239
          double_tape(double_tape_pointer) = OpenAD_Symbol_522
          double_tape_pointer = double_tape_pointer+1
          double_tape(double_tape_pointer) = OpenAD_Symbol_524
          double_tape_pointer = double_tape_pointer+1
      R(2)%v = (-ALPHA%v)
      OpenAD_Symbol_241 = (-1_w2f__i8)
      OpenAD_Symbol_526 = OpenAD_Symbol_241
          double_tape(double_tape_pointer) = OpenAD_Symbol_526
          double_tape_pointer = double_tape_pointer+1
      OpenAD_Symbol_242 = (1.0D00-DELTA%v)
      OpenAD_Symbol_247 = (ALPHA%v*OpenAD_Symbol_242)
      OpenAD_Symbol_243 = OpenAD_Symbol_242
      OpenAD_Symbol_246 = (-1_w2f__i8)
      OpenAD_Symbol_244 = ALPHA%v
      R(3)%v = OpenAD_Symbol_247
      OpenAD_Symbol_528 = (OpenAD_Symbol_246 * OpenAD_Symbol_244)
      OpenAD_Symbol_530 = OpenAD_Symbol_243
          double_tape(double_tape_pointer) = OpenAD_Symbol_528
          double_tape_pointer = double_tape_pointer+1
          double_tape(double_tape_pointer) = OpenAD_Symbol_530
          double_tape_pointer = double_tape_pointer+1
      OpenAD_Symbol_251 = (-(BETA%v*DELTA%v))
      OpenAD_Symbol_249 = DELTA%v
      OpenAD_Symbol_250 = BETA%v
      OpenAD_Symbol_248 = (-1_w2f__i8)
      R(4)%v = OpenAD_Symbol_251
      OpenAD_Symbol_532 = (OpenAD_Symbol_249 * OpenAD_Symbol_248)
      OpenAD_Symbol_534 = (OpenAD_Symbol_250 * OpenAD_Symbol_248)
          double_tape(double_tape_pointer) = OpenAD_Symbol_532
          double_tape_pointer = double_tape_pointer+1
          double_tape(double_tape_pointer) = OpenAD_Symbol_534
          double_tape_pointer = double_tape_pointer+1
      R(5)%v = BETA%v
      OpenAD_Symbol_253 = (1.0D00-DELTA%v)
      OpenAD_Symbol_258 = (-(BETA%v*OpenAD_Symbol_253))
      OpenAD_Symbol_254 = OpenAD_Symbol_253
      OpenAD_Symbol_257 = (-1_w2f__i8)
      OpenAD_Symbol_255 = BETA%v
      OpenAD_Symbol_252 = (-1_w2f__i8)
      R(6)%v = OpenAD_Symbol_258
      OpenAD_Symbol_536 = (OpenAD_Symbol_257 * OpenAD_Symbol_255)
      OpenAD_Symbol_537 = (OpenAD_Symbol_254 * OpenAD_Symbol_252)
      OpenAD_Symbol_539 = (OpenAD_Symbol_536 * OpenAD_Symbol_252)
          double_tape(double_tape_pointer) = OpenAD_Symbol_537
          double_tape_pointer = double_tape_pointer+1
          double_tape(double_tape_pointer) = OpenAD_Symbol_539
          double_tape_pointer = double_tape_pointer+1
      OpenAD_Symbol_737 = 0_w2f__i8
      DO L = 1, 6, 1
        OpenAD_Symbol_259 = (R(L)%v*U0%v)
        OpenAD_Symbol_264 = (OpenAD_Symbol_259/SV%v)
        OpenAD_Symbol_262 = U0%v
        OpenAD_Symbol_263 = R(L)%v
        OpenAD_Symbol_260 = (INT(1 _w2f__i8)/SV%v)
        OpenAD_Symbol_261 = (-(OpenAD_Symbol_259/(SV%v*SV%v)))
        R(INT(L))%v = OpenAD_Symbol_264
        OpenAD_Symbol_541 = (OpenAD_Symbol_262 * OpenAD_Symbol_260)
        OpenAD_Symbol_543 = (OpenAD_Symbol_263 * OpenAD_Symbol_260)
        OpenAD_Symbol_545 = OpenAD_Symbol_261
          integer_tape(integer_tape_pointer) = L
          integer_tape_pointer = integer_tape_pointer+1
          double_tape(double_tape_pointer) = OpenAD_Symbol_541
          double_tape_pointer = double_tape_pointer+1
          integer_tape(integer_tape_pointer) = L
          integer_tape_pointer = integer_tape_pointer+1
          double_tape(double_tape_pointer) = OpenAD_Symbol_543
          double_tape_pointer = double_tape_pointer+1
          integer_tape(integer_tape_pointer) = L
          integer_tape_pointer = integer_tape_pointer+1
          double_tape(double_tape_pointer) = OpenAD_Symbol_545
          double_tape_pointer = double_tape_pointer+1
          integer_tape(integer_tape_pointer) = L
          integer_tape_pointer = integer_tape_pointer+1
        OpenAD_Symbol_737 = (INT(OpenAD_Symbol_737) + INT(1_w2f__i8))
      END DO
          integer_tape(integer_tape_pointer) = OpenAD_Symbol_737
          integer_tape_pointer = integer_tape_pointer+1
      OpenAD_Symbol_738 = 0_w2f__i8
      DO L = 1, 6, 1
        IF(L .LE. INT(3_w2f__i8)) THEN
          PROJ_T(INT(L))%v = 1.0D00
          PROJ_S(INT(L))%v = 0.0D00
          integer_tape(integer_tape_pointer) = L
          integer_tape_pointer = integer_tape_pointer+1
          integer_tape(integer_tape_pointer) = L
          integer_tape_pointer = integer_tape_pointer+1
          OpenAD_Symbol_739 = 1_w2f__i8
          integer_tape(integer_tape_pointer) = OpenAD_Symbol_739
          integer_tape_pointer = integer_tape_pointer+1
        ELSE
          PROJ_T(INT(L))%v = 0.0D00
          PROJ_S(INT(L))%v = 1.0D00
          integer_tape(integer_tape_pointer) = L
          integer_tape_pointer = integer_tape_pointer+1
          integer_tape(integer_tape_pointer) = L
          integer_tape_pointer = integer_tape_pointer+1
          OpenAD_Symbol_740 = 0_w2f__i8
          integer_tape(integer_tape_pointer) = OpenAD_Symbol_740
          integer_tape_pointer = integer_tape_pointer+1
        ENDIF
        OpenAD_Symbol_738 = (INT(OpenAD_Symbol_738) + INT(1_w2f__i8))
      END DO
          integer_tape(integer_tape_pointer) = OpenAD_Symbol_738
          integer_tape_pointer = integer_tape_pointer+1
      OpenAD_Symbol_741 = 0_w2f__i8
      DO L = 1, 6, 1
        OpenAD_Symbol_267 = (PROJ_T(L)%v*R(L)%v)
        OpenAD_Symbol_265 = R(L)%v
        OpenAD_Symbol_266 = PROJ_T(L)%v
        R_T(INT(L))%v = OpenAD_Symbol_267
        OpenAD_Symbol_547 = OpenAD_Symbol_265
        OpenAD_Symbol_549 = OpenAD_Symbol_266
          integer_tape(integer_tape_pointer) = L
          integer_tape_pointer = integer_tape_pointer+1
          integer_tape(integer_tape_pointer) = L
          integer_tape_pointer = integer_tape_pointer+1
          double_tape(double_tape_pointer) = OpenAD_Symbol_547
          double_tape_pointer = double_tape_pointer+1
          integer_tape(integer_tape_pointer) = L
          integer_tape_pointer = integer_tape_pointer+1
          double_tape(double_tape_pointer) = OpenAD_Symbol_549
          double_tape_pointer = double_tape_pointer+1
          integer_tape(integer_tape_pointer) = L
          integer_tape_pointer = integer_tape_pointer+1
        OpenAD_Symbol_270 = (PROJ_S(L)%v*R(L)%v)
        OpenAD_Symbol_268 = R(L)%v
        OpenAD_Symbol_269 = PROJ_S(L)%v
        R_S(INT(L))%v = OpenAD_Symbol_270
        OpenAD_Symbol_551 = OpenAD_Symbol_268
        OpenAD_Symbol_553 = OpenAD_Symbol_269
          integer_tape(integer_tape_pointer) = L
          integer_tape_pointer = integer_tape_pointer+1
          integer_tape(integer_tape_pointer) = L
          integer_tape_pointer = integer_tape_pointer+1
          double_tape(double_tape_pointer) = OpenAD_Symbol_551
          double_tape_pointer = double_tape_pointer+1
          integer_tape(integer_tape_pointer) = L
          integer_tape_pointer = integer_tape_pointer+1
          double_tape(double_tape_pointer) = OpenAD_Symbol_553
          double_tape_pointer = double_tape_pointer+1
          integer_tape(integer_tape_pointer) = L
          integer_tape_pointer = integer_tape_pointer+1
        OpenAD_Symbol_741 = (INT(OpenAD_Symbol_741) + INT(1_w2f__i8))
      END DO
          integer_tape(integer_tape_pointer) = OpenAD_Symbol_741
          integer_tape_pointer = integer_tape_pointer+1
      R1(1)%v = 1.0D00
      R1(2)%v = (-1.0D00)
      R1(3)%v = 0.0D00
      R1(4)%v = 0.0D00
      R1(5)%v = 0.0D00
      R1(6)%v = 0.0D00
      OpenAD_Symbol_742 = 0_w2f__i8
      DO J = 1, 6, 1
        OpenAD_Symbol_743 = 0_w2f__i8
        DO I = 1, 6, 1
          OpenAD_Symbol_273 = (R(I)%v*R(J)%v)
          OpenAD_Symbol_271 = R(J)%v
          OpenAD_Symbol_272 = R(I)%v
          X(INT(I),INT(J))%v = OpenAD_Symbol_273
          OpenAD_Symbol_555 = OpenAD_Symbol_271
          OpenAD_Symbol_557 = OpenAD_Symbol_272
          integer_tape(integer_tape_pointer) = J
          integer_tape_pointer = integer_tape_pointer+1
          integer_tape(integer_tape_pointer) = I
          integer_tape_pointer = integer_tape_pointer+1
          double_tape(double_tape_pointer) = OpenAD_Symbol_555
          double_tape_pointer = double_tape_pointer+1
          integer_tape(integer_tape_pointer) = I
          integer_tape_pointer = integer_tape_pointer+1
          integer_tape(integer_tape_pointer) = J
          integer_tape_pointer = integer_tape_pointer+1
          double_tape(double_tape_pointer) = OpenAD_Symbol_557
          double_tape_pointer = double_tape_pointer+1
          integer_tape(integer_tape_pointer) = I
          integer_tape_pointer = integer_tape_pointer+1
          integer_tape(integer_tape_pointer) = J
          integer_tape_pointer = integer_tape_pointer+1
          OpenAD_Symbol_743 = (INT(OpenAD_Symbol_743) + INT(1_w2f__i8))
        END DO
          integer_tape(integer_tape_pointer) = OpenAD_Symbol_743
          integer_tape_pointer = integer_tape_pointer+1
        OpenAD_Symbol_742 = (INT(OpenAD_Symbol_742) + INT(1_w2f__i8))
      END DO
          integer_tape(integer_tape_pointer) = OpenAD_Symbol_742
          integer_tape_pointer = integer_tape_pointer+1
      EPSILON_REGULARIZE%v = 1.00000000000000002092D-08
      OpenAD_Symbol_744 = 0_w2f__i8
      DO J = 1, 6, 1
        OpenAD_Symbol_745 = 0_w2f__i8
        DO I = 1, 6, 1
          X(INT(I),INT(J))%v = (X(I,J)%v+EPSILON_REGULARIZE%v)
          OpenAD_Symbol_274 = 1_w2f__i8
          OpenAD_Symbol_275 = 1_w2f__i8
          OpenAD_Symbol_559 = OpenAD_Symbol_274
          OpenAD_Symbol_561 = OpenAD_Symbol_275
          integer_tape(integer_tape_pointer) = I
          integer_tape_pointer = integer_tape_pointer+1
          integer_tape(integer_tape_pointer) = J
          integer_tape_pointer = integer_tape_pointer+1
          double_tape(double_tape_pointer) = OpenAD_Symbol_559
          double_tape_pointer = double_tape_pointer+1
          integer_tape(integer_tape_pointer) = I
          integer_tape_pointer = integer_tape_pointer+1
          integer_tape(integer_tape_pointer) = J
          integer_tape_pointer = integer_tape_pointer+1
          double_tape(double_tape_pointer) = OpenAD_Symbol_561
          double_tape_pointer = double_tape_pointer+1
          integer_tape(integer_tape_pointer) = I
          integer_tape_pointer = integer_tape_pointer+1
          integer_tape(integer_tape_pointer) = J
          integer_tape_pointer = integer_tape_pointer+1
          OpenAD_Symbol_745 = (INT(OpenAD_Symbol_745) + INT(1_w2f__i8))
        END DO
          integer_tape(integer_tape_pointer) = OpenAD_Symbol_745
          integer_tape_pointer = integer_tape_pointer+1
        OpenAD_Symbol_744 = (INT(OpenAD_Symbol_744) + INT(1_w2f__i8))
      END DO
          integer_tape(integer_tape_pointer) = OpenAD_Symbol_744
          integer_tape_pointer = integer_tape_pointer+1
      
          end if 
          if (our_rev_mode%adjoint) then
! adjoint
          integer_tape_pointer = integer_tape_pointer-1
          OpenAD_Symbol_722 = integer_tape(integer_tape_pointer)
      OpenAD_Symbol_723 = 1
      DO WHILE(INT(OpenAD_Symbol_723) .LE. INT(OpenAD_Symbol_722))
          integer_tape_pointer = integer_tape_pointer-1
          OpenAD_Symbol_724 = integer_tape(integer_tape_pointer)
        OpenAD_Symbol_725 = 1
        DO WHILE(INT(OpenAD_Symbol_725) .LE. INT(OpenAD_Symbol_724))
          integer_tape_pointer = integer_tape_pointer-1
          OpenAD_Symbol_819 = integer_tape(integer_tape_pointer)
          integer_tape_pointer = integer_tape_pointer-1
          OpenAD_Symbol_820 = integer_tape(integer_tape_pointer)
          double_tape_pointer = double_tape_pointer-1
          OpenAD_Symbol_821 = double_tape(double_tape_pointer)
          OpenAD_Symbol_562%d = OpenAD_Symbol_562%d+X(INT(OpenAD_Symbol_
     +820),INT(OpenAD_Symbol_819))%d*OpenAD_Symbol_821
          integer_tape_pointer = integer_tape_pointer-1
          OpenAD_Symbol_822 = integer_tape(integer_tape_pointer)
          integer_tape_pointer = integer_tape_pointer-1
          OpenAD_Symbol_823 = integer_tape(integer_tape_pointer)
          double_tape_pointer = double_tape_pointer-1
          OpenAD_Symbol_824 = double_tape(double_tape_pointer)
          OpenAD_Symbol_560%d = OpenAD_Symbol_560%d+X(INT(OpenAD_Symbol_
     +823),INT(OpenAD_Symbol_822))%d*OpenAD_Symbol_824
          X(INT(OpenAD_Symbol_823),INT(OpenAD_Symbol_822))%d = 0.0d0
          integer_tape_pointer = integer_tape_pointer-1
          OpenAD_Symbol_825 = integer_tape(integer_tape_pointer)
          integer_tape_pointer = integer_tape_pointer-1
          OpenAD_Symbol_826 = integer_tape(integer_tape_pointer)
          X(INT(OpenAD_Symbol_826),INT(OpenAD_Symbol_825))%d = X(INT(Ope
     +nAD_Symbol_826),INT(OpenAD_Symbol_825))%d+OpenAD_Symbol_560%d
          OpenAD_Symbol_560%d = 0.0d0
          EPSILON_REGULARIZE%d = EPSILON_REGULARIZE%d+OpenAD_Symbol_562%
     +d
          OpenAD_Symbol_562%d = 0.0d0
          OpenAD_Symbol_725 = INT(OpenAD_Symbol_725) + 1
        END DO
        OpenAD_Symbol_723 = INT(OpenAD_Symbol_723) + 1
      END DO
          EPSILON_REGULARIZE%d = 0.0d0
          integer_tape_pointer = integer_tape_pointer-1
          OpenAD_Symbol_726 = integer_tape(integer_tape_pointer)
      OpenAD_Symbol_727 = 1
      DO WHILE(INT(OpenAD_Symbol_727) .LE. INT(OpenAD_Symbol_726))
          integer_tape_pointer = integer_tape_pointer-1
          OpenAD_Symbol_728 = integer_tape(integer_tape_pointer)
        OpenAD_Symbol_729 = 1
        DO WHILE(INT(OpenAD_Symbol_729) .LE. INT(OpenAD_Symbol_728))
          integer_tape_pointer = integer_tape_pointer-1
          OpenAD_Symbol_811 = integer_tape(integer_tape_pointer)
          integer_tape_pointer = integer_tape_pointer-1
          OpenAD_Symbol_812 = integer_tape(integer_tape_pointer)
          double_tape_pointer = double_tape_pointer-1
          OpenAD_Symbol_813 = double_tape(double_tape_pointer)
          OpenAD_Symbol_558%d = OpenAD_Symbol_558%d+X(INT(OpenAD_Symbol_
     +812),INT(OpenAD_Symbol_811))%d*OpenAD_Symbol_813
          integer_tape_pointer = integer_tape_pointer-1
          OpenAD_Symbol_814 = integer_tape(integer_tape_pointer)
          integer_tape_pointer = integer_tape_pointer-1
          OpenAD_Symbol_815 = integer_tape(integer_tape_pointer)
          double_tape_pointer = double_tape_pointer-1
          OpenAD_Symbol_816 = double_tape(double_tape_pointer)
          OpenAD_Symbol_556%d = OpenAD_Symbol_556%d+X(INT(OpenAD_Symbol_
     +815),INT(OpenAD_Symbol_814))%d*OpenAD_Symbol_816
          X(INT(OpenAD_Symbol_815),INT(OpenAD_Symbol_814))%d = 0.0d0
          integer_tape_pointer = integer_tape_pointer-1
          OpenAD_Symbol_817 = integer_tape(integer_tape_pointer)
          R(INT(OpenAD_Symbol_817))%d = R(INT(OpenAD_Symbol_817))%d+Open
     +AD_Symbol_556%d
          OpenAD_Symbol_556%d = 0.0d0
          integer_tape_pointer = integer_tape_pointer-1
          OpenAD_Symbol_818 = integer_tape(integer_tape_pointer)
          R(INT(OpenAD_Symbol_818))%d = R(INT(OpenAD_Symbol_818))%d+Open
     +AD_Symbol_558%d
          OpenAD_Symbol_558%d = 0.0d0
          OpenAD_Symbol_729 = INT(OpenAD_Symbol_729) + 1
        END DO
        OpenAD_Symbol_727 = INT(OpenAD_Symbol_727) + 1
      END DO
          R1(6)%d = 0.0d0
          R1(5)%d = 0.0d0
          R1(4)%d = 0.0d0
          R1(3)%d = 0.0d0
          R1(2)%d = 0.0d0
          R1(1)%d = 0.0d0
          integer_tape_pointer = integer_tape_pointer-1
          OpenAD_Symbol_730 = integer_tape(integer_tape_pointer)
      OpenAD_Symbol_731 = 1
      DO WHILE(INT(OpenAD_Symbol_731) .LE. INT(OpenAD_Symbol_730))
          integer_tape_pointer = integer_tape_pointer-1
          OpenAD_Symbol_799 = integer_tape(integer_tape_pointer)
          double_tape_pointer = double_tape_pointer-1
          OpenAD_Symbol_800 = double_tape(double_tape_pointer)
          OpenAD_Symbol_554%d = OpenAD_Symbol_554%d+R_S(INT(OpenAD_Symbo
     +l_799))%d*OpenAD_Symbol_800
          integer_tape_pointer = integer_tape_pointer-1
          OpenAD_Symbol_801 = integer_tape(integer_tape_pointer)
          double_tape_pointer = double_tape_pointer-1
          OpenAD_Symbol_802 = double_tape(double_tape_pointer)
          OpenAD_Symbol_552%d = OpenAD_Symbol_552%d+R_S(INT(OpenAD_Symbo
     +l_801))%d*OpenAD_Symbol_802
          R_S(INT(OpenAD_Symbol_801))%d = 0.0d0
          integer_tape_pointer = integer_tape_pointer-1
          OpenAD_Symbol_803 = integer_tape(integer_tape_pointer)
          PROJ_S(INT(OpenAD_Symbol_803))%d = PROJ_S(INT(OpenAD_Symbol_80
     +3))%d+OpenAD_Symbol_552%d
          OpenAD_Symbol_552%d = 0.0d0
          integer_tape_pointer = integer_tape_pointer-1
          OpenAD_Symbol_804 = integer_tape(integer_tape_pointer)
          R(INT(OpenAD_Symbol_804))%d = R(INT(OpenAD_Symbol_804))%d+Open
     +AD_Symbol_554%d
          OpenAD_Symbol_554%d = 0.0d0
          integer_tape_pointer = integer_tape_pointer-1
          OpenAD_Symbol_805 = integer_tape(integer_tape_pointer)
          double_tape_pointer = double_tape_pointer-1
          OpenAD_Symbol_806 = double_tape(double_tape_pointer)
          OpenAD_Symbol_550%d = OpenAD_Symbol_550%d+R_T(INT(OpenAD_Symbo
     +l_805))%d*OpenAD_Symbol_806
          integer_tape_pointer = integer_tape_pointer-1
          OpenAD_Symbol_807 = integer_tape(integer_tape_pointer)
          double_tape_pointer = double_tape_pointer-1
          OpenAD_Symbol_808 = double_tape(double_tape_pointer)
          OpenAD_Symbol_548%d = OpenAD_Symbol_548%d+R_T(INT(OpenAD_Symbo
     +l_807))%d*OpenAD_Symbol_808
          R_T(INT(OpenAD_Symbol_807))%d = 0.0d0
          integer_tape_pointer = integer_tape_pointer-1
          OpenAD_Symbol_809 = integer_tape(integer_tape_pointer)
          PROJ_T(INT(OpenAD_Symbol_809))%d = PROJ_T(INT(OpenAD_Symbol_80
     +9))%d+OpenAD_Symbol_548%d
          OpenAD_Symbol_548%d = 0.0d0
          integer_tape_pointer = integer_tape_pointer-1
          OpenAD_Symbol_810 = integer_tape(integer_tape_pointer)
          R(INT(OpenAD_Symbol_810))%d = R(INT(OpenAD_Symbol_810))%d+Open
     +AD_Symbol_550%d
          OpenAD_Symbol_550%d = 0.0d0
        OpenAD_Symbol_731 = INT(OpenAD_Symbol_731) + 1
      END DO
          integer_tape_pointer = integer_tape_pointer-1
          OpenAD_Symbol_732 = integer_tape(integer_tape_pointer)
      OpenAD_Symbol_733 = 1
      DO WHILE(INT(OpenAD_Symbol_733) .LE. INT(OpenAD_Symbol_732))
          integer_tape_pointer = integer_tape_pointer-1
          OpenAD_Symbol_734 = integer_tape(integer_tape_pointer)
        IF(OpenAD_Symbol_734 .ne. 0) THEN
          integer_tape_pointer = integer_tape_pointer-1
          OpenAD_Symbol_795 = integer_tape(integer_tape_pointer)
          PROJ_S(INT(OpenAD_Symbol_795))%d = 0.0d0
          integer_tape_pointer = integer_tape_pointer-1
          OpenAD_Symbol_796 = integer_tape(integer_tape_pointer)
          PROJ_T(INT(OpenAD_Symbol_796))%d = 0.0d0
        ELSE
          integer_tape_pointer = integer_tape_pointer-1
          OpenAD_Symbol_797 = integer_tape(integer_tape_pointer)
          PROJ_S(INT(OpenAD_Symbol_797))%d = 0.0d0
          integer_tape_pointer = integer_tape_pointer-1
          OpenAD_Symbol_798 = integer_tape(integer_tape_pointer)
          PROJ_T(INT(OpenAD_Symbol_798))%d = 0.0d0
        ENDIF
        OpenAD_Symbol_733 = INT(OpenAD_Symbol_733) + 1
      END DO
          integer_tape_pointer = integer_tape_pointer-1
          OpenAD_Symbol_735 = integer_tape(integer_tape_pointer)
      OpenAD_Symbol_736 = 1
      DO WHILE(INT(OpenAD_Symbol_736) .LE. INT(OpenAD_Symbol_735))
          integer_tape_pointer = integer_tape_pointer-1
          OpenAD_Symbol_788 = integer_tape(integer_tape_pointer)
          double_tape_pointer = double_tape_pointer-1
          OpenAD_Symbol_789 = double_tape(double_tape_pointer)
          OpenAD_Symbol_546%d = OpenAD_Symbol_546%d+R(INT(OpenAD_Symbol_
     +788))%d*OpenAD_Symbol_789
          integer_tape_pointer = integer_tape_pointer-1
          OpenAD_Symbol_790 = integer_tape(integer_tape_pointer)
          double_tape_pointer = double_tape_pointer-1
          OpenAD_Symbol_791 = double_tape(double_tape_pointer)
          OpenAD_Symbol_544%d = OpenAD_Symbol_544%d+R(INT(OpenAD_Symbol_
     +790))%d*OpenAD_Symbol_791
          integer_tape_pointer = integer_tape_pointer-1
          OpenAD_Symbol_792 = integer_tape(integer_tape_pointer)
          double_tape_pointer = double_tape_pointer-1
          OpenAD_Symbol_793 = double_tape(double_tape_pointer)
          OpenAD_Symbol_542%d = OpenAD_Symbol_542%d+R(INT(OpenAD_Symbol_
     +792))%d*OpenAD_Symbol_793
          R(INT(OpenAD_Symbol_792))%d = 0.0d0
          integer_tape_pointer = integer_tape_pointer-1
          OpenAD_Symbol_794 = integer_tape(integer_tape_pointer)
          R(INT(OpenAD_Symbol_794))%d = R(INT(OpenAD_Symbol_794))%d+Open
     +AD_Symbol_542%d
          OpenAD_Symbol_542%d = 0.0d0
          U0%d = U0%d+OpenAD_Symbol_544%d
          OpenAD_Symbol_544%d = 0.0d0
          SV%d = SV%d+OpenAD_Symbol_546%d
          OpenAD_Symbol_546%d = 0.0d0
        OpenAD_Symbol_736 = INT(OpenAD_Symbol_736) + 1
      END DO
          double_tape_pointer = double_tape_pointer-1
          OpenAD_Symbol_746 = double_tape(double_tape_pointer)
          OpenAD_Symbol_540%d = OpenAD_Symbol_540%d+R(6)%d*OpenAD_Symbol
     +_746
          double_tape_pointer = double_tape_pointer-1
          OpenAD_Symbol_747 = double_tape(double_tape_pointer)
          OpenAD_Symbol_538%d = OpenAD_Symbol_538%d+R(6)%d*OpenAD_Symbol
     +_747
          R(6)%d = 0.0d0
          BETA%d = BETA%d+OpenAD_Symbol_538%d
          OpenAD_Symbol_538%d = 0.0d0
          DELTA%d = DELTA%d+OpenAD_Symbol_540%d
          OpenAD_Symbol_540%d = 0.0d0
          if (iaddr(R(5)) .ne. iaddr(BETA)) then
            BETA%d = BETA%d+R(5)%d
            R(5)%d = 0
          end if
          double_tape_pointer = double_tape_pointer-1
          OpenAD_Symbol_748 = double_tape(double_tape_pointer)
          OpenAD_Symbol_535%d = OpenAD_Symbol_535%d+R(4)%d*OpenAD_Symbol
     +_748
          double_tape_pointer = double_tape_pointer-1
          OpenAD_Symbol_749 = double_tape(double_tape_pointer)
          OpenAD_Symbol_533%d = OpenAD_Symbol_533%d+R(4)%d*OpenAD_Symbol
     +_749
          R(4)%d = 0.0d0
          BETA%d = BETA%d+OpenAD_Symbol_533%d
          OpenAD_Symbol_533%d = 0.0d0
          DELTA%d = DELTA%d+OpenAD_Symbol_535%d
          OpenAD_Symbol_535%d = 0.0d0
          double_tape_pointer = double_tape_pointer-1
          OpenAD_Symbol_750 = double_tape(double_tape_pointer)
          OpenAD_Symbol_531%d = OpenAD_Symbol_531%d+R(3)%d*OpenAD_Symbol
     +_750
          double_tape_pointer = double_tape_pointer-1
          OpenAD_Symbol_751 = double_tape(double_tape_pointer)
          OpenAD_Symbol_529%d = OpenAD_Symbol_529%d+R(3)%d*OpenAD_Symbol
     +_751
          R(3)%d = 0.0d0
          DELTA%d = DELTA%d+OpenAD_Symbol_529%d
          OpenAD_Symbol_529%d = 0.0d0
          ALPHA%d = ALPHA%d+OpenAD_Symbol_531%d
          OpenAD_Symbol_531%d = 0.0d0
          double_tape_pointer = double_tape_pointer-1
          OpenAD_Symbol_752 = double_tape(double_tape_pointer)
          OpenAD_Symbol_527%d = OpenAD_Symbol_527%d+R(2)%d*OpenAD_Symbol
     +_752
          R(2)%d = 0.0d0
          ALPHA%d = ALPHA%d+OpenAD_Symbol_527%d
          OpenAD_Symbol_527%d = 0.0d0
          double_tape_pointer = double_tape_pointer-1
          OpenAD_Symbol_753 = double_tape(double_tape_pointer)
          OpenAD_Symbol_525%d = OpenAD_Symbol_525%d+R(1)%d*OpenAD_Symbol
     +_753
          double_tape_pointer = double_tape_pointer-1
          OpenAD_Symbol_754 = double_tape(double_tape_pointer)
          OpenAD_Symbol_523%d = OpenAD_Symbol_523%d+R(1)%d*OpenAD_Symbol
     +_754
          R(1)%d = 0.0d0
          ALPHA%d = ALPHA%d+OpenAD_Symbol_523%d
          OpenAD_Symbol_523%d = 0.0d0
          DELTA%d = DELTA%d+OpenAD_Symbol_525%d
          OpenAD_Symbol_525%d = 0.0d0
          double_tape_pointer = double_tape_pointer-1
          OpenAD_Symbol_755 = double_tape(double_tape_pointer)
          OpenAD_Symbol_521%d = OpenAD_Symbol_521%d+Y(6)%d*OpenAD_Symbol
     +_755
          Y(6)%d = 0.0d0
          THOUSAND%d = THOUSAND%d+OpenAD_Symbol_521%d
          OpenAD_Symbol_521%d = 0.0d0
          double_tape_pointer = double_tape_pointer-1
          OpenAD_Symbol_756 = double_tape(double_tape_pointer)
          OpenAD_Symbol_519%d = OpenAD_Symbol_519%d+Y(5)%d*OpenAD_Symbol
     +_756
          Y(5)%d = 0.0d0
          THOUSAND%d = THOUSAND%d+OpenAD_Symbol_519%d
          OpenAD_Symbol_519%d = 0.0d0
          double_tape_pointer = double_tape_pointer-1
          OpenAD_Symbol_757 = double_tape(double_tape_pointer)
          OpenAD_Symbol_517%d = OpenAD_Symbol_517%d+Y(4)%d*OpenAD_Symbol
     +_757
          Y(4)%d = 0.0d0
          THOUSAND%d = THOUSAND%d+OpenAD_Symbol_517%d
          OpenAD_Symbol_517%d = 0.0d0
          double_tape_pointer = double_tape_pointer-1
          OpenAD_Symbol_758 = double_tape(double_tape_pointer)
          OpenAD_Symbol_515%d = OpenAD_Symbol_515%d+Y(3)%d*OpenAD_Symbol
     +_758
          Y(3)%d = 0.0d0
          THOUSAND%d = THOUSAND%d+OpenAD_Symbol_515%d
          OpenAD_Symbol_515%d = 0.0d0
          double_tape_pointer = double_tape_pointer-1
          OpenAD_Symbol_759 = double_tape(double_tape_pointer)
          OpenAD_Symbol_513%d = OpenAD_Symbol_513%d+Y(2)%d*OpenAD_Symbol
     +_759
          Y(2)%d = 0.0d0
          THOUSAND%d = THOUSAND%d+OpenAD_Symbol_513%d
          OpenAD_Symbol_513%d = 0.0d0
          double_tape_pointer = double_tape_pointer-1
          OpenAD_Symbol_760 = double_tape(double_tape_pointer)
          OpenAD_Symbol_511%d = OpenAD_Symbol_511%d+Y(1)%d*OpenAD_Symbol
     +_760
          Y(1)%d = 0.0d0
          THOUSAND%d = THOUSAND%d+OpenAD_Symbol_511%d
          OpenAD_Symbol_511%d = 0.0d0
          FDEPS%d = 0.0d0
          double_tape_pointer = double_tape_pointer-1
          OpenAD_Symbol_761 = double_tape(double_tape_pointer)
          OpenAD_Symbol_509%d = OpenAD_Symbol_509%d+INTEGRATION_TIME%d*O
     +penAD_Symbol_761
          INTEGRATION_TIME%d = 0.0d0
          double_tape_pointer = double_tape_pointer-1
          OpenAD_Symbol_762 = double_tape(double_tape_pointer)
          OpenAD_Symbol_506%d = OpenAD_Symbol_506%d+DELTA_T%d*OpenAD_Sym
     +bol_762
          DELTA_T%d = 0.0d0
          double_tape_pointer = double_tape_pointer-1
          OpenAD_Symbol_763 = double_tape(double_tape_pointer)
          OpenAD_Symbol_506%d = OpenAD_Symbol_506%d+NOISE_CORRELATION_TI
     +ME%d*OpenAD_Symbol_763
          NOISE_CORRELATION_TIME%d = 0.0d0
          DAY%d = DAY%d+OpenAD_Symbol_506%d
          OpenAD_Symbol_506%d = 0.0d0
          YEAR%d = YEAR%d+OpenAD_Symbol_509%d
          OpenAD_Symbol_509%d = 0.0d0
          double_tape_pointer = double_tape_pointer-1
          OpenAD_Symbol_764 = double_tape(double_tape_pointer)
          OpenAD_Symbol_504%d = OpenAD_Symbol_504%d+GAMMA_S%d*OpenAD_Sym
     +bol_764
          double_tape_pointer = double_tape_pointer-1
          OpenAD_Symbol_765 = double_tape(double_tape_pointer)
          OpenAD_Symbol_502%d = OpenAD_Symbol_502%d+GAMMA_S%d*OpenAD_Sym
     +bol_765
          double_tape_pointer = double_tape_pointer-1
          OpenAD_Symbol_766 = double_tape(double_tape_pointer)
          OpenAD_Symbol_500%d = OpenAD_Symbol_500%d+GAMMA_S%d*OpenAD_Sym
     +bol_766
          GAMMA_S%d = 0.0d0
          EPSILON_IC%d = 0.0d0
          DAY%d = DAY%d+OpenAD_Symbol_500%d
          OpenAD_Symbol_500%d = 0.0d0
          DAYS_PER_50M_MIXED_LAYER%d = DAYS_PER_50M_MIXED_LAYER%d+OpenAD
     +_Symbol_502%d
          OpenAD_Symbol_502%d = 0.0d0
          BHEIGHT(1)%d = BHEIGHT(1)%d+OpenAD_Symbol_504%d
          OpenAD_Symbol_504%d = 0.0d0
          double_tape_pointer = double_tape_pointer-1
          OpenAD_Symbol_767 = double_tape(double_tape_pointer)
          OpenAD_Symbol_496%d = OpenAD_Symbol_496%d+GAMMA_T%d*OpenAD_Sym
     +bol_767
          GAMMA_T%d = 0.0d0
          DAY%d = DAY%d+OpenAD_Symbol_496%d
          OpenAD_Symbol_496%d = 0.0d0
          double_tape_pointer = double_tape_pointer-1
          OpenAD_Symbol_768 = double_tape(double_tape_pointer)
          OpenAD_Symbol_494%d = OpenAD_Symbol_494%d+U0%d*OpenAD_Symbol_7
     +68
          U0%d = 0.0d0
          DAYS_PER_50M_MIXED_LAYER%d = 0.0d0
          BETA%d = 0.0d0
          ALPHA%d = 0.0d0
          SV%d = SV%d+OpenAD_Symbol_494%d
          OpenAD_Symbol_494%d = 0.0d0
          double_tape_pointer = double_tape_pointer-1
          OpenAD_Symbol_769 = double_tape(double_tape_pointer)
          OpenAD_Symbol_492%d = OpenAD_Symbol_492%d+YEAR%d*OpenAD_Symbol
     +_769
          YEAR%d = 0.0d0
          SV%d = 0.0d0
          DAY%d = DAY%d+OpenAD_Symbol_492%d
          OpenAD_Symbol_492%d = 0.0d0
          double_tape_pointer = double_tape_pointer-1
          OpenAD_Symbol_770 = double_tape(double_tape_pointer)
          OpenAD_Symbol_490%d = OpenAD_Symbol_490%d+VOL(3)%d*OpenAD_Symb
     +ol_770
          double_tape_pointer = double_tape_pointer-1
          OpenAD_Symbol_771 = double_tape(double_tape_pointer)
          OpenAD_Symbol_488%d = OpenAD_Symbol_488%d+VOL(3)%d*OpenAD_Symb
     +ol_771
          VOL(3)%d = 0.0d0
          DAY%d = 0.0d0
          THOUSAND%d = 0.0d0
          HUNDRED%d = 0.0d0
          ROBERT_FILTER_COEFF%d = 0.0d0
          AREA(3)%d = AREA(3)%d+OpenAD_Symbol_488%d
          OpenAD_Symbol_488%d = 0.0d0
          BHEIGHT(3)%d = BHEIGHT(3)%d+OpenAD_Symbol_490%d
          OpenAD_Symbol_490%d = 0.0d0
          double_tape_pointer = double_tape_pointer-1
          OpenAD_Symbol_772 = double_tape(double_tape_pointer)
          OpenAD_Symbol_486%d = OpenAD_Symbol_486%d+VOL(2)%d*OpenAD_Symb
     +ol_772
          double_tape_pointer = double_tape_pointer-1
          OpenAD_Symbol_773 = double_tape(double_tape_pointer)
          OpenAD_Symbol_484%d = OpenAD_Symbol_484%d+VOL(2)%d*OpenAD_Symb
     +ol_773
          double_tape_pointer = double_tape_pointer-1
          OpenAD_Symbol_774 = double_tape(double_tape_pointer)
          OpenAD_Symbol_482%d = OpenAD_Symbol_482%d+VOL(2)%d*OpenAD_Symb
     +ol_774
          VOL(2)%d = 0.0d0
          BHEIGHT(1)%d = BHEIGHT(1)%d+OpenAD_Symbol_482%d
          OpenAD_Symbol_482%d = 0.0d0
          BHEIGHT(3)%d = BHEIGHT(3)%d+OpenAD_Symbol_484%d
          OpenAD_Symbol_484%d = 0.0d0
          AREA(2)%d = AREA(2)%d+OpenAD_Symbol_486%d
          OpenAD_Symbol_486%d = 0.0d0
          double_tape_pointer = double_tape_pointer-1
          OpenAD_Symbol_775 = double_tape(double_tape_pointer)
          OpenAD_Symbol_480%d = OpenAD_Symbol_480%d+VOL(1)%d*OpenAD_Symb
     +ol_775
          double_tape_pointer = double_tape_pointer-1
          OpenAD_Symbol_776 = double_tape(double_tape_pointer)
          OpenAD_Symbol_478%d = OpenAD_Symbol_478%d+VOL(1)%d*OpenAD_Symb
     +ol_776
          VOL(1)%d = 0.0d0
          AREA(1)%d = AREA(1)%d+OpenAD_Symbol_478%d
          OpenAD_Symbol_478%d = 0.0d0
          BHEIGHT(1)%d = BHEIGHT(1)%d+OpenAD_Symbol_480%d
          OpenAD_Symbol_480%d = 0.0d0
          double_tape_pointer = double_tape_pointer-1
          OpenAD_Symbol_777 = double_tape(double_tape_pointer)
          OpenAD_Symbol_476%d = OpenAD_Symbol_476%d+AREA(3)%d*OpenAD_Sym
     +bol_777
          double_tape_pointer = double_tape_pointer-1
          OpenAD_Symbol_778 = double_tape(double_tape_pointer)
          OpenAD_Symbol_474%d = OpenAD_Symbol_474%d+AREA(3)%d*OpenAD_Sym
     +bol_778
          AREA(3)%d = 0.0d0
          BLENGTH(3)%d = BLENGTH(3)%d+OpenAD_Symbol_474%d
          OpenAD_Symbol_474%d = 0.0d0
          BWIDTH%d = BWIDTH%d+OpenAD_Symbol_476%d
          OpenAD_Symbol_476%d = 0.0d0
          double_tape_pointer = double_tape_pointer-1
          OpenAD_Symbol_779 = double_tape(double_tape_pointer)
          OpenAD_Symbol_472%d = OpenAD_Symbol_472%d+AREA(2)%d*OpenAD_Sym
     +bol_779
          double_tape_pointer = double_tape_pointer-1
          OpenAD_Symbol_780 = double_tape(double_tape_pointer)
          OpenAD_Symbol_470%d = OpenAD_Symbol_470%d+AREA(2)%d*OpenAD_Sym
     +bol_780
          AREA(2)%d = 0.0d0
          BLENGTH(2)%d = BLENGTH(2)%d+OpenAD_Symbol_470%d
          OpenAD_Symbol_470%d = 0.0d0
          BWIDTH%d = BWIDTH%d+OpenAD_Symbol_472%d
          OpenAD_Symbol_472%d = 0.0d0
          double_tape_pointer = double_tape_pointer-1
          OpenAD_Symbol_781 = double_tape(double_tape_pointer)
          OpenAD_Symbol_468%d = OpenAD_Symbol_468%d+AREA(1)%d*OpenAD_Sym
     +bol_781
          double_tape_pointer = double_tape_pointer-1
          OpenAD_Symbol_782 = double_tape(double_tape_pointer)
          OpenAD_Symbol_466%d = OpenAD_Symbol_466%d+AREA(1)%d*OpenAD_Sym
     +bol_782
          AREA(1)%d = 0.0d0
          BLENGTH(1)%d = BLENGTH(1)%d+OpenAD_Symbol_466%d
          OpenAD_Symbol_466%d = 0.0d0
          BWIDTH%d = BWIDTH%d+OpenAD_Symbol_468%d
          OpenAD_Symbol_468%d = 0.0d0
          double_tape_pointer = double_tape_pointer-1
          OpenAD_Symbol_783 = double_tape(double_tape_pointer)
          OpenAD_Symbol_464%d = OpenAD_Symbol_464%d+DELTA%d*OpenAD_Symbo
     +l_783
          double_tape_pointer = double_tape_pointer-1
          OpenAD_Symbol_784 = double_tape(double_tape_pointer)
          OpenAD_Symbol_462%d = OpenAD_Symbol_462%d+DELTA%d*OpenAD_Symbo
     +l_784
          double_tape_pointer = double_tape_pointer-1
          OpenAD_Symbol_785 = double_tape(double_tape_pointer)
          OpenAD_Symbol_460%d = OpenAD_Symbol_460%d+DELTA%d*OpenAD_Symbo
     +l_785
          DELTA%d = 0.0d0
          BWIDTH%d = 0.0d0
          BHEIGHT(1)%d = BHEIGHT(1)%d+OpenAD_Symbol_460%d
          OpenAD_Symbol_460%d = 0.0d0
          BHEIGHT(3)%d = BHEIGHT(3)%d+OpenAD_Symbol_462%d
          OpenAD_Symbol_462%d = 0.0d0
          BHEIGHT(1)%d = BHEIGHT(1)%d+OpenAD_Symbol_464%d
          OpenAD_Symbol_464%d = 0.0d0
          double_tape_pointer = double_tape_pointer-1
          OpenAD_Symbol_786 = double_tape(double_tape_pointer)
          OpenAD_Symbol_458%d = OpenAD_Symbol_458%d+BHEIGHT(2)%d*OpenAD_
     +Symbol_786
          double_tape_pointer = double_tape_pointer-1
          OpenAD_Symbol_787 = double_tape(double_tape_pointer)
          OpenAD_Symbol_456%d = OpenAD_Symbol_456%d+BHEIGHT(2)%d*OpenAD_
     +Symbol_787
          BHEIGHT(2)%d = 0.0d0
          BHEIGHT(1)%d = BHEIGHT(1)%d+OpenAD_Symbol_456%d
          OpenAD_Symbol_456%d = 0.0d0
          BHEIGHT(3)%d = BHEIGHT(3)%d+OpenAD_Symbol_458%d
          OpenAD_Symbol_458%d = 0.0d0
          BHEIGHT(3)%d = 0.0d0
          BHEIGHT(1)%d = 0.0d0
          if (iaddr(BLENGTH(3)) .ne. iaddr(BLENGTH(1))) then
            BLENGTH(1)%d = BLENGTH(1)%d+BLENGTH(3)%d
            BLENGTH(3)%d = 0
          end if
          BLENGTH(2)%d = 0.0d0
          BLENGTH(1)%d = 0.0d0
          end if 
        end subroutine box_ini_params
       subroutine box_model_body()
          use OpenAD_tape
          use OpenAD_rev

          ! original arguments get inserted before version
          ! and declared here together with all local variables
          ! generated by xaifBooster

      use w2f__types
      use active_module
      use all_globals_mod
      use all_globals_mod
      IMPLICIT NONE
C
C     **** Global Variables ****
C
      INTEGER(w2f__i8) OpenAD_Symbol_830
      INTEGER(w2f__i8) OpenAD_Symbol_831
      INTEGER(w2f__i8) OpenAD_Symbol_832
      INTEGER(w2f__i8) OpenAD_Symbol_827
      INTEGER(w2f__i8) OpenAD_Symbol_833
      INTEGER(w2f__i8) OpenAD_Symbol_828
      INTEGER(w2f__i8) OpenAD_Symbol_834
      INTEGER(w2f__i8) OpenAD_Symbol_829
      INTEGER(w2f__i8) OpenAD_Symbol_840
      INTEGER(w2f__i8) OpenAD_Symbol_835
      INTEGER(w2f__i8) OpenAD_Symbol_841
      INTEGER(w2f__i8) OpenAD_Symbol_836
      INTEGER(w2f__i8) OpenAD_Symbol_837
      INTEGER(w2f__i8) OpenAD_Symbol_838
      INTEGER(w2f__i8) OpenAD_Symbol_839
C
C     **** Local Variables and functions ****
C
      EXTERNAL box_final_state
      EXTERNAL box_forward
      EXTERNAL box_ini_fields
      INTEGER(w2f__i4) ILEV1
      INTEGER(w2f__i4) ILEV2
      INTEGER(w2f__i4) ILOOP
      INTEGER(w2f__i4) ISBYTE
      PARAMETER ( ISBYTE = 8)
      INTEGER(w2f__i4) MAXLEV2
      INTEGER(w2f__i4) NLEV1
      PARAMETER ( NLEV1 = 73)
      INTEGER(w2f__i4) NLEV2
      PARAMETER ( NLEV2 = 50)
C
C     **** statements ****
C

          integer iaddr
          external iaddr

         if (our_rev_mode%plain) then
! original function
      CALL box_ini_fields()
      MAXLEV2 = (N_MAX / 73) + 1
      IF(N_MAX .GT. INT(3650_w2f__i8)) THEN
        WRITE(*, *) 'NEED TO SET nlev1*nlev2 >= n_max '
      ELSE
        DO ILEV2 = 1, 50, 1
          IF(ILEV2 .LE. MAXLEV2) THEN
            DO ILEV1 = 1, 73, 1
              ILOOP = ILEV1 + ILEV2 * 73 +(-73)
              IF(ILOOP .LE. N_MAX) THEN
                CALL box_forward(ILEV1)
              ENDIF
            END DO
          ENDIF
        END DO
        CALL box_final_state()
      ENDIF
      
          end if
          if (our_rev_mode%tape) then
! taping
      CALL box_ini_fields()
      MAXLEV2 = (N_MAX / 73) + 1
      IF(N_MAX .GT. INT(3650_w2f__i8)) THEN
        WRITE(*, *) 'NEED TO SET nlev1*nlev2 >= n_max '
        OpenAD_Symbol_840 = 1_w2f__i8
          integer_tape(integer_tape_pointer) = OpenAD_Symbol_840
          integer_tape_pointer = integer_tape_pointer+1
      ELSE
        OpenAD_Symbol_834 = 0_w2f__i8
        DO ILEV2 = 1, 50, 1
          IF(ILEV2 .LE. MAXLEV2) THEN
            OpenAD_Symbol_835 = 0_w2f__i8
            DO ILEV1 = 1, 73, 1
              ILOOP = ILEV1 + ILEV2 * 73 +(-73)
              IF(ILOOP .LE. N_MAX) THEN
                CALL box_forward(ILEV1)
                OpenAD_Symbol_836 = 1_w2f__i8
          integer_tape(integer_tape_pointer) = OpenAD_Symbol_836
          integer_tape_pointer = integer_tape_pointer+1
              ELSE
                OpenAD_Symbol_837 = 0_w2f__i8
          integer_tape(integer_tape_pointer) = OpenAD_Symbol_837
          integer_tape_pointer = integer_tape_pointer+1
              ENDIF
              OpenAD_Symbol_835 = (INT(OpenAD_Symbol_835) + INT( 1_w2f__
     +i8))
            END DO
          integer_tape(integer_tape_pointer) = OpenAD_Symbol_835
          integer_tape_pointer = integer_tape_pointer+1
            OpenAD_Symbol_839 = 1_w2f__i8
          integer_tape(integer_tape_pointer) = OpenAD_Symbol_839
          integer_tape_pointer = integer_tape_pointer+1
          ELSE
            OpenAD_Symbol_838 = 0_w2f__i8
          integer_tape(integer_tape_pointer) = OpenAD_Symbol_838
          integer_tape_pointer = integer_tape_pointer+1
          ENDIF
          OpenAD_Symbol_834 = (INT(OpenAD_Symbol_834) + INT(1_w2f__i8))
        END DO
          integer_tape(integer_tape_pointer) = OpenAD_Symbol_834
          integer_tape_pointer = integer_tape_pointer+1
        CALL box_final_state()
        OpenAD_Symbol_841 = 0_w2f__i8
          integer_tape(integer_tape_pointer) = OpenAD_Symbol_841
          integer_tape_pointer = integer_tape_pointer+1
      ENDIF
      
          end if 
          if (our_rev_mode%adjoint) then
! adjoint
          integer_tape_pointer = integer_tape_pointer-1
          OpenAD_Symbol_827 = integer_tape(integer_tape_pointer)
      IF(OpenAD_Symbol_827 .ne. 0) THEN
      ELSE
        CALL box_final_state()
          integer_tape_pointer = integer_tape_pointer-1
          OpenAD_Symbol_828 = integer_tape(integer_tape_pointer)
        OpenAD_Symbol_829 = 1
        DO WHILE(INT(OpenAD_Symbol_829) .LE. INT(OpenAD_Symbol_828))
          integer_tape_pointer = integer_tape_pointer-1
          OpenAD_Symbol_830 = integer_tape(integer_tape_pointer)
          IF(OpenAD_Symbol_830 .ne. 0) THEN
          integer_tape_pointer = integer_tape_pointer-1
          OpenAD_Symbol_831 = integer_tape(integer_tape_pointer)
            OpenAD_Symbol_832 = 1
            DO WHILE(INT(OpenAD_Symbol_832) .LE. INT(OpenAD_Symbol_831) 
     +)
          integer_tape_pointer = integer_tape_pointer-1
          OpenAD_Symbol_833 = integer_tape(integer_tape_pointer)
              IF(OpenAD_Symbol_833 .ne. 0) THEN
                CALL box_forward(ILEV1)
              ENDIF
              OpenAD_Symbol_832 = INT(OpenAD_Symbol_832) + 1
            END DO
          ENDIF
          OpenAD_Symbol_829 = INT(OpenAD_Symbol_829) + 1
        END DO
      ENDIF
      CALL box_ini_fields()
          end if 
        end subroutine box_model_body
       subroutine box_density(TLOC,SLOC,RHOLOC)
          use OpenAD_tape
          use OpenAD_rev

          ! original arguments get inserted before version
          ! and declared here together with all local variables
          ! generated by xaifBooster

      use w2f__types
      use active_module
      use all_globals_mod
      use all_globals_mod
      IMPLICIT NONE
C
C     **** Global Variables ****
C
      REAL(w2f__8) OpenAD_Symbol_284
      REAL(w2f__8) OpenAD_Symbol_290
      type(active) :: OpenAD_Symbol_285
      type(active) :: OpenAD_Symbol_291
      REAL(w2f__8) OpenAD_Symbol_286
      type(active) :: OpenAD_Symbol_287
      REAL(w2f__8) OpenAD_Symbol_288
      type(active) :: OpenAD_Symbol_289
      INTEGER(w2f__i8) OpenAD_Symbol_577
      INTEGER(w2f__i8) OpenAD_Symbol_578
      INTEGER(w2f__i8) OpenAD_Symbol_579
      REAL(w2f__8) OpenAD_Symbol_0
      REAL(w2f__8) OpenAD_Symbol_1
      REAL(w2f__8) OpenAD_Symbol_2
      REAL(w2f__8) OpenAD_Symbol_3
      REAL(w2f__8) OpenAD_Symbol_4
      REAL(w2f__8) OpenAD_Symbol_5
      REAL(w2f__8) OpenAD_Symbol_6
C
C     **** Parameters and Result ****
C
      type(active) :: TLOC(1 : 3)
      type(active) :: SLOC(1 : 3)
      type(active) :: RHOLOC(1 : 3)
C
C     **** Local Variables and functions ****
C
      INTEGER(w2f__i4) ISBYTE
      PARAMETER ( ISBYTE = 8)
      INTEGER(w2f__i4) L
      INTEGER(w2f__i4) NLEV1
      PARAMETER ( NLEV1 = 73)
      INTEGER(w2f__i4) NLEV2
      PARAMETER ( NLEV2 = 50)
      INTEGER(w2f__i8) OpenAD_Symbol_580
      REAL(w2f__8) OpenAD_Symbol_581
      INTEGER(w2f__i8) OpenAD_Symbol_582
      REAL(w2f__8) OpenAD_Symbol_583
      INTEGER(w2f__i8) OpenAD_Symbol_584
      REAL(w2f__8) OpenAD_Symbol_585
      INTEGER(w2f__i8) OpenAD_Symbol_586
      REAL(w2f__8) OpenAD_Symbol_587
      INTEGER(w2f__i8) OpenAD_Symbol_588
      INTEGER(w2f__i8) OpenAD_Symbol_589
C
C     **** statements ****
C

          integer iaddr
          external iaddr

         if (our_rev_mode%plain) then
! original function
      DO L = 1, 3, 1
        RHOLOC(INT(L))%v = (SLOC(L)%v*BETA%v-TLOC(L)%v*ALPHA%v)
      END DO
      
          end if
          if (our_rev_mode%tape) then
! taping
      OpenAD_Symbol_579 = 0_w2f__i8
      DO L = 1, 3, 1
        OpenAD_Symbol_6 = (SLOC(L)%v*BETA%v-TLOC(L)%v*ALPHA%v)
        OpenAD_Symbol_2 = BETA%v
        OpenAD_Symbol_3 = SLOC(L)%v
        OpenAD_Symbol_0 = 1_w2f__i8
        OpenAD_Symbol_4 = ALPHA%v
        OpenAD_Symbol_5 = TLOC(L)%v
        OpenAD_Symbol_1 = (-1_w2f__i8)
        RHOLOC(INT(L))%v = OpenAD_Symbol_6
        OpenAD_Symbol_284 = (OpenAD_Symbol_2 * OpenAD_Symbol_0)
        OpenAD_Symbol_286 = (OpenAD_Symbol_3 * OpenAD_Symbol_0)
        OpenAD_Symbol_288 = (OpenAD_Symbol_4 * OpenAD_Symbol_1)
        OpenAD_Symbol_290 = (OpenAD_Symbol_5 * OpenAD_Symbol_1)
          integer_tape(integer_tape_pointer) = L
          integer_tape_pointer = integer_tape_pointer+1
          integer_tape(integer_tape_pointer) = L
          integer_tape_pointer = integer_tape_pointer+1
          double_tape(double_tape_pointer) = OpenAD_Symbol_284
          double_tape_pointer = double_tape_pointer+1
          integer_tape(integer_tape_pointer) = L
          integer_tape_pointer = integer_tape_pointer+1
          double_tape(double_tape_pointer) = OpenAD_Symbol_286
          double_tape_pointer = double_tape_pointer+1
          integer_tape(integer_tape_pointer) = L
          integer_tape_pointer = integer_tape_pointer+1
          double_tape(double_tape_pointer) = OpenAD_Symbol_288
          double_tape_pointer = double_tape_pointer+1
          integer_tape(integer_tape_pointer) = L
          integer_tape_pointer = integer_tape_pointer+1
          double_tape(double_tape_pointer) = OpenAD_Symbol_290
          double_tape_pointer = double_tape_pointer+1
          integer_tape(integer_tape_pointer) = L
          integer_tape_pointer = integer_tape_pointer+1
        OpenAD_Symbol_579 = (INT(OpenAD_Symbol_579) + INT(1_w2f__i8))
      END DO
          integer_tape(integer_tape_pointer) = OpenAD_Symbol_579
          integer_tape_pointer = integer_tape_pointer+1
      
          end if 
          if (our_rev_mode%adjoint) then
! adjoint
          integer_tape_pointer = integer_tape_pointer-1
          OpenAD_Symbol_577 = integer_tape(integer_tape_pointer)
      OpenAD_Symbol_578 = 1
      DO WHILE(INT(OpenAD_Symbol_578) .LE. INT(OpenAD_Symbol_577))
          integer_tape_pointer = integer_tape_pointer-1
          OpenAD_Symbol_580 = integer_tape(integer_tape_pointer)
          double_tape_pointer = double_tape_pointer-1
          OpenAD_Symbol_581 = double_tape(double_tape_pointer)
          OpenAD_Symbol_291%d = OpenAD_Symbol_291%d+RHOLOC(INT(OpenAD_Sy
     +mbol_580))%d*OpenAD_Symbol_581
          integer_tape_pointer = integer_tape_pointer-1
          OpenAD_Symbol_582 = integer_tape(integer_tape_pointer)
          double_tape_pointer = double_tape_pointer-1
          OpenAD_Symbol_583 = double_tape(double_tape_pointer)
          OpenAD_Symbol_289%d = OpenAD_Symbol_289%d+RHOLOC(INT(OpenAD_Sy
     +mbol_582))%d*OpenAD_Symbol_583
          integer_tape_pointer = integer_tape_pointer-1
          OpenAD_Symbol_584 = integer_tape(integer_tape_pointer)
          double_tape_pointer = double_tape_pointer-1
          OpenAD_Symbol_585 = double_tape(double_tape_pointer)
          OpenAD_Symbol_287%d = OpenAD_Symbol_287%d+RHOLOC(INT(OpenAD_Sy
     +mbol_584))%d*OpenAD_Symbol_585
          integer_tape_pointer = integer_tape_pointer-1
          OpenAD_Symbol_586 = integer_tape(integer_tape_pointer)
          double_tape_pointer = double_tape_pointer-1
          OpenAD_Symbol_587 = double_tape(double_tape_pointer)
          OpenAD_Symbol_285%d = OpenAD_Symbol_285%d+RHOLOC(INT(OpenAD_Sy
     +mbol_586))%d*OpenAD_Symbol_587
          RHOLOC(INT(OpenAD_Symbol_586))%d = 0.0d0
          integer_tape_pointer = integer_tape_pointer-1
          OpenAD_Symbol_588 = integer_tape(integer_tape_pointer)
          SLOC(INT(OpenAD_Symbol_588))%d = SLOC(INT(OpenAD_Symbol_588))%
     +d+OpenAD_Symbol_285%d
          OpenAD_Symbol_285%d = 0.0d0
          BETA%d = BETA%d+OpenAD_Symbol_287%d
          OpenAD_Symbol_287%d = 0.0d0
          integer_tape_pointer = integer_tape_pointer-1
          OpenAD_Symbol_589 = integer_tape(integer_tape_pointer)
          TLOC(INT(OpenAD_Symbol_589))%d = TLOC(INT(OpenAD_Symbol_589))%
     +d+OpenAD_Symbol_289%d
          OpenAD_Symbol_289%d = 0.0d0
          ALPHA%d = ALPHA%d+OpenAD_Symbol_291%d
          OpenAD_Symbol_291%d = 0.0d0
        OpenAD_Symbol_578 = INT(OpenAD_Symbol_578) + 1
      END DO
          end if 
        end subroutine box_density
       subroutine box_transport(RHOLOC,UVELLOC)
          use OpenAD_tape
          use OpenAD_rev

          ! original arguments get inserted before version
          ! and declared here together with all local variables
          ! generated by xaifBooster

      use w2f__types
      use active_module
      use all_globals_mod
      use all_globals_mod
      IMPLICIT NONE
C
C     **** Global Variables ****
C
      REAL(w2f__8) OpenAD_Symbol_300
      type(active) :: OpenAD_Symbol_301
      REAL(w2f__8) OpenAD_Symbol_302
      REAL(w2f__8) OpenAD_Symbol_303
      type(active) :: OpenAD_Symbol_304
      REAL(w2f__8) OpenAD_Symbol_305
      REAL(w2f__8) OpenAD_Symbol_306
      type(active) :: OpenAD_Symbol_307
      REAL(w2f__8) OpenAD_Symbol_292
      type(active) :: OpenAD_Symbol_293
      REAL(w2f__8) OpenAD_Symbol_294
      REAL(w2f__8) OpenAD_Symbol_295
      REAL(w2f__8) OpenAD_Symbol_296
      type(active) :: OpenAD_Symbol_297
      REAL(w2f__8) OpenAD_Symbol_298
      REAL(w2f__8) OpenAD_Symbol_299
      REAL(w2f__8) OpenAD_Symbol_10
      REAL(w2f__8) OpenAD_Symbol_11
      REAL(w2f__8) OpenAD_Symbol_12
      REAL(w2f__8) OpenAD_Symbol_13
      REAL(w2f__8) OpenAD_Symbol_14
      REAL(w2f__8) OpenAD_Symbol_15
      REAL(w2f__8) OpenAD_Symbol_16
      REAL(w2f__8) OpenAD_Symbol_21
      REAL(w2f__8) OpenAD_Symbol_17
      REAL(w2f__8) OpenAD_Symbol_22
      REAL(w2f__8) OpenAD_Symbol_18
      REAL(w2f__8) OpenAD_Symbol_19
      REAL(w2f__8) OpenAD_Symbol_7
      REAL(w2f__8) OpenAD_Symbol_8
      REAL(w2f__8) OpenAD_Symbol_9
C
C     **** Parameters and Result ****
C
      type(active) :: RHOLOC(1 : 3)
      type(active) :: UVELLOC
C
C     **** Local Variables and functions ****
C
      INTEGER(w2f__i4) ISBYTE
      PARAMETER ( ISBYTE = 8)
      INTEGER(w2f__i4) NLEV1
      PARAMETER ( NLEV1 = 73)
      INTEGER(w2f__i4) NLEV2
      PARAMETER ( NLEV2 = 50)
      REAL(w2f__8) OpenAD_Symbol_590
      REAL(w2f__8) OpenAD_Symbol_591
      REAL(w2f__8) OpenAD_Symbol_592
      REAL(w2f__8) OpenAD_Symbol_593
      REAL(w2f__8) OpenAD_Symbol_594
C
C     **** statements ****
C

          integer iaddr
          external iaddr

         if (our_rev_mode%plain) then
! original function
      UVELLOC%v = (-(U0%v*(RHOLOC(1)%v*DELTA%v+RHOLOC(3)%v*(1.0D00-DELTA
     +%v)-RHOLOC(2)%v)))
      
          end if
          if (our_rev_mode%tape) then
! taping
      OpenAD_Symbol_17 = (1.0D00-DELTA%v)
      OpenAD_Symbol_8 = (RHOLOC(1)%v*DELTA%v+RHOLOC(3)%v*OpenAD_Symbol_1
     +7-RHOLOC(2)%v)
      OpenAD_Symbol_22 = (-(U0%v*OpenAD_Symbol_8))
      OpenAD_Symbol_9 = OpenAD_Symbol_8
      OpenAD_Symbol_15 = DELTA%v
      OpenAD_Symbol_16 = RHOLOC(1)%v
      OpenAD_Symbol_13 = 1_w2f__i8
      OpenAD_Symbol_18 = OpenAD_Symbol_17
      OpenAD_Symbol_21 = (-1_w2f__i8)
      OpenAD_Symbol_19 = RHOLOC(3)%v
      OpenAD_Symbol_14 = 1_w2f__i8
      OpenAD_Symbol_11 = 1_w2f__i8
      OpenAD_Symbol_12 = (-1_w2f__i8)
      OpenAD_Symbol_10 = U0%v
      OpenAD_Symbol_7 = (-1_w2f__i8)
      UVELLOC%v = OpenAD_Symbol_22
      OpenAD_Symbol_292 = (OpenAD_Symbol_9 * OpenAD_Symbol_7)
      OpenAD_Symbol_294 = (OpenAD_Symbol_10 * OpenAD_Symbol_7)
      OpenAD_Symbol_295 = (OpenAD_Symbol_11 * OpenAD_Symbol_294)
      OpenAD_Symbol_296 = (OpenAD_Symbol_12 * OpenAD_Symbol_294)
      OpenAD_Symbol_298 = (OpenAD_Symbol_13 * OpenAD_Symbol_295)
      OpenAD_Symbol_299 = (OpenAD_Symbol_14 * OpenAD_Symbol_295)
      OpenAD_Symbol_300 = (OpenAD_Symbol_18 * OpenAD_Symbol_299)
      OpenAD_Symbol_302 = (OpenAD_Symbol_19 * OpenAD_Symbol_299)
      OpenAD_Symbol_303 = (OpenAD_Symbol_15 * OpenAD_Symbol_298)
      OpenAD_Symbol_305 = (OpenAD_Symbol_16 * OpenAD_Symbol_298)
      OpenAD_Symbol_306 = (OpenAD_Symbol_305 + OpenAD_Symbol_21 *  OpenA
     +D_Symbol_302)
          double_tape(double_tape_pointer) = OpenAD_Symbol_292
          double_tape_pointer = double_tape_pointer+1
          double_tape(double_tape_pointer) = OpenAD_Symbol_296
          double_tape_pointer = double_tape_pointer+1
          double_tape(double_tape_pointer) = OpenAD_Symbol_300
          double_tape_pointer = double_tape_pointer+1
          double_tape(double_tape_pointer) = OpenAD_Symbol_303
          double_tape_pointer = double_tape_pointer+1
          double_tape(double_tape_pointer) = OpenAD_Symbol_306
          double_tape_pointer = double_tape_pointer+1
      
          end if 
          if (our_rev_mode%adjoint) then
! adjoint
          double_tape_pointer = double_tape_pointer-1
          OpenAD_Symbol_590 = double_tape(double_tape_pointer)
          OpenAD_Symbol_307%d = OpenAD_Symbol_307%d+UVELLOC%d*OpenAD_Sym
     +bol_590
          double_tape_pointer = double_tape_pointer-1
          OpenAD_Symbol_591 = double_tape(double_tape_pointer)
          OpenAD_Symbol_304%d = OpenAD_Symbol_304%d+UVELLOC%d*OpenAD_Sym
     +bol_591
          double_tape_pointer = double_tape_pointer-1
          OpenAD_Symbol_592 = double_tape(double_tape_pointer)
          OpenAD_Symbol_301%d = OpenAD_Symbol_301%d+UVELLOC%d*OpenAD_Sym
     +bol_592
          double_tape_pointer = double_tape_pointer-1
          OpenAD_Symbol_593 = double_tape(double_tape_pointer)
          OpenAD_Symbol_297%d = OpenAD_Symbol_297%d+UVELLOC%d*OpenAD_Sym
     +bol_593
          double_tape_pointer = double_tape_pointer-1
          OpenAD_Symbol_594 = double_tape(double_tape_pointer)
          OpenAD_Symbol_293%d = OpenAD_Symbol_293%d+UVELLOC%d*OpenAD_Sym
     +bol_594
          UVELLOC%d = 0.0d0
          U0%d = U0%d+OpenAD_Symbol_293%d
          OpenAD_Symbol_293%d = 0.0d0
          RHOLOC(2)%d = RHOLOC(2)%d+OpenAD_Symbol_297%d
          OpenAD_Symbol_297%d = 0.0d0
          RHOLOC(3)%d = RHOLOC(3)%d+OpenAD_Symbol_301%d
          OpenAD_Symbol_301%d = 0.0d0
          RHOLOC(1)%d = RHOLOC(1)%d+OpenAD_Symbol_304%d
          OpenAD_Symbol_304%d = 0.0d0
          DELTA%d = DELTA%d+OpenAD_Symbol_307%d
          OpenAD_Symbol_307%d = 0.0d0
          end if 
        end subroutine box_transport
       subroutine box_robert_filter(FLDNOW,FLDOLD,FLDNEW)
          use OpenAD_tape
          use OpenAD_rev

          ! original arguments get inserted before version
          ! and declared here together with all local variables
          ! generated by xaifBooster

      use w2f__types
      use active_module
      use all_globals_mod
      use all_globals_mod
      IMPLICIT NONE
C
C     **** Global Variables ****
C
      REAL(w2f__8) OpenAD_Symbol_130
      REAL(w2f__8) OpenAD_Symbol_131
      REAL(w2f__8) OpenAD_Symbol_126
      REAL(w2f__8) OpenAD_Symbol_132
      REAL(w2f__8) OpenAD_Symbol_127
      REAL(w2f__8) OpenAD_Symbol_133
      REAL(w2f__8) OpenAD_Symbol_128
      REAL(w2f__8) OpenAD_Symbol_134
      REAL(w2f__8) OpenAD_Symbol_129
      REAL(w2f__8) OpenAD_Symbol_135
      REAL(w2f__8) OpenAD_Symbol_137
      REAL(w2f__8) OpenAD_Symbol_423
      type(active) :: OpenAD_Symbol_424
      type(active) :: OpenAD_Symbol_430
      REAL(w2f__8) OpenAD_Symbol_425
      REAL(w2f__8) OpenAD_Symbol_431
      REAL(w2f__8) OpenAD_Symbol_426
      REAL(w2f__8) OpenAD_Symbol_432
      type(active) :: OpenAD_Symbol_427
      type(active) :: OpenAD_Symbol_433
      REAL(w2f__8) OpenAD_Symbol_428
      REAL(w2f__8) OpenAD_Symbol_434
      REAL(w2f__8) OpenAD_Symbol_429
      type(active) :: OpenAD_Symbol_435
      INTEGER(w2f__i8) OpenAD_Symbol_642
      INTEGER(w2f__i8) OpenAD_Symbol_643
      INTEGER(w2f__i8) OpenAD_Symbol_644
C
C     **** Parameters and Result ****
C
      type(active) :: FLDNOW(1 : 3)
      type(active) :: FLDOLD(1 : 3)
      type(active) :: FLDNEW(1 : 3)
C
C     **** Local Variables and functions ****
C
      INTEGER(w2f__i4) ISBYTE
      PARAMETER ( ISBYTE = 8)
      INTEGER(w2f__i4) L
      INTEGER(w2f__i4) NLEV1
      PARAMETER ( NLEV1 = 73)
      INTEGER(w2f__i4) NLEV2
      PARAMETER ( NLEV2 = 50)
      REAL(w2f__8) OpenAD_Symbol_650
      INTEGER(w2f__i8) OpenAD_Symbol_645
      INTEGER(w2f__i8) OpenAD_Symbol_651
      REAL(w2f__8) OpenAD_Symbol_646
      REAL(w2f__8) OpenAD_Symbol_652
      INTEGER(w2f__i8) OpenAD_Symbol_647
      INTEGER(w2f__i8) OpenAD_Symbol_653
      REAL(w2f__8) OpenAD_Symbol_648
      REAL(w2f__8) OpenAD_Symbol_654
      INTEGER(w2f__i8) OpenAD_Symbol_649
      INTEGER(w2f__i8) OpenAD_Symbol_655
      INTEGER(w2f__i8) OpenAD_Symbol_656
      INTEGER(w2f__i8) OpenAD_Symbol_657
      INTEGER(w2f__i8) OpenAD_Symbol_658
C
C     **** statements ****
C

          integer iaddr
          external iaddr

         if (our_rev_mode%plain) then
! original function
      DO L = 1, 3, 1
        FLDNOW(INT(L))%v = (FLDNOW(L)%v+ROBERT_FILTER_COEFF%v*(FLDOLD(L)
     +%v+FLDNEW(L)%v-FLDNOW(L)%v*2.0D00))
      END DO
      
          end if
          if (our_rev_mode%tape) then
! taping
      OpenAD_Symbol_644 = 0_w2f__i8
      DO L = 1, 3, 1
        OpenAD_Symbol_128 = (FLDOLD(L)%v+FLDNEW(L)%v-FLDNOW(L)%v*2.0D00)
        OpenAD_Symbol_137 = (FLDNOW(L)%v+ROBERT_FILTER_COEFF%v*OpenAD_Sy
     +mbol_128)
        OpenAD_Symbol_126 = 1_w2f__i8
        OpenAD_Symbol_129 = OpenAD_Symbol_128
        OpenAD_Symbol_131 = 1_w2f__i8
        OpenAD_Symbol_133 = 1_w2f__i8
        OpenAD_Symbol_135 = 2.0D00
        OpenAD_Symbol_134 = (-1_w2f__i8)
        OpenAD_Symbol_132 = 1_w2f__i8
        OpenAD_Symbol_130 = ROBERT_FILTER_COEFF%v
        OpenAD_Symbol_127 = 1_w2f__i8
        FLDNOW(INT(L))%v = OpenAD_Symbol_137
        OpenAD_Symbol_423 = (OpenAD_Symbol_129 * OpenAD_Symbol_127)
        OpenAD_Symbol_425 = (OpenAD_Symbol_130 * OpenAD_Symbol_127)
        OpenAD_Symbol_426 = (OpenAD_Symbol_131 * OpenAD_Symbol_425)
        OpenAD_Symbol_428 = (OpenAD_Symbol_132 * OpenAD_Symbol_425)
        OpenAD_Symbol_429 = (OpenAD_Symbol_133 * OpenAD_Symbol_428)
        OpenAD_Symbol_431 = (OpenAD_Symbol_134 * OpenAD_Symbol_428)
        OpenAD_Symbol_432 = (OpenAD_Symbol_135 * OpenAD_Symbol_431)
        OpenAD_Symbol_434 = OpenAD_Symbol_126
          integer_tape(integer_tape_pointer) = L
          integer_tape_pointer = integer_tape_pointer+1
          integer_tape(integer_tape_pointer) = L
          integer_tape_pointer = integer_tape_pointer+1
          integer_tape(integer_tape_pointer) = L
          integer_tape_pointer = integer_tape_pointer+1
          integer_tape(integer_tape_pointer) = L
          integer_tape_pointer = integer_tape_pointer+1
          double_tape(double_tape_pointer) = OpenAD_Symbol_423
          double_tape_pointer = double_tape_pointer+1
          integer_tape(integer_tape_pointer) = L
          integer_tape_pointer = integer_tape_pointer+1
          double_tape(double_tape_pointer) = OpenAD_Symbol_426
          double_tape_pointer = double_tape_pointer+1
          integer_tape(integer_tape_pointer) = L
          integer_tape_pointer = integer_tape_pointer+1
          double_tape(double_tape_pointer) = OpenAD_Symbol_429
          double_tape_pointer = double_tape_pointer+1
          integer_tape(integer_tape_pointer) = L
          integer_tape_pointer = integer_tape_pointer+1
          double_tape(double_tape_pointer) = OpenAD_Symbol_432
          double_tape_pointer = double_tape_pointer+1
          integer_tape(integer_tape_pointer) = L
          integer_tape_pointer = integer_tape_pointer+1
          double_tape(double_tape_pointer) = OpenAD_Symbol_434
          double_tape_pointer = double_tape_pointer+1
          integer_tape(integer_tape_pointer) = L
          integer_tape_pointer = integer_tape_pointer+1
        OpenAD_Symbol_644 = (INT(OpenAD_Symbol_644) + INT(1_w2f__i8))
      END DO
          integer_tape(integer_tape_pointer) = OpenAD_Symbol_644
          integer_tape_pointer = integer_tape_pointer+1
      
          end if 
          if (our_rev_mode%adjoint) then
! adjoint
          integer_tape_pointer = integer_tape_pointer-1
          OpenAD_Symbol_642 = integer_tape(integer_tape_pointer)
      OpenAD_Symbol_643 = 1
      DO WHILE(INT(OpenAD_Symbol_643) .LE. INT(OpenAD_Symbol_642))
          integer_tape_pointer = integer_tape_pointer-1
          OpenAD_Symbol_645 = integer_tape(integer_tape_pointer)
          double_tape_pointer = double_tape_pointer-1
          OpenAD_Symbol_646 = double_tape(double_tape_pointer)
          OpenAD_Symbol_435%d = OpenAD_Symbol_435%d+FLDNOW(INT(OpenAD_Sy
     +mbol_645))%d*OpenAD_Symbol_646
          integer_tape_pointer = integer_tape_pointer-1
          OpenAD_Symbol_647 = integer_tape(integer_tape_pointer)
          double_tape_pointer = double_tape_pointer-1
          OpenAD_Symbol_648 = double_tape(double_tape_pointer)
          OpenAD_Symbol_433%d = OpenAD_Symbol_433%d+FLDNOW(INT(OpenAD_Sy
     +mbol_647))%d*OpenAD_Symbol_648
          integer_tape_pointer = integer_tape_pointer-1
          OpenAD_Symbol_649 = integer_tape(integer_tape_pointer)
          double_tape_pointer = double_tape_pointer-1
          OpenAD_Symbol_650 = double_tape(double_tape_pointer)
          OpenAD_Symbol_430%d = OpenAD_Symbol_430%d+FLDNOW(INT(OpenAD_Sy
     +mbol_649))%d*OpenAD_Symbol_650
          integer_tape_pointer = integer_tape_pointer-1
          OpenAD_Symbol_651 = integer_tape(integer_tape_pointer)
          double_tape_pointer = double_tape_pointer-1
          OpenAD_Symbol_652 = double_tape(double_tape_pointer)
          OpenAD_Symbol_427%d = OpenAD_Symbol_427%d+FLDNOW(INT(OpenAD_Sy
     +mbol_651))%d*OpenAD_Symbol_652
          integer_tape_pointer = integer_tape_pointer-1
          OpenAD_Symbol_653 = integer_tape(integer_tape_pointer)
          double_tape_pointer = double_tape_pointer-1
          OpenAD_Symbol_654 = double_tape(double_tape_pointer)
          OpenAD_Symbol_424%d = OpenAD_Symbol_424%d+FLDNOW(INT(OpenAD_Sy
     +mbol_653))%d*OpenAD_Symbol_654
          FLDNOW(INT(OpenAD_Symbol_653))%d = 0.0d0
          ROBERT_FILTER_COEFF%d = ROBERT_FILTER_COEFF%d+OpenAD_Symbol_42
     +4%d
          OpenAD_Symbol_424%d = 0.0d0
          integer_tape_pointer = integer_tape_pointer-1
          OpenAD_Symbol_655 = integer_tape(integer_tape_pointer)
          FLDOLD(INT(OpenAD_Symbol_655))%d = FLDOLD(INT(OpenAD_Symbol_65
     +5))%d+OpenAD_Symbol_427%d
          OpenAD_Symbol_427%d = 0.0d0
          integer_tape_pointer = integer_tape_pointer-1
          OpenAD_Symbol_656 = integer_tape(integer_tape_pointer)
          FLDNEW(INT(OpenAD_Symbol_656))%d = FLDNEW(INT(OpenAD_Symbol_65
     +6))%d+OpenAD_Symbol_430%d
          OpenAD_Symbol_430%d = 0.0d0
          integer_tape_pointer = integer_tape_pointer-1
          OpenAD_Symbol_657 = integer_tape(integer_tape_pointer)
          FLDNOW(INT(OpenAD_Symbol_657))%d = FLDNOW(INT(OpenAD_Symbol_65
     +7))%d+OpenAD_Symbol_433%d
          OpenAD_Symbol_433%d = 0.0d0
          integer_tape_pointer = integer_tape_pointer-1
          OpenAD_Symbol_658 = integer_tape(integer_tape_pointer)
          FLDNOW(INT(OpenAD_Symbol_658))%d = FLDNOW(INT(OpenAD_Symbol_65
     +8))%d+OpenAD_Symbol_435%d
          OpenAD_Symbol_435%d = 0.0d0
        OpenAD_Symbol_643 = INT(OpenAD_Symbol_643) + 1
      END DO
          end if 
        end subroutine box_robert_filter
       subroutine box_cycle_fields()
          use OpenAD_tape
          use OpenAD_rev

          ! original arguments get inserted before version
          ! and declared here together with all local variables
          ! generated by xaifBooster

      use w2f__types
      use active_module
      use all_globals_mod
      use all_globals_mod
      IMPLICIT NONE
C
C     **** Global Variables ****
C
      INTEGER(w2f__i8) OpenAD_Symbol_660
      INTEGER(w2f__i8) OpenAD_Symbol_661
      INTEGER(w2f__i8) OpenAD_Symbol_659
C
C     **** Local Variables and functions ****
C
      INTEGER(w2f__i4) ISBYTE
      PARAMETER ( ISBYTE = 8)
      INTEGER(w2f__i4) L
      INTEGER(w2f__i4) NLEV1
      PARAMETER ( NLEV1 = 73)
      INTEGER(w2f__i4) NLEV2
      PARAMETER ( NLEV2 = 50)
      INTEGER(w2f__i8) OpenAD_Symbol_662
      INTEGER(w2f__i8) OpenAD_Symbol_663
      INTEGER(w2f__i8) OpenAD_Symbol_664
      INTEGER(w2f__i8) OpenAD_Symbol_665
      INTEGER(w2f__i8) OpenAD_Symbol_666
      INTEGER(w2f__i8) OpenAD_Symbol_667
      INTEGER(w2f__i8) OpenAD_Symbol_668
      INTEGER(w2f__i8) OpenAD_Symbol_669
C
C     **** statements ****
C

          integer iaddr
          external iaddr

         if (our_rev_mode%plain) then
! original function
      DO L = 1, 3, 1
        TOLD(INT(L))%v = TNOW(L)%v
        TNOW(INT(L))%v = TNEW(L)%v
        SOLD(INT(L))%v = SNOW(L)%v
        SNOW(INT(L))%v = SNEW(L)%v
      END DO
      
          end if
          if (our_rev_mode%tape) then
! taping
      OpenAD_Symbol_661 = 0_w2f__i8
      DO L = 1, 3, 1
        TOLD(INT(L))%v = TNOW(L)%v
          integer_tape(integer_tape_pointer) = L
          integer_tape_pointer = integer_tape_pointer+1
          integer_tape(integer_tape_pointer) = L
          integer_tape_pointer = integer_tape_pointer+1
        TNOW(INT(L))%v = TNEW(L)%v
          integer_tape(integer_tape_pointer) = L
          integer_tape_pointer = integer_tape_pointer+1
          integer_tape(integer_tape_pointer) = L
          integer_tape_pointer = integer_tape_pointer+1
        SOLD(INT(L))%v = SNOW(L)%v
          integer_tape(integer_tape_pointer) = L
          integer_tape_pointer = integer_tape_pointer+1
          integer_tape(integer_tape_pointer) = L
          integer_tape_pointer = integer_tape_pointer+1
        SNOW(INT(L))%v = SNEW(L)%v
          integer_tape(integer_tape_pointer) = L
          integer_tape_pointer = integer_tape_pointer+1
          integer_tape(integer_tape_pointer) = L
          integer_tape_pointer = integer_tape_pointer+1
        OpenAD_Symbol_661 = (INT(OpenAD_Symbol_661) + INT(1_w2f__i8))
      END DO
          integer_tape(integer_tape_pointer) = OpenAD_Symbol_661
          integer_tape_pointer = integer_tape_pointer+1
      
          end if 
          if (our_rev_mode%adjoint) then
! adjoint
          integer_tape_pointer = integer_tape_pointer-1
          OpenAD_Symbol_659 = integer_tape(integer_tape_pointer)
      OpenAD_Symbol_660 = 1
      DO WHILE(INT(OpenAD_Symbol_660) .LE. INT(OpenAD_Symbol_659))
          integer_tape_pointer = integer_tape_pointer-1
          OpenAD_Symbol_662 = integer_tape(integer_tape_pointer)
          integer_tape_pointer = integer_tape_pointer-1
          OpenAD_Symbol_663 = integer_tape(integer_tape_pointer)
          if (iaddr(SNOW(INT(OpenAD_Symbol_662))) .ne. iaddr(SNEW(INT(Op
     +enAD_Symbol_663)))) then
            SNEW(INT(OpenAD_Symbol_663))%d = SNEW(INT(OpenAD_Symbol_663)
     +)%d+SNOW(INT(OpenAD_Symbol_662))%d
            SNOW(INT(OpenAD_Symbol_662))%d = 0
          end if
          integer_tape_pointer = integer_tape_pointer-1
          OpenAD_Symbol_664 = integer_tape(integer_tape_pointer)
          integer_tape_pointer = integer_tape_pointer-1
          OpenAD_Symbol_665 = integer_tape(integer_tape_pointer)
          if (iaddr(SOLD(INT(OpenAD_Symbol_664))) .ne. iaddr(SNOW(INT(Op
     +enAD_Symbol_665)))) then
            SNOW(INT(OpenAD_Symbol_665))%d = SNOW(INT(OpenAD_Symbol_665)
     +)%d+SOLD(INT(OpenAD_Symbol_664))%d
            SOLD(INT(OpenAD_Symbol_664))%d = 0
          end if
          integer_tape_pointer = integer_tape_pointer-1
          OpenAD_Symbol_666 = integer_tape(integer_tape_pointer)
          integer_tape_pointer = integer_tape_pointer-1
          OpenAD_Symbol_667 = integer_tape(integer_tape_pointer)
          if (iaddr(TNOW(INT(OpenAD_Symbol_666))) .ne. iaddr(TNEW(INT(Op
     +enAD_Symbol_667)))) then
            TNEW(INT(OpenAD_Symbol_667))%d = TNEW(INT(OpenAD_Symbol_667)
     +)%d+TNOW(INT(OpenAD_Symbol_666))%d
            TNOW(INT(OpenAD_Symbol_666))%d = 0
          end if
          integer_tape_pointer = integer_tape_pointer-1
          OpenAD_Symbol_668 = integer_tape(integer_tape_pointer)
          integer_tape_pointer = integer_tape_pointer-1
          OpenAD_Symbol_669 = integer_tape(integer_tape_pointer)
          if (iaddr(TOLD(INT(OpenAD_Symbol_668))) .ne. iaddr(TNOW(INT(Op
     +enAD_Symbol_669)))) then
            TNOW(INT(OpenAD_Symbol_669))%d = TNOW(INT(OpenAD_Symbol_669)
     +)%d+TOLD(INT(OpenAD_Symbol_668))%d
            TOLD(INT(OpenAD_Symbol_668))%d = 0
          end if
        OpenAD_Symbol_660 = INT(OpenAD_Symbol_660) + 1
      END DO
          end if 
        end subroutine box_cycle_fields
       subroutine box_update(FLDNEW,FLDOLD,DFLDDT)
          use OpenAD_tape
          use OpenAD_rev

          ! original arguments get inserted before version
          ! and declared here together with all local variables
          ! generated by xaifBooster

      use w2f__types
      use active_module
      use all_globals_mod
      use all_globals_mod
      IMPLICIT NONE
C
C     **** Global Variables ****
C
      REAL(w2f__8) OpenAD_Symbol_280
      REAL(w2f__8) OpenAD_Symbol_281
      REAL(w2f__8) OpenAD_Symbol_276
      REAL(w2f__8) OpenAD_Symbol_277
      REAL(w2f__8) OpenAD_Symbol_283
      REAL(w2f__8) OpenAD_Symbol_278
      REAL(w2f__8) OpenAD_Symbol_279
      REAL(w2f__8) OpenAD_Symbol_563
      REAL(w2f__8) OpenAD_Symbol_564
      type(active) :: OpenAD_Symbol_565
      REAL(w2f__8) OpenAD_Symbol_566
      type(active) :: OpenAD_Symbol_567
      REAL(w2f__8) OpenAD_Symbol_568
      type(active) :: OpenAD_Symbol_569
      INTEGER(w2f__i8) OpenAD_Symbol_842
      INTEGER(w2f__i8) OpenAD_Symbol_843
      INTEGER(w2f__i8) OpenAD_Symbol_844
C
C     **** Parameters and Result ****
C
      type(active) :: FLDNEW(1 : 3)
      type(active) :: FLDOLD(1 : 3)
      type(active) :: DFLDDT(1 : 3)
C
C     **** Local Variables and functions ****
C
      INTEGER(w2f__i4) ISBYTE
      PARAMETER ( ISBYTE = 8)
      INTEGER(w2f__i4) L
      INTEGER(w2f__i4) NLEV1
      PARAMETER ( NLEV1 = 73)
      INTEGER(w2f__i4) NLEV2
      PARAMETER ( NLEV2 = 50)
      REAL(w2f__8) OpenAD_Symbol_850
      INTEGER(w2f__i8) OpenAD_Symbol_845
      INTEGER(w2f__i8) OpenAD_Symbol_851
      REAL(w2f__8) OpenAD_Symbol_846
      INTEGER(w2f__i8) OpenAD_Symbol_852
      INTEGER(w2f__i8) OpenAD_Symbol_847
      REAL(w2f__8) OpenAD_Symbol_848
      INTEGER(w2f__i8) OpenAD_Symbol_849
C
C     **** statements ****
C

          integer iaddr
          external iaddr

         if (our_rev_mode%plain) then
! original function
      DO L = 1, 3, 1
        FLDNEW(INT(L))%v = (FLDOLD(L)%v+DFLDDT(L)%v*DELTA_T%v*2.0D00)
      END DO
      
          end if
          if (our_rev_mode%tape) then
! taping
      OpenAD_Symbol_844 = 0_w2f__i8
      DO L = 1, 3, 1
        OpenAD_Symbol_278 = (DELTA_T%v*2.0D00)
        OpenAD_Symbol_283 = (FLDOLD(L)%v+DFLDDT(L)%v*OpenAD_Symbol_278)
        OpenAD_Symbol_276 = 1_w2f__i8
        OpenAD_Symbol_279 = OpenAD_Symbol_278
        OpenAD_Symbol_281 = 2.0D00
        OpenAD_Symbol_280 = DFLDDT(L)%v
        OpenAD_Symbol_277 = 1_w2f__i8
        FLDNEW(INT(L))%v = OpenAD_Symbol_283
        OpenAD_Symbol_563 = (OpenAD_Symbol_281 * OpenAD_Symbol_280)
        OpenAD_Symbol_564 = (OpenAD_Symbol_279 * OpenAD_Symbol_277)
        OpenAD_Symbol_566 = (OpenAD_Symbol_563 * OpenAD_Symbol_277)
        OpenAD_Symbol_568 = OpenAD_Symbol_276
          integer_tape(integer_tape_pointer) = L
          integer_tape_pointer = integer_tape_pointer+1
          integer_tape(integer_tape_pointer) = L
          integer_tape_pointer = integer_tape_pointer+1
          double_tape(double_tape_pointer) = OpenAD_Symbol_564
          double_tape_pointer = double_tape_pointer+1
          integer_tape(integer_tape_pointer) = L
          integer_tape_pointer = integer_tape_pointer+1
          double_tape(double_tape_pointer) = OpenAD_Symbol_566
          double_tape_pointer = double_tape_pointer+1
          integer_tape(integer_tape_pointer) = L
          integer_tape_pointer = integer_tape_pointer+1
          double_tape(double_tape_pointer) = OpenAD_Symbol_568
          double_tape_pointer = double_tape_pointer+1
          integer_tape(integer_tape_pointer) = L
          integer_tape_pointer = integer_tape_pointer+1
        OpenAD_Symbol_844 = (INT(OpenAD_Symbol_844) + INT(1_w2f__i8))
      END DO
          integer_tape(integer_tape_pointer) = OpenAD_Symbol_844
          integer_tape_pointer = integer_tape_pointer+1
      
          end if 
          if (our_rev_mode%adjoint) then
! adjoint
          integer_tape_pointer = integer_tape_pointer-1
          OpenAD_Symbol_842 = integer_tape(integer_tape_pointer)
      OpenAD_Symbol_843 = 1
      DO WHILE(INT(OpenAD_Symbol_843) .LE. INT(OpenAD_Symbol_842))
          integer_tape_pointer = integer_tape_pointer-1
          OpenAD_Symbol_845 = integer_tape(integer_tape_pointer)
          double_tape_pointer = double_tape_pointer-1
          OpenAD_Symbol_846 = double_tape(double_tape_pointer)
          OpenAD_Symbol_569%d = OpenAD_Symbol_569%d+FLDNEW(INT(OpenAD_Sy
     +mbol_845))%d*OpenAD_Symbol_846
          integer_tape_pointer = integer_tape_pointer-1
          OpenAD_Symbol_847 = integer_tape(integer_tape_pointer)
          double_tape_pointer = double_tape_pointer-1
          OpenAD_Symbol_848 = double_tape(double_tape_pointer)
          OpenAD_Symbol_567%d = OpenAD_Symbol_567%d+FLDNEW(INT(OpenAD_Sy
     +mbol_847))%d*OpenAD_Symbol_848
          integer_tape_pointer = integer_tape_pointer-1
          OpenAD_Symbol_849 = integer_tape(integer_tape_pointer)
          double_tape_pointer = double_tape_pointer-1
          OpenAD_Symbol_850 = double_tape(double_tape_pointer)
          OpenAD_Symbol_565%d = OpenAD_Symbol_565%d+FLDNEW(INT(OpenAD_Sy
     +mbol_849))%d*OpenAD_Symbol_850
          FLDNEW(INT(OpenAD_Symbol_849))%d = 0.0d0
          integer_tape_pointer = integer_tape_pointer-1
          OpenAD_Symbol_851 = integer_tape(integer_tape_pointer)
          DFLDDT(INT(OpenAD_Symbol_851))%d = DFLDDT(INT(OpenAD_Symbol_85
     +1))%d+OpenAD_Symbol_565%d
          OpenAD_Symbol_565%d = 0.0d0
          DELTA_T%d = DELTA_T%d+OpenAD_Symbol_567%d
          OpenAD_Symbol_567%d = 0.0d0
          integer_tape_pointer = integer_tape_pointer-1
          OpenAD_Symbol_852 = integer_tape(integer_tape_pointer)
          FLDOLD(INT(OpenAD_Symbol_852))%d = FLDOLD(INT(OpenAD_Symbol_85
     +2))%d+OpenAD_Symbol_569%d
          OpenAD_Symbol_569%d = 0.0d0
        OpenAD_Symbol_843 = INT(OpenAD_Symbol_843) + 1
      END DO
          end if 
        end subroutine box_update
       subroutine box_timestep(GAMMALOC,FLDSTAR,EXTFORLOC,UVELLOC,FLDNOW
     +,FLDOLD,FLDNEW)
          use OpenAD_tape
          use OpenAD_rev

          ! original arguments get inserted before version
          ! and declared here together with all local variables
          ! generated by xaifBooster

      use w2f__types
      use active_module
      use all_globals_mod
      use all_globals_mod
      IMPLICIT NONE
C
C     **** Global Variables ****
C
      REAL(w2f__8) OpenAD_Symbol_100
      REAL(w2f__8) OpenAD_Symbol_101
      REAL(w2f__8) OpenAD_Symbol_102
      REAL(w2f__8) OpenAD_Symbol_103
      REAL(w2f__8) OpenAD_Symbol_104
      REAL(w2f__8) OpenAD_Symbol_105
      REAL(w2f__8) OpenAD_Symbol_110
      REAL(w2f__8) OpenAD_Symbol_106
      REAL(w2f__8) OpenAD_Symbol_111
      REAL(w2f__8) OpenAD_Symbol_107
      REAL(w2f__8) OpenAD_Symbol_112
      REAL(w2f__8) OpenAD_Symbol_113
      REAL(w2f__8) OpenAD_Symbol_108
      REAL(w2f__8) OpenAD_Symbol_114
      REAL(w2f__8) OpenAD_Symbol_109
      REAL(w2f__8) OpenAD_Symbol_120
      REAL(w2f__8) OpenAD_Symbol_115
      REAL(w2f__8) OpenAD_Symbol_121
      REAL(w2f__8) OpenAD_Symbol_116
      REAL(w2f__8) OpenAD_Symbol_122
      REAL(w2f__8) OpenAD_Symbol_117
      REAL(w2f__8) OpenAD_Symbol_123
      REAL(w2f__8) OpenAD_Symbol_118
      REAL(w2f__8) OpenAD_Symbol_124
      REAL(w2f__8) OpenAD_Symbol_119
      REAL(w2f__8) OpenAD_Symbol_125
      REAL(w2f__8) OpenAD_Symbol_310
      type(active) :: OpenAD_Symbol_311
      REAL(w2f__8) OpenAD_Symbol_312
      REAL(w2f__8) OpenAD_Symbol_313
      REAL(w2f__8) OpenAD_Symbol_308
      type(active) :: OpenAD_Symbol_314
      REAL(w2f__8) OpenAD_Symbol_309
      type(active) :: OpenAD_Symbol_320
      REAL(w2f__8) OpenAD_Symbol_315
      REAL(w2f__8) OpenAD_Symbol_321
      REAL(w2f__8) OpenAD_Symbol_316
      REAL(w2f__8) OpenAD_Symbol_322
      type(active) :: OpenAD_Symbol_317
      type(active) :: OpenAD_Symbol_323
      REAL(w2f__8) OpenAD_Symbol_318
      REAL(w2f__8) OpenAD_Symbol_324
      REAL(w2f__8) OpenAD_Symbol_319
      REAL(w2f__8) OpenAD_Symbol_330
      type(active) :: OpenAD_Symbol_325
      type(active) :: OpenAD_Symbol_331
      REAL(w2f__8) OpenAD_Symbol_326
      REAL(w2f__8) OpenAD_Symbol_332
      type(active) :: OpenAD_Symbol_327
      REAL(w2f__8) OpenAD_Symbol_333
      REAL(w2f__8) OpenAD_Symbol_328
      REAL(w2f__8) OpenAD_Symbol_334
      type(active) :: OpenAD_Symbol_329
      REAL(w2f__8) OpenAD_Symbol_340
      type(active) :: OpenAD_Symbol_335
      type(active) :: OpenAD_Symbol_341
      REAL(w2f__8) OpenAD_Symbol_336
      REAL(w2f__8) OpenAD_Symbol_342
      REAL(w2f__8) OpenAD_Symbol_337
      REAL(w2f__8) OpenAD_Symbol_343
      type(active) :: OpenAD_Symbol_338
      type(active) :: OpenAD_Symbol_344
      REAL(w2f__8) OpenAD_Symbol_339
      REAL(w2f__8) OpenAD_Symbol_400
      REAL(w2f__8) OpenAD_Symbol_350
      REAL(w2f__8) OpenAD_Symbol_345
      type(active) :: OpenAD_Symbol_401
      type(active) :: OpenAD_Symbol_351
      REAL(w2f__8) OpenAD_Symbol_346
      REAL(w2f__8) OpenAD_Symbol_402
      REAL(w2f__8) OpenAD_Symbol_352
      type(active) :: OpenAD_Symbol_347
      REAL(w2f__8) OpenAD_Symbol_403
      type(active) :: OpenAD_Symbol_353
      REAL(w2f__8) OpenAD_Symbol_348
      type(active) :: OpenAD_Symbol_404
      REAL(w2f__8) OpenAD_Symbol_354
      type(active) :: OpenAD_Symbol_349
      type(active) :: OpenAD_Symbol_410
      REAL(w2f__8) OpenAD_Symbol_405
      type(active) :: OpenAD_Symbol_360
      type(active) :: OpenAD_Symbol_355
      REAL(w2f__8) OpenAD_Symbol_411
      type(active) :: OpenAD_Symbol_406
      REAL(w2f__8) OpenAD_Symbol_361
      REAL(w2f__8) OpenAD_Symbol_356
      type(active) :: OpenAD_Symbol_412
      REAL(w2f__8) OpenAD_Symbol_407
      type(active) :: OpenAD_Symbol_362
      type(active) :: OpenAD_Symbol_357
      REAL(w2f__8) OpenAD_Symbol_413
      type(active) :: OpenAD_Symbol_408
      REAL(w2f__8) OpenAD_Symbol_363
      REAL(w2f__8) OpenAD_Symbol_358
      REAL(w2f__8) OpenAD_Symbol_414
      REAL(w2f__8) OpenAD_Symbol_409
      type(active) :: OpenAD_Symbol_364
      REAL(w2f__8) OpenAD_Symbol_359
      type(active) :: OpenAD_Symbol_420
      type(active) :: OpenAD_Symbol_415
      REAL(w2f__8) OpenAD_Symbol_370
      REAL(w2f__8) OpenAD_Symbol_365
      REAL(w2f__8) OpenAD_Symbol_421
      REAL(w2f__8) OpenAD_Symbol_416
      type(active) :: OpenAD_Symbol_371
      REAL(w2f__8) OpenAD_Symbol_366
      type(active) :: OpenAD_Symbol_422
      type(active) :: OpenAD_Symbol_417
      REAL(w2f__8) OpenAD_Symbol_372
      REAL(w2f__8) OpenAD_Symbol_367
      REAL(w2f__8) OpenAD_Symbol_418
      REAL(w2f__8) OpenAD_Symbol_373
      type(active) :: OpenAD_Symbol_368
      REAL(w2f__8) OpenAD_Symbol_419
      type(active) :: OpenAD_Symbol_374
      REAL(w2f__8) OpenAD_Symbol_369
      type(active) :: OpenAD_Symbol_380
      REAL(w2f__8) OpenAD_Symbol_375
      REAL(w2f__8) OpenAD_Symbol_381
      REAL(w2f__8) OpenAD_Symbol_376
      type(active) :: OpenAD_Symbol_382
      type(active) :: OpenAD_Symbol_377
      REAL(w2f__8) OpenAD_Symbol_383
      REAL(w2f__8) OpenAD_Symbol_378
      type(active) :: OpenAD_Symbol_384
      REAL(w2f__8) OpenAD_Symbol_379
      REAL(w2f__8) OpenAD_Symbol_390
      REAL(w2f__8) OpenAD_Symbol_385
      REAL(w2f__8) OpenAD_Symbol_391
      type(active) :: OpenAD_Symbol_386
      type(active) :: OpenAD_Symbol_392
      REAL(w2f__8) OpenAD_Symbol_387
      REAL(w2f__8) OpenAD_Symbol_393
      type(active) :: OpenAD_Symbol_388
      REAL(w2f__8) OpenAD_Symbol_394
      REAL(w2f__8) OpenAD_Symbol_389
      type(active) :: OpenAD_Symbol_395
      REAL(w2f__8) OpenAD_Symbol_396
      REAL(w2f__8) OpenAD_Symbol_397
      type(active) :: OpenAD_Symbol_398
      REAL(w2f__8) OpenAD_Symbol_399
      INTEGER(w2f__i8) OpenAD_Symbol_595
      INTEGER(w2f__i8) OpenAD_Symbol_596
      INTEGER(w2f__i8) OpenAD_Symbol_597
      REAL(w2f__8) OpenAD_Symbol_23
      REAL(w2f__8) OpenAD_Symbol_24
      REAL(w2f__8) OpenAD_Symbol_25
      REAL(w2f__8) OpenAD_Symbol_30
      REAL(w2f__8) OpenAD_Symbol_26
      REAL(w2f__8) OpenAD_Symbol_31
      REAL(w2f__8) OpenAD_Symbol_27
      REAL(w2f__8) OpenAD_Symbol_32
      REAL(w2f__8) OpenAD_Symbol_28
      REAL(w2f__8) OpenAD_Symbol_33
      REAL(w2f__8) OpenAD_Symbol_29
      REAL(w2f__8) OpenAD_Symbol_34
      REAL(w2f__8) OpenAD_Symbol_35
      REAL(w2f__8) OpenAD_Symbol_40
      REAL(w2f__8) OpenAD_Symbol_36
      REAL(w2f__8) OpenAD_Symbol_41
      REAL(w2f__8) OpenAD_Symbol_37
      REAL(w2f__8) OpenAD_Symbol_42
      REAL(w2f__8) OpenAD_Symbol_38
      REAL(w2f__8) OpenAD_Symbol_43
      REAL(w2f__8) OpenAD_Symbol_39
      REAL(w2f__8) OpenAD_Symbol_44
      REAL(w2f__8) OpenAD_Symbol_45
      REAL(w2f__8) OpenAD_Symbol_50
      REAL(w2f__8) OpenAD_Symbol_46
      REAL(w2f__8) OpenAD_Symbol_51
      REAL(w2f__8) OpenAD_Symbol_47
      REAL(w2f__8) OpenAD_Symbol_52
      REAL(w2f__8) OpenAD_Symbol_48
      REAL(w2f__8) OpenAD_Symbol_53
      REAL(w2f__8) OpenAD_Symbol_49
      REAL(w2f__8) OpenAD_Symbol_54
      REAL(w2f__8) OpenAD_Symbol_55
      REAL(w2f__8) OpenAD_Symbol_60
      REAL(w2f__8) OpenAD_Symbol_56
      REAL(w2f__8) OpenAD_Symbol_61
      REAL(w2f__8) OpenAD_Symbol_57
      REAL(w2f__8) OpenAD_Symbol_62
      REAL(w2f__8) OpenAD_Symbol_58
      REAL(w2f__8) OpenAD_Symbol_63
      REAL(w2f__8) OpenAD_Symbol_59
      REAL(w2f__8) OpenAD_Symbol_64
      REAL(w2f__8) OpenAD_Symbol_65
      REAL(w2f__8) OpenAD_Symbol_70
      REAL(w2f__8) OpenAD_Symbol_66
      REAL(w2f__8) OpenAD_Symbol_71
      REAL(w2f__8) OpenAD_Symbol_67
      REAL(w2f__8) OpenAD_Symbol_72
      REAL(w2f__8) OpenAD_Symbol_68
      REAL(w2f__8) OpenAD_Symbol_73
      REAL(w2f__8) OpenAD_Symbol_69
      REAL(w2f__8) OpenAD_Symbol_74
      REAL(w2f__8) OpenAD_Symbol_75
      REAL(w2f__8) OpenAD_Symbol_80
      REAL(w2f__8) OpenAD_Symbol_76
      REAL(w2f__8) OpenAD_Symbol_81
      REAL(w2f__8) OpenAD_Symbol_77
      REAL(w2f__8) OpenAD_Symbol_82
      REAL(w2f__8) OpenAD_Symbol_78
      REAL(w2f__8) OpenAD_Symbol_83
      REAL(w2f__8) OpenAD_Symbol_79
      REAL(w2f__8) OpenAD_Symbol_84
      REAL(w2f__8) OpenAD_Symbol_85
      REAL(w2f__8) OpenAD_Symbol_90
      REAL(w2f__8) OpenAD_Symbol_86
      REAL(w2f__8) OpenAD_Symbol_91
      REAL(w2f__8) OpenAD_Symbol_87
      REAL(w2f__8) OpenAD_Symbol_92
      REAL(w2f__8) OpenAD_Symbol_88
      REAL(w2f__8) OpenAD_Symbol_93
      REAL(w2f__8) OpenAD_Symbol_89
      REAL(w2f__8) OpenAD_Symbol_94
      REAL(w2f__8) OpenAD_Symbol_95
      REAL(w2f__8) OpenAD_Symbol_96
      REAL(w2f__8) OpenAD_Symbol_97
      REAL(w2f__8) OpenAD_Symbol_98
      REAL(w2f__8) OpenAD_Symbol_99
C
C     **** Parameters and Result ****
C
      type(active) :: GAMMALOC
      type(active) :: FLDSTAR(1 : 2)
      type(active) :: EXTFORLOC(1 : 2)
      type(active) :: UVELLOC
      type(active) :: FLDNOW(1 : 3)
      type(active) :: FLDOLD(1 : 3)
      type(active) :: FLDNEW(1 : 3)
C
C     **** Local Variables and functions ****
C
      EXTERNAL box_update
      type(active) :: DFLDDT(1 : 3)
      INTEGER(w2f__i4) ISBYTE
      PARAMETER ( ISBYTE = 8)
      INTEGER(w2f__i4) NLEV1
      PARAMETER ( NLEV1 = 73)
      INTEGER(w2f__i4) NLEV2
      PARAMETER ( NLEV2 = 50)
      REAL(w2f__8) OpenAD_Symbol_600
      REAL(w2f__8) OpenAD_Symbol_601
      REAL(w2f__8) OpenAD_Symbol_602
      REAL(w2f__8) OpenAD_Symbol_603
      REAL(w2f__8) OpenAD_Symbol_604
      REAL(w2f__8) OpenAD_Symbol_610
      REAL(w2f__8) OpenAD_Symbol_605
      REAL(w2f__8) OpenAD_Symbol_611
      REAL(w2f__8) OpenAD_Symbol_606
      REAL(w2f__8) OpenAD_Symbol_612
      REAL(w2f__8) OpenAD_Symbol_607
      REAL(w2f__8) OpenAD_Symbol_613
      REAL(w2f__8) OpenAD_Symbol_608
      REAL(w2f__8) OpenAD_Symbol_614
      REAL(w2f__8) OpenAD_Symbol_609
      REAL(w2f__8) OpenAD_Symbol_620
      REAL(w2f__8) OpenAD_Symbol_615
      REAL(w2f__8) OpenAD_Symbol_621
      REAL(w2f__8) OpenAD_Symbol_616
      REAL(w2f__8) OpenAD_Symbol_622
      REAL(w2f__8) OpenAD_Symbol_617
      REAL(w2f__8) OpenAD_Symbol_623
      REAL(w2f__8) OpenAD_Symbol_618
      REAL(w2f__8) OpenAD_Symbol_624
      REAL(w2f__8) OpenAD_Symbol_619
      REAL(w2f__8) OpenAD_Symbol_630
      REAL(w2f__8) OpenAD_Symbol_625
      REAL(w2f__8) OpenAD_Symbol_631
      REAL(w2f__8) OpenAD_Symbol_626
      REAL(w2f__8) OpenAD_Symbol_632
      REAL(w2f__8) OpenAD_Symbol_627
      REAL(w2f__8) OpenAD_Symbol_633
      REAL(w2f__8) OpenAD_Symbol_628
      REAL(w2f__8) OpenAD_Symbol_634
      REAL(w2f__8) OpenAD_Symbol_629
      REAL(w2f__8) OpenAD_Symbol_640
      REAL(w2f__8) OpenAD_Symbol_635
      REAL(w2f__8) OpenAD_Symbol_641
      REAL(w2f__8) OpenAD_Symbol_636
      REAL(w2f__8) OpenAD_Symbol_637
      REAL(w2f__8) OpenAD_Symbol_638
      REAL(w2f__8) OpenAD_Symbol_639
      REAL(w2f__8) OpenAD_Symbol_598
      REAL(w2f__8) OpenAD_Symbol_599
C
C     **** statements ****
C

          integer iaddr
          external iaddr

         if (our_rev_mode%plain) then
! original function
      IF (UVELLOC%v .GE. 0.0D00) THEN
        DFLDDT(1)%v = ((EXTFORLOC(1)%v+VOL(1)%v*GAMMALOC%v*(FLDSTAR(1)%v
     +-FLDNOW(1)%v)+UVELLOC%v*(FLDNOW(3)%v-FLDNOW(1)%v))/VOL(1)%v)
        DFLDDT(2)%v = ((EXTFORLOC(2)%v+VOL(2)%v*GAMMALOC%v*(FLDSTAR(2)%v
     +-FLDNOW(2)%v)+UVELLOC%v*(FLDNOW(1)%v-FLDNOW(2)%v))/VOL(2)%v)
        DFLDDT(3)%v = ((UVELLOC%v*(FLDNOW(2)%v-FLDNOW(3)%v))/VOL(3)%v)
      ELSE
        DFLDDT(1)%v = ((EXTFORLOC(1)%v+VOL(1)%v*GAMMALOC%v*(FLDSTAR(1)%v
     +-FLDNOW(1)%v)-UVELLOC%v*(FLDNOW(2)%v-FLDNOW(1)%v))/VOL(1)%v)
        DFLDDT(2)%v = ((EXTFORLOC(2)%v+VOL(2)%v*GAMMALOC%v*(FLDSTAR(2)%v
     +-FLDNOW(2)%v)-UVELLOC%v*(FLDNOW(3)%v-FLDNOW(2)%v))/VOL(2)%v)
        DFLDDT(3)%v = (-((UVELLOC%v*(FLDNOW(1)%v-FLDNOW(3)%v))/VOL(3)%v)
     +)
      ENDIF
      CALL box_update(FLDNEW,FLDOLD,DFLDDT)
      
          end if
          if (our_rev_mode%tape) then
! taping
      IF (UVELLOC%v .GE. 0.0D00) THEN
        OpenAD_Symbol_33 = (FLDSTAR(1)%v-FLDNOW(1)%v)
        OpenAD_Symbol_30 = (GAMMALOC%v*OpenAD_Symbol_33)
        OpenAD_Symbol_38 = (FLDNOW(3)%v-FLDNOW(1)%v)
        OpenAD_Symbol_23 = (EXTFORLOC(1)%v+VOL(1)%v*OpenAD_Symbol_30+UVE
     +LLOC%v*OpenAD_Symbol_38)
        OpenAD_Symbol_43 = (OpenAD_Symbol_23/VOL(1)%v)
        OpenAD_Symbol_28 = 1_w2f__i8
        OpenAD_Symbol_31 = OpenAD_Symbol_30
        OpenAD_Symbol_34 = OpenAD_Symbol_33
        OpenAD_Symbol_36 = 1_w2f__i8
        OpenAD_Symbol_37 = (-1_w2f__i8)
        OpenAD_Symbol_35 = GAMMALOC%v
        OpenAD_Symbol_32 = VOL(1)%v
        OpenAD_Symbol_29 = 1_w2f__i8
        OpenAD_Symbol_26 = 1_w2f__i8
        OpenAD_Symbol_39 = OpenAD_Symbol_38
        OpenAD_Symbol_41 = 1_w2f__i8
        OpenAD_Symbol_42 = (-1_w2f__i8)
        OpenAD_Symbol_40 = UVELLOC%v
        OpenAD_Symbol_27 = 1_w2f__i8
        OpenAD_Symbol_24 = (INT(1 _w2f__i8)/VOL(1)%v)
        OpenAD_Symbol_25 = (-(OpenAD_Symbol_23/(VOL(1)%v*VOL(1)%v)))
        DFLDDT(1)%v = OpenAD_Symbol_43
        OpenAD_Symbol_308 = (OpenAD_Symbol_26 * OpenAD_Symbol_24)
        OpenAD_Symbol_309 = (OpenAD_Symbol_27 * OpenAD_Symbol_24)
        OpenAD_Symbol_310 = (OpenAD_Symbol_28 * OpenAD_Symbol_308)
        OpenAD_Symbol_312 = (OpenAD_Symbol_29 * OpenAD_Symbol_308)
        OpenAD_Symbol_313 = (OpenAD_Symbol_31 * OpenAD_Symbol_312)
        OpenAD_Symbol_315 = (OpenAD_Symbol_32 * OpenAD_Symbol_312)
        OpenAD_Symbol_316 = (OpenAD_Symbol_39 * OpenAD_Symbol_309)
        OpenAD_Symbol_318 = (OpenAD_Symbol_40 * OpenAD_Symbol_309)
        OpenAD_Symbol_319 = (OpenAD_Symbol_34 * OpenAD_Symbol_315)
        OpenAD_Symbol_321 = (OpenAD_Symbol_35 * OpenAD_Symbol_315)
        OpenAD_Symbol_322 = (OpenAD_Symbol_41 * OpenAD_Symbol_318)
        OpenAD_Symbol_324 = (OpenAD_Symbol_42 * OpenAD_Symbol_318)
        OpenAD_Symbol_326 = (OpenAD_Symbol_36 * OpenAD_Symbol_321)
        OpenAD_Symbol_328 = (OpenAD_Symbol_37 * OpenAD_Symbol_321)
        OpenAD_Symbol_330 = OpenAD_Symbol_25
          double_tape(double_tape_pointer) = OpenAD_Symbol_310
          double_tape_pointer = double_tape_pointer+1
          double_tape(double_tape_pointer) = OpenAD_Symbol_313
          double_tape_pointer = double_tape_pointer+1
          double_tape(double_tape_pointer) = OpenAD_Symbol_316
          double_tape_pointer = double_tape_pointer+1
          double_tape(double_tape_pointer) = OpenAD_Symbol_319
          double_tape_pointer = double_tape_pointer+1
          double_tape(double_tape_pointer) = OpenAD_Symbol_322
          double_tape_pointer = double_tape_pointer+1
          double_tape(double_tape_pointer) = OpenAD_Symbol_324
          double_tape_pointer = double_tape_pointer+1
          double_tape(double_tape_pointer) = OpenAD_Symbol_326
          double_tape_pointer = double_tape_pointer+1
          double_tape(double_tape_pointer) = OpenAD_Symbol_328
          double_tape_pointer = double_tape_pointer+1
          double_tape(double_tape_pointer) = OpenAD_Symbol_330
          double_tape_pointer = double_tape_pointer+1
        OpenAD_Symbol_54 = (FLDSTAR(2)%v-FLDNOW(2)%v)
        OpenAD_Symbol_51 = (GAMMALOC%v*OpenAD_Symbol_54)
        OpenAD_Symbol_59 = (FLDNOW(1)%v-FLDNOW(2)%v)
        OpenAD_Symbol_44 = (EXTFORLOC(2)%v+VOL(2)%v*OpenAD_Symbol_51+UVE
     +LLOC%v*OpenAD_Symbol_59)
        OpenAD_Symbol_64 = (OpenAD_Symbol_44/VOL(2)%v)
        OpenAD_Symbol_49 = 1_w2f__i8
        OpenAD_Symbol_52 = OpenAD_Symbol_51
        OpenAD_Symbol_55 = OpenAD_Symbol_54
        OpenAD_Symbol_57 = 1_w2f__i8
        OpenAD_Symbol_58 = (-1_w2f__i8)
        OpenAD_Symbol_56 = GAMMALOC%v
        OpenAD_Symbol_53 = VOL(2)%v
        OpenAD_Symbol_50 = 1_w2f__i8
        OpenAD_Symbol_47 = 1_w2f__i8
        OpenAD_Symbol_60 = OpenAD_Symbol_59
        OpenAD_Symbol_62 = 1_w2f__i8
        OpenAD_Symbol_63 = (-1_w2f__i8)
        OpenAD_Symbol_61 = UVELLOC%v
        OpenAD_Symbol_48 = 1_w2f__i8
        OpenAD_Symbol_45 = (INT(1 _w2f__i8)/VOL(2)%v)
        OpenAD_Symbol_46 = (-(OpenAD_Symbol_44/(VOL(2)%v*VOL(2)%v)))
        DFLDDT(2)%v = OpenAD_Symbol_64
        OpenAD_Symbol_332 = (OpenAD_Symbol_47 * OpenAD_Symbol_45)
        OpenAD_Symbol_333 = (OpenAD_Symbol_48 * OpenAD_Symbol_45)
        OpenAD_Symbol_334 = (OpenAD_Symbol_49 * OpenAD_Symbol_332)
        OpenAD_Symbol_336 = (OpenAD_Symbol_50 * OpenAD_Symbol_332)
        OpenAD_Symbol_337 = (OpenAD_Symbol_52 * OpenAD_Symbol_336)
        OpenAD_Symbol_339 = (OpenAD_Symbol_53 * OpenAD_Symbol_336)
        OpenAD_Symbol_340 = (OpenAD_Symbol_60 * OpenAD_Symbol_333)
        OpenAD_Symbol_342 = (OpenAD_Symbol_61 * OpenAD_Symbol_333)
        OpenAD_Symbol_343 = (OpenAD_Symbol_55 * OpenAD_Symbol_339)
        OpenAD_Symbol_345 = (OpenAD_Symbol_56 * OpenAD_Symbol_339)
        OpenAD_Symbol_346 = (OpenAD_Symbol_62 * OpenAD_Symbol_342)
        OpenAD_Symbol_348 = (OpenAD_Symbol_63 * OpenAD_Symbol_342)
        OpenAD_Symbol_350 = (OpenAD_Symbol_57 * OpenAD_Symbol_345)
        OpenAD_Symbol_352 = (OpenAD_Symbol_58 * OpenAD_Symbol_345)
        OpenAD_Symbol_354 = OpenAD_Symbol_46
          double_tape(double_tape_pointer) = OpenAD_Symbol_334
          double_tape_pointer = double_tape_pointer+1
          double_tape(double_tape_pointer) = OpenAD_Symbol_337
          double_tape_pointer = double_tape_pointer+1
          double_tape(double_tape_pointer) = OpenAD_Symbol_340
          double_tape_pointer = double_tape_pointer+1
          double_tape(double_tape_pointer) = OpenAD_Symbol_343
          double_tape_pointer = double_tape_pointer+1
          double_tape(double_tape_pointer) = OpenAD_Symbol_346
          double_tape_pointer = double_tape_pointer+1
          double_tape(double_tape_pointer) = OpenAD_Symbol_348
          double_tape_pointer = double_tape_pointer+1
          double_tape(double_tape_pointer) = OpenAD_Symbol_350
          double_tape_pointer = double_tape_pointer+1
          double_tape(double_tape_pointer) = OpenAD_Symbol_352
          double_tape_pointer = double_tape_pointer+1
          double_tape(double_tape_pointer) = OpenAD_Symbol_354
          double_tape_pointer = double_tape_pointer+1
        OpenAD_Symbol_68 = (FLDNOW(2)%v-FLDNOW(3)%v)
        OpenAD_Symbol_65 = (UVELLOC%v*OpenAD_Symbol_68)
        OpenAD_Symbol_73 = (OpenAD_Symbol_65/VOL(3)%v)
        OpenAD_Symbol_69 = OpenAD_Symbol_68
        OpenAD_Symbol_71 = 1_w2f__i8
        OpenAD_Symbol_72 = (-1_w2f__i8)
        OpenAD_Symbol_70 = UVELLOC%v
        OpenAD_Symbol_66 = (INT(1 _w2f__i8)/VOL(3)%v)
        OpenAD_Symbol_67 = (-(OpenAD_Symbol_65/(VOL(3)%v*VOL(3)%v)))
        DFLDDT(3)%v = OpenAD_Symbol_73
        OpenAD_Symbol_356 = (OpenAD_Symbol_69 * OpenAD_Symbol_66)
        OpenAD_Symbol_358 = (OpenAD_Symbol_70 * OpenAD_Symbol_66)
        OpenAD_Symbol_359 = (OpenAD_Symbol_71 * OpenAD_Symbol_358)
        OpenAD_Symbol_361 = (OpenAD_Symbol_72 * OpenAD_Symbol_358)
        OpenAD_Symbol_363 = OpenAD_Symbol_67
          double_tape(double_tape_pointer) = OpenAD_Symbol_356
          double_tape_pointer = double_tape_pointer+1
          double_tape(double_tape_pointer) = OpenAD_Symbol_359
          double_tape_pointer = double_tape_pointer+1
          double_tape(double_tape_pointer) = OpenAD_Symbol_361
          double_tape_pointer = double_tape_pointer+1
          double_tape(double_tape_pointer) = OpenAD_Symbol_363
          double_tape_pointer = double_tape_pointer+1
        OpenAD_Symbol_596 = 1_w2f__i8
          integer_tape(integer_tape_pointer) = OpenAD_Symbol_596
          integer_tape_pointer = integer_tape_pointer+1
      ELSE
        OpenAD_Symbol_84 = (FLDSTAR(1)%v-FLDNOW(1)%v)
        OpenAD_Symbol_81 = (GAMMALOC%v*OpenAD_Symbol_84)
        OpenAD_Symbol_89 = (FLDNOW(2)%v-FLDNOW(1)%v)
        OpenAD_Symbol_74 = (EXTFORLOC(1)%v+VOL(1)%v*OpenAD_Symbol_81-UVE
     +LLOC%v*OpenAD_Symbol_89)
        OpenAD_Symbol_94 = (OpenAD_Symbol_74/VOL(1)%v)
        OpenAD_Symbol_79 = 1_w2f__i8
        OpenAD_Symbol_82 = OpenAD_Symbol_81
        OpenAD_Symbol_85 = OpenAD_Symbol_84
        OpenAD_Symbol_87 = 1_w2f__i8
        OpenAD_Symbol_88 = (-1_w2f__i8)
        OpenAD_Symbol_86 = GAMMALOC%v
        OpenAD_Symbol_83 = VOL(1)%v
        OpenAD_Symbol_80 = 1_w2f__i8
        OpenAD_Symbol_77 = 1_w2f__i8
        OpenAD_Symbol_90 = OpenAD_Symbol_89
        OpenAD_Symbol_92 = 1_w2f__i8
        OpenAD_Symbol_93 = (-1_w2f__i8)
        OpenAD_Symbol_91 = UVELLOC%v
        OpenAD_Symbol_78 = (-1_w2f__i8)
        OpenAD_Symbol_75 = (INT(1 _w2f__i8)/VOL(1)%v)
        OpenAD_Symbol_76 = (-(OpenAD_Symbol_74/(VOL(1)%v*VOL(1)%v)))
        DFLDDT(1)%v = OpenAD_Symbol_94
        OpenAD_Symbol_365 = (OpenAD_Symbol_77 * OpenAD_Symbol_75)
        OpenAD_Symbol_366 = (OpenAD_Symbol_78 * OpenAD_Symbol_75)
        OpenAD_Symbol_367 = (OpenAD_Symbol_79 * OpenAD_Symbol_365)
        OpenAD_Symbol_369 = (OpenAD_Symbol_80 * OpenAD_Symbol_365)
        OpenAD_Symbol_370 = (OpenAD_Symbol_82 * OpenAD_Symbol_369)
        OpenAD_Symbol_372 = (OpenAD_Symbol_83 * OpenAD_Symbol_369)
        OpenAD_Symbol_373 = (OpenAD_Symbol_90 * OpenAD_Symbol_366)
        OpenAD_Symbol_375 = (OpenAD_Symbol_91 * OpenAD_Symbol_366)
        OpenAD_Symbol_376 = (OpenAD_Symbol_85 * OpenAD_Symbol_372)
        OpenAD_Symbol_378 = (OpenAD_Symbol_86 * OpenAD_Symbol_372)
        OpenAD_Symbol_379 = (OpenAD_Symbol_92 * OpenAD_Symbol_375)
        OpenAD_Symbol_381 = (OpenAD_Symbol_93 * OpenAD_Symbol_375)
        OpenAD_Symbol_383 = (OpenAD_Symbol_87 * OpenAD_Symbol_378)
        OpenAD_Symbol_385 = (OpenAD_Symbol_88 * OpenAD_Symbol_378)
        OpenAD_Symbol_387 = OpenAD_Symbol_76
          double_tape(double_tape_pointer) = OpenAD_Symbol_367
          double_tape_pointer = double_tape_pointer+1
          double_tape(double_tape_pointer) = OpenAD_Symbol_370
          double_tape_pointer = double_tape_pointer+1
          double_tape(double_tape_pointer) = OpenAD_Symbol_373
          double_tape_pointer = double_tape_pointer+1
          double_tape(double_tape_pointer) = OpenAD_Symbol_376
          double_tape_pointer = double_tape_pointer+1
          double_tape(double_tape_pointer) = OpenAD_Symbol_379
          double_tape_pointer = double_tape_pointer+1
          double_tape(double_tape_pointer) = OpenAD_Symbol_381
          double_tape_pointer = double_tape_pointer+1
          double_tape(double_tape_pointer) = OpenAD_Symbol_383
          double_tape_pointer = double_tape_pointer+1
          double_tape(double_tape_pointer) = OpenAD_Symbol_385
          double_tape_pointer = double_tape_pointer+1
          double_tape(double_tape_pointer) = OpenAD_Symbol_387
          double_tape_pointer = double_tape_pointer+1
        OpenAD_Symbol_105 = (FLDSTAR(2)%v-FLDNOW(2)%v)
        OpenAD_Symbol_102 = (GAMMALOC%v*OpenAD_Symbol_105)
        OpenAD_Symbol_110 = (FLDNOW(3)%v-FLDNOW(2)%v)
        OpenAD_Symbol_95 = (EXTFORLOC(2)%v+VOL(2)%v*OpenAD_Symbol_102-UV
     +ELLOC%v*OpenAD_Symbol_110)
        OpenAD_Symbol_115 = (OpenAD_Symbol_95/VOL(2)%v)
        OpenAD_Symbol_100 = 1_w2f__i8
        OpenAD_Symbol_103 = OpenAD_Symbol_102
        OpenAD_Symbol_106 = OpenAD_Symbol_105
        OpenAD_Symbol_108 = 1_w2f__i8
        OpenAD_Symbol_109 = (-1_w2f__i8)
        OpenAD_Symbol_107 = GAMMALOC%v
        OpenAD_Symbol_104 = VOL(2)%v
        OpenAD_Symbol_101 = 1_w2f__i8
        OpenAD_Symbol_98 = 1_w2f__i8
        OpenAD_Symbol_111 = OpenAD_Symbol_110
        OpenAD_Symbol_113 = 1_w2f__i8
        OpenAD_Symbol_114 = (-1_w2f__i8)
        OpenAD_Symbol_112 = UVELLOC%v
        OpenAD_Symbol_99 = (-1_w2f__i8)
        OpenAD_Symbol_96 = (INT(1 _w2f__i8)/VOL(2)%v)
        OpenAD_Symbol_97 = (-(OpenAD_Symbol_95/(VOL(2)%v*VOL(2)%v)))
        DFLDDT(2)%v = OpenAD_Symbol_115
        OpenAD_Symbol_389 = (OpenAD_Symbol_98 * OpenAD_Symbol_96)
        OpenAD_Symbol_390 = (OpenAD_Symbol_99 * OpenAD_Symbol_96)
        OpenAD_Symbol_391 = (OpenAD_Symbol_100 * OpenAD_Symbol_389)
        OpenAD_Symbol_393 = (OpenAD_Symbol_101 * OpenAD_Symbol_389)
        OpenAD_Symbol_394 = (OpenAD_Symbol_103 * OpenAD_Symbol_393)
        OpenAD_Symbol_396 = (OpenAD_Symbol_104 * OpenAD_Symbol_393)
        OpenAD_Symbol_397 = (OpenAD_Symbol_111 * OpenAD_Symbol_390)
        OpenAD_Symbol_399 = (OpenAD_Symbol_112 * OpenAD_Symbol_390)
        OpenAD_Symbol_400 = (OpenAD_Symbol_106 * OpenAD_Symbol_396)
        OpenAD_Symbol_402 = (OpenAD_Symbol_107 * OpenAD_Symbol_396)
        OpenAD_Symbol_403 = (OpenAD_Symbol_113 * OpenAD_Symbol_399)
        OpenAD_Symbol_405 = (OpenAD_Symbol_114 * OpenAD_Symbol_399)
        OpenAD_Symbol_407 = (OpenAD_Symbol_108 * OpenAD_Symbol_402)
        OpenAD_Symbol_409 = (OpenAD_Symbol_109 * OpenAD_Symbol_402)
        OpenAD_Symbol_411 = OpenAD_Symbol_97
          double_tape(double_tape_pointer) = OpenAD_Symbol_391
          double_tape_pointer = double_tape_pointer+1
          double_tape(double_tape_pointer) = OpenAD_Symbol_394
          double_tape_pointer = double_tape_pointer+1
          double_tape(double_tape_pointer) = OpenAD_Symbol_397
          double_tape_pointer = double_tape_pointer+1
          double_tape(double_tape_pointer) = OpenAD_Symbol_400
          double_tape_pointer = double_tape_pointer+1
          double_tape(double_tape_pointer) = OpenAD_Symbol_403
          double_tape_pointer = double_tape_pointer+1
          double_tape(double_tape_pointer) = OpenAD_Symbol_405
          double_tape_pointer = double_tape_pointer+1
          double_tape(double_tape_pointer) = OpenAD_Symbol_407
          double_tape_pointer = double_tape_pointer+1
          double_tape(double_tape_pointer) = OpenAD_Symbol_409
          double_tape_pointer = double_tape_pointer+1
          double_tape(double_tape_pointer) = OpenAD_Symbol_411
          double_tape_pointer = double_tape_pointer+1
        OpenAD_Symbol_120 = (FLDNOW(1)%v-FLDNOW(3)%v)
        OpenAD_Symbol_117 = (UVELLOC%v*OpenAD_Symbol_120)
        OpenAD_Symbol_125 = (-(OpenAD_Symbol_117/VOL(3)%v))
        OpenAD_Symbol_121 = OpenAD_Symbol_120
        OpenAD_Symbol_123 = 1_w2f__i8
        OpenAD_Symbol_124 = (-1_w2f__i8)
        OpenAD_Symbol_122 = UVELLOC%v
        OpenAD_Symbol_118 = (INT(1 _w2f__i8)/VOL(3)%v)
        OpenAD_Symbol_119 = (-(OpenAD_Symbol_117/(VOL(3)%v*VOL(3)%v)))
        OpenAD_Symbol_116 = (-1_w2f__i8)
        DFLDDT(3)%v = OpenAD_Symbol_125
        OpenAD_Symbol_413 = (OpenAD_Symbol_118 * OpenAD_Symbol_116)
        OpenAD_Symbol_414 = (OpenAD_Symbol_119 * OpenAD_Symbol_116)
        OpenAD_Symbol_416 = (OpenAD_Symbol_121 * OpenAD_Symbol_413)
        OpenAD_Symbol_418 = (OpenAD_Symbol_122 * OpenAD_Symbol_413)
        OpenAD_Symbol_419 = (OpenAD_Symbol_123 * OpenAD_Symbol_418)
        OpenAD_Symbol_421 = (OpenAD_Symbol_124 * OpenAD_Symbol_418)
          double_tape(double_tape_pointer) = OpenAD_Symbol_414
          double_tape_pointer = double_tape_pointer+1
          double_tape(double_tape_pointer) = OpenAD_Symbol_416
          double_tape_pointer = double_tape_pointer+1
          double_tape(double_tape_pointer) = OpenAD_Symbol_419
          double_tape_pointer = double_tape_pointer+1
          double_tape(double_tape_pointer) = OpenAD_Symbol_421
          double_tape_pointer = double_tape_pointer+1
        OpenAD_Symbol_597 = 0_w2f__i8
          integer_tape(integer_tape_pointer) = OpenAD_Symbol_597
          integer_tape_pointer = integer_tape_pointer+1
      ENDIF
      CALL box_update(FLDNEW,FLDOLD,DFLDDT)
      
          end if 
          if (our_rev_mode%adjoint) then
! adjoint
      CALL box_update(FLDNEW,FLDOLD,DFLDDT)
          integer_tape_pointer = integer_tape_pointer-1
          OpenAD_Symbol_595 = integer_tape(integer_tape_pointer)
      IF(OpenAD_Symbol_595 .ne. 0) THEN
          double_tape_pointer = double_tape_pointer-1
          OpenAD_Symbol_598 = double_tape(double_tape_pointer)
          OpenAD_Symbol_364%d = OpenAD_Symbol_364%d+DFLDDT(3)%d*OpenAD_S
     +ymbol_598
          double_tape_pointer = double_tape_pointer-1
          OpenAD_Symbol_599 = double_tape(double_tape_pointer)
          OpenAD_Symbol_362%d = OpenAD_Symbol_362%d+DFLDDT(3)%d*OpenAD_S
     +ymbol_599
          double_tape_pointer = double_tape_pointer-1
          OpenAD_Symbol_600 = double_tape(double_tape_pointer)
          OpenAD_Symbol_360%d = OpenAD_Symbol_360%d+DFLDDT(3)%d*OpenAD_S
     +ymbol_600
          double_tape_pointer = double_tape_pointer-1
          OpenAD_Symbol_601 = double_tape(double_tape_pointer)
          OpenAD_Symbol_357%d = OpenAD_Symbol_357%d+DFLDDT(3)%d*OpenAD_S
     +ymbol_601
          DFLDDT(3)%d = 0.0d0
          UVELLOC%d = UVELLOC%d+OpenAD_Symbol_357%d
          OpenAD_Symbol_357%d = 0.0d0
          FLDNOW(2)%d = FLDNOW(2)%d+OpenAD_Symbol_360%d
          OpenAD_Symbol_360%d = 0.0d0
          FLDNOW(3)%d = FLDNOW(3)%d+OpenAD_Symbol_362%d
          OpenAD_Symbol_362%d = 0.0d0
          VOL(3)%d = VOL(3)%d+OpenAD_Symbol_364%d
          OpenAD_Symbol_364%d = 0.0d0
          double_tape_pointer = double_tape_pointer-1
          OpenAD_Symbol_602 = double_tape(double_tape_pointer)
          OpenAD_Symbol_355%d = OpenAD_Symbol_355%d+DFLDDT(2)%d*OpenAD_S
     +ymbol_602
          double_tape_pointer = double_tape_pointer-1
          OpenAD_Symbol_603 = double_tape(double_tape_pointer)
          OpenAD_Symbol_353%d = OpenAD_Symbol_353%d+DFLDDT(2)%d*OpenAD_S
     +ymbol_603
          double_tape_pointer = double_tape_pointer-1
          OpenAD_Symbol_604 = double_tape(double_tape_pointer)
          OpenAD_Symbol_351%d = OpenAD_Symbol_351%d+DFLDDT(2)%d*OpenAD_S
     +ymbol_604
          double_tape_pointer = double_tape_pointer-1
          OpenAD_Symbol_605 = double_tape(double_tape_pointer)
          OpenAD_Symbol_349%d = OpenAD_Symbol_349%d+DFLDDT(2)%d*OpenAD_S
     +ymbol_605
          double_tape_pointer = double_tape_pointer-1
          OpenAD_Symbol_606 = double_tape(double_tape_pointer)
          OpenAD_Symbol_347%d = OpenAD_Symbol_347%d+DFLDDT(2)%d*OpenAD_S
     +ymbol_606
          double_tape_pointer = double_tape_pointer-1
          OpenAD_Symbol_607 = double_tape(double_tape_pointer)
          OpenAD_Symbol_344%d = OpenAD_Symbol_344%d+DFLDDT(2)%d*OpenAD_S
     +ymbol_607
          double_tape_pointer = double_tape_pointer-1
          OpenAD_Symbol_608 = double_tape(double_tape_pointer)
          OpenAD_Symbol_341%d = OpenAD_Symbol_341%d+DFLDDT(2)%d*OpenAD_S
     +ymbol_608
          double_tape_pointer = double_tape_pointer-1
          OpenAD_Symbol_609 = double_tape(double_tape_pointer)
          OpenAD_Symbol_338%d = OpenAD_Symbol_338%d+DFLDDT(2)%d*OpenAD_S
     +ymbol_609
          double_tape_pointer = double_tape_pointer-1
          OpenAD_Symbol_610 = double_tape(double_tape_pointer)
          OpenAD_Symbol_335%d = OpenAD_Symbol_335%d+DFLDDT(2)%d*OpenAD_S
     +ymbol_610
          DFLDDT(2)%d = 0.0d0
          EXTFORLOC(2)%d = EXTFORLOC(2)%d+OpenAD_Symbol_335%d
          OpenAD_Symbol_335%d = 0.0d0
          VOL(2)%d = VOL(2)%d+OpenAD_Symbol_338%d
          OpenAD_Symbol_338%d = 0.0d0
          UVELLOC%d = UVELLOC%d+OpenAD_Symbol_341%d
          OpenAD_Symbol_341%d = 0.0d0
          GAMMALOC%d = GAMMALOC%d+OpenAD_Symbol_344%d
          OpenAD_Symbol_344%d = 0.0d0
          FLDNOW(1)%d = FLDNOW(1)%d+OpenAD_Symbol_347%d
          OpenAD_Symbol_347%d = 0.0d0
          FLDNOW(2)%d = FLDNOW(2)%d+OpenAD_Symbol_349%d
          OpenAD_Symbol_349%d = 0.0d0
          FLDSTAR(2)%d = FLDSTAR(2)%d+OpenAD_Symbol_351%d
          OpenAD_Symbol_351%d = 0.0d0
          FLDNOW(2)%d = FLDNOW(2)%d+OpenAD_Symbol_353%d
          OpenAD_Symbol_353%d = 0.0d0
          VOL(2)%d = VOL(2)%d+OpenAD_Symbol_355%d
          OpenAD_Symbol_355%d = 0.0d0
          double_tape_pointer = double_tape_pointer-1
          OpenAD_Symbol_611 = double_tape(double_tape_pointer)
          OpenAD_Symbol_331%d = OpenAD_Symbol_331%d+DFLDDT(1)%d*OpenAD_S
     +ymbol_611
          double_tape_pointer = double_tape_pointer-1
          OpenAD_Symbol_612 = double_tape(double_tape_pointer)
          OpenAD_Symbol_329%d = OpenAD_Symbol_329%d+DFLDDT(1)%d*OpenAD_S
     +ymbol_612
          double_tape_pointer = double_tape_pointer-1
          OpenAD_Symbol_613 = double_tape(double_tape_pointer)
          OpenAD_Symbol_327%d = OpenAD_Symbol_327%d+DFLDDT(1)%d*OpenAD_S
     +ymbol_613
          double_tape_pointer = double_tape_pointer-1
          OpenAD_Symbol_614 = double_tape(double_tape_pointer)
          OpenAD_Symbol_325%d = OpenAD_Symbol_325%d+DFLDDT(1)%d*OpenAD_S
     +ymbol_614
          double_tape_pointer = double_tape_pointer-1
          OpenAD_Symbol_615 = double_tape(double_tape_pointer)
          OpenAD_Symbol_323%d = OpenAD_Symbol_323%d+DFLDDT(1)%d*OpenAD_S
     +ymbol_615
          double_tape_pointer = double_tape_pointer-1
          OpenAD_Symbol_616 = double_tape(double_tape_pointer)
          OpenAD_Symbol_320%d = OpenAD_Symbol_320%d+DFLDDT(1)%d*OpenAD_S
     +ymbol_616
          double_tape_pointer = double_tape_pointer-1
          OpenAD_Symbol_617 = double_tape(double_tape_pointer)
          OpenAD_Symbol_317%d = OpenAD_Symbol_317%d+DFLDDT(1)%d*OpenAD_S
     +ymbol_617
          double_tape_pointer = double_tape_pointer-1
          OpenAD_Symbol_618 = double_tape(double_tape_pointer)
          OpenAD_Symbol_314%d = OpenAD_Symbol_314%d+DFLDDT(1)%d*OpenAD_S
     +ymbol_618
          double_tape_pointer = double_tape_pointer-1
          OpenAD_Symbol_619 = double_tape(double_tape_pointer)
          OpenAD_Symbol_311%d = OpenAD_Symbol_311%d+DFLDDT(1)%d*OpenAD_S
     +ymbol_619
          DFLDDT(1)%d = 0.0d0
          EXTFORLOC(1)%d = EXTFORLOC(1)%d+OpenAD_Symbol_311%d
          OpenAD_Symbol_311%d = 0.0d0
          VOL(1)%d = VOL(1)%d+OpenAD_Symbol_314%d
          OpenAD_Symbol_314%d = 0.0d0
          UVELLOC%d = UVELLOC%d+OpenAD_Symbol_317%d
          OpenAD_Symbol_317%d = 0.0d0
          GAMMALOC%d = GAMMALOC%d+OpenAD_Symbol_320%d
          OpenAD_Symbol_320%d = 0.0d0
          FLDNOW(3)%d = FLDNOW(3)%d+OpenAD_Symbol_323%d
          OpenAD_Symbol_323%d = 0.0d0
          FLDNOW(1)%d = FLDNOW(1)%d+OpenAD_Symbol_325%d
          OpenAD_Symbol_325%d = 0.0d0
          FLDSTAR(1)%d = FLDSTAR(1)%d+OpenAD_Symbol_327%d
          OpenAD_Symbol_327%d = 0.0d0
          FLDNOW(1)%d = FLDNOW(1)%d+OpenAD_Symbol_329%d
          OpenAD_Symbol_329%d = 0.0d0
          VOL(1)%d = VOL(1)%d+OpenAD_Symbol_331%d
          OpenAD_Symbol_331%d = 0.0d0
      ELSE
          double_tape_pointer = double_tape_pointer-1
          OpenAD_Symbol_620 = double_tape(double_tape_pointer)
          OpenAD_Symbol_422%d = OpenAD_Symbol_422%d+DFLDDT(3)%d*OpenAD_S
     +ymbol_620
          double_tape_pointer = double_tape_pointer-1
          OpenAD_Symbol_621 = double_tape(double_tape_pointer)
          OpenAD_Symbol_420%d = OpenAD_Symbol_420%d+DFLDDT(3)%d*OpenAD_S
     +ymbol_621
          double_tape_pointer = double_tape_pointer-1
          OpenAD_Symbol_622 = double_tape(double_tape_pointer)
          OpenAD_Symbol_417%d = OpenAD_Symbol_417%d+DFLDDT(3)%d*OpenAD_S
     +ymbol_622
          double_tape_pointer = double_tape_pointer-1
          OpenAD_Symbol_623 = double_tape(double_tape_pointer)
          OpenAD_Symbol_415%d = OpenAD_Symbol_415%d+DFLDDT(3)%d*OpenAD_S
     +ymbol_623
          DFLDDT(3)%d = 0.0d0
          VOL(3)%d = VOL(3)%d+OpenAD_Symbol_415%d
          OpenAD_Symbol_415%d = 0.0d0
          UVELLOC%d = UVELLOC%d+OpenAD_Symbol_417%d
          OpenAD_Symbol_417%d = 0.0d0
          FLDNOW(1)%d = FLDNOW(1)%d+OpenAD_Symbol_420%d
          OpenAD_Symbol_420%d = 0.0d0
          FLDNOW(3)%d = FLDNOW(3)%d+OpenAD_Symbol_422%d
          OpenAD_Symbol_422%d = 0.0d0
          double_tape_pointer = double_tape_pointer-1
          OpenAD_Symbol_624 = double_tape(double_tape_pointer)
          OpenAD_Symbol_412%d = OpenAD_Symbol_412%d+DFLDDT(2)%d*OpenAD_S
     +ymbol_624
          double_tape_pointer = double_tape_pointer-1
          OpenAD_Symbol_625 = double_tape(double_tape_pointer)
          OpenAD_Symbol_410%d = OpenAD_Symbol_410%d+DFLDDT(2)%d*OpenAD_S
     +ymbol_625
          double_tape_pointer = double_tape_pointer-1
          OpenAD_Symbol_626 = double_tape(double_tape_pointer)
          OpenAD_Symbol_408%d = OpenAD_Symbol_408%d+DFLDDT(2)%d*OpenAD_S
     +ymbol_626
          double_tape_pointer = double_tape_pointer-1
          OpenAD_Symbol_627 = double_tape(double_tape_pointer)
          OpenAD_Symbol_406%d = OpenAD_Symbol_406%d+DFLDDT(2)%d*OpenAD_S
     +ymbol_627
          double_tape_pointer = double_tape_pointer-1
          OpenAD_Symbol_628 = double_tape(double_tape_pointer)
          OpenAD_Symbol_404%d = OpenAD_Symbol_404%d+DFLDDT(2)%d*OpenAD_S
     +ymbol_628
          double_tape_pointer = double_tape_pointer-1
          OpenAD_Symbol_629 = double_tape(double_tape_pointer)
          OpenAD_Symbol_401%d = OpenAD_Symbol_401%d+DFLDDT(2)%d*OpenAD_S
     +ymbol_629
          double_tape_pointer = double_tape_pointer-1
          OpenAD_Symbol_630 = double_tape(double_tape_pointer)
          OpenAD_Symbol_398%d = OpenAD_Symbol_398%d+DFLDDT(2)%d*OpenAD_S
     +ymbol_630
          double_tape_pointer = double_tape_pointer-1
          OpenAD_Symbol_631 = double_tape(double_tape_pointer)
          OpenAD_Symbol_395%d = OpenAD_Symbol_395%d+DFLDDT(2)%d*OpenAD_S
     +ymbol_631
          double_tape_pointer = double_tape_pointer-1
          OpenAD_Symbol_632 = double_tape(double_tape_pointer)
          OpenAD_Symbol_392%d = OpenAD_Symbol_392%d+DFLDDT(2)%d*OpenAD_S
     +ymbol_632
          DFLDDT(2)%d = 0.0d0
          EXTFORLOC(2)%d = EXTFORLOC(2)%d+OpenAD_Symbol_392%d
          OpenAD_Symbol_392%d = 0.0d0
          VOL(2)%d = VOL(2)%d+OpenAD_Symbol_395%d
          OpenAD_Symbol_395%d = 0.0d0
          UVELLOC%d = UVELLOC%d+OpenAD_Symbol_398%d
          OpenAD_Symbol_398%d = 0.0d0
          GAMMALOC%d = GAMMALOC%d+OpenAD_Symbol_401%d
          OpenAD_Symbol_401%d = 0.0d0
          FLDNOW(3)%d = FLDNOW(3)%d+OpenAD_Symbol_404%d
          OpenAD_Symbol_404%d = 0.0d0
          FLDNOW(2)%d = FLDNOW(2)%d+OpenAD_Symbol_406%d
          OpenAD_Symbol_406%d = 0.0d0
          FLDSTAR(2)%d = FLDSTAR(2)%d+OpenAD_Symbol_408%d
          OpenAD_Symbol_408%d = 0.0d0
          FLDNOW(2)%d = FLDNOW(2)%d+OpenAD_Symbol_410%d
          OpenAD_Symbol_410%d = 0.0d0
          VOL(2)%d = VOL(2)%d+OpenAD_Symbol_412%d
          OpenAD_Symbol_412%d = 0.0d0
          double_tape_pointer = double_tape_pointer-1
          OpenAD_Symbol_633 = double_tape(double_tape_pointer)
          OpenAD_Symbol_388%d = OpenAD_Symbol_388%d+DFLDDT(1)%d*OpenAD_S
     +ymbol_633
          double_tape_pointer = double_tape_pointer-1
          OpenAD_Symbol_634 = double_tape(double_tape_pointer)
          OpenAD_Symbol_386%d = OpenAD_Symbol_386%d+DFLDDT(1)%d*OpenAD_S
     +ymbol_634
          double_tape_pointer = double_tape_pointer-1
          OpenAD_Symbol_635 = double_tape(double_tape_pointer)
          OpenAD_Symbol_384%d = OpenAD_Symbol_384%d+DFLDDT(1)%d*OpenAD_S
     +ymbol_635
          double_tape_pointer = double_tape_pointer-1
          OpenAD_Symbol_636 = double_tape(double_tape_pointer)
          OpenAD_Symbol_382%d = OpenAD_Symbol_382%d+DFLDDT(1)%d*OpenAD_S
     +ymbol_636
          double_tape_pointer = double_tape_pointer-1
          OpenAD_Symbol_637 = double_tape(double_tape_pointer)
          OpenAD_Symbol_380%d = OpenAD_Symbol_380%d+DFLDDT(1)%d*OpenAD_S
     +ymbol_637
          double_tape_pointer = double_tape_pointer-1
          OpenAD_Symbol_638 = double_tape(double_tape_pointer)
          OpenAD_Symbol_377%d = OpenAD_Symbol_377%d+DFLDDT(1)%d*OpenAD_S
     +ymbol_638
          double_tape_pointer = double_tape_pointer-1
          OpenAD_Symbol_639 = double_tape(double_tape_pointer)
          OpenAD_Symbol_374%d = OpenAD_Symbol_374%d+DFLDDT(1)%d*OpenAD_S
     +ymbol_639
          double_tape_pointer = double_tape_pointer-1
          OpenAD_Symbol_640 = double_tape(double_tape_pointer)
          OpenAD_Symbol_371%d = OpenAD_Symbol_371%d+DFLDDT(1)%d*OpenAD_S
     +ymbol_640
          double_tape_pointer = double_tape_pointer-1
          OpenAD_Symbol_641 = double_tape(double_tape_pointer)
          OpenAD_Symbol_368%d = OpenAD_Symbol_368%d+DFLDDT(1)%d*OpenAD_S
     +ymbol_641
          DFLDDT(1)%d = 0.0d0
          EXTFORLOC(1)%d = EXTFORLOC(1)%d+OpenAD_Symbol_368%d
          OpenAD_Symbol_368%d = 0.0d0
          VOL(1)%d = VOL(1)%d+OpenAD_Symbol_371%d
          OpenAD_Symbol_371%d = 0.0d0
          UVELLOC%d = UVELLOC%d+OpenAD_Symbol_374%d
          OpenAD_Symbol_374%d = 0.0d0
          GAMMALOC%d = GAMMALOC%d+OpenAD_Symbol_377%d
          OpenAD_Symbol_377%d = 0.0d0
          FLDNOW(2)%d = FLDNOW(2)%d+OpenAD_Symbol_380%d
          OpenAD_Symbol_380%d = 0.0d0
          FLDNOW(1)%d = FLDNOW(1)%d+OpenAD_Symbol_382%d
          OpenAD_Symbol_382%d = 0.0d0
          FLDSTAR(1)%d = FLDSTAR(1)%d+OpenAD_Symbol_384%d
          OpenAD_Symbol_384%d = 0.0d0
          FLDNOW(1)%d = FLDNOW(1)%d+OpenAD_Symbol_386%d
          OpenAD_Symbol_386%d = 0.0d0
          VOL(1)%d = VOL(1)%d+OpenAD_Symbol_388%d
          OpenAD_Symbol_388%d = 0.0d0
      ENDIF
          end if 
        end subroutine box_timestep
