1 |
C $Header: $ |
2 |
C $Name: $ |
3 |
|
4 |
#include "AUTODIFF_OPTIONS.h" |
5 |
|
6 |
c ================================================================== |
7 |
c |
8 |
c active_file.F: Routines to handle the I/O of the active file for |
9 |
c the adjoint calculations. All files are direct |
10 |
c access files. |
11 |
c |
12 |
c Routines |
13 |
c |
14 |
c o active_read_xy - Read an active 2D variable from file. |
15 |
c o active_read_xyz - Read an active 3D variable from file. |
16 |
c o active_read_xz - Read an active 2D xz-slice from file. |
17 |
c o active_read_yz - Read an active 2D yz-slice from file. |
18 |
c |
19 |
c o active_write_xy - Write an active 2D variable to a file. |
20 |
c o active_write_xyz - Write an active 3D variable to a file. |
21 |
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. |
23 |
c |
24 |
c o active_read_tile_xy - Read an active 2D variable from file. |
25 |
c o active_read_tile_xyz - Read an active 3D variable from file. |
26 |
c |
27 |
c o active_write_tile_xy - Write an active 2D variable to a file. |
28 |
c o active_write_tile_xyz - Write an active 3D variable to a file. |
29 |
c |
30 |
c changed: Christian Eckert eckert@mit.edu 24-Apr-2000 |
31 |
c - Added routines that do active writes on tiles |
32 |
c instead of a whole thread. |
33 |
c changed: heimbach@mit.edu 05-Mar-2001 |
34 |
c - added active file handling of xz-/yz-arrays |
35 |
c |
36 |
c ================================================================== |
37 |
|
38 |
|
39 |
CBOP |
40 |
C !ROUTINE: active_read_xy |
41 |
C !INTERFACE: |
42 |
subroutine active_read_xy( |
43 |
I active_var_file, |
44 |
O active_var, |
45 |
I irec, |
46 |
I doglobalread, |
47 |
I lAdInit, |
48 |
I myOptimIter, |
49 |
I mythid |
50 |
I , dummy |
51 |
& ) |
52 |
|
53 |
C !DESCRIPTION: \bv |
54 |
c ================================================================== |
55 |
c SUBROUTINE active_read_xy |
56 |
c ================================================================== |
57 |
c o Read an active 2D (XY) variable from file. |
58 |
c started: Christian Eckert eckert@mit.edu 30-Jun-1999 |
59 |
c ================================================================== |
60 |
c SUBROUTINE active_read_xy |
61 |
c ================================================================== |
62 |
C \ev |
63 |
|
64 |
C !USES: |
65 |
implicit none |
66 |
|
67 |
c == global variables == |
68 |
#include "EEPARAMS.h" |
69 |
#include "SIZE.h" |
70 |
|
71 |
C !INPUT/OUTPUT PARAMETERS: |
72 |
c == routine arguments == |
73 |
c active_var_file: filename |
74 |
c active_var: array |
75 |
c irec: record number |
76 |
c myOptimIter: number of optimization iteration (default: 0) |
77 |
c mythid: thread number for this instance |
78 |
c doglobalread: flag for global or local read/write |
79 |
c (default: .false.) |
80 |
c lAdInit: initialisation of corresponding adjoint |
81 |
c variable and write to active file |
82 |
character*(*) active_var_file |
83 |
_RL active_var(1-olx:snx+olx,1-oly:sny+oly,nsx,nsy) |
84 |
integer irec |
85 |
integer myOptimIter |
86 |
integer mythid |
87 |
logical doglobalread |
88 |
logical lAdInit |
89 |
_RL dummy |
90 |
|
91 |
C !LOCAL VARIABLES: |
92 |
c == local variables == |
93 |
integer mynr |
94 |
|
95 |
c == end of interface == |
96 |
CEOP |
97 |
|
98 |
mynr = 1 |
99 |
call active_read_rl( active_var_file, active_var, doglobalread, |
100 |
& lAdInit, irec, mynr, |
101 |
& FORWARD_SIMULATION, myOptimIter, mythid) |
102 |
|
103 |
return |
104 |
end |
105 |
|
106 |
c ================================================================== |
107 |
|
108 |
CBOP |
109 |
C !ROUTINE: active_read_xyz |
110 |
C !INTERFACE: |
111 |
subroutine active_read_xyz( |
112 |
I active_var_file, |
113 |
O active_var, |
114 |
I irec, |
115 |
I doglobalread, |
116 |
I lAdInit, |
117 |
I myOptimIter, |
118 |
I mythid |
119 |
I , dummy |
120 |
& ) |
121 |
|
122 |
C !DESCRIPTION: \bv |
123 |
c ================================================================== |
124 |
c SUBROUTINE active_read_xyz |
125 |
c ================================================================== |
126 |
c o Read an active 3D variable from file. |
127 |
c started: Christian Eckert eckert@mit.edu 30-Jun-1999 |
128 |
c ================================================================== |
129 |
c SUBROUTINE active_read_xyz |
130 |
c ================================================================== |
131 |
C \ev |
132 |
|
133 |
C !USES: |
134 |
implicit none |
135 |
|
136 |
c == global variables == |
137 |
#include "EEPARAMS.h" |
138 |
#include "SIZE.h" |
139 |
|
140 |
C !INPUT/OUTPUT PARAMETERS: |
141 |
c == routine arguments == |
142 |
c active_var_file: filename |
143 |
c active_var: array |
144 |
c irec: record number |
145 |
c myOptimIter: 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 |
152 |
_RL active_var(1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy) |
153 |
integer irec |
154 |
integer myOptimIter |
155 |
integer mythid |
156 |
logical doglobalread |
157 |
logical lAdInit |
158 |
_RL dummy |
159 |
|
160 |
C !LOCAL VARIABLES: |
161 |
c == local variables == |
162 |
integer mynr |
163 |
|
164 |
c == end of interface == |
165 |
CEOP |
166 |
|
167 |
mynr = nr |
168 |
call active_read_rl( active_var_file, active_var, doglobalread, |
169 |
& lAdInit, irec, mynr, |
170 |
& FORWARD_SIMULATION, myOptimIter, mythid) |
171 |
|
172 |
return |
173 |
end |
174 |
|
175 |
c ================================================================== |
176 |
|
177 |
|
178 |
CBOP |
179 |
C !ROUTINE: active_read_xz |
180 |
C !INTERFACE: |
181 |
subroutine active_read_xz( |
182 |
I active_var_file, |
183 |
O active_var, |
184 |
I irec, |
185 |
I doglobalread, |
186 |
I lAdInit, |
187 |
I myOptimIter, |
188 |
I mythid |
189 |
I , dummy |
190 |
& ) |
191 |
|
192 |
C !DESCRIPTION: \bv |
193 |
c ================================================================== |
194 |
c SUBROUTINE active_read_xz |
195 |
c ================================================================== |
196 |
c o Read an active 2D xz-slice from file. |
197 |
c started: heimbach@mit.edu 05-Mar-2001 |
198 |
c ================================================================== |
199 |
c SUBROUTINE active_read_xz |
200 |
c ================================================================== |
201 |
C \ev |
202 |
|
203 |
C !USES: |
204 |
implicit none |
205 |
|
206 |
c == global variables == |
207 |
#include "EEPARAMS.h" |
208 |
#include "SIZE.h" |
209 |
|
210 |
C !INPUT/OUTPUT PARAMETERS: |
211 |
c == routine arguments == |
212 |
c active_var_file: filename |
213 |
c active_var: array |
214 |
c irec: record number |
215 |
c myOptimIter: number of optimization iteration (default: 0) |
216 |
c mythid: thread number for this instance |
217 |
c doglobalread: flag for global or local read/write |
218 |
c (default: .false.) |
219 |
c lAdInit: initialisation of corresponding adjoint |
220 |
c variable and write to active file |
221 |
character*(*) active_var_file |
222 |
_RL active_var(1-olx:snx+olx,nsx,nsy) |
223 |
integer irec |
224 |
integer myOptimIter |
225 |
integer mythid |
226 |
logical doglobalread |
227 |
logical lAdInit |
228 |
_RL dummy |
229 |
|
230 |
C !LOCAL VARIABLES: |
231 |
c == local variables == |
232 |
integer mynr |
233 |
|
234 |
c == end of interface == |
235 |
CEOP |
236 |
|
237 |
mynr = nr |
238 |
call active_read_xz_rl( active_var_file, active_var, doglobalread, |
239 |
& lAdInit, irec, mynr, |
240 |
& FORWARD_SIMULATION, myOptimIter, mythid) |
241 |
|
242 |
return |
243 |
end |
244 |
|
245 |
c ================================================================== |
246 |
|
247 |
|
248 |
CBOP |
249 |
C !ROUTINE: active_read_yz |
250 |
C !INTERFACE: |
251 |
subroutine active_read_yz( |
252 |
I active_var_file, |
253 |
O active_var, |
254 |
I irec, |
255 |
I doglobalread, |
256 |
I lAdInit, |
257 |
I myOptimIter, |
258 |
I mythid |
259 |
I , dummy |
260 |
& ) |
261 |
|
262 |
C !DESCRIPTION: \bv |
263 |
c ================================================================== |
264 |
c SUBROUTINE active_read_yz |
265 |
c ================================================================== |
266 |
c o Read an active 2D yz-slice from file. |
267 |
c started: heimbach@mit.edu 05-Mar-2001 |
268 |
c ================================================================== |
269 |
c SUBROUTINE active_read_yz |
270 |
c ================================================================== |
271 |
C \ev |
272 |
|
273 |
C !USES: |
274 |
implicit none |
275 |
|
276 |
c == global variables == |
277 |
#include "EEPARAMS.h" |
278 |
#include "SIZE.h" |
279 |
|
280 |
C !INPUT/OUTPUT PARAMETERS: |
281 |
c == routine arguments == |
282 |
c active_var_file: filename |
283 |
c active_var: array |
284 |
c irec: record number |
285 |
c myOptimIter: number of optimization iteration (default: 0) |
286 |
c mythid: thread number for this instance |
287 |
c doglobalread: flag for global or local read/write |
288 |
c (default: .false.) |
289 |
c lAdInit: initialisation of corresponding adjoint |
290 |
c variable and write to active file |
291 |
character*(*) active_var_file |
292 |
_RL active_var(1-oly:sny+oly,nsx,nsy) |
293 |
integer irec |
294 |
integer myOptimIter |
295 |
integer mythid |
296 |
logical doglobalread |
297 |
logical lAdInit |
298 |
_RL dummy |
299 |
|
300 |
C !LOCAL VARIABLES: |
301 |
c == local variables == |
302 |
integer mynr |
303 |
|
304 |
c == end of interface == |
305 |
CEOP |
306 |
|
307 |
mynr = nr |
308 |
call active_read_yz_rl( active_var_file, active_var, doglobalread, |
309 |
& lAdInit, irec, mynr, |
310 |
& FORWARD_SIMULATION, myOptimIter, mythid) |
311 |
|
312 |
return |
313 |
end |
314 |
|
315 |
c ================================================================== |
316 |
|
317 |
CBOP |
318 |
C !ROUTINE: active_write_xy |
319 |
C !INTERFACE: |
320 |
subroutine active_write_xy( |
321 |
I active_var_file, |
322 |
I active_var, |
323 |
I irec, |
324 |
I myOptimIter, |
325 |
I mythid |
326 |
I , dummy |
327 |
& ) |
328 |
|
329 |
C !DESCRIPTION: \bv |
330 |
c ================================================================== |
331 |
c SUBROUTINE active_write_xy |
332 |
c ================================================================== |
333 |
c o Write an active 2D variable to a file. |
334 |
c started: Christian Eckert eckert@mit.edu 30-Jun-1999 |
335 |
c ================================================================== |
336 |
c SUBROUTINE active_write_xy |
337 |
c ================================================================== |
338 |
C \ev |
339 |
|
340 |
C !USES: |
341 |
implicit none |
342 |
|
343 |
c == global variables == |
344 |
#include "EEPARAMS.h" |
345 |
#include "SIZE.h" |
346 |
|
347 |
c == routine arguments == |
348 |
c active_var_file: filename |
349 |
c active_var: array |
350 |
c irec: record number |
351 |
c myOptimIter: number of optimization iteration (default: 0) |
352 |
c mythid: thread number for this instance |
353 |
character*(*) active_var_file |
354 |
_RL active_var(1-olx:snx+olx,1-oly:sny+oly,nsx,nsy) |
355 |
integer irec |
356 |
integer myOptimIter |
357 |
integer mythid |
358 |
_RL dummy |
359 |
|
360 |
C !LOCAL VARIABLES: |
361 |
c == local variables == |
362 |
integer mynr |
363 |
logical globalfile |
364 |
|
365 |
c == end of interface == |
366 |
CEOP |
367 |
|
368 |
mynr = 1 |
369 |
globalfile = .false. |
370 |
|
371 |
call active_write_rl( active_var_file, active_var, globalfile, |
372 |
& irec, mynr, |
373 |
& FORWARD_SIMULATION, myOptimIter, mythid ) |
374 |
|
375 |
return |
376 |
end |
377 |
|
378 |
c ================================================================== |
379 |
|
380 |
CBOP |
381 |
C !ROUTINE: active_write_xyz |
382 |
C !INTERFACE: |
383 |
subroutine active_write_xyz( |
384 |
I active_var_file, |
385 |
I active_var, |
386 |
I irec, |
387 |
I myOptimIter, |
388 |
I mythid |
389 |
I , dummy |
390 |
& ) |
391 |
|
392 |
C !DESCRIPTION: \bv |
393 |
c ================================================================== |
394 |
c SUBROUTINE active_write_xyz |
395 |
c ================================================================== |
396 |
c o Write an active 3D variable to a file. |
397 |
c started: Christian Eckert eckert@mit.edu 30-Jun-1999 |
398 |
c ================================================================== |
399 |
c SUBROUTINE active_write_xyz |
400 |
c ================================================================== |
401 |
C \ev |
402 |
|
403 |
C !USES: |
404 |
implicit none |
405 |
|
406 |
c == global variables == |
407 |
#include "EEPARAMS.h" |
408 |
#include "SIZE.h" |
409 |
|
410 |
c == routine arguments == |
411 |
c active_var_file: filename |
412 |
c active_var: array |
413 |
c irec: record number |
414 |
c myOptimIter: number of optimization iteration (default: 0) |
415 |
c mythid: thread number for this instance |
416 |
character*(*) active_var_file |
417 |
_RL active_var(1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy) |
418 |
integer irec |
419 |
integer myOptimIter |
420 |
integer mythid |
421 |
_RL dummy |
422 |
|
423 |
C !LOCAL VARIABLES: |
424 |
c == local variables == |
425 |
integer mynr |
426 |
logical globalfile |
427 |
|
428 |
c == end of interface == |
429 |
CEOP |
430 |
|
431 |
mynr = nr |
432 |
globalfile = .false. |
433 |
call active_write_rl(active_var_file, active_var, globalfile, |
434 |
& irec, mynr, |
435 |
& FORWARD_SIMULATION, myOptimIter, mythid) |
436 |
|
437 |
return |
438 |
end |
439 |
|
440 |
c ================================================================== |
441 |
|
442 |
CBOP |
443 |
C !ROUTINE: active_write_xz |
444 |
C !INTERFACE: |
445 |
subroutine active_write_xz( |
446 |
I active_var_file, |
447 |
I active_var, |
448 |
I irec, |
449 |
I myOptimIter, |
450 |
I mythid |
451 |
I , dummy |
452 |
& ) |
453 |
|
454 |
C !DESCRIPTION: \bv |
455 |
c ================================================================== |
456 |
c SUBROUTINE active_write_xz |
457 |
c ================================================================== |
458 |
c o Write an active 2D xz-slice to a file. |
459 |
c started: heimbach@mit.edu 05-Mar-2001 |
460 |
c ================================================================== |
461 |
c SUBROUTINE active_write_xz |
462 |
c ================================================================== |
463 |
C \ev |
464 |
|
465 |
C !USES: |
466 |
implicit none |
467 |
|
468 |
c == global variables == |
469 |
#include "EEPARAMS.h" |
470 |
#include "SIZE.h" |
471 |
|
472 |
c == routine arguments == |
473 |
c active_var_file: filename |
474 |
c active_var: array |
475 |
c irec: record number |
476 |
c myOptimIter: number of optimization iteration (default: 0) |
477 |
c mythid: thread number for this instance |
478 |
character*(*) active_var_file |
479 |
_RL active_var(1-olx:snx+olx,nsx,nsy) |
480 |
integer irec |
481 |
integer myOptimIter |
482 |
integer mythid |
483 |
_RL dummy |
484 |
|
485 |
C !LOCAL VARIABLES: |
486 |
c == local variables == |
487 |
integer mynr |
488 |
logical globalfile |
489 |
|
490 |
c == end of interface == |
491 |
CEOP |
492 |
|
493 |
mynr = nr |
494 |
globalfile = .false. |
495 |
|
496 |
call active_write_xz_rl( active_var_file, active_var, globalfile, |
497 |
& irec, mynr, |
498 |
& FORWARD_SIMULATION, myOptimIter, mythid ) |
499 |
|
500 |
return |
501 |
end |
502 |
|
503 |
c ================================================================== |
504 |
|
505 |
CBOP |
506 |
C !ROUTINE: active_write_yz |
507 |
C !INTERFACE: |
508 |
subroutine active_write_yz( |
509 |
I active_var_file, |
510 |
I active_var, |
511 |
I irec, |
512 |
I myOptimIter, |
513 |
I mythid |
514 |
I , dummy |
515 |
& ) |
516 |
|
517 |
C !DESCRIPTION: \bv |
518 |
c ================================================================== |
519 |
c SUBROUTINE active_write_yz |
520 |
c ================================================================== |
521 |
c o Write an active 2D variable to a file. |
522 |
c started: heimbach@mit.edu 05-Mar-2001 |
523 |
c ================================================================== |
524 |
c SUBROUTINE active_write_yz |
525 |
c ================================================================== |
526 |
C \ev |
527 |
|
528 |
C !USES: |
529 |
implicit none |
530 |
|
531 |
c == global variables == |
532 |
#include "EEPARAMS.h" |
533 |
#include "SIZE.h" |
534 |
|
535 |
c == routine arguments == |
536 |
c active_var_file: filename |
537 |
c active_var: array |
538 |
c irec: record number |
539 |
c myOptimIter: number of optimization iteration (default: 0) |
540 |
c mythid: thread number for this instance |
541 |
character*(*) active_var_file |
542 |
_RL active_var(1-oly:sny+oly,nsx,nsy) |
543 |
integer irec |
544 |
integer myOptimIter |
545 |
integer mythid |
546 |
_RL dummy |
547 |
|
548 |
C !LOCAL VARIABLES: |
549 |
c == local variables == |
550 |
integer mynr |
551 |
logical globalfile |
552 |
|
553 |
c == end of interface == |
554 |
CEOP |
555 |
|
556 |
mynr = nr |
557 |
globalfile = .false. |
558 |
|
559 |
call active_write_yz_rl( active_var_file, active_var, globalfile, |
560 |
& irec, mynr, |
561 |
& FORWARD_SIMULATION, myOptimIter, mythid ) |
562 |
|
563 |
return |
564 |
end |
565 |
|
566 |
c ================================================================== |
567 |
|
568 |
subroutine active_read_tile_xy( |
569 |
I active_var_file, |
570 |
O active_var, |
571 |
I irec, |
572 |
I doglobalread, |
573 |
I bi, |
574 |
I bj, |
575 |
I lAdInit, |
576 |
I myOptimIter, |
577 |
I mythid |
578 |
& ) |
579 |
|
580 |
c ================================================================== |
581 |
c SUBROUTINE active_read_tile_xy |
582 |
c ================================================================== |
583 |
c |
584 |
c o Read an active 2D variable from file. |
585 |
c |
586 |
c started: Christian Eckert eckert@mit.edu 30-Jun-1999 |
587 |
c |
588 |
c changed: Christian Eckert eckert@mit.edu 11-Feb-2000 |
589 |
c |
590 |
c - Restructured the code in order to create a package |
591 |
c for the MITgcmUV.c |
592 |
c |
593 |
c changed: Christian Eckert eckert@mit.edu 24-Apr-2000 |
594 |
c |
595 |
c - Added routines that do active writes on tiles |
596 |
c instead of a whole thread. |
597 |
c |
598 |
c ================================================================== |
599 |
c SUBROUTINE active_read_tile_xy |
600 |
c ================================================================== |
601 |
|
602 |
implicit none |
603 |
|
604 |
c == global variables == |
605 |
|
606 |
#include "EEPARAMS.h" |
607 |
#include "SIZE.h" |
608 |
|
609 |
c == routine arguments == |
610 |
|
611 |
character*(*) active_var_file |
612 |
_RL active_var(1-olx:snx+olx,1-oly:sny+oly) |
613 |
integer irec |
614 |
integer myOptimIter |
615 |
integer mythid |
616 |
integer bi |
617 |
integer bj |
618 |
logical doglobalread |
619 |
logical lAdInit |
620 |
|
621 |
c == local variables == |
622 |
|
623 |
integer mynr |
624 |
|
625 |
c == end of interface == |
626 |
|
627 |
mynr = 1 |
628 |
call active_read_tile_rl( |
629 |
I active_var_file, |
630 |
I active_var, |
631 |
I doglobalread, |
632 |
I lAdInit, |
633 |
I irec, |
634 |
I mynr, |
635 |
I bi, |
636 |
I bj, |
637 |
I FORWARD_SIMULATION, |
638 |
I myOptimIter, |
639 |
I mythid |
640 |
& ) |
641 |
|
642 |
return |
643 |
end |
644 |
|
645 |
|
646 |
subroutine active_read_tile_xyz( |
647 |
I active_var_file, |
648 |
O active_var, |
649 |
I irec, |
650 |
I doglobalread, |
651 |
I bi, |
652 |
I bj, |
653 |
I lAdInit, |
654 |
I myOptimIter, |
655 |
I mythid |
656 |
& ) |
657 |
|
658 |
c ================================================================== |
659 |
c SUBROUTINE active_read_tile_xyz |
660 |
c ================================================================== |
661 |
c |
662 |
c o Read an active 3D variable from file. |
663 |
c |
664 |
c started: Christian Eckert eckert@mit.edu 30-Jun-1999 |
665 |
c |
666 |
c changed: Christian Eckert eckert@mit.edu 11-Feb-2000 |
667 |
c |
668 |
c - Restructured the code in order to create a package |
669 |
c for the MITgcmUV.c |
670 |
c |
671 |
c changed: Christian Eckert eckert@mit.edu 24-Apr-2000 |
672 |
c |
673 |
c - Added routines that do active writes on tiles |
674 |
c instead of a whole thread. |
675 |
c |
676 |
c ================================================================== |
677 |
c SUBROUTINE active_read_tile_xyz |
678 |
c ================================================================== |
679 |
|
680 |
implicit none |
681 |
|
682 |
c == global variables == |
683 |
|
684 |
#include "EEPARAMS.h" |
685 |
#include "SIZE.h" |
686 |
|
687 |
c == routine arguments == |
688 |
|
689 |
character*(*) active_var_file |
690 |
_RL active_var(1-olx:snx+olx,1-oly:sny+oly,nr) |
691 |
integer irec |
692 |
integer myOptimIter |
693 |
integer mythid |
694 |
logical doglobalread |
695 |
integer bi |
696 |
integer bj |
697 |
logical lAdInit |
698 |
|
699 |
c == local variables == |
700 |
|
701 |
integer mynr |
702 |
|
703 |
c == end of interface == |
704 |
|
705 |
mynr = nr |
706 |
|
707 |
call active_read_tile_rl( |
708 |
I active_var_file, |
709 |
I active_var, |
710 |
I doglobalread, |
711 |
I lAdInit, |
712 |
I irec, |
713 |
I mynr, |
714 |
I bi, |
715 |
I bj, |
716 |
I FORWARD_SIMULATION, |
717 |
I myOptimIter, |
718 |
I mythid |
719 |
& ) |
720 |
|
721 |
return |
722 |
end |
723 |
|
724 |
|
725 |
subroutine active_write_tile_xy( |
726 |
I active_var_file, |
727 |
I active_var, |
728 |
I irec, |
729 |
I bi, |
730 |
I bj, |
731 |
I myOptimIter, |
732 |
I mythid |
733 |
& ) |
734 |
|
735 |
c ================================================================== |
736 |
c SUBROUTINE active_write_tile_xy |
737 |
c ================================================================== |
738 |
c |
739 |
c o Write an active 2D variable to a file. |
740 |
c |
741 |
c started: Christian Eckert eckert@mit.edu 30-Jun-1999 |
742 |
c |
743 |
c changed: Christian Eckert eckert@mit.edu 11-Feb-2000 |
744 |
c |
745 |
c - Restructured the code in order to create a package |
746 |
c for the MITgcmUV.c |
747 |
c |
748 |
c changed: Christian Eckert eckert@mit.edu 24-Apr-2000 |
749 |
c |
750 |
c - Added routines that do active writes on tiles |
751 |
c instead of a whole thread. |
752 |
c |
753 |
c ================================================================== |
754 |
c SUBROUTINE active_write_tile_xy |
755 |
c ================================================================== |
756 |
|
757 |
implicit none |
758 |
|
759 |
c == global variables == |
760 |
|
761 |
#include "EEPARAMS.h" |
762 |
#include "SIZE.h" |
763 |
|
764 |
c == routine arguments == |
765 |
|
766 |
character*(*) active_var_file |
767 |
_RL active_var(1-olx:snx+olx,1-oly:sny+oly) |
768 |
integer irec |
769 |
integer bi |
770 |
integer bj |
771 |
integer myOptimIter |
772 |
integer mythid |
773 |
|
774 |
c == local variables == |
775 |
|
776 |
integer mynr |
777 |
logical globalfile |
778 |
|
779 |
c == end of interface == |
780 |
|
781 |
mynr = 1 |
782 |
globalfile = .false. |
783 |
|
784 |
call active_write_tile_rl( |
785 |
I active_var_file, |
786 |
I active_var, |
787 |
I globalfile, |
788 |
I irec, |
789 |
I mynr, |
790 |
I bi, |
791 |
I bj, |
792 |
I FORWARD_SIMULATION, |
793 |
I myOptimIter, |
794 |
I mythid |
795 |
& ) |
796 |
|
797 |
return |
798 |
end |
799 |
|
800 |
|
801 |
subroutine active_write_tile_xyz( |
802 |
I active_var_file, |
803 |
I active_var, |
804 |
I irec, |
805 |
I bi, |
806 |
I bj, |
807 |
I myOptimIter, |
808 |
I mythid |
809 |
& ) |
810 |
|
811 |
c ================================================================== |
812 |
c SUBROUTINE active_write_tile_xyz |
813 |
c ================================================================== |
814 |
c |
815 |
c o Write an active 3D variable to a file. |
816 |
c |
817 |
c started: Christian Eckert eckert@mit.edu 30-Jun-1999 |
818 |
c |
819 |
c changed: Christian Eckert eckert@mit.edu 11-Feb-2000 |
820 |
c |
821 |
c - Restructured the code in order to create a package |
822 |
c for the MITgcmUV.c |
823 |
c |
824 |
c changed: Christian Eckert eckert@mit.edu 24-Apr-2000 |
825 |
c |
826 |
c - Added routines that do active writes on tiles |
827 |
c instead of a whole thread. |
828 |
c |
829 |
c ================================================================== |
830 |
c SUBROUTINE active_write_tile_xyz |
831 |
c ================================================================== |
832 |
|
833 |
implicit none |
834 |
|
835 |
c == global variables == |
836 |
|
837 |
#include "EEPARAMS.h" |
838 |
#include "SIZE.h" |
839 |
|
840 |
c == routine arguments == |
841 |
|
842 |
character*(*) active_var_file |
843 |
_RL active_var(1-olx:snx+olx,1-oly:sny+oly,nr) |
844 |
integer irec |
845 |
integer bi |
846 |
integer bj |
847 |
integer myOptimIter |
848 |
integer mythid |
849 |
|
850 |
c == local variables == |
851 |
|
852 |
integer mynr |
853 |
logical globalfile |
854 |
|
855 |
c == end of interface == |
856 |
|
857 |
mynr = nr |
858 |
globalfile = .false. |
859 |
call active_write_tile_rl( |
860 |
I active_var_file, |
861 |
I active_var, |
862 |
I globalfile, |
863 |
I irec, |
864 |
I mynr, |
865 |
I bi, |
866 |
I bj, |
867 |
I FORWARD_SIMULATION, |
868 |
I myOptimIter, |
869 |
I mythid |
870 |
& ) |
871 |
|
872 |
return |
873 |
end |
874 |
|
875 |
|