1 |
|
|
|
CADJ SUBROUTINE active_read_rl INPUT = 1, 2, 3, 4, 5, 6, 7, 8, 9 |
|
|
CADJ SUBROUTINE active_read_rl OUTPUT = 2 |
|
|
|
|
|
CADJ SUBROUTINE active_write_rl INPUT = 1, 2, 3, 4, 5, 6, 7, 8 |
|
|
CADJ SUBROUTINE active_write_rl OUTPUT = 2 |
|
|
|
|
|
CADJ SUBROUTINE active_read_tile_rl INPUT = 1, 2, 3, 4, 5, 6, 7, 8, 9 |
|
|
CADJ SUBROUTINE active_read_tile_rl INPUT += 10, 11 |
|
|
CADJ SUBROUTINE active_read_tile_rl OUTPUT = 2 |
|
|
|
|
|
CADJ SUBROUTINE active_write_tile_rl INPUT = 1, 2, 3, 4, 5, 6, 7, 8, 9 |
|
|
CADJ SUBROUTINE active_write_tile_rl INPUT += 10 |
|
|
CADJ SUBROUTINE active_write_tile_rl OUTPUT = 2 |
|
|
|
|
2 |
#include "CPP_OPTIONS.h" |
#include "CPP_OPTIONS.h" |
3 |
|
|
4 |
c ================================================================== |
c ================================================================== |
21 |
c |
c |
22 |
c |
c |
23 |
c changed: Christian Eckert eckert@mit.edu 24-Apr-2000 |
c changed: Christian Eckert eckert@mit.edu 24-Apr-2000 |
|
c |
|
24 |
c - Added routines that do active writes on tiles |
c - Added routines that do active writes on tiles |
25 |
c instead of a whole thread. |
c instead of a whole thread. |
|
c |
|
26 |
c changed: Patrick Heimbach heimbach@mit.edu 27-May-2000 |
c changed: Patrick Heimbach heimbach@mit.edu 27-May-2000 |
|
c |
|
27 |
c - changed suboutine argument list: |
c - changed suboutine argument list: |
28 |
c dropped mycurrentiter, mycurrenttime |
c dropped mycurrentiter, mycurrenttime |
29 |
c |
c |
30 |
c ================================================================== |
c ================================================================== |
31 |
|
|
32 |
|
CBOP |
33 |
|
C !ROUTINE: adactive_read_xy |
34 |
|
C !INTERFACE: |
35 |
subroutine adactive_read_xy( |
subroutine adactive_read_xy( |
36 |
I active_var_file, |
I active_var_file, |
37 |
I irec, |
I irec, |
42 |
I adactive_var |
I adactive_var |
43 |
& ) |
& ) |
44 |
|
|
45 |
|
C !DESCRIPTION: \bv |
46 |
c ================================================================== |
c ================================================================== |
47 |
c SUBROUTINE active_read_xy |
c SUBROUTINE adactive_read_xy |
48 |
c ================================================================== |
c ================================================================== |
|
c |
|
49 |
c o Adjoint of active_read_xy. |
c o Adjoint of active_read_xy. |
|
c |
|
50 |
c started: Christian Eckert eckert@mit.edu 24-May-1999 |
c started: Christian Eckert eckert@mit.edu 24-May-1999 |
|
c |
|
|
c changed: Christian Eckert eckert@mit.edu 11-Feb-2000 |
|
|
c |
|
|
c - Restructured the code in order to create a package |
|
|
c for the MITgcmUV. |
|
|
c |
|
|
c changed: Patrick Heimbach heimbach@mit.edu 27-May-2000 |
|
|
c |
|
|
c - changed suboutine argument list: |
|
|
c dropped mycurrentiter, mycurrenttime |
|
|
c |
|
51 |
c ================================================================== |
c ================================================================== |
52 |
c SUBROUTINE active_read_xy |
c SUBROUTINE adactive_read_xy |
53 |
c ================================================================== |
c ================================================================== |
54 |
|
C \ev |
55 |
|
|
56 |
|
C !USES: |
57 |
implicit none |
implicit none |
58 |
|
|
59 |
c == global variables == |
c == global variables == |
|
|
|
60 |
#include "EEPARAMS.h" |
#include "EEPARAMS.h" |
61 |
#include "SIZE.h" |
#include "SIZE.h" |
62 |
|
|
63 |
|
C !INPUT/OUTPUT PARAMETERS: |
64 |
c == routine arguments == |
c == routine arguments == |
65 |
|
c active_var_file: filename |
66 |
|
c adactive_var: array |
67 |
|
c irec: record number |
68 |
|
c myIter: number of optimization iteration (default: 0) |
69 |
|
c mythid: thread number for this instance |
70 |
|
c doglobalread: flag for global or local read/write |
71 |
|
c (default: .false.) |
72 |
|
c lAdInit: initialisation of corresponding adjoint |
73 |
|
c variable and write to active file |
74 |
character*(*) active_var_file |
character*(*) active_var_file |
75 |
_RL adactive_var(1-olx:snx+olx,1-oly:sny+oly,nsx,nsy) |
_RL adactive_var(1-olx:snx+olx,1-oly:sny+oly,nsx,nsy) |
76 |
integer irec |
integer irec |
78 |
logical doglobalread |
logical doglobalread |
79 |
logical lAdInit |
logical lAdInit |
80 |
|
|
81 |
|
C !LOCAL VARIABLES: |
82 |
c == local variables == |
c == local variables == |
|
|
|
83 |
integer mynr |
integer mynr |
84 |
integer il |
integer il |
85 |
integer ilnblnk |
integer ilnblnk |
87 |
character*(80) fname |
character*(80) fname |
88 |
|
|
89 |
c == functions == |
c == functions == |
|
|
|
90 |
external ilnblnk |
external ilnblnk |
91 |
|
|
92 |
c == end of interface == |
c == end of interface == |
93 |
|
CEOP |
94 |
|
|
95 |
mynr = 1 |
mynr = 1 |
96 |
adpref = 'ad' |
adpref = 'ad' |
107 |
|
|
108 |
end |
end |
109 |
|
|
110 |
|
CBOP |
111 |
|
C !ROUTINE: adactive_read_xyz |
112 |
|
C !INTERFACE: |
113 |
subroutine adactive_read_xyz( |
subroutine adactive_read_xyz( |
114 |
I active_var_file, |
I active_var_file, |
115 |
I irec, |
I irec, |
120 |
I adactive_var |
I adactive_var |
121 |
& ) |
& ) |
122 |
|
|
123 |
|
C !DESCRIPTION: \bv |
124 |
c ================================================================== |
c ================================================================== |
125 |
c SUBROUTINE adactive_read_xyz |
c SUBROUTINE adactive_read_xyz |
126 |
c ================================================================== |
c ================================================================== |
|
c |
|
127 |
c o Adjoint of active_read_xyz. |
c o Adjoint of active_read_xyz. |
|
c |
|
128 |
c started: Christian Eckert eckert@mit.edu 24-May-1999 |
c started: Christian Eckert eckert@mit.edu 24-May-1999 |
|
c |
|
|
c changed: Christian Eckert eckert@mit.edu 11-Feb-2000 |
|
|
c |
|
|
c - Restructured the code in order to create a package |
|
|
c for the MITgcmUV. |
|
|
c |
|
|
c changed: Patrick Heimbach heimbach@mit.edu 27-May-2000 |
|
|
c |
|
|
c - changed suboutine argument list: |
|
|
c dropped mycurrentiter, mycurrenttime |
|
|
c |
|
129 |
c ================================================================== |
c ================================================================== |
130 |
c SUBROUTINE adactive_read_xyz |
c SUBROUTINE adactive_read_xyz |
131 |
c ================================================================== |
c ================================================================== |
132 |
|
C \ev |
133 |
|
|
134 |
|
C !USES: |
135 |
implicit none |
implicit none |
136 |
|
|
137 |
c == global variables == |
c == global variables == |
|
|
|
138 |
#include "EEPARAMS.h" |
#include "EEPARAMS.h" |
139 |
#include "SIZE.h" |
#include "SIZE.h" |
140 |
|
|
141 |
c == routine arguments == |
c == routine arguments == |
142 |
|
c active_var_file: filename |
143 |
|
c adactive_var: array |
144 |
|
c irec: record number |
145 |
|
c myIter: number of optimization iteration (default: 0) |
146 |
|
c mythid: thread number for this instance |
147 |
|
c doglobalread: flag for global or local read/write |
148 |
|
c (default: .false.) |
149 |
|
c lAdInit: initialisation of corresponding adjoint |
150 |
|
c variable and write to active file |
151 |
character*(*) active_var_file |
character*(*) active_var_file |
152 |
_RL adactive_var(1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy) |
_RL adactive_var(1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy) |
153 |
integer irec |
integer irec |
155 |
logical doglobalread |
logical doglobalread |
156 |
logical lAdInit |
logical lAdInit |
157 |
|
|
158 |
|
C !LOCAL VARIABLES: |
159 |
c == local variables == |
c == local variables == |
|
|
|
160 |
integer mynr |
integer mynr |
161 |
integer il |
integer il |
162 |
integer ilnblnk |
integer ilnblnk |
164 |
character*(80) fname |
character*(80) fname |
165 |
|
|
166 |
c == functions == |
c == functions == |
|
|
|
167 |
external ilnblnk |
external ilnblnk |
168 |
|
|
169 |
c == end of interface == |
c == end of interface == |
170 |
|
CEOP |
171 |
|
|
172 |
mynr = nr |
mynr = nr |
173 |
adpref = 'ad' |
adpref = 'ad' |
184 |
|
|
185 |
end |
end |
186 |
|
|
187 |
|
CBOP |
188 |
|
C !ROUTINE: adactive_read_xy |
189 |
|
C !INTERFACE: |
190 |
subroutine adactive_write_xy( |
subroutine adactive_write_xy( |
191 |
I active_var_file, |
I active_var_file, |
192 |
I irec, |
I irec, |
197 |
& ) |
& ) |
198 |
|
|
199 |
|
|
200 |
|
C !DESCRIPTION: \bv |
201 |
c ================================================================== |
c ================================================================== |
202 |
c SUBROUTINE adactive_write_xy |
c SUBROUTINE adactive_write_xy |
203 |
c ================================================================== |
c ================================================================== |
|
c |
|
204 |
c o Adjoint of active_write_xy. |
c o Adjoint of active_write_xy. |
|
c |
|
205 |
c started: Christian Eckert eckert@mit.edu 24-May-1999 |
c started: Christian Eckert eckert@mit.edu 24-May-1999 |
|
c |
|
|
c changed: Christian Eckert eckert@mit.edu 11-Feb-2000 |
|
|
c |
|
|
c - Restructured the code in order to create a package |
|
|
c for the MITgcmUV. |
|
|
c |
|
|
c changed: Patrick Heimbach heimbach@mit.edu 27-May-2000 |
|
|
c |
|
|
c - changed suboutine argument list: |
|
|
c dropped mycurrentiter, mycurrenttime |
|
|
c |
|
206 |
c ================================================================== |
c ================================================================== |
207 |
c SUBROUTINE adactive_write_xy |
c SUBROUTINE adactive_write_xy |
208 |
c ================================================================== |
c ================================================================== |
209 |
|
C \ev |
210 |
|
|
211 |
|
C !USES: |
212 |
implicit none |
implicit none |
213 |
|
|
214 |
c == global variables == |
c == global variables == |
|
|
|
215 |
#include "EEPARAMS.h" |
#include "EEPARAMS.h" |
216 |
#include "SIZE.h" |
#include "SIZE.h" |
217 |
|
|
218 |
c == routine arguments == |
c == routine arguments == |
219 |
|
c active_var_file: filename |
220 |
|
c adactive_var: array |
221 |
|
c irec: record number |
222 |
|
c myIter: number of optimization iteration (default: 0) |
223 |
|
c mythid: thread number for this instance |
224 |
character*(*) active_var_file |
character*(*) active_var_file |
225 |
_RL adactive_var(1-olx:snx+olx,1-oly:sny+oly,nsx,nsy) |
_RL adactive_var(1-olx:snx+olx,1-oly:sny+oly,nsx,nsy) |
226 |
integer irec |
integer irec |
227 |
integer myiter,mythid |
integer myiter,mythid |
228 |
_RL dummy |
_RL dummy |
229 |
|
|
230 |
|
C !LOCAL VARIABLES: |
231 |
c == local variables == |
c == local variables == |
|
|
|
232 |
integer mynr |
integer mynr |
233 |
integer il |
integer il |
234 |
integer ilnblnk |
integer ilnblnk |
237 |
logical globalfile |
logical globalfile |
238 |
|
|
239 |
c == functions == |
c == functions == |
|
|
|
240 |
external ilnblnk |
external ilnblnk |
241 |
|
|
242 |
c == end of interface == |
c == end of interface == |
243 |
|
CEOP |
244 |
|
|
245 |
mynr = 1 |
mynr = 1 |
246 |
adpref = 'ad' |
adpref = 'ad' |
260 |
end |
end |
261 |
|
|
262 |
|
|
263 |
|
CBOP |
264 |
|
C !ROUTINE: adactive_read_xyz |
265 |
|
C !INTERFACE: |
266 |
subroutine adactive_write_xyz( |
subroutine adactive_write_xyz( |
267 |
I active_var_file, |
I active_var_file, |
268 |
I irec, |
I irec, |
273 |
& ) |
& ) |
274 |
|
|
275 |
|
|
276 |
|
C !DESCRIPTION: \bv |
277 |
c ================================================================== |
c ================================================================== |
278 |
c SUBROUTINE adactive_write_xyz |
c SUBROUTINE adactive_write_xyz |
279 |
c ================================================================== |
c ================================================================== |
|
c |
|
280 |
c o Adjoint of active_write_xyz. |
c o Adjoint of active_write_xyz. |
|
c |
|
281 |
c started: Christian Eckert eckert@mit.edu 24-May-1999 |
c started: Christian Eckert eckert@mit.edu 24-May-1999 |
|
c |
|
|
c changed: Christian Eckert eckert@mit.edu 11-Feb-2000 |
|
|
c |
|
|
c - Restructured the code in order to create a package |
|
|
c for the MITgcmUV. |
|
|
c |
|
|
c changed: Patrick Heimbach heimbach@mit.edu 27-May-2000 |
|
|
c |
|
|
c - changed suboutine argument list: |
|
|
c dropped mycurrentiter, mycurrenttime |
|
|
c |
|
282 |
c ================================================================== |
c ================================================================== |
283 |
c SUBROUTINE adactive_write_xyz |
c SUBROUTINE adactive_write_xyz |
284 |
c ================================================================== |
c ================================================================== |
285 |
|
C \ev |
286 |
|
|
287 |
|
C !USES: |
288 |
implicit none |
implicit none |
289 |
|
|
290 |
c == global variables == |
c == global variables == |
|
|
|
291 |
#include "EEPARAMS.h" |
#include "EEPARAMS.h" |
292 |
#include "SIZE.h" |
#include "SIZE.h" |
293 |
|
|
294 |
c == routine arguments == |
c == routine arguments == |
295 |
|
c active_var_file: filename |
296 |
|
c adactive_var: array |
297 |
|
c irec: record number |
298 |
|
c myIter: number of optimization iteration (default: 0) |
299 |
|
c mythid: thread number for this instance |
300 |
character*(*) active_var_file |
character*(*) active_var_file |
301 |
_RL adactive_var(1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy) |
_RL adactive_var(1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy) |
302 |
integer irec |
integer irec |
303 |
integer myiter,mythid |
integer myiter,mythid |
304 |
_RL dummy |
_RL dummy |
305 |
|
|
306 |
|
C !LOCAL VARIABLES: |
307 |
c == local variables == |
c == local variables == |
|
|
|
308 |
integer mynr |
integer mynr |
309 |
integer il |
integer il |
310 |
integer ilnblnk |
integer ilnblnk |
313 |
logical globalfile |
logical globalfile |
314 |
|
|
315 |
c == functions == |
c == functions == |
|
|
|
316 |
external ilnblnk |
external ilnblnk |
317 |
|
|
318 |
c == end of interface == |
c == end of interface == |
319 |
|
CEOP |
320 |
|
|
321 |
mynr = nr |
mynr = nr |
322 |
adpref = 'ad' |
adpref = 'ad' |