/[MITgcm]/MITgcm/pkg/autodiff/active_file_ad.F
ViewVC logotype

Annotation of /MITgcm/pkg/autodiff/active_file_ad.F

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


Revision 1.7 - (hide annotations) (download)
Mon Oct 8 23:50:52 2007 UTC (16 years, 8 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint60, checkpoint59q, checkpoint59p, checkpoint59r, checkpoint59m, checkpoint59l, checkpoint59o, checkpoint59n, checkpoint59i, checkpoint59k, checkpoint59j
Changes since 1.6: +7 -6 lines
add missing cvs $Header:$ or $Name:$

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

  ViewVC Help
Powered by ViewVC 1.1.22