/[MITgcm]/MITgcm_contrib/heimbach/OpenAD/code_shallow_openad3/OpenAD_tape.f90
ViewVC logotype

Annotation of /MITgcm_contrib/heimbach/OpenAD/code_shallow_openad3/OpenAD_tape.f90

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


Revision 1.2 - (hide annotations) (download)
Wed Jan 10 23:58:30 2007 UTC (19 years, 10 months ago) by utke
Branch: MAIN
Changes since 1.1: +22 -0 lines
additional tapes for different variable types related to simple loop logic

1 utke 1.1 module OpenAD_tape
2     implicit none
3    
4     private
5     public :: double_tape, double_tmp_tape, &
6     & double_tape_pointer, double_tape_size, &
7     & integer_tape, integer_tmp_tape, &
8     & integer_tape_pointer, integer_tape_size, &
9 utke 1.2 & logical_tape, logical_tmp_tape, &
10     & logical_tape_pointer, logical_tape_size, &
11     & string_tape, string_tmp_tape, &
12     & string_tape_pointer, string_tape_size, &
13 utke 1.1 & tape_init
14    
15     double precision, dimension(:), allocatable :: double_tape, double_tmp_tape
16     integer, dimension(:), allocatable :: integer_tape, integer_tmp_tape
17 utke 1.2 logical, dimension(:), allocatable :: logical_tape, logical_tmp_tape
18     character(80), dimension(:), allocatable :: string_tape, string_tmp_tape
19 utke 1.1 integer :: double_tape_pointer=0, integer_tape_pointer=0
20     integer :: double_tape_size=0, integer_tape_size=0
21 utke 1.2 integer :: logical_tape_pointer=0, string_tape_pointer=0
22     integer :: logical_tape_size=0, string_tape_size=0
23 utke 1.1
24     interface tape_init
25     module procedure init
26     end interface tape_init
27    
28     contains
29    
30     subroutine init
31     double_tape_pointer=1
32     if (allocated(double_tape)) then
33     deallocate(double_tape)
34     end if
35     double_tape_size=1048576
36     allocate(double_tape(double_tape_size))
37     integer_tape_pointer=1
38     if (allocated(integer_tape)) then
39     deallocate(integer_tape)
40     end if
41     integer_tape_size=1048576
42     allocate(integer_tape(integer_tape_size))
43 utke 1.2 logical_tape_pointer=1
44     if (allocated(logical_tape)) then
45     deallocate(logical_tape)
46     end if
47     logical_tape_size=1048576
48     allocate(logical_tape(logical_tape_size))
49     string_tape_size=1048576
50     allocate(string_tape(string_tape_size))
51     string_tape_pointer=1
52     if (allocated(string_tape)) then
53     deallocate(string_tape)
54     end if
55     string_tape_size=1048576
56     allocate(string_tape(string_tape_size))
57 utke 1.1 end subroutine init
58    
59     end module OpenAD_tape

  ViewVC Help
Powered by ViewVC 1.1.22