1 |
|
C $Header$ |
2 |
|
C $Name$ |
3 |
|
|
4 |
#include "CPP_OPTIONS.h" |
#include "AUTODIFF_OPTIONS.h" |
5 |
|
|
6 |
c ================================================================== |
c ================================================================== |
7 |
c |
c |
21 |
c o active_write_xz - Write an active 2D xz-slice to a file. |
c o active_write_xz - Write an active 2D xz-slice to a file. |
22 |
c o active_write_yz - Write an active 2D yz-slice to a file. |
c o active_write_yz - Write an active 2D yz-slice to a file. |
23 |
c |
c |
|
c o active_read_tile_xy - Read an active 2D variable from file. |
|
|
c o active_read_tile_xyz - Read an active 3D variable from file. |
|
|
c |
|
|
c o active_write_tile_xy - Write an active 2D variable to a file. |
|
|
c o active_write_tile_xyz - Write an active 3D variable to a file. |
|
|
c |
|
|
c |
|
24 |
c changed: Christian Eckert eckert@mit.edu 24-Apr-2000 |
c changed: Christian Eckert eckert@mit.edu 24-Apr-2000 |
|
c |
|
25 |
c - Added routines that do active writes on tiles |
c - Added routines that do active writes on tiles |
26 |
c instead of a whole thread. |
c instead of a whole thread. |
27 |
|
c changed: heimbach@mit.edu 05-Mar-2001 |
28 |
|
c - added active file handling of xz-/yz-arrays |
29 |
c |
c |
30 |
c ================================================================== |
c ================================================================== |
31 |
|
|
32 |
|
|
33 |
|
CBOP |
34 |
|
C !ROUTINE: active_read_xy |
35 |
|
C !INTERFACE: |
36 |
subroutine active_read_xy( |
subroutine active_read_xy( |
37 |
I active_var_file, |
I active_var_file, |
38 |
O active_var, |
O active_var, |
44 |
I , dummy |
I , dummy |
45 |
& ) |
& ) |
46 |
|
|
47 |
|
C !DESCRIPTION: \bv |
48 |
c ================================================================== |
c ================================================================== |
49 |
c SUBROUTINE active_read_xy |
c SUBROUTINE active_read_xy |
50 |
c ================================================================== |
c ================================================================== |
51 |
c |
c o Read an active 2D (XY) variable from file. |
|
c o Read an active 2D variable from file. |
|
|
c |
|
52 |
c started: Christian Eckert eckert@mit.edu 30-Jun-1999 |
c started: Christian Eckert eckert@mit.edu 30-Jun-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 |
|
53 |
c ================================================================== |
c ================================================================== |
54 |
c SUBROUTINE active_read_xy |
c SUBROUTINE active_read_xy |
55 |
c ================================================================== |
c ================================================================== |
56 |
|
C \ev |
57 |
|
|
58 |
|
C !USES: |
59 |
implicit none |
implicit none |
60 |
|
|
61 |
c == global variables == |
c == global variables == |
|
|
|
62 |
#include "EEPARAMS.h" |
#include "EEPARAMS.h" |
63 |
#include "SIZE.h" |
#include "SIZE.h" |
64 |
|
|
65 |
|
C !INPUT/OUTPUT PARAMETERS: |
66 |
c == routine arguments == |
c == routine arguments == |
67 |
|
c active_var_file: filename |
68 |
|
c active_var: array |
69 |
|
c irec: record number |
70 |
|
c myOptimIter: number of optimization iteration (default: 0) |
71 |
|
c mythid: thread number for this instance |
72 |
|
c doglobalread: flag for global or local read/write |
73 |
|
c (default: .false.) |
74 |
|
c lAdInit: initialisation of corresponding adjoint |
75 |
|
c variable and write to active file |
76 |
character*(*) active_var_file |
character*(*) active_var_file |
77 |
_RL active_var(1-olx:snx+olx,1-oly:sny+oly,nsx,nsy) |
_RL active_var(1-olx:snx+olx,1-oly:sny+oly,nsx,nsy) |
78 |
integer irec |
integer irec |
82 |
logical lAdInit |
logical lAdInit |
83 |
_RL dummy |
_RL dummy |
84 |
|
|
85 |
|
C !LOCAL VARIABLES: |
86 |
c == local variables == |
c == local variables == |
|
|
|
87 |
integer mynr |
integer mynr |
88 |
|
|
89 |
c == end of interface == |
c == end of interface == |
90 |
|
CEOP |
91 |
|
|
92 |
mynr = 1 |
mynr = 1 |
93 |
call active_read_rl( active_var_file, active_var, doglobalread, |
call active_read_rl( active_var_file, active_var, doglobalread, |
99 |
|
|
100 |
c ================================================================== |
c ================================================================== |
101 |
|
|
102 |
|
CBOP |
103 |
|
C !ROUTINE: active_read_xyz |
104 |
|
C !INTERFACE: |
105 |
subroutine active_read_xyz( |
subroutine active_read_xyz( |
106 |
I active_var_file, |
I active_var_file, |
107 |
O active_var, |
O active_var, |
113 |
I , dummy |
I , dummy |
114 |
& ) |
& ) |
115 |
|
|
116 |
|
C !DESCRIPTION: \bv |
117 |
c ================================================================== |
c ================================================================== |
118 |
c SUBROUTINE active_read_xyz |
c SUBROUTINE active_read_xyz |
119 |
c ================================================================== |
c ================================================================== |
|
c |
|
120 |
c o Read an active 3D variable from file. |
c o Read an active 3D variable from file. |
|
c |
|
121 |
c started: Christian Eckert eckert@mit.edu 30-Jun-1999 |
c started: Christian Eckert eckert@mit.edu 30-Jun-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 |
|
122 |
c ================================================================== |
c ================================================================== |
123 |
c SUBROUTINE active_read_xyz |
c SUBROUTINE active_read_xyz |
124 |
c ================================================================== |
c ================================================================== |
125 |
|
C \ev |
126 |
|
|
127 |
|
C !USES: |
128 |
implicit none |
implicit none |
129 |
|
|
130 |
c == global variables == |
c == global variables == |
|
|
|
131 |
#include "EEPARAMS.h" |
#include "EEPARAMS.h" |
132 |
#include "SIZE.h" |
#include "SIZE.h" |
133 |
|
|
134 |
|
C !INPUT/OUTPUT PARAMETERS: |
135 |
c == routine arguments == |
c == routine arguments == |
136 |
|
c active_var_file: filename |
137 |
|
c active_var: array |
138 |
|
c irec: record number |
139 |
|
c myOptimIter: number of optimization iteration (default: 0) |
140 |
|
c mythid: thread number for this instance |
141 |
|
c doglobalread: flag for global or local read/write |
142 |
|
c (default: .false.) |
143 |
|
c lAdInit: initialisation of corresponding adjoint |
144 |
|
c variable and write to active file |
145 |
character*(*) active_var_file |
character*(*) active_var_file |
146 |
_RL active_var(1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy) |
_RL active_var(1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy) |
147 |
integer irec |
integer irec |
151 |
logical lAdInit |
logical lAdInit |
152 |
_RL dummy |
_RL dummy |
153 |
|
|
154 |
|
C !LOCAL VARIABLES: |
155 |
c == local variables == |
c == local variables == |
|
|
|
156 |
integer mynr |
integer mynr |
157 |
|
|
158 |
c == end of interface == |
c == end of interface == |
159 |
|
CEOP |
160 |
|
|
161 |
mynr = nr |
mynr = nr |
162 |
call active_read_rl( active_var_file, active_var, doglobalread, |
call active_read_rl( active_var_file, active_var, doglobalread, |
169 |
c ================================================================== |
c ================================================================== |
170 |
|
|
171 |
|
|
172 |
|
CBOP |
173 |
|
C !ROUTINE: active_read_xz |
174 |
|
C !INTERFACE: |
175 |
subroutine active_read_xz( |
subroutine active_read_xz( |
176 |
I active_var_file, |
I active_var_file, |
177 |
O active_var, |
O active_var, |
183 |
I , dummy |
I , dummy |
184 |
& ) |
& ) |
185 |
|
|
186 |
|
C !DESCRIPTION: \bv |
187 |
c ================================================================== |
c ================================================================== |
188 |
c SUBROUTINE active_read_xz |
c SUBROUTINE active_read_xz |
189 |
c ================================================================== |
c ================================================================== |
|
c |
|
190 |
c o Read an active 2D xz-slice from file. |
c o Read an active 2D xz-slice from file. |
|
c |
|
191 |
c started: heimbach@mit.edu 05-Mar-2001 |
c started: heimbach@mit.edu 05-Mar-2001 |
|
c |
|
192 |
c ================================================================== |
c ================================================================== |
193 |
c SUBROUTINE active_read_xz |
c SUBROUTINE active_read_xz |
194 |
c ================================================================== |
c ================================================================== |
195 |
|
C \ev |
196 |
|
|
197 |
|
C !USES: |
198 |
implicit none |
implicit none |
199 |
|
|
200 |
c == global variables == |
c == global variables == |
|
|
|
201 |
#include "EEPARAMS.h" |
#include "EEPARAMS.h" |
202 |
#include "SIZE.h" |
#include "SIZE.h" |
203 |
|
|
204 |
|
C !INPUT/OUTPUT PARAMETERS: |
205 |
c == routine arguments == |
c == routine arguments == |
206 |
|
c active_var_file: filename |
207 |
|
c active_var: array |
208 |
|
c irec: record number |
209 |
|
c myOptimIter: number of optimization iteration (default: 0) |
210 |
|
c mythid: thread number for this instance |
211 |
|
c doglobalread: flag for global or local read/write |
212 |
|
c (default: .false.) |
213 |
|
c lAdInit: initialisation of corresponding adjoint |
214 |
|
c variable and write to active file |
215 |
character*(*) active_var_file |
character*(*) active_var_file |
216 |
_RL active_var(1-olx:snx+olx,nsx,nsy) |
_RL active_var(1-olx:snx+olx,nsx,nsy) |
217 |
integer irec |
integer irec |
221 |
logical lAdInit |
logical lAdInit |
222 |
_RL dummy |
_RL dummy |
223 |
|
|
224 |
|
C !LOCAL VARIABLES: |
225 |
c == local variables == |
c == local variables == |
|
|
|
226 |
integer mynr |
integer mynr |
227 |
|
|
228 |
c == end of interface == |
c == end of interface == |
229 |
|
CEOP |
230 |
|
|
231 |
mynr = 1 |
mynr = nr |
232 |
call active_read_xz_rl( active_var_file, active_var, doglobalread, |
call active_read_xz_rl( active_var_file, active_var, doglobalread, |
233 |
& lAdInit, irec, mynr, |
& lAdInit, irec, mynr, |
234 |
& FORWARD_SIMULATION, myOptimIter, mythid) |
& FORWARD_SIMULATION, myOptimIter, mythid) |
239 |
c ================================================================== |
c ================================================================== |
240 |
|
|
241 |
|
|
242 |
subroutine active_read_yz( |
CBOP |
243 |
|
C !ROUTINE: active_read_yz |
244 |
|
C !INTERFACE: |
245 |
|
subroutine active_read_yz( |
246 |
I active_var_file, |
I active_var_file, |
247 |
O active_var, |
O active_var, |
248 |
I irec, |
I irec, |
253 |
I , dummy |
I , dummy |
254 |
& ) |
& ) |
255 |
|
|
256 |
|
C !DESCRIPTION: \bv |
257 |
c ================================================================== |
c ================================================================== |
258 |
c SUBROUTINE active_read_yz |
c SUBROUTINE active_read_yz |
259 |
c ================================================================== |
c ================================================================== |
|
c |
|
260 |
c o Read an active 2D yz-slice from file. |
c o Read an active 2D yz-slice from file. |
|
c |
|
261 |
c started: heimbach@mit.edu 05-Mar-2001 |
c started: heimbach@mit.edu 05-Mar-2001 |
|
c |
|
262 |
c ================================================================== |
c ================================================================== |
263 |
c SUBROUTINE active_read_yz |
c SUBROUTINE active_read_yz |
264 |
c ================================================================== |
c ================================================================== |
265 |
|
C \ev |
266 |
|
|
267 |
|
C !USES: |
268 |
implicit none |
implicit none |
269 |
|
|
270 |
c == global variables == |
c == global variables == |
|
|
|
271 |
#include "EEPARAMS.h" |
#include "EEPARAMS.h" |
272 |
#include "SIZE.h" |
#include "SIZE.h" |
273 |
|
|
274 |
|
C !INPUT/OUTPUT PARAMETERS: |
275 |
c == routine arguments == |
c == routine arguments == |
276 |
|
c active_var_file: filename |
277 |
|
c active_var: array |
278 |
|
c irec: record number |
279 |
|
c myOptimIter: number of optimization iteration (default: 0) |
280 |
|
c mythid: thread number for this instance |
281 |
|
c doglobalread: flag for global or local read/write |
282 |
|
c (default: .false.) |
283 |
|
c lAdInit: initialisation of corresponding adjoint |
284 |
|
c variable and write to active file |
285 |
character*(*) active_var_file |
character*(*) active_var_file |
286 |
_RL active_var(1-oly:sny+oly,nsx,nsy) |
_RL active_var(1-oly:sny+oly,nsx,nsy) |
287 |
integer irec |
integer irec |
291 |
logical lAdInit |
logical lAdInit |
292 |
_RL dummy |
_RL dummy |
293 |
|
|
294 |
|
C !LOCAL VARIABLES: |
295 |
c == local variables == |
c == local variables == |
|
|
|
296 |
integer mynr |
integer mynr |
297 |
|
|
298 |
c == end of interface == |
c == end of interface == |
299 |
|
CEOP |
300 |
|
|
301 |
mynr = 1 |
mynr = nr |
302 |
call active_read_yz_rl( active_var_file, active_var, doglobalread, |
call active_read_yz_rl( active_var_file, active_var, doglobalread, |
303 |
& lAdInit, irec, mynr, |
& lAdInit, irec, mynr, |
304 |
& FORWARD_SIMULATION, myOptimIter, mythid) |
& FORWARD_SIMULATION, myOptimIter, mythid) |
308 |
|
|
309 |
c ================================================================== |
c ================================================================== |
310 |
|
|
311 |
|
CBOP |
312 |
|
C !ROUTINE: active_write_xy |
313 |
|
C !INTERFACE: |
314 |
subroutine active_write_xy( |
subroutine active_write_xy( |
315 |
I active_var_file, |
I active_var_file, |
316 |
I active_var, |
I active_var, |
320 |
I , dummy |
I , dummy |
321 |
& ) |
& ) |
322 |
|
|
323 |
|
C !DESCRIPTION: \bv |
324 |
c ================================================================== |
c ================================================================== |
325 |
c SUBROUTINE active_write_xy |
c SUBROUTINE active_write_xy |
326 |
c ================================================================== |
c ================================================================== |
|
c |
|
327 |
c o Write an active 2D variable to a file. |
c o Write an active 2D variable to a file. |
|
c |
|
328 |
c started: Christian Eckert eckert@mit.edu 30-Jun-1999 |
c started: Christian Eckert eckert@mit.edu 30-Jun-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 |
|
329 |
c ================================================================== |
c ================================================================== |
330 |
c SUBROUTINE active_write_xy |
c SUBROUTINE active_write_xy |
331 |
c ================================================================== |
c ================================================================== |
332 |
|
C \ev |
333 |
|
|
334 |
|
C !USES: |
335 |
implicit none |
implicit none |
336 |
|
|
337 |
c == global variables == |
c == global variables == |
|
|
|
338 |
#include "EEPARAMS.h" |
#include "EEPARAMS.h" |
339 |
#include "SIZE.h" |
#include "SIZE.h" |
340 |
|
|
341 |
c == routine arguments == |
c == routine arguments == |
342 |
|
c active_var_file: filename |
343 |
|
c active_var: array |
344 |
|
c irec: record number |
345 |
|
c myOptimIter: number of optimization iteration (default: 0) |
346 |
|
c mythid: thread number for this instance |
347 |
character*(*) active_var_file |
character*(*) active_var_file |
348 |
_RL active_var(1-olx:snx+olx,1-oly:sny+oly,nsx,nsy) |
_RL active_var(1-olx:snx+olx,1-oly:sny+oly,nsx,nsy) |
349 |
integer irec |
integer irec |
351 |
integer mythid |
integer mythid |
352 |
_RL dummy |
_RL dummy |
353 |
|
|
354 |
|
C !LOCAL VARIABLES: |
355 |
c == local variables == |
c == local variables == |
|
|
|
356 |
integer mynr |
integer mynr |
357 |
logical globalfile |
logical globalfile |
358 |
|
|
359 |
c == end of interface == |
c == end of interface == |
360 |
|
CEOP |
361 |
|
|
362 |
mynr = 1 |
mynr = 1 |
363 |
globalfile = .false. |
globalfile = .false. |
371 |
|
|
372 |
c ================================================================== |
c ================================================================== |
373 |
|
|
374 |
|
CBOP |
375 |
|
C !ROUTINE: active_write_xyz |
376 |
|
C !INTERFACE: |
377 |
subroutine active_write_xyz( |
subroutine active_write_xyz( |
378 |
I active_var_file, |
I active_var_file, |
379 |
I active_var, |
I active_var, |
383 |
I , dummy |
I , dummy |
384 |
& ) |
& ) |
385 |
|
|
386 |
|
C !DESCRIPTION: \bv |
387 |
c ================================================================== |
c ================================================================== |
388 |
c SUBROUTINE active_write_xyz |
c SUBROUTINE active_write_xyz |
389 |
c ================================================================== |
c ================================================================== |
|
c |
|
390 |
c o Write an active 3D variable to a file. |
c o Write an active 3D variable to a file. |
|
c |
|
391 |
c started: Christian Eckert eckert@mit.edu 30-Jun-1999 |
c started: Christian Eckert eckert@mit.edu 30-Jun-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 |
|
392 |
c ================================================================== |
c ================================================================== |
393 |
c SUBROUTINE active_write_xyz |
c SUBROUTINE active_write_xyz |
394 |
c ================================================================== |
c ================================================================== |
395 |
|
C \ev |
396 |
|
|
397 |
|
C !USES: |
398 |
implicit none |
implicit none |
399 |
|
|
400 |
c == global variables == |
c == global variables == |
|
|
|
401 |
#include "EEPARAMS.h" |
#include "EEPARAMS.h" |
402 |
#include "SIZE.h" |
#include "SIZE.h" |
403 |
|
|
404 |
c == routine arguments == |
c == routine arguments == |
405 |
|
c active_var_file: filename |
406 |
|
c active_var: array |
407 |
|
c irec: record number |
408 |
|
c myOptimIter: number of optimization iteration (default: 0) |
409 |
|
c mythid: thread number for this instance |
410 |
character*(*) active_var_file |
character*(*) active_var_file |
411 |
_RL active_var(1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy) |
_RL active_var(1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy) |
412 |
integer irec |
integer irec |
414 |
integer mythid |
integer mythid |
415 |
_RL dummy |
_RL dummy |
416 |
|
|
417 |
|
C !LOCAL VARIABLES: |
418 |
c == local variables == |
c == local variables == |
|
|
|
419 |
integer mynr |
integer mynr |
420 |
logical globalfile |
logical globalfile |
421 |
|
|
422 |
c == end of interface == |
c == end of interface == |
423 |
|
CEOP |
424 |
|
|
425 |
mynr = nr |
mynr = nr |
426 |
globalfile = .false. |
globalfile = .false. |
433 |
|
|
434 |
c ================================================================== |
c ================================================================== |
435 |
|
|
436 |
|
CBOP |
437 |
|
C !ROUTINE: active_write_xz |
438 |
|
C !INTERFACE: |
439 |
subroutine active_write_xz( |
subroutine active_write_xz( |
440 |
I active_var_file, |
I active_var_file, |
441 |
I active_var, |
I active_var, |
445 |
I , dummy |
I , dummy |
446 |
& ) |
& ) |
447 |
|
|
448 |
|
C !DESCRIPTION: \bv |
449 |
c ================================================================== |
c ================================================================== |
450 |
c SUBROUTINE active_write_xz |
c SUBROUTINE active_write_xz |
451 |
c ================================================================== |
c ================================================================== |
|
c |
|
452 |
c o Write an active 2D xz-slice to a file. |
c o Write an active 2D xz-slice to a file. |
|
c |
|
453 |
c started: heimbach@mit.edu 05-Mar-2001 |
c started: heimbach@mit.edu 05-Mar-2001 |
|
c |
|
454 |
c ================================================================== |
c ================================================================== |
455 |
c SUBROUTINE active_write_xz |
c SUBROUTINE active_write_xz |
456 |
c ================================================================== |
c ================================================================== |
457 |
|
C \ev |
458 |
|
|
459 |
|
C !USES: |
460 |
implicit none |
implicit none |
461 |
|
|
462 |
c == global variables == |
c == global variables == |
|
|
|
463 |
#include "EEPARAMS.h" |
#include "EEPARAMS.h" |
464 |
#include "SIZE.h" |
#include "SIZE.h" |
465 |
|
|
466 |
c == routine arguments == |
c == routine arguments == |
467 |
|
c active_var_file: filename |
468 |
|
c active_var: array |
469 |
|
c irec: record number |
470 |
|
c myOptimIter: number of optimization iteration (default: 0) |
471 |
|
c mythid: thread number for this instance |
472 |
character*(*) active_var_file |
character*(*) active_var_file |
473 |
_RL active_var(1-olx:snx+olx,nsx,nsy) |
_RL active_var(1-olx:snx+olx,nsx,nsy) |
474 |
integer irec |
integer irec |
476 |
integer mythid |
integer mythid |
477 |
_RL dummy |
_RL dummy |
478 |
|
|
479 |
|
C !LOCAL VARIABLES: |
480 |
c == local variables == |
c == local variables == |
|
|
|
481 |
integer mynr |
integer mynr |
482 |
logical globalfile |
logical globalfile |
483 |
|
|
484 |
c == end of interface == |
c == end of interface == |
485 |
|
CEOP |
486 |
|
|
487 |
mynr = 1 |
mynr = nr |
488 |
globalfile = .false. |
globalfile = .false. |
489 |
|
|
490 |
call active_write_xz_rl( active_var_file, active_var, globalfile, |
call active_write_xz_rl( active_var_file, active_var, globalfile, |
496 |
|
|
497 |
c ================================================================== |
c ================================================================== |
498 |
|
|
499 |
|
CBOP |
500 |
|
C !ROUTINE: active_write_yz |
501 |
|
C !INTERFACE: |
502 |
subroutine active_write_yz( |
subroutine active_write_yz( |
503 |
I active_var_file, |
I active_var_file, |
504 |
I active_var, |
I active_var, |
508 |
I , dummy |
I , dummy |
509 |
& ) |
& ) |
510 |
|
|
511 |
|
C !DESCRIPTION: \bv |
512 |
c ================================================================== |
c ================================================================== |
513 |
c SUBROUTINE active_write_yz |
c SUBROUTINE active_write_yz |
514 |
c ================================================================== |
c ================================================================== |
|
c |
|
515 |
c o Write an active 2D variable to a file. |
c o Write an active 2D variable to a file. |
|
c |
|
516 |
c started: heimbach@mit.edu 05-Mar-2001 |
c started: heimbach@mit.edu 05-Mar-2001 |
|
c |
|
517 |
c ================================================================== |
c ================================================================== |
518 |
c SUBROUTINE active_write_yz |
c SUBROUTINE active_write_yz |
519 |
c ================================================================== |
c ================================================================== |
520 |
|
C \ev |
521 |
|
|
522 |
|
C !USES: |
523 |
implicit none |
implicit none |
524 |
|
|
525 |
c == global variables == |
c == global variables == |
|
|
|
526 |
#include "EEPARAMS.h" |
#include "EEPARAMS.h" |
527 |
#include "SIZE.h" |
#include "SIZE.h" |
528 |
|
|
529 |
c == routine arguments == |
c == routine arguments == |
530 |
|
c active_var_file: filename |
531 |
|
c active_var: array |
532 |
|
c irec: record number |
533 |
|
c myOptimIter: number of optimization iteration (default: 0) |
534 |
|
c mythid: thread number for this instance |
535 |
character*(*) active_var_file |
character*(*) active_var_file |
536 |
_RL active_var(1-oly:sny+oly,nsx,nsy) |
_RL active_var(1-oly:sny+oly,nsx,nsy) |
537 |
integer irec |
integer irec |
539 |
integer mythid |
integer mythid |
540 |
_RL dummy |
_RL dummy |
541 |
|
|
542 |
|
C !LOCAL VARIABLES: |
543 |
c == local variables == |
c == local variables == |
|
|
|
544 |
integer mynr |
integer mynr |
545 |
logical globalfile |
logical globalfile |
546 |
|
|
547 |
c == end of interface == |
c == end of interface == |
548 |
|
CEOP |
549 |
|
|
550 |
mynr = 1 |
mynr = nr |
551 |
globalfile = .false. |
globalfile = .false. |
552 |
|
|
553 |
call active_write_yz_rl( active_var_file, active_var, globalfile, |
call active_write_yz_rl( active_var_file, active_var, globalfile, |
556 |
|
|
557 |
return |
return |
558 |
end |
end |
|
|
|
|
c ================================================================== |
|
|
|
|
|
subroutine active_read_tile_xy( |
|
|
I active_var_file, |
|
|
O active_var, |
|
|
I irec, |
|
|
I doglobalread, |
|
|
I bi, |
|
|
I bj, |
|
|
I lAdInit, |
|
|
I myOptimIter, |
|
|
I mythid |
|
|
& ) |
|
|
|
|
|
c ================================================================== |
|
|
c SUBROUTINE active_read_tile_xy |
|
|
c ================================================================== |
|
|
c |
|
|
c o Read an active 2D variable from file. |
|
|
c |
|
|
c started: Christian Eckert eckert@mit.edu 30-Jun-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 |
|
|
c changed: Christian Eckert eckert@mit.edu 24-Apr-2000 |
|
|
c |
|
|
c - Added routines that do active writes on tiles |
|
|
c instead of a whole thread. |
|
|
c |
|
|
c ================================================================== |
|
|
c SUBROUTINE active_read_tile_xy |
|
|
c ================================================================== |
|
|
|
|
|
implicit none |
|
|
|
|
|
c == global variables == |
|
|
|
|
|
#include "EEPARAMS.h" |
|
|
#include "SIZE.h" |
|
|
|
|
|
c == routine arguments == |
|
|
|
|
|
character*(*) active_var_file |
|
|
_RL active_var(1-olx:snx+olx,1-oly:sny+oly) |
|
|
integer irec |
|
|
integer myOptimIter |
|
|
integer mythid |
|
|
integer bi |
|
|
integer bj |
|
|
logical doglobalread |
|
|
logical lAdInit |
|
|
|
|
|
c == local variables == |
|
|
|
|
|
integer mynr |
|
|
|
|
|
c == end of interface == |
|
|
|
|
|
mynr = 1 |
|
|
call active_read_tile_rl( |
|
|
I active_var_file, |
|
|
I active_var, |
|
|
I doglobalread, |
|
|
I lAdInit, |
|
|
I irec, |
|
|
I mynr, |
|
|
I bi, |
|
|
I bj, |
|
|
I FORWARD_SIMULATION, |
|
|
I myOptimIter, |
|
|
I mythid |
|
|
& ) |
|
|
|
|
|
return |
|
|
end |
|
|
|
|
|
|
|
|
subroutine active_read_tile_xyz( |
|
|
I active_var_file, |
|
|
O active_var, |
|
|
I irec, |
|
|
I doglobalread, |
|
|
I bi, |
|
|
I bj, |
|
|
I lAdInit, |
|
|
I myOptimIter, |
|
|
I mythid |
|
|
& ) |
|
|
|
|
|
c ================================================================== |
|
|
c SUBROUTINE active_read_tile_xyz |
|
|
c ================================================================== |
|
|
c |
|
|
c o Read an active 3D variable from file. |
|
|
c |
|
|
c started: Christian Eckert eckert@mit.edu 30-Jun-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 |
|
|
c changed: Christian Eckert eckert@mit.edu 24-Apr-2000 |
|
|
c |
|
|
c - Added routines that do active writes on tiles |
|
|
c instead of a whole thread. |
|
|
c |
|
|
c ================================================================== |
|
|
c SUBROUTINE active_read_tile_xyz |
|
|
c ================================================================== |
|
|
|
|
|
implicit none |
|
|
|
|
|
c == global variables == |
|
|
|
|
|
#include "EEPARAMS.h" |
|
|
#include "SIZE.h" |
|
|
|
|
|
c == routine arguments == |
|
|
|
|
|
character*(*) active_var_file |
|
|
_RL active_var(1-olx:snx+olx,1-oly:sny+oly,nr) |
|
|
integer irec |
|
|
integer myOptimIter |
|
|
integer mythid |
|
|
logical doglobalread |
|
|
integer bi |
|
|
integer bj |
|
|
logical lAdInit |
|
|
|
|
|
c == local variables == |
|
|
|
|
|
integer mynr |
|
|
|
|
|
c == end of interface == |
|
|
|
|
|
mynr = nr |
|
|
|
|
|
call active_read_tile_rl( |
|
|
I active_var_file, |
|
|
I active_var, |
|
|
I doglobalread, |
|
|
I lAdInit, |
|
|
I irec, |
|
|
I mynr, |
|
|
I bi, |
|
|
I bj, |
|
|
I FORWARD_SIMULATION, |
|
|
I myOptimIter, |
|
|
I mythid |
|
|
& ) |
|
|
|
|
|
return |
|
|
end |
|
|
|
|
|
|
|
|
subroutine active_write_tile_xy( |
|
|
I active_var_file, |
|
|
I active_var, |
|
|
I irec, |
|
|
I bi, |
|
|
I bj, |
|
|
I myOptimIter, |
|
|
I mythid |
|
|
& ) |
|
|
|
|
|
c ================================================================== |
|
|
c SUBROUTINE active_write_tile_xy |
|
|
c ================================================================== |
|
|
c |
|
|
c o Write an active 2D variable to a file. |
|
|
c |
|
|
c started: Christian Eckert eckert@mit.edu 30-Jun-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 |
|
|
c changed: Christian Eckert eckert@mit.edu 24-Apr-2000 |
|
|
c |
|
|
c - Added routines that do active writes on tiles |
|
|
c instead of a whole thread. |
|
|
c |
|
|
c ================================================================== |
|
|
c SUBROUTINE active_write_tile_xy |
|
|
c ================================================================== |
|
|
|
|
|
implicit none |
|
|
|
|
|
c == global variables == |
|
|
|
|
|
#include "EEPARAMS.h" |
|
|
#include "SIZE.h" |
|
|
|
|
|
c == routine arguments == |
|
|
|
|
|
character*(*) active_var_file |
|
|
_RL active_var(1-olx:snx+olx,1-oly:sny+oly) |
|
|
integer irec |
|
|
integer bi |
|
|
integer bj |
|
|
integer myOptimIter |
|
|
integer mythid |
|
|
|
|
|
c == local variables == |
|
|
|
|
|
integer mynr |
|
|
logical globalfile |
|
|
|
|
|
c == end of interface == |
|
|
|
|
|
mynr = 1 |
|
|
globalfile = .false. |
|
|
|
|
|
call active_write_tile_rl( |
|
|
I active_var_file, |
|
|
I active_var, |
|
|
I globalfile, |
|
|
I irec, |
|
|
I mynr, |
|
|
I bi, |
|
|
I bj, |
|
|
I FORWARD_SIMULATION, |
|
|
I myOptimIter, |
|
|
I mythid |
|
|
& ) |
|
|
|
|
|
return |
|
|
end |
|
|
|
|
|
|
|
|
subroutine active_write_tile_xyz( |
|
|
I active_var_file, |
|
|
I active_var, |
|
|
I irec, |
|
|
I bi, |
|
|
I bj, |
|
|
I myOptimIter, |
|
|
I mythid |
|
|
& ) |
|
|
|
|
|
c ================================================================== |
|
|
c SUBROUTINE active_write_tile_xyz |
|
|
c ================================================================== |
|
|
c |
|
|
c o Write an active 3D variable to a file. |
|
|
c |
|
|
c started: Christian Eckert eckert@mit.edu 30-Jun-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 |
|
|
c changed: Christian Eckert eckert@mit.edu 24-Apr-2000 |
|
|
c |
|
|
c - Added routines that do active writes on tiles |
|
|
c instead of a whole thread. |
|
|
c |
|
|
c ================================================================== |
|
|
c SUBROUTINE active_write_tile_xyz |
|
|
c ================================================================== |
|
|
|
|
|
implicit none |
|
|
|
|
|
c == global variables == |
|
|
|
|
|
#include "EEPARAMS.h" |
|
|
#include "SIZE.h" |
|
|
|
|
|
c == routine arguments == |
|
|
|
|
|
character*(*) active_var_file |
|
|
_RL active_var(1-olx:snx+olx,1-oly:sny+oly,nr) |
|
|
integer irec |
|
|
integer bi |
|
|
integer bj |
|
|
integer myOptimIter |
|
|
integer mythid |
|
|
|
|
|
c == local variables == |
|
|
|
|
|
integer mynr |
|
|
logical globalfile |
|
|
|
|
|
c == end of interface == |
|
|
|
|
|
mynr = nr |
|
|
globalfile = .false. |
|
|
call active_write_tile_rl( |
|
|
I active_var_file, |
|
|
I active_var, |
|
|
I globalfile, |
|
|
I irec, |
|
|
I mynr, |
|
|
I bi, |
|
|
I bj, |
|
|
I FORWARD_SIMULATION, |
|
|
I myOptimIter, |
|
|
I mythid |
|
|
& ) |
|
|
|
|
|
return |
|
|
end |
|