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

Contents of /MITgcm/pkg/autodiff/active_file_loc.F

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


Revision 1.3 - (show annotations) (download)
Thu Oct 9 04:19:18 2003 UTC (20 years, 8 months ago) by edhill
Branch: MAIN
CVS Tags: checkpoint58l_post, checkpoint51k_post, checkpoint57t_post, checkpoint57o_post, checkpoint52l_pre, checkpoint52e_pre, hrcube4, checkpoint58e_post, checkpoint57v_post, checkpoint52n_post, checkpoint52j_post, checkpoint53d_post, checkpoint58u_post, checkpoint58w_post, checkpoint54a_pre, checkpoint51o_pre, checkpoint57m_post, checkpoint55c_post, checkpoint54e_post, checkpoint52e_post, checkpoint57s_post, checkpoint51n_pre, checkpoint54a_post, checkpoint53c_post, checkpoint57k_post, checkpoint55d_pre, checkpoint57d_post, checkpoint51l_post, checkpoint57g_post, checkpoint51q_post, checkpoint57b_post, checkpoint57c_pre, checkpoint58r_post, checkpoint55j_post, checkpoint56b_post, checkpoint57i_post, checkpoint57y_post, hrcube_1, checkpoint57e_post, branch-netcdf, checkpoint52d_pre, checkpoint52l_post, checkpoint55h_post, checkpoint58n_post, checkpoint51r_post, checkpoint58x_post, checkpoint52k_post, checkpoint52b_pre, checkpoint57g_pre, checkpoint54b_post, checkpoint53b_pre, checkpoint55b_post, checkpoint58t_post, checkpoint58h_post, checkpoint54d_post, checkpoint56c_post, checkpoint52m_post, checkpoint57y_pre, checkpoint55, checkpoint53a_post, checkpoint57f_pre, checkpoint57a_post, checkpoint54, checkpoint58q_post, checkpoint54f_post, checkpoint53b_post, checkpoint55g_post, checkpoint51o_post, checkpoint51p_post, checkpoint58j_post, checkpoint52a_pre, checkpoint59e, checkpoint59d, checkpoint59g, checkpoint59f, checkpoint59a, checkpoint55f_post, checkpoint59c, checkpoint59b, checkpoint59h, checkpoint57r_post, checkpoint59, checkpoint58, checkpoint57a_pre, checkpoint55i_post, checkpoint57, checkpoint56, checkpoint51i_post, checkpoint53, checkpoint52, checkpoint52d_post, eckpoint57e_pre, checkpoint52a_post, checkpoint57h_done, checkpoint58f_post, checkpoint52b_post, checkpoint53g_post, checkpoint52f_post, checkpoint57x_post, checkpoint57n_post, checkpoint52c_post, checkpoint58d_post, checkpoint58c_post, checkpoint57w_post, checkpoint57p_post, checkpint57u_post, checkpoint57f_post, checkpoint58a_post, checkpoint51l_pre, checkpoint58i_post, checkpoint57q_post, checkpoint58g_post, ecco_c52_e35, hrcube5, checkpoint58o_post, checkpoint57z_post, checkpoint57c_post, checkpoint58y_post, checkpoint55e_post, checkpoint58k_post, checkpoint52i_post, checkpoint52j_pre, checkpoint58v_post, checkpoint53f_post, checkpoint55a_post, checkpoint51t_post, checkpoint53d_pre, checkpoint54c_post, checkpoint58s_post, checkpoint58p_post, checkpoint51n_post, checkpoint57j_post, checkpoint58b_post, checkpoint57h_pre, checkpoint58m_post, checkpoint57l_post, checkpoint52i_pre, checkpoint51u_post, checkpoint52h_pre, checkpoint52f_pre, checkpoint57h_post, hrcube_2, hrcube_3, checkpoint56a_post, checkpoint51m_post, checkpoint51s_post, checkpoint55d_post
Branch point for: branch-nonh, tg2-branch, checkpoint51n_branch, netcdf-sm0
Changes since 1.2: +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
2 #include "AUTODIFF_OPTIONS.h"
3
4 c ==================================================================
5 c
6 c active_file.F: Routines to handle the I/O of the active file for
7 c the adjoint calculations. All files are direct
8 c access files.
9 c
10 c Routines
11 c
12 c o active_read_xy - Read an active 2D variable from file.
13 c o active_read_xyz - Read an active 3D variable from file.
14 c o active_read_xz - Read an active 2D xz-slice from file.
15 c o active_read_yz - Read an active 2D yz-slice from file.
16 c
17 c o active_write_xy - Write an active 2D variable to a file.
18 c o active_write_xyz - Write an active 3D variable to a file.
19 c o active_write_xz - Write an active 2D xz-slice to a file.
20 c o active_write_yz - Write an active 2D yz-slice to a file.
21 c
22 c o active_read_tile_xy - Read an active 2D variable from file.
23 c o active_read_tile_xyz - Read an active 3D variable from file.
24 c
25 c o active_write_tile_xy - Write an active 2D variable to a file.
26 c o 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: active_read_xy_loc
40 C !INTERFACE:
41 subroutine active_read_xy_loc(
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 & )
51
52 C !DESCRIPTION: \bv
53 c ==================================================================
54 c SUBROUTINE active_read_xy_loc
55 c ==================================================================
56 c o Read an active 2D (XY) variable from file.
57 c started: Christian Eckert eckert@mit.edu 30-Jun-1999
58 c ==================================================================
59 C \ev
60
61 C !USES:
62 implicit none
63
64 c == global variables ==
65 #include "EEPARAMS.h"
66 #include "SIZE.h"
67
68 C !INPUT/OUTPUT PARAMETERS:
69 c == routine arguments ==
70 c active_var_file: filename
71 c active_var: array
72 c irec: record number
73 c myOptimIter: number of optimization iteration (default: 0)
74 c mythid: thread number for this instance
75 c doglobalread: flag for global or local read/write
76 c (default: .false.)
77 c lAdInit: initialisation of corresponding adjoint
78 c variable and write to active file
79 character*(*) active_var_file
80 _RL active_var(1-olx:snx+olx,1-oly:sny+oly,nsx,nsy)
81 integer irec
82 integer myOptimIter
83 integer mythid
84 logical doglobalread
85 logical lAdInit
86 _RL dummy
87
88 C !LOCAL VARIABLES:
89 c == local variables ==
90 integer mynr
91
92 c == end of interface ==
93 CEOP
94
95 mynr = 1
96 call active_read_rl_loc( active_var_file, active_var,
97 & doglobalread, lAdInit, irec, mynr,
98 & FORWARD_SIMULATION, myOptimIter, mythid)
99
100 return
101 end
102
103 c ==================================================================
104
105 CBOP
106 C !ROUTINE: active_read_xyz_loc
107 C !INTERFACE:
108 subroutine active_read_xyz_loc(
109 I active_var_file,
110 O active_var,
111 I irec,
112 I doglobalread,
113 I lAdInit,
114 I myOptimIter,
115 I mythid
116 I , dummy
117 & )
118
119 C !DESCRIPTION: \bv
120 c ==================================================================
121 c SUBROUTINE active_read_xyz_loc
122 c ==================================================================
123 c o Read an active 3D variable from file.
124 c started: Christian Eckert eckert@mit.edu 30-Jun-1999
125 c ==================================================================
126 C \ev
127
128 C !USES:
129 implicit none
130
131 c == global variables ==
132 #include "EEPARAMS.h"
133 #include "SIZE.h"
134
135 C !INPUT/OUTPUT PARAMETERS:
136 c == routine arguments ==
137 c active_var_file: filename
138 c active_var: array
139 c irec: record number
140 c myOptimIter: number of optimization iteration (default: 0)
141 c mythid: thread number for this instance
142 c doglobalread: flag for global or local read/write
143 c (default: .false.)
144 c lAdInit: initialisation of corresponding adjoint
145 c variable and write to active file
146 character*(*) active_var_file
147 _RL active_var(1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy)
148 integer irec
149 integer myOptimIter
150 integer mythid
151 logical doglobalread
152 logical lAdInit
153 _RL dummy
154
155 C !LOCAL VARIABLES:
156 c == local variables ==
157 integer mynr
158
159 c == end of interface ==
160 CEOP
161
162 mynr = nr
163 call active_read_rl_loc( active_var_file, active_var,
164 & doglobalread, lAdInit, irec, mynr,
165 & FORWARD_SIMULATION, myOptimIter, mythid)
166
167 return
168 end
169
170 c ==================================================================
171
172
173 CBOP
174 C !ROUTINE: active_read_xz_loc
175 C !INTERFACE:
176 subroutine active_read_xz_loc(
177 I active_var_file,
178 O active_var,
179 I irec,
180 I doglobalread,
181 I lAdInit,
182 I myOptimIter,
183 I mythid
184 I , dummy
185 & )
186
187 C !DESCRIPTION: \bv
188 c ==================================================================
189 c SUBROUTINE active_read_xz_loc
190 c ==================================================================
191 c o Read an active 2D xz-slice from file.
192 c started: heimbach@mit.edu 05-Mar-2001
193 c ==================================================================
194 C \ev
195
196 C !USES:
197 implicit none
198
199 c == global variables ==
200 #include "EEPARAMS.h"
201 #include "SIZE.h"
202
203 C !INPUT/OUTPUT PARAMETERS:
204 c == routine arguments ==
205 c active_var_file: filename
206 c active_var: array
207 c irec: record number
208 c myOptimIter: number of optimization iteration (default: 0)
209 c mythid: thread number for this instance
210 c doglobalread: flag for global or local read/write
211 c (default: .false.)
212 c lAdInit: initialisation of corresponding adjoint
213 c variable and write to active file
214 character*(*) active_var_file
215 _RL active_var(1-olx:snx+olx,nsx,nsy)
216 integer irec
217 integer myOptimIter
218 integer mythid
219 logical doglobalread
220 logical lAdInit
221 _RL dummy
222
223 C !LOCAL VARIABLES:
224 c == local variables ==
225 integer mynr
226
227 c == end of interface ==
228 CEOP
229
230 mynr = nr
231 call active_read_xz_rl_loc( active_var_file, active_var,
232 & doglobalread, lAdInit, irec, mynr,
233 & FORWARD_SIMULATION, myOptimIter, mythid)
234
235 return
236 end
237
238 c ==================================================================
239
240
241 CBOP
242 C !ROUTINE: active_read_yz_loc
243 C !INTERFACE:
244 subroutine active_read_yz_loc(
245 I active_var_file,
246 O active_var,
247 I irec,
248 I doglobalread,
249 I lAdInit,
250 I myOptimIter,
251 I mythid
252 I , dummy
253 & )
254
255 C !DESCRIPTION: \bv
256 c ==================================================================
257 c SUBROUTINE active_read_yz_loc
258 c ==================================================================
259 c o Read an active 2D yz-slice from file.
260 c started: heimbach@mit.edu 05-Mar-2001
261 c ==================================================================
262 C \ev
263
264 C !USES:
265 implicit none
266
267 c == global variables ==
268 #include "EEPARAMS.h"
269 #include "SIZE.h"
270
271 C !INPUT/OUTPUT PARAMETERS:
272 c == routine arguments ==
273 c active_var_file: filename
274 c active_var: array
275 c irec: record number
276 c myOptimIter: number of optimization iteration (default: 0)
277 c mythid: thread number for this instance
278 c doglobalread: flag for global or local read/write
279 c (default: .false.)
280 c lAdInit: initialisation of corresponding adjoint
281 c variable and write to active file
282 character*(*) active_var_file
283 _RL active_var(1-oly:sny+oly,nsx,nsy)
284 integer irec
285 integer myOptimIter
286 integer mythid
287 logical doglobalread
288 logical lAdInit
289 _RL dummy
290
291 C !LOCAL VARIABLES:
292 c == local variables ==
293 integer mynr
294
295 c == end of interface ==
296 CEOP
297
298 mynr = nr
299 call active_read_yz_rl_loc( active_var_file, active_var,
300 & doglobalread, lAdInit, irec, mynr,
301 & FORWARD_SIMULATION, myOptimIter, mythid)
302
303 return
304 end
305
306 c ==================================================================
307
308 CBOP
309 C !ROUTINE: active_write_xy_loc
310 C !INTERFACE:
311 subroutine active_write_xy_loc(
312 I active_var_file,
313 I active_var,
314 I irec,
315 I myOptimIter,
316 I mythid
317 I , dummy
318 & )
319
320 C !DESCRIPTION: \bv
321 c ==================================================================
322 c SUBROUTINE active_write_xy_loc
323 c ==================================================================
324 c o Write an active 2D variable to a file.
325 c started: Christian Eckert eckert@mit.edu 30-Jun-1999
326 c ==================================================================
327 C \ev
328
329 C !USES:
330 implicit none
331
332 c == global variables ==
333 #include "EEPARAMS.h"
334 #include "SIZE.h"
335
336 c == routine arguments ==
337 c active_var_file: filename
338 c active_var: array
339 c irec: record number
340 c myOptimIter: number of optimization iteration (default: 0)
341 c mythid: thread number for this instance
342 character*(*) active_var_file
343 _RL active_var(1-olx:snx+olx,1-oly:sny+oly,nsx,nsy)
344 integer irec
345 integer myOptimIter
346 integer mythid
347 _RL dummy
348
349 C !LOCAL VARIABLES:
350 c == local variables ==
351 integer mynr
352 logical globalfile
353
354 c == end of interface ==
355 CEOP
356
357 mynr = 1
358 globalfile = .false.
359
360 call active_write_rl_loc( active_var_file, active_var,
361 & globalfile, irec, mynr,
362 & FORWARD_SIMULATION, myOptimIter, mythid )
363
364 return
365 end
366
367 c ==================================================================
368
369 CBOP
370 C !ROUTINE: active_write_xyz_loc
371 C !INTERFACE:
372 subroutine active_write_xyz_loc(
373 I active_var_file,
374 I active_var,
375 I irec,
376 I myOptimIter,
377 I mythid
378 I , dummy
379 & )
380
381 C !DESCRIPTION: \bv
382 c ==================================================================
383 c SUBROUTINE active_write_xyz_loc
384 c ==================================================================
385 c o Write an active 3D variable to a file.
386 c started: Christian Eckert eckert@mit.edu 30-Jun-1999
387 c ==================================================================
388 C \ev
389
390 C !USES:
391 implicit none
392
393 c == global variables ==
394 #include "EEPARAMS.h"
395 #include "SIZE.h"
396
397 c == routine arguments ==
398 c active_var_file: filename
399 c active_var: array
400 c irec: record number
401 c myOptimIter: number of optimization iteration (default: 0)
402 c mythid: thread number for this instance
403 character*(*) active_var_file
404 _RL active_var(1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy)
405 integer irec
406 integer myOptimIter
407 integer mythid
408 _RL dummy
409
410 C !LOCAL VARIABLES:
411 c == local variables ==
412 integer mynr
413 logical globalfile
414
415 c == end of interface ==
416 CEOP
417
418 mynr = nr
419 globalfile = .false.
420 call active_write_rl_loc(active_var_file, active_var,
421 & globalfile, irec, mynr,
422 & FORWARD_SIMULATION, myOptimIter, mythid)
423
424 return
425 end
426
427 c ==================================================================
428
429 CBOP
430 C !ROUTINE: active_write_xz_loc
431 C !INTERFACE:
432 subroutine active_write_xz_loc(
433 I active_var_file,
434 I active_var,
435 I irec,
436 I myOptimIter,
437 I mythid
438 I , dummy
439 & )
440
441 C !DESCRIPTION: \bv
442 c ==================================================================
443 c SUBROUTINE active_write_xz_loc
444 c ==================================================================
445 c o Write an active 2D xz-slice to a file.
446 c started: heimbach@mit.edu 05-Mar-2001
447 c ==================================================================
448 C \ev
449
450 C !USES:
451 implicit none
452
453 c == global variables ==
454 #include "EEPARAMS.h"
455 #include "SIZE.h"
456
457 c == routine arguments ==
458 c active_var_file: filename
459 c active_var: array
460 c irec: record number
461 c myOptimIter: number of optimization iteration (default: 0)
462 c mythid: thread number for this instance
463 character*(*) active_var_file
464 _RL active_var(1-olx:snx+olx,nsx,nsy)
465 integer irec
466 integer myOptimIter
467 integer mythid
468 _RL dummy
469
470 C !LOCAL VARIABLES:
471 c == local variables ==
472 integer mynr
473 logical globalfile
474
475 c == end of interface ==
476 CEOP
477
478 mynr = nr
479 globalfile = .false.
480
481 call active_write_xz_rl_loc( active_var_file, active_var,
482 & globalfile, irec, mynr,
483 & FORWARD_SIMULATION, myOptimIter, mythid )
484
485 return
486 end
487
488 c ==================================================================
489
490 CBOP
491 C !ROUTINE: active_write_yz_loc
492 C !INTERFACE:
493 subroutine active_write_yz_loc(
494 I active_var_file,
495 I active_var,
496 I irec,
497 I myOptimIter,
498 I mythid
499 I , dummy
500 & )
501
502 C !DESCRIPTION: \bv
503 c ==================================================================
504 c SUBROUTINE active_write_yz_loc
505 c ==================================================================
506 c o Write an active 2D variable to a file.
507 c started: heimbach@mit.edu 05-Mar-2001
508 c ==================================================================
509 C \ev
510
511 C !USES:
512 implicit none
513
514 c == global variables ==
515 #include "EEPARAMS.h"
516 #include "SIZE.h"
517
518 c == routine arguments ==
519 c active_var_file: filename
520 c active_var: array
521 c irec: record number
522 c myOptimIter: number of optimization iteration (default: 0)
523 c mythid: thread number for this instance
524 character*(*) active_var_file
525 _RL active_var(1-oly:sny+oly,nsx,nsy)
526 integer irec
527 integer myOptimIter
528 integer mythid
529 _RL dummy
530
531 C !LOCAL VARIABLES:
532 c == local variables ==
533 integer mynr
534 logical globalfile
535
536 c == end of interface ==
537 CEOP
538
539 mynr = nr
540 globalfile = .false.
541
542 call active_write_yz_rl_loc( active_var_file, active_var,
543 & globalfile, irec, mynr,
544 & FORWARD_SIMULATION, myOptimIter, mythid )
545
546 return
547 end

  ViewVC Help
Powered by ViewVC 1.1.22