3 |
|
|
4 |
#include "AUTODIFF_OPTIONS.h" |
#include "AUTODIFF_OPTIONS.h" |
5 |
|
|
6 |
c ================================================================== |
C ================================================================== |
7 |
c |
C active_file.F: Routines to handle the I/O of the active file for |
8 |
c active_file.F: Routines to handle the I/O of the active file for |
C the adjoint calculations. All files are direct |
9 |
c the adjoint calculations. All files are direct |
C access files. |
10 |
c access files. |
C Routines |
11 |
c |
C o active_read_xy_loc - Read an active 2D variable from file. |
12 |
c Routines |
C o active_read_xyz_loc - Read an active 3D variable from file. |
13 |
c |
C o active_read_xz_loc - Read an active 2D xz-slice from file. |
14 |
c o active_read_xy - Read an active 2D variable from file. |
C o active_read_yz_loc - Read an active 2D yz-slice from file. |
15 |
c o active_read_xyz - Read an active 3D variable from file. |
C |
16 |
c o active_read_xz - Read an active 2D xz-slice from file. |
C o active_write_xy_loc - Write an active 2D variable to a file. |
17 |
c o active_read_yz - Read an active 2D yz-slice from file. |
C o active_write_xyz_loc - Write an active 3D variable to a file. |
18 |
c |
C o active_write_xz_loc - Write an active 2D xz-slice to a file. |
19 |
c o active_write_xy - Write an active 2D variable to a file. |
C o active_write_yz_loc - Write an active 2D yz-slice to a file. |
20 |
c o active_write_xyz - Write an active 3D variable to a file. |
C |
21 |
c o active_write_xz - Write an active 2D xz-slice to a file. |
C changed: Christian Eckert eckert@mit.edu 24-Apr-2000 |
22 |
c o active_write_yz - Write an active 2D yz-slice to a file. |
C - Added routines that do active writes on tiles |
23 |
c |
C instead of a whole thread. |
24 |
c changed: Christian Eckert eckert@mit.edu 24-Apr-2000 |
C changed: heimbach@mit.edu 05-Mar-2001 |
25 |
c - Added routines that do active writes on tiles |
C - added active file handling of xz-/yz-arrays |
26 |
c instead of a whole thread. |
C ================================================================== |
|
c changed: heimbach@mit.edu 05-Mar-2001 |
|
|
c - added active file handling of xz-/yz-arrays |
|
|
c |
|
|
c ================================================================== |
|
|
|
|
27 |
|
|
28 |
|
C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----| |
29 |
CBOP |
CBOP |
30 |
C !ROUTINE: active_read_xy_loc |
C !ROUTINE: active_read_xy_loc |
31 |
C !INTERFACE: |
C !INTERFACE: |
32 |
subroutine active_read_xy_loc( |
subroutine active_read_xy_loc( |
33 |
I active_var_file, |
I active_var_file, |
34 |
O active_var, |
O active_var, |
35 |
I irec, |
I iRec, |
36 |
I doglobalread, |
I doglobalread, |
37 |
I lAdInit, |
I lAdInit, |
38 |
I myOptimIter, |
I myOptimIter, |
39 |
I mythid |
I myThid |
40 |
I , dummy |
I , dummy |
41 |
& ) |
& ) |
42 |
|
|
43 |
C !DESCRIPTION: \bv |
C !DESCRIPTION: \bv |
44 |
c ================================================================== |
C ================================================================== |
45 |
c SUBROUTINE active_read_xy_loc |
C SUBROUTINE active_read_xy_loc |
46 |
c ================================================================== |
C ================================================================== |
47 |
c o Read an active 2D (XY) variable from file. |
C o Read an active 2D (XY) variable from file. |
48 |
c started: Christian Eckert eckert@mit.edu 30-Jun-1999 |
C started: Christian Eckert eckert@mit.edu 30-Jun-1999 |
49 |
c ================================================================== |
C ================================================================== |
50 |
C \ev |
C \ev |
51 |
|
|
52 |
C !USES: |
C !USES: |
53 |
implicit none |
IMPLICIT NONE |
54 |
|
|
55 |
c == global variables == |
C == global variables == |
56 |
#include "EEPARAMS.h" |
#include "EEPARAMS.h" |
57 |
#include "SIZE.h" |
#include "SIZE.h" |
58 |
|
|
59 |
C !INPUT/OUTPUT PARAMETERS: |
C !INPUT/OUTPUT PARAMETERS: |
60 |
c == routine arguments == |
C active_var_file: filename |
61 |
c active_var_file: filename |
C active_var: array |
62 |
c active_var: array |
C iRec: record number |
63 |
c irec: record number |
C myOptimIter: number of optimization iteration (default: 0) |
64 |
c myOptimIter: number of optimization iteration (default: 0) |
C myThid: thread number for this instance |
65 |
c mythid: thread number for this instance |
C doglobalread: flag for global or local read/write |
66 |
c doglobalread: flag for global or local read/write |
C (default: .false.) |
67 |
c (default: .false.) |
C lAdInit: initialisation of corresponding adjoint |
68 |
c lAdInit: initialisation of corresponding adjoint |
C variable and write to active file |
69 |
c variable and write to active file |
CHARACTER*(*) active_var_file |
70 |
character*(*) active_var_file |
_RL active_var(1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy) |
71 |
_RL active_var(1-olx:snx+olx,1-oly:sny+oly,nsx,nsy) |
INTEGER iRec |
72 |
integer irec |
INTEGER myOptimIter |
73 |
integer myOptimIter |
INTEGER myThid |
74 |
integer mythid |
LOGICAL doglobalread |
75 |
logical doglobalread |
LOGICAL lAdInit |
|
logical lAdInit |
|
76 |
_RL dummy |
_RL dummy |
77 |
|
|
78 |
C !LOCAL VARIABLES: |
C !LOCAL VARIABLES: |
79 |
c == local variables == |
INTEGER myNr |
80 |
integer mynr |
LOGICAL useCurrentDir |
|
|
|
|
c == end of interface == |
|
81 |
CEOP |
CEOP |
82 |
|
|
83 |
mynr = 1 |
myNr = 1 |
84 |
call active_read_rl_loc( active_var_file, active_var, |
useCurrentDir = .TRUE. |
85 |
& doglobalread, lAdInit, irec, mynr, |
CALL ACTIVE_READ_3D_RL( |
86 |
& FORWARD_SIMULATION, myOptimIter, mythid) |
& active_var_file, active_var, doglobalread, |
87 |
|
& useCurrentDir, lAdInit, iRec, myNr, |
88 |
|
& FORWARD_SIMULATION, myOptimIter, myThid ) |
89 |
|
|
90 |
return |
RETURN |
91 |
end |
END |
|
|
|
|
c ================================================================== |
|
92 |
|
|
93 |
|
C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----| |
94 |
CBOP |
CBOP |
95 |
C !ROUTINE: active_read_xyz_loc |
C !ROUTINE: active_read_xyz_loc |
96 |
C !INTERFACE: |
C !INTERFACE: |
97 |
subroutine active_read_xyz_loc( |
subroutine active_read_xyz_loc( |
98 |
I active_var_file, |
I active_var_file, |
99 |
O active_var, |
O active_var, |
100 |
I irec, |
I iRec, |
101 |
I doglobalread, |
I doglobalread, |
102 |
I lAdInit, |
I lAdInit, |
103 |
I myOptimIter, |
I myOptimIter, |
104 |
I mythid |
I myThid |
105 |
I , dummy |
I , dummy |
106 |
& ) |
& ) |
107 |
|
|
108 |
C !DESCRIPTION: \bv |
C !DESCRIPTION: \bv |
109 |
c ================================================================== |
C ================================================================== |
110 |
c SUBROUTINE active_read_xyz_loc |
C SUBROUTINE active_read_xyz_loc |
111 |
c ================================================================== |
C ================================================================== |
112 |
c o Read an active 3D variable from file. |
C o Read an active 3D variable from file. |
113 |
c started: Christian Eckert eckert@mit.edu 30-Jun-1999 |
C started: Christian Eckert eckert@mit.edu 30-Jun-1999 |
114 |
c ================================================================== |
C ================================================================== |
115 |
C \ev |
C \ev |
116 |
|
|
117 |
C !USES: |
C !USES: |
118 |
implicit none |
IMPLICIT NONE |
119 |
|
|
120 |
c == global variables == |
C == global variables == |
121 |
#include "EEPARAMS.h" |
#include "EEPARAMS.h" |
122 |
#include "SIZE.h" |
#include "SIZE.h" |
123 |
|
|
124 |
C !INPUT/OUTPUT PARAMETERS: |
C !INPUT/OUTPUT PARAMETERS: |
125 |
c == routine arguments == |
C active_var_file: filename |
126 |
c active_var_file: filename |
C active_var: array |
127 |
c active_var: array |
C iRec: record number |
128 |
c irec: record number |
C myOptimIter: number of optimization iteration (default: 0) |
129 |
c myOptimIter: number of optimization iteration (default: 0) |
C myThid: thread number for this instance |
130 |
c mythid: thread number for this instance |
C doglobalread: flag for global or local read/write |
131 |
c doglobalread: flag for global or local read/write |
C (default: .false.) |
132 |
c (default: .false.) |
C lAdInit: initialisation of corresponding adjoint |
133 |
c lAdInit: initialisation of corresponding adjoint |
C variable and write to active file |
134 |
c variable and write to active file |
CHARACTER*(*) active_var_file |
135 |
character*(*) active_var_file |
_RL active_var(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy) |
136 |
_RL active_var(1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy) |
INTEGER iRec |
137 |
integer irec |
INTEGER myOptimIter |
138 |
integer myOptimIter |
INTEGER myThid |
139 |
integer mythid |
LOGICAL doglobalread |
140 |
logical doglobalread |
LOGICAL lAdInit |
|
logical lAdInit |
|
141 |
_RL dummy |
_RL dummy |
142 |
|
|
143 |
C !LOCAL VARIABLES: |
C !LOCAL VARIABLES: |
144 |
c == local variables == |
INTEGER myNr |
145 |
integer mynr |
LOGICAL useCurrentDir |
|
|
|
|
c == end of interface == |
|
146 |
CEOP |
CEOP |
147 |
|
|
148 |
mynr = nr |
myNr = Nr |
149 |
call active_read_rl_loc( active_var_file, active_var, |
useCurrentDir = .TRUE. |
150 |
& doglobalread, lAdInit, irec, mynr, |
CALL ACTIVE_READ_3D_RL( |
151 |
& FORWARD_SIMULATION, myOptimIter, mythid) |
& active_var_file, active_var, doglobalread, |
152 |
|
& useCurrentDir, lAdInit, iRec, myNr, |
153 |
return |
& FORWARD_SIMULATION, myOptimIter, myThid ) |
|
end |
|
|
|
|
|
c ================================================================== |
|
154 |
|
|
155 |
|
RETURN |
156 |
|
END |
157 |
|
|
158 |
|
C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----| |
159 |
CBOP |
CBOP |
160 |
C !ROUTINE: active_read_xz_loc |
C !ROUTINE: active_read_xz_loc |
161 |
C !INTERFACE: |
C !INTERFACE: |
162 |
subroutine active_read_xz_loc( |
subroutine active_read_xz_loc( |
163 |
I active_var_file, |
I active_var_file, |
164 |
O active_var, |
O active_var, |
165 |
I irec, |
I iRec, |
166 |
I doglobalread, |
I doglobalread, |
167 |
I lAdInit, |
I lAdInit, |
168 |
I myOptimIter, |
I myOptimIter, |
169 |
I mythid |
I myThid |
170 |
I , dummy |
I , dummy |
171 |
& ) |
& ) |
172 |
|
|
173 |
C !DESCRIPTION: \bv |
C !DESCRIPTION: \bv |
174 |
c ================================================================== |
C ================================================================== |
175 |
c SUBROUTINE active_read_xz_loc |
C SUBROUTINE active_read_xz_loc |
176 |
c ================================================================== |
C ================================================================== |
177 |
c o Read an active 2D xz-slice from file. |
C o Read an active 2D xz-slice from file. |
178 |
c started: heimbach@mit.edu 05-Mar-2001 |
C started: heimbach@mit.edu 05-Mar-2001 |
179 |
c ================================================================== |
C ================================================================== |
180 |
C \ev |
C \ev |
181 |
|
|
182 |
C !USES: |
C !USES: |
183 |
implicit none |
IMPLICIT NONE |
184 |
|
|
185 |
c == global variables == |
C == global variables == |
186 |
#include "EEPARAMS.h" |
#include "EEPARAMS.h" |
187 |
#include "SIZE.h" |
#include "SIZE.h" |
188 |
|
|
189 |
C !INPUT/OUTPUT PARAMETERS: |
C !INPUT/OUTPUT PARAMETERS: |
190 |
c == routine arguments == |
C active_var_file: filename |
191 |
c active_var_file: filename |
C active_var: array |
192 |
c active_var: array |
C iRec: record number |
193 |
c irec: record number |
C myOptimIter: number of optimization iteration (default: 0) |
194 |
c myOptimIter: number of optimization iteration (default: 0) |
C myThid: thread number for this instance |
195 |
c mythid: thread number for this instance |
C doglobalread: flag for global or local read/write |
196 |
c doglobalread: flag for global or local read/write |
C (default: .false.) |
197 |
c (default: .false.) |
C lAdInit: initialisation of corresponding adjoint |
198 |
c lAdInit: initialisation of corresponding adjoint |
C variable and write to active file |
199 |
c variable and write to active file |
CHARACTER*(*) active_var_file |
200 |
character*(*) active_var_file |
_RL active_var(1-OLx:sNx+OLx,nSx,nSy) |
201 |
_RL active_var(1-olx:snx+olx,nsx,nsy) |
INTEGER iRec |
202 |
integer irec |
INTEGER myOptimIter |
203 |
integer myOptimIter |
INTEGER myThid |
204 |
integer mythid |
LOGICAL doglobalread |
205 |
logical doglobalread |
LOGICAL lAdInit |
|
logical lAdInit |
|
206 |
_RL dummy |
_RL dummy |
207 |
|
|
208 |
C !LOCAL VARIABLES: |
C !LOCAL VARIABLES: |
209 |
c == local variables == |
INTEGER myNr |
210 |
integer mynr |
LOGICAL useCurrentDir |
|
|
|
|
c == end of interface == |
|
211 |
CEOP |
CEOP |
212 |
|
|
213 |
mynr = nr |
myNr = Nr |
214 |
call active_read_xz_rl_loc( active_var_file, active_var, |
useCurrentDir = .TRUE. |
215 |
& doglobalread, lAdInit, irec, mynr, |
CALL ACTIVE_READ_XZ_RL( |
216 |
& FORWARD_SIMULATION, myOptimIter, mythid) |
& active_var_file, active_var, doglobalread, |
217 |
|
& useCurrentDir, lAdInit, iRec, myNr, |
218 |
return |
& FORWARD_SIMULATION, myOptimIter, myThid ) |
|
end |
|
|
|
|
|
c ================================================================== |
|
219 |
|
|
220 |
|
RETURN |
221 |
|
END |
222 |
|
|
223 |
|
C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----| |
224 |
CBOP |
CBOP |
225 |
C !ROUTINE: active_read_yz_loc |
C !ROUTINE: active_read_yz_loc |
226 |
C !INTERFACE: |
C !INTERFACE: |
227 |
subroutine active_read_yz_loc( |
subroutine active_read_yz_loc( |
228 |
I active_var_file, |
I active_var_file, |
229 |
O active_var, |
O active_var, |
230 |
I irec, |
I iRec, |
231 |
I doglobalread, |
I doglobalread, |
232 |
I lAdInit, |
I lAdInit, |
233 |
I myOptimIter, |
I myOptimIter, |
234 |
I mythid |
I myThid |
235 |
I , dummy |
I , dummy |
236 |
& ) |
& ) |
237 |
|
|
238 |
C !DESCRIPTION: \bv |
C !DESCRIPTION: \bv |
239 |
c ================================================================== |
C ================================================================== |
240 |
c SUBROUTINE active_read_yz_loc |
C SUBROUTINE active_read_yz_loc |
241 |
c ================================================================== |
C ================================================================== |
242 |
c o Read an active 2D yz-slice from file. |
C o Read an active 2D yz-slice from file. |
243 |
c started: heimbach@mit.edu 05-Mar-2001 |
C started: heimbach@mit.edu 05-Mar-2001 |
244 |
c ================================================================== |
C ================================================================== |
245 |
C \ev |
C \ev |
246 |
|
|
247 |
C !USES: |
IMPLICIT NONE |
|
implicit none |
|
248 |
|
|
249 |
c == global variables == |
C == global variables == |
250 |
#include "EEPARAMS.h" |
#include "EEPARAMS.h" |
251 |
#include "SIZE.h" |
#include "SIZE.h" |
252 |
|
|
253 |
C !INPUT/OUTPUT PARAMETERS: |
C !INPUT/OUTPUT PARAMETERS: |
254 |
c == routine arguments == |
C active_var_file: filename |
255 |
c active_var_file: filename |
C active_var: array |
256 |
c active_var: array |
C iRec: record number |
257 |
c irec: record number |
C myOptimIter: number of optimization iteration (default: 0) |
258 |
c myOptimIter: number of optimization iteration (default: 0) |
C myThid: thread number for this instance |
259 |
c mythid: thread number for this instance |
C doglobalread: flag for global or local read/write |
260 |
c doglobalread: flag for global or local read/write |
C (default: .false.) |
261 |
c (default: .false.) |
C lAdInit: initialisation of corresponding adjoint |
262 |
c lAdInit: initialisation of corresponding adjoint |
C variable and write to active file |
263 |
c variable and write to active file |
CHARACTER*(*) active_var_file |
264 |
character*(*) active_var_file |
_RL active_var(1-OLy:sNy+OLy,nSx,nSy) |
265 |
_RL active_var(1-oly:sny+oly,nsx,nsy) |
INTEGER iRec |
266 |
integer irec |
INTEGER myOptimIter |
267 |
integer myOptimIter |
INTEGER myThid |
268 |
integer mythid |
LOGICAL doglobalread |
269 |
logical doglobalread |
LOGICAL lAdInit |
|
logical lAdInit |
|
270 |
_RL dummy |
_RL dummy |
271 |
|
|
272 |
C !LOCAL VARIABLES: |
C !LOCAL VARIABLES: |
273 |
c == local variables == |
INTEGER myNr |
274 |
integer mynr |
LOGICAL useCurrentDir |
|
|
|
|
c == end of interface == |
|
275 |
CEOP |
CEOP |
276 |
|
|
277 |
mynr = nr |
myNr = Nr |
278 |
call active_read_yz_rl_loc( active_var_file, active_var, |
useCurrentDir = .TRUE. |
279 |
& doglobalread, lAdInit, irec, mynr, |
CALL ACTIVE_READ_YZ_RL( |
280 |
& FORWARD_SIMULATION, myOptimIter, mythid) |
& active_var_file, active_var, doglobalread, |
281 |
|
& useCurrentDir, lAdInit, iRec, myNr, |
282 |
return |
& FORWARD_SIMULATION, myOptimIter, myThid ) |
|
end |
|
283 |
|
|
284 |
c ================================================================== |
RETURN |
285 |
|
END |
286 |
|
|
287 |
|
C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----| |
288 |
CBOP |
CBOP |
289 |
C !ROUTINE: active_write_xy_loc |
C !ROUTINE: active_write_xy_loc |
290 |
C !INTERFACE: |
C !INTERFACE: |
291 |
subroutine active_write_xy_loc( |
subroutine active_write_xy_loc( |
292 |
I active_var_file, |
I active_var_file, |
293 |
I active_var, |
I active_var, |
294 |
I irec, |
I iRec, |
295 |
I myOptimIter, |
I myOptimIter, |
296 |
I mythid |
I myThid |
297 |
I , dummy |
I , dummy |
298 |
& ) |
& ) |
299 |
|
|
300 |
C !DESCRIPTION: \bv |
C !DESCRIPTION: \bv |
301 |
c ================================================================== |
C ================================================================== |
302 |
c SUBROUTINE active_write_xy_loc |
C SUBROUTINE active_write_xy_loc |
303 |
c ================================================================== |
C ================================================================== |
304 |
c o Write an active 2D variable to a file. |
C o Write an active 2D variable to a file. |
305 |
c started: Christian Eckert eckert@mit.edu 30-Jun-1999 |
C started: Christian Eckert eckert@mit.edu 30-Jun-1999 |
306 |
c ================================================================== |
C ================================================================== |
307 |
C \ev |
C \ev |
308 |
|
|
309 |
C !USES: |
C !USES: |
310 |
implicit none |
IMPLICIT NONE |
311 |
|
|
312 |
c == global variables == |
C == global variables == |
313 |
#include "EEPARAMS.h" |
#include "EEPARAMS.h" |
314 |
#include "SIZE.h" |
#include "SIZE.h" |
315 |
|
|
316 |
c == routine arguments == |
C !INPUT/OUTPUT PARAMETERS: |
317 |
c active_var_file: filename |
C active_var_file: filename |
318 |
c active_var: array |
C active_var: array |
319 |
c irec: record number |
C iRec: record number |
320 |
c myOptimIter: number of optimization iteration (default: 0) |
C myOptimIter: number of optimization iteration (default: 0) |
321 |
c mythid: thread number for this instance |
C myThid: thread number for this instance |
322 |
character*(*) active_var_file |
CHARACTER*(*) active_var_file |
323 |
_RL active_var(1-olx:snx+olx,1-oly:sny+oly,nsx,nsy) |
_RL active_var(1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy) |
324 |
integer irec |
INTEGER iRec |
325 |
integer myOptimIter |
INTEGER myOptimIter |
326 |
integer mythid |
INTEGER myThid |
327 |
_RL dummy |
_RL dummy |
328 |
|
|
329 |
C !LOCAL VARIABLES: |
C !LOCAL VARIABLES: |
330 |
c == local variables == |
INTEGER myNr |
331 |
integer mynr |
LOGICAL globalFile |
332 |
logical globalfile |
LOGICAL useCurrentDir |
|
|
|
|
c == end of interface == |
|
333 |
CEOP |
CEOP |
334 |
|
|
335 |
mynr = 1 |
myNr = 1 |
336 |
globalfile = .false. |
globalFile = .FALSE. |
337 |
|
useCurrentDir = .TRUE. |
338 |
call active_write_rl_loc( active_var_file, active_var, |
CALL ACTIVE_WRITE_3D_RL( |
339 |
& globalfile, irec, mynr, |
& active_var_file, active_var, globalFile, |
340 |
& FORWARD_SIMULATION, myOptimIter, mythid ) |
& useCurrentDir, iRec, myNr, |
341 |
|
& FORWARD_SIMULATION, myOptimIter, myThid ) |
342 |
|
|
343 |
return |
RETURN |
344 |
end |
END |
|
|
|
|
c ================================================================== |
|
345 |
|
|
346 |
|
C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----| |
347 |
CBOP |
CBOP |
348 |
C !ROUTINE: active_write_xyz_loc |
C !ROUTINE: active_write_xyz_loc |
349 |
C !INTERFACE: |
C !INTERFACE: |
350 |
subroutine active_write_xyz_loc( |
subroutine active_write_xyz_loc( |
351 |
I active_var_file, |
I active_var_file, |
352 |
I active_var, |
I active_var, |
353 |
I irec, |
I iRec, |
354 |
I myOptimIter, |
I myOptimIter, |
355 |
I mythid |
I myThid |
356 |
I , dummy |
I , dummy |
357 |
& ) |
& ) |
358 |
|
|
359 |
C !DESCRIPTION: \bv |
C !DESCRIPTION: \bv |
360 |
c ================================================================== |
C ================================================================== |
361 |
c SUBROUTINE active_write_xyz_loc |
C SUBROUTINE active_write_xyz_loc |
362 |
c ================================================================== |
C ================================================================== |
363 |
c o Write an active 3D variable to a file. |
C o Write an active 3D variable to a file. |
364 |
c started: Christian Eckert eckert@mit.edu 30-Jun-1999 |
C started: Christian Eckert eckert@mit.edu 30-Jun-1999 |
365 |
c ================================================================== |
C ================================================================== |
366 |
C \ev |
C \ev |
367 |
|
|
368 |
C !USES: |
C !USES: |
369 |
implicit none |
IMPLICIT NONE |
370 |
|
|
371 |
c == global variables == |
C == global variables == |
372 |
#include "EEPARAMS.h" |
#include "EEPARAMS.h" |
373 |
#include "SIZE.h" |
#include "SIZE.h" |
374 |
|
|
375 |
c == routine arguments == |
C !INPUT/OUTPUT PARAMETERS: |
376 |
c active_var_file: filename |
C active_var_file: filename |
377 |
c active_var: array |
C active_var: array |
378 |
c irec: record number |
C iRec: record number |
379 |
c myOptimIter: number of optimization iteration (default: 0) |
C myOptimIter: number of optimization iteration (default: 0) |
380 |
c mythid: thread number for this instance |
C myThid: thread number for this instance |
381 |
character*(*) active_var_file |
CHARACTER*(*) active_var_file |
382 |
_RL active_var(1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy) |
_RL active_var(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy) |
383 |
integer irec |
INTEGER iRec |
384 |
integer myOptimIter |
INTEGER myOptimIter |
385 |
integer mythid |
INTEGER myThid |
386 |
_RL dummy |
_RL dummy |
387 |
|
|
388 |
C !LOCAL VARIABLES: |
C !LOCAL VARIABLES: |
389 |
c == local variables == |
INTEGER myNr |
390 |
integer mynr |
LOGICAL globalFile |
391 |
logical globalfile |
LOGICAL useCurrentDir |
|
|
|
|
c == end of interface == |
|
392 |
CEOP |
CEOP |
393 |
|
|
394 |
mynr = nr |
myNr = Nr |
395 |
globalfile = .false. |
globalFile = .FALSE. |
396 |
call active_write_rl_loc(active_var_file, active_var, |
useCurrentDir = .TRUE. |
397 |
& globalfile, irec, mynr, |
CALL ACTIVE_WRITE_3D_RL( |
398 |
& FORWARD_SIMULATION, myOptimIter, mythid) |
& active_var_file, active_var, globalFile, |
399 |
|
& useCurrentDir, iRec, myNr, |
400 |
return |
& FORWARD_SIMULATION, myOptimIter, myThid ) |
|
end |
|
401 |
|
|
402 |
c ================================================================== |
RETURN |
403 |
|
END |
404 |
|
|
405 |
|
C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----| |
406 |
CBOP |
CBOP |
407 |
C !ROUTINE: active_write_xz_loc |
C !ROUTINE: active_write_xz_loc |
408 |
C !INTERFACE: |
C !INTERFACE: |
409 |
subroutine active_write_xz_loc( |
subroutine active_write_xz_loc( |
410 |
I active_var_file, |
I active_var_file, |
411 |
I active_var, |
I active_var, |
412 |
I irec, |
I iRec, |
413 |
I myOptimIter, |
I myOptimIter, |
414 |
I mythid |
I myThid |
415 |
I , dummy |
I , dummy |
416 |
& ) |
& ) |
417 |
|
|
418 |
C !DESCRIPTION: \bv |
C !DESCRIPTION: \bv |
419 |
c ================================================================== |
C ================================================================== |
420 |
c SUBROUTINE active_write_xz_loc |
C SUBROUTINE active_write_xz_loc |
421 |
c ================================================================== |
C ================================================================== |
422 |
c o Write an active 2D xz-slice to a file. |
C o Write an active 2D xz-slice to a file. |
423 |
c started: heimbach@mit.edu 05-Mar-2001 |
C started: heimbach@mit.edu 05-Mar-2001 |
424 |
c ================================================================== |
C ================================================================== |
425 |
C \ev |
C \ev |
426 |
|
|
427 |
C !USES: |
C !USES: |
428 |
implicit none |
IMPLICIT NONE |
429 |
|
|
430 |
c == global variables == |
C == global variables == |
431 |
#include "EEPARAMS.h" |
#include "EEPARAMS.h" |
432 |
#include "SIZE.h" |
#include "SIZE.h" |
433 |
|
|
434 |
c == routine arguments == |
C !INPUT/OUTPUT PARAMETERS: |
435 |
c active_var_file: filename |
C active_var_file: filename |
436 |
c active_var: array |
C active_var: array |
437 |
c irec: record number |
C iRec: record number |
438 |
c myOptimIter: number of optimization iteration (default: 0) |
C myOptimIter: number of optimization iteration (default: 0) |
439 |
c mythid: thread number for this instance |
C myThid: thread number for this instance |
440 |
character*(*) active_var_file |
CHARACTER*(*) active_var_file |
441 |
_RL active_var(1-olx:snx+olx,nsx,nsy) |
_RL active_var(1-OLx:sNx+OLx,nSx,nSy) |
442 |
integer irec |
INTEGER iRec |
443 |
integer myOptimIter |
INTEGER myOptimIter |
444 |
integer mythid |
INTEGER myThid |
445 |
_RL dummy |
_RL dummy |
446 |
|
|
447 |
C !LOCAL VARIABLES: |
C !LOCAL VARIABLES: |
448 |
c == local variables == |
INTEGER myNr |
449 |
integer mynr |
LOGICAL globalFile |
450 |
logical globalfile |
LOGICAL useCurrentDir |
|
|
|
|
c == end of interface == |
|
451 |
CEOP |
CEOP |
452 |
|
|
453 |
mynr = nr |
myNr = Nr |
454 |
globalfile = .false. |
globalFile = .FALSE. |
455 |
|
useCurrentDir = .TRUE. |
456 |
call active_write_xz_rl_loc( active_var_file, active_var, |
CALL ACTIVE_WRITE_XZ_RL( |
457 |
& globalfile, irec, mynr, |
& active_var_file, active_var, globalFile, |
458 |
& FORWARD_SIMULATION, myOptimIter, mythid ) |
& useCurrentDir, iRec, myNr, |
459 |
|
& FORWARD_SIMULATION, myOptimIter, myThid ) |
|
return |
|
|
end |
|
460 |
|
|
461 |
c ================================================================== |
RETURN |
462 |
|
END |
463 |
|
|
464 |
|
C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----| |
465 |
CBOP |
CBOP |
466 |
C !ROUTINE: active_write_yz_loc |
C !ROUTINE: active_write_yz_loc |
467 |
C !INTERFACE: |
C !INTERFACE: |
468 |
subroutine active_write_yz_loc( |
subroutine active_write_yz_loc( |
469 |
I active_var_file, |
I active_var_file, |
470 |
I active_var, |
I active_var, |
471 |
I irec, |
I iRec, |
472 |
I myOptimIter, |
I myOptimIter, |
473 |
I mythid |
I myThid |
474 |
I , dummy |
I , dummy |
475 |
& ) |
& ) |
476 |
|
|
477 |
C !DESCRIPTION: \bv |
C !DESCRIPTION: \bv |
478 |
c ================================================================== |
C ================================================================== |
479 |
c SUBROUTINE active_write_yz_loc |
C SUBROUTINE active_write_yz_loc |
480 |
c ================================================================== |
C ================================================================== |
481 |
c o Write an active 2D variable to a file. |
C o Write an active 2D variable to a file. |
482 |
c started: heimbach@mit.edu 05-Mar-2001 |
C started: heimbach@mit.edu 05-Mar-2001 |
483 |
c ================================================================== |
C ================================================================== |
484 |
C \ev |
C \ev |
485 |
|
|
486 |
C !USES: |
C !USES: |
487 |
implicit none |
IMPLICIT NONE |
488 |
|
|
489 |
c == global variables == |
C == global variables == |
490 |
#include "EEPARAMS.h" |
#include "EEPARAMS.h" |
491 |
#include "SIZE.h" |
#include "SIZE.h" |
492 |
|
|
493 |
c == routine arguments == |
C !INPUT/OUTPUT PARAMETERS: |
494 |
c active_var_file: filename |
C active_var_file: filename |
495 |
c active_var: array |
C active_var: array |
496 |
c irec: record number |
C iRec: record number |
497 |
c myOptimIter: number of optimization iteration (default: 0) |
C myOptimIter: number of optimization iteration (default: 0) |
498 |
c mythid: thread number for this instance |
C myThid: thread number for this instance |
499 |
character*(*) active_var_file |
CHARACTER*(*) active_var_file |
500 |
_RL active_var(1-oly:sny+oly,nsx,nsy) |
_RL active_var(1-OLy:sNy+OLy,nSx,nSy) |
501 |
integer irec |
INTEGER iRec |
502 |
integer myOptimIter |
INTEGER myOptimIter |
503 |
integer mythid |
INTEGER myThid |
504 |
_RL dummy |
_RL dummy |
505 |
|
|
506 |
C !LOCAL VARIABLES: |
C !LOCAL VARIABLES: |
507 |
c == local variables == |
INTEGER myNr |
508 |
integer mynr |
LOGICAL globalFile |
509 |
logical globalfile |
LOGICAL useCurrentDir |
|
|
|
|
c == end of interface == |
|
510 |
CEOP |
CEOP |
511 |
|
|
512 |
mynr = nr |
myNr = Nr |
513 |
globalfile = .false. |
globalFile = .FALSE. |
514 |
|
useCurrentDir = .TRUE. |
515 |
call active_write_yz_rl_loc( active_var_file, active_var, |
CALL ACTIVE_WRITE_YZ_RL( |
516 |
& globalfile, irec, mynr, |
& active_var_file, active_var, globalFile, |
517 |
& FORWARD_SIMULATION, myOptimIter, mythid ) |
& useCurrentDir, iRec, myNr, |
518 |
|
& FORWARD_SIMULATION, myOptimIter, myThid ) |
519 |
|
|
520 |
return |
RETURN |
521 |
end |
END |