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

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

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


Revision 1.4 - (hide annotations) (download)
Thu Oct 9 04:19:18 2003 UTC (20 years, 8 months ago) by edhill
Branch: MAIN
CVS Tags: checkpoint51k_post, checkpoint57m_post, checkpoint52l_pre, hrcube4, hrcube5, checkpoint57g_pre, checkpoint57s_post, checkpoint58b_post, checkpoint57b_post, checkpoint52d_pre, checkpoint57g_post, checkpoint56b_post, checkpoint57y_post, checkpoint52j_pre, checkpoint51o_pre, checkpoint54d_post, checkpoint54e_post, checkpoint51l_post, checkpoint57r_post, checkpoint57d_post, checkpoint57i_post, checkpoint52k_post, checkpoint58, checkpoint55, checkpoint54, checkpoint57, checkpoint56, checkpoint53, checkpoint52, checkpoint52f_post, checkpoint57n_post, checkpoint58a_post, checkpoint57z_post, checkpoint54f_post, checkpoint51t_post, checkpoint51n_post, checkpoint55i_post, checkpoint57l_post, checkpoint52i_pre, hrcube_1, hrcube_2, hrcube_3, checkpoint51s_post, checkpoint57t_post, checkpoint55c_post, checkpoint52e_pre, checkpoint57v_post, checkpoint57f_post, checkpoint52e_post, checkpoint51n_pre, checkpoint53d_post, checkpoint57a_post, checkpoint57h_pre, checkpoint52b_pre, checkpoint54b_post, checkpoint57h_post, checkpoint51l_pre, checkpoint52m_post, checkpoint57y_pre, checkpoint55g_post, checkpoint51q_post, checkpoint52b_post, checkpoint52c_post, checkpoint57c_post, checkpoint52f_pre, checkpoint55d_post, checkpoint54a_pre, checkpoint53c_post, checkpoint55d_pre, checkpoint57c_pre, checkpoint55j_post, checkpoint54a_post, checkpoint55h_post, checkpoint51r_post, checkpoint51i_post, checkpoint57e_post, checkpoint55b_post, checkpoint53a_post, checkpoint55f_post, checkpoint52d_post, checkpoint53g_post, checkpoint57p_post, checkpint57u_post, checkpoint57q_post, eckpoint57e_pre, checkpoint52a_pre, checkpoint52i_post, checkpoint52h_pre, checkpoint56a_post, checkpoint53f_post, checkpoint57h_done, checkpoint52j_post, checkpoint57j_post, checkpoint57f_pre, branch-netcdf, checkpoint52l_post, checkpoint52n_post, checkpoint53b_pre, checkpoint56c_post, checkpoint57a_pre, checkpoint55a_post, checkpoint57o_post, checkpoint51o_post, checkpoint57k_post, checkpoint53b_post, checkpoint52a_post, checkpoint57w_post, ecco_c52_e35, checkpoint57x_post, checkpoint58c_post, checkpoint51m_post, checkpoint53d_pre, checkpoint55e_post, checkpoint54c_post, checkpoint51p_post, checkpoint51u_post
Branch point for: branch-nonh, tg2-branch, netcdf-sm0, checkpoint51n_branch
Changes since 1.3: +1 -1 lines
 o first check-in for the "branch-genmake2" merge
 o verification suite as run on shelley (gcc 3.2.2):

Wed Oct  8 23:42:29 EDT 2003
                T           S           U           V
G D M    c        m  s        m  s        m  s        m  s
E p a R  g  m  m  e  .  m  m  e  .  m  m  e  .  m  m  e  .
N n k u  2  i  a  a  d  i  a  a  d  i  a  a  d  i  a  a  d
2 d e n  d  n  x  n  .  n  x  n  .  n  x  n  .  n  x  n  .

OPTFILE=NONE

Y Y Y Y 13 16 16 16  0 16 16 16 16 16 16 16 16 13 12  0  0 pass  adjustment.128x64x1
Y Y Y Y 16 16 16 16  0 16 16 16 16 16 16  0  0 16 16  0  0 pass  adjustment.cs-32x32x1
Y Y Y Y 16 16 16 16  0 16 16 16 16 16 16 22  0 16 16 22  0 pass  adjust_nlfs.cs-32x32x1
Y Y Y Y -- 13 13 16 16 13 13 13 13 16 16 16 16 16 16 16 16 N/O   advect_cs
Y Y Y Y -- 22 16 16 16 16 16 16 13 16 16 16 16 16 16 16 16 N/O   advect_xy
Y Y Y Y -- 13 16 13 16 16 16 16 16 16 16 22 16 16 16 16 16 N/O   advect_xz
Y Y Y Y 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 pass  aim.5l_cs
Y Y Y Y 14 16 16 16 16 16 16 16 16 13 16 16 16 16 16 13 16 pass  aim.5l_Equatorial_Channel
Y Y Y Y 16 16 16 16 16 16 16 16 16 16 16 13 16 16 13 13 16 pass  aim.5l_LatLon
Y Y Y Y 13 16 16 16 16 16 16 16 16 16 13 12 13 13 16 13 16 pass  exp0
Y Y Y Y 14 16 16 16 16 16 16 16 22 16 16 16 13 16 16 22 16 pass  exp1
Y Y Y Y 13 13 16 13 16 16 16 16 16 13 13 16 16 13 13 13 13 pass  exp2
Y Y Y Y 16 16 16 16 16 16 16 16 22 16 16 16 16 16 16 16 16 pass  exp4
Y Y Y Y 16 16 16 16 16 16 16 16 16 16 16 22 16 16 16 22 16 pass  exp5
Y Y Y Y 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 pass  front_relax
Y Y Y Y 14 16 16 13 13 16 16 13 13 16 13 13 16 12 13 13 16 pass  global_ocean.90x40x15
Y Y Y Y 10 16 16 13 13 16 13 16 16 13 13 13 13 16 16 13 16 FAIL  global_ocean.cs32x15
Y Y Y Y  6 11 12 13 13 12 13 16 13  9  9  9  9 10  9  9 11 FAIL  global_ocean_pressure
Y Y Y Y 14 16 16 13 16 16 16 13 13 13 13 13 16 12 16 13 16 pass  global_with_exf
Y Y Y Y 14 16 16 16 16 16 16 16 16 11 13 22 13 16 16  9 16 pass  hs94.128x64x5
Y Y Y Y 13 16 16 16 16 16 16 16 16 11 16 16 16 13 16 22 13 pass  hs94.1x64x5
Y Y Y Y 14 16 16 16 16 16 16 16 16 13 16 13 13 16 16 22 13 pass  hs94.cs-32x32x5
Y Y Y Y 10 10 16 13 13 16 16 16 22 16 13 13 13 13 13 22 13 FAIL  ideal_2D_oce
Y Y Y Y  8 16 16 16 16 16 16 16 16 13 13  8 16 16 16 16 16 FAIL  internal_wave
Y Y Y Y 14 16 16 16 16 16 16 16 16 13 13 22 13 13 13 22 16 pass  inverted_barometer
Y Y Y Y 12 16 16 16 16 16 16 16 16 16 13 12 13 13 13 13 13 FAIL  lab_sea
Y Y Y Y 11 16 16 16 16 16 16 16 13 13 13 12 13 16 13 12 13 FAIL  natl_box
Y Y Y Y 16 16 16 16 16 16 16 16 22 16 16 16 16 16 16 16 16 pass  plume_on_slope
Y Y Y Y 13 16 16 16 16 13 16 16 16 16 16 16 16 13 16 16 16 pass  solid-body.cs-32x32x1

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

  ViewVC Help
Powered by ViewVC 1.1.22