--- MITgcm/tools/OAD_support/OAD_tape.F90 2013/12/18 20:01:00 1.2 +++ MITgcm/tools/OAD_support/OAD_tape.F90 2014/01/16 15:15:23 1.3 @@ -5,8 +5,8 @@ private :: increment , dtt, itt, ltt, stt, & init, dump_tapestats, & dt_grow, it_grow, lt_grow, st_grow, & - push_i0, push_d1, push_i1, & - pop_i0, pop_d1, pop_i1, & + push_d0, push_i0, push_d1, push_i1, & + pop_d0, pop_i0, pop_d1, pop_i1, & push_d4, push_d6, & pop_d4, pop_d6 @@ -56,13 +56,13 @@ end interface interface oad_tape_push - module procedure push_i0 + module procedure push_d0, push_i0 module procedure push_d1, push_i1 module procedure push_d4, push_d6 end interface interface oad_tape_pop - module procedure pop_i0 + module procedure pop_d0, pop_i0 module procedure pop_d1, pop_i1 module procedure pop_d4, pop_d6 end interface @@ -187,6 +187,13 @@ oad_st_sz=oad_st_sz+increment end subroutine st_grow + subroutine push_d0(v) + implicit none + double precision :: v + if(oad_dt_sz .lt. oad_dt_ptr+1) call oad_dt_grow() + oad_dt(oad_dt_ptr)=v; oad_dt_ptr=oad_dt_ptr+1 + end subroutine push_d0 + subroutine push_i0(v) implicit none integer :: v @@ -194,13 +201,6 @@ oad_it(oad_it_ptr)=v; oad_it_ptr=oad_it_ptr+1 end subroutine push_i0 - subroutine pop_i0(v) - implicit none - integer :: v - oad_it_ptr=oad_it_ptr-1 - v=oad_it(oad_it_ptr) - end subroutine pop_i0 - subroutine push_d1(v) implicit none double precision :: v(:) @@ -245,6 +245,20 @@ oad_dt_ptr=oad_dt_ptr+chunk(1) end subroutine push_d6 + subroutine pop_d0(v) + implicit none + double precision :: v + oad_dt_ptr=oad_dt_ptr-1 + v=oad_dt(oad_dt_ptr) + end subroutine pop_d0 + + subroutine pop_i0(v) + implicit none + integer :: v + oad_it_ptr=oad_it_ptr-1 + v=oad_it(oad_it_ptr) + end subroutine pop_i0 + subroutine pop_d1(v) implicit none double precision :: v(:)