1 |
C $Header: $ |
2 |
C $Name: $ |
3 |
|
4 |
#include "AUTODIFF_OPTIONS.h" |
5 |
|
6 |
c ================================================================== |
7 |
c |
8 |
c adopen_adclose.F: Routines to handle the I/O of the TAMC generated |
9 |
c code. All files are direct access files. |
10 |
c Routines: |
11 |
c |
12 |
c o adopen - Open file (here a dummy routine). |
13 |
c o adclose - Close file (here a dummy routine). |
14 |
c |
15 |
c |
16 |
c The following input veriables are used throughout in the argument |
17 |
c lists: |
18 |
c |
19 |
c name - character |
20 |
c On entry, name is the extended tape name. |
21 |
c len - integer |
22 |
c On entry, len is the number of characters in name. |
23 |
c tid - integer |
24 |
c On entry, tid identifies the tape. |
25 |
c vid - integer |
26 |
c On entry, vid identifies the variable to be stored on |
27 |
c the tape. |
28 |
c var - real array of dimension length |
29 |
c On entry, var contains the values to be stored. |
30 |
c var must not be changed. |
31 |
c size - integer |
32 |
c On entry, size is the size in bytes of the type of |
33 |
c variable var. |
34 |
c length - integer |
35 |
c On entry, length is the dimension of the variable |
36 |
c stored on the tape. |
37 |
c irec - integer |
38 |
c On entry, irec is the record number to be written. |
39 |
c mythid - integer |
40 |
c On entry, mythid is the number of the thread or |
41 |
c instance of the program. |
42 |
c myiter - integer |
43 |
c On entry, myiter is the current iteration step during |
44 |
c the integration. |
45 |
c |
46 |
c For further details on this see the TAMC Users Manual, Appendix B, |
47 |
c User defined Storage Subroutines. |
48 |
c |
49 |
c TAMC does not provide the two leading arguments mythid and myiter |
50 |
c when compiling the MITgcmUV code. Instead the is a sed script avail- |
51 |
c able that does change the TAMC-generated adjoint code. |
52 |
c |
53 |
c Only the master thread is allowed to write data and only gobal |
54 |
c model arrays are allowed to be written be the subsequent routines. |
55 |
c Tiled data are to be stored in common blocks. This implies that at |
56 |
c least a two level checkpointing for the adjoint code has to be |
57 |
c available. |
58 |
c |
59 |
c ================================================================== |
60 |
|
61 |
|
62 |
CBOP |
63 |
C !ROUTINE: adopen |
64 |
C !INTERFACE: |
65 |
subroutine adopen( |
66 |
I mythid, |
67 |
cph( |
68 |
cph I myiter, |
69 |
cph) |
70 |
I name, |
71 |
I len, |
72 |
I tid, |
73 |
I vid, |
74 |
I size, |
75 |
I length |
76 |
& ) |
77 |
|
78 |
C !DESCRIPTION: \bv |
79 |
c ================================================================== |
80 |
c SUBROUTINE adopen |
81 |
c ================================================================== |
82 |
c o Dummy routine expected to be available by TAMC I/O. |
83 |
c This routine is simply a dummy routine expected to be available by |
84 |
c the Tangent Linear and Adjoint Model Compiler(TAMC). Files are |
85 |
c opened and closed by the routines that are called by *adread* and |
86 |
c *adwrite*. |
87 |
c started: Christian Eckert eckert@mit.edu 30-Jun-1999 |
88 |
c ================================================================== |
89 |
c SUBROUTINE adopen |
90 |
c ================================================================== |
91 |
C \ev |
92 |
|
93 |
C !USES: |
94 |
implicit none |
95 |
|
96 |
c == global variables == |
97 |
|
98 |
C !INPUT/OUTPUT PARAMETERS: |
99 |
c == routine arguments == |
100 |
c name - extended tape name. |
101 |
c len - number of characters in name. |
102 |
c tid - tape identifier. |
103 |
c vid - identifies the variable to be stored on tape. |
104 |
c size - size in bytes of the type of variable var. |
105 |
c length - dimension of the variable stored on the tape. |
106 |
c mythid - number of the thread or instance of the program. |
107 |
|
108 |
integer mythid |
109 |
cph( |
110 |
cph integer myiter |
111 |
cph) |
112 |
character*(*) name |
113 |
integer len |
114 |
integer tid |
115 |
integer vid |
116 |
integer size |
117 |
integer length |
118 |
|
119 |
C !LOCAL VARIABLES: |
120 |
c == local variables == |
121 |
|
122 |
c == end of interface == |
123 |
CEOP |
124 |
|
125 |
return |
126 |
end |
127 |
|
128 |
|
129 |
CBOP |
130 |
C !ROUTINE: adclose |
131 |
C !INTERFACE: |
132 |
subroutine adclose( |
133 |
I mythid, |
134 |
cph( |
135 |
cph I myiter, |
136 |
cph) |
137 |
I name, |
138 |
I len, |
139 |
I tid, |
140 |
I vid, |
141 |
I size, |
142 |
I length |
143 |
& ) |
144 |
|
145 |
|
146 |
C !DESCRIPTION: \bv |
147 |
c ================================================================== |
148 |
c SUBROUTINE adclose |
149 |
c ================================================================== |
150 |
c o Dummy routine expected to be available by TAMC I/O. |
151 |
c This routine is simply a dummy routine expected to be available by |
152 |
c the Tangent Linear and Adjoint Model Compiler(TAMC). Files are |
153 |
c opened and closed by the routines that are called by *adread* and |
154 |
c *adwrite*. |
155 |
c started: Christian Eckert eckert@mit.edu 30-Jun-1999 |
156 |
c ================================================================== |
157 |
c SUBROUTINE adclose |
158 |
c ================================================================== |
159 |
C \ev |
160 |
|
161 |
C !USES: |
162 |
implicit none |
163 |
|
164 |
c == global variables == |
165 |
|
166 |
C !INPUT/OUTPUT PARAMETERS: |
167 |
c == routine arguments == |
168 |
c name - extended tape name. |
169 |
c len - number of characters in name. |
170 |
c tid - tape identifier. |
171 |
c vid - identifies the variable to be stored on tape. |
172 |
c size - size in bytes of the type of variable var. |
173 |
c length - dimension of the variable stored on the tape. |
174 |
c mythid - number of the thread or instance of the program. |
175 |
|
176 |
integer mythid |
177 |
cph( |
178 |
cph integer myiter |
179 |
cph) |
180 |
character*(*) name |
181 |
integer len |
182 |
integer tid |
183 |
integer vid |
184 |
integer size |
185 |
integer length |
186 |
|
187 |
C !LOCAL VARIABLES: |
188 |
c == local variables == |
189 |
|
190 |
c == end of interface == |
191 |
CEOP |
192 |
|
193 |
return |
194 |
end |