1 | SUBROUTINE read_3d_binary |
---|
2 | |
---|
3 | !--------------------------------------------------------------------------------! |
---|
4 | ! This file is part of PALM. |
---|
5 | ! |
---|
6 | ! PALM is free software: you can redistribute it and/or modify it under the terms |
---|
7 | ! of the GNU General Public License as published by the Free Software Foundation, |
---|
8 | ! either version 3 of the License, or (at your option) any later version. |
---|
9 | ! |
---|
10 | ! PALM is distributed in the hope that it will be useful, but WITHOUT ANY |
---|
11 | ! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR |
---|
12 | ! A PARTICULAR PURPOSE. See the GNU General Public License for more details. |
---|
13 | ! |
---|
14 | ! You should have received a copy of the GNU General Public License along with |
---|
15 | ! PALM. If not, see <http://www.gnu.org/licenses/>. |
---|
16 | ! |
---|
17 | ! Copyright 1997-2014 Leibniz Universitaet Hannover |
---|
18 | !--------------------------------------------------------------------------------! |
---|
19 | ! |
---|
20 | ! Current revisions: |
---|
21 | ! ----------------- |
---|
22 | ! |
---|
23 | ! |
---|
24 | ! Former revisions: |
---|
25 | ! ----------------- |
---|
26 | ! $Id: read_3d_binary.f90 1469 2014-09-24 14:09:56Z boeske $ |
---|
27 | ! |
---|
28 | ! 1468 2014-09-24 14:06:57Z maronga |
---|
29 | ! Adapted for use on up to 6-digit processor cores |
---|
30 | ! |
---|
31 | ! 1400 2014-05-09 14:03:54Z knoop |
---|
32 | ! reading of arrays for random_generator_parallel added |
---|
33 | ! |
---|
34 | ! 1320 2014-03-20 08:40:49Z raasch |
---|
35 | ! ONLY-attribute added to USE-statements, |
---|
36 | ! kind-parameters added to all INTEGER and REAL declaration statements, |
---|
37 | ! kinds are defined in new module kinds, |
---|
38 | ! old module precision_kind is removed, |
---|
39 | ! revision history before 2012 removed, |
---|
40 | ! comment fields (!:) to be used for variable explanations added to |
---|
41 | ! all variable declaration statements |
---|
42 | ! |
---|
43 | ! 1318 2014-03-17 13:35:16Z raasch |
---|
44 | ! module interfaces removed |
---|
45 | ! |
---|
46 | ! 1115 2013-03-26 18:16:16Z hoffmann |
---|
47 | ! unused variables removed |
---|
48 | ! |
---|
49 | ! 1053 2012-11-13 17:11:03Z hoffmann |
---|
50 | ! necessary expansions according to the two new prognostic equations (nr, qr) |
---|
51 | ! of the two-moment cloud physics scheme: |
---|
52 | ! +prr, prr_av, *, *_av, *s, *sws, *swst |
---|
53 | ! |
---|
54 | ! 1036 2012-10-22 13:43:42Z raasch |
---|
55 | ! code put under GPL (PALM 3.9) |
---|
56 | ! |
---|
57 | ! 1001 2012-09-13 14:08:46Z raasch |
---|
58 | ! all actions concerning leapfrog scheme removed |
---|
59 | ! |
---|
60 | ! 978 2012-08-09 08:28:32Z fricke |
---|
61 | ! +z0h, z0h_av |
---|
62 | ! |
---|
63 | ! Revision 1.1 2004/04/30 12:47:27 raasch |
---|
64 | ! Initial revision |
---|
65 | ! |
---|
66 | ! |
---|
67 | ! Description: |
---|
68 | ! ------------ |
---|
69 | ! Binary input of variables and arrays from restart file |
---|
70 | !------------------------------------------------------------------------------! |
---|
71 | |
---|
72 | USE arrays_3d, & |
---|
73 | ONLY: e, kh, km, p, pt, q, ql, qc, nr, nrs, nrsws, nrswst, qr, qrs, & |
---|
74 | qrsws, qrswst, qs, qsws, qswst, sa, saswsb, saswst, rif, & |
---|
75 | rif_wall, shf, ts, tswst, u, u_m_l, u_m_n, u_m_r, u_m_s, us, & |
---|
76 | usws, uswst, v, v_m_l, v_m_n, v_m_r, v_m_s, vpt, vsws, vswst, & |
---|
77 | w, w_m_l, w_m_n, w_m_r, w_m_s, z0, z0h |
---|
78 | |
---|
79 | USE averaging |
---|
80 | |
---|
81 | USE cloud_parameters, & |
---|
82 | ONLY: prr, precipitation_amount |
---|
83 | |
---|
84 | USE control_parameters, & |
---|
85 | ONLY: iran, message_string, outflow_l, outflow_n, outflow_r, outflow_s |
---|
86 | |
---|
87 | USE cpulog, & |
---|
88 | ONLY: cpu_log, log_point_s |
---|
89 | |
---|
90 | USE indices, & |
---|
91 | ONLY: nbgp, nx, nxl, nxlg, nxr, nxrg, nx_on_file, ny, nys, nysg, nyn, & |
---|
92 | nyng, ny_on_file, nzb, nzt |
---|
93 | |
---|
94 | USE kinds |
---|
95 | |
---|
96 | USE particle_attributes, & |
---|
97 | ONLY: iran_part |
---|
98 | |
---|
99 | USE pegrid |
---|
100 | |
---|
101 | USE random_function_mod, & |
---|
102 | ONLY: random_iv, random_iy |
---|
103 | |
---|
104 | USE random_generator_parallel, & |
---|
105 | ONLY: id_random_array, seq_random_array |
---|
106 | |
---|
107 | USE statistics, & |
---|
108 | ONLY: spectrum_x, spectrum_y |
---|
109 | |
---|
110 | |
---|
111 | IMPLICIT NONE |
---|
112 | |
---|
113 | CHARACTER (LEN=7) :: myid_char_save |
---|
114 | CHARACTER (LEN=10) :: binary_version |
---|
115 | CHARACTER (LEN=10) :: version_on_file |
---|
116 | CHARACTER (LEN=20) :: field_chr |
---|
117 | |
---|
118 | INTEGER(iwp) :: files_to_be_opened !: |
---|
119 | INTEGER(iwp) :: i !: |
---|
120 | INTEGER(iwp) :: j !: |
---|
121 | INTEGER(iwp) :: k !: |
---|
122 | INTEGER(iwp) :: myid_on_file !: |
---|
123 | INTEGER(iwp) :: numprocs_on_file !: |
---|
124 | INTEGER(iwp) :: nxlc !: |
---|
125 | INTEGER(iwp) :: nxlf !: |
---|
126 | INTEGER(iwp) :: nxlpr !: |
---|
127 | INTEGER(iwp) :: nxl_on_file !: |
---|
128 | INTEGER(iwp) :: nxrc !: |
---|
129 | INTEGER(iwp) :: nxrf !: |
---|
130 | INTEGER(iwp) :: nxrpr !: |
---|
131 | INTEGER(iwp) :: nxr_on_file !: |
---|
132 | INTEGER(iwp) :: nync !: |
---|
133 | INTEGER(iwp) :: nynf !: |
---|
134 | INTEGER(iwp) :: nynpr !: |
---|
135 | INTEGER(iwp) :: nyn_on_file !: |
---|
136 | INTEGER(iwp) :: nysc !: |
---|
137 | INTEGER(iwp) :: nysf !: |
---|
138 | INTEGER(iwp) :: nyspr !: |
---|
139 | INTEGER(iwp) :: nys_on_file !: |
---|
140 | INTEGER(iwp) :: nzb_on_file !: |
---|
141 | INTEGER(iwp) :: nzt_on_file !: |
---|
142 | INTEGER(iwp) :: offset_x !: |
---|
143 | INTEGER(iwp) :: offset_y !: |
---|
144 | INTEGER(iwp) :: shift_x !: |
---|
145 | INTEGER(iwp) :: shift_y !: |
---|
146 | |
---|
147 | INTEGER(iwp), DIMENSION(numprocs_previous_run) :: file_list !: |
---|
148 | INTEGER(iwp), DIMENSION(numprocs_previous_run) :: overlap_count !: |
---|
149 | |
---|
150 | INTEGER(iwp), DIMENSION(numprocs_previous_run,1000) :: nxlfa !: |
---|
151 | INTEGER(iwp), DIMENSION(numprocs_previous_run,1000) :: nxrfa !: |
---|
152 | INTEGER(iwp), DIMENSION(numprocs_previous_run,1000) :: nynfa !: |
---|
153 | INTEGER(iwp), DIMENSION(numprocs_previous_run,1000) :: nysfa !: |
---|
154 | INTEGER(iwp), DIMENSION(numprocs_previous_run,1000) :: offset_xa !: |
---|
155 | INTEGER(iwp), DIMENSION(numprocs_previous_run,1000) :: offset_ya !: |
---|
156 | |
---|
157 | REAL(wp) :: rdummy |
---|
158 | |
---|
159 | REAL(wp), DIMENSION(:,:), ALLOCATABLE :: tmp_2d !: |
---|
160 | REAL(wp), DIMENSION(:,:,:), ALLOCATABLE :: tmp_3d !: |
---|
161 | REAL(wp), DIMENSION(:,:,:), ALLOCATABLE :: tmp_3dwul !: |
---|
162 | REAL(wp), DIMENSION(:,:,:), ALLOCATABLE :: tmp_3dwun !: |
---|
163 | REAL(wp), DIMENSION(:,:,:), ALLOCATABLE :: tmp_3dwur !: |
---|
164 | REAL(wp), DIMENSION(:,:,:), ALLOCATABLE :: tmp_3dwus !: |
---|
165 | REAL(wp), DIMENSION(:,:,:), ALLOCATABLE :: tmp_3dwvl !: |
---|
166 | REAL(wp), DIMENSION(:,:,:), ALLOCATABLE :: tmp_3dwvn !: |
---|
167 | REAL(wp), DIMENSION(:,:,:), ALLOCATABLE :: tmp_3dwvr !: |
---|
168 | REAL(wp), DIMENSION(:,:,:), ALLOCATABLE :: tmp_3dwvs !: |
---|
169 | REAL(wp), DIMENSION(:,:,:), ALLOCATABLE :: tmp_3dwwl !: |
---|
170 | REAL(wp), DIMENSION(:,:,:), ALLOCATABLE :: tmp_3dwwn !: |
---|
171 | REAL(wp), DIMENSION(:,:,:), ALLOCATABLE :: tmp_3dwwr !: |
---|
172 | REAL(wp), DIMENSION(:,:,:), ALLOCATABLE :: tmp_3dwws !: |
---|
173 | |
---|
174 | REAL(wp), DIMENSION(:,:,:,:), ALLOCATABLE :: tmp_4d !: |
---|
175 | |
---|
176 | |
---|
177 | ! |
---|
178 | !-- Read data from previous model run. |
---|
179 | CALL cpu_log( log_point_s(14), 'read_3d_binary', 'start' ) |
---|
180 | |
---|
181 | ! |
---|
182 | !-- Check which of the restart files contain data needed for the subdomain |
---|
183 | !-- of this PE |
---|
184 | files_to_be_opened = 0 |
---|
185 | |
---|
186 | DO i = 1, numprocs_previous_run |
---|
187 | ! |
---|
188 | !-- Store array bounds of the previous run ("pr") in temporary scalars |
---|
189 | nxlpr = hor_index_bounds_previous_run(1,i-1) |
---|
190 | nxrpr = hor_index_bounds_previous_run(2,i-1) |
---|
191 | nyspr = hor_index_bounds_previous_run(3,i-1) |
---|
192 | nynpr = hor_index_bounds_previous_run(4,i-1) |
---|
193 | |
---|
194 | ! |
---|
195 | !-- Determine the offsets. They may be non-zero in case that the total domain |
---|
196 | !-- on file is smaller than the current total domain. |
---|
197 | offset_x = ( nxl / ( nx_on_file + 1 ) ) * ( nx_on_file + 1 ) |
---|
198 | offset_y = ( nys / ( ny_on_file + 1 ) ) * ( ny_on_file + 1 ) |
---|
199 | |
---|
200 | ! |
---|
201 | !-- Start with this offset and then check, if the subdomain on file |
---|
202 | !-- matches another time(s) in the current subdomain by shifting it |
---|
203 | !-- for nx_on_file+1, ny_on_file+1 respectively |
---|
204 | |
---|
205 | shift_y = 0 |
---|
206 | j = 0 |
---|
207 | DO WHILE ( nyspr+shift_y <= nyn-offset_y ) |
---|
208 | |
---|
209 | IF ( nynpr+shift_y >= nys-offset_y ) THEN |
---|
210 | |
---|
211 | shift_x = 0 |
---|
212 | DO WHILE ( nxlpr+shift_x <= nxr-offset_x ) |
---|
213 | |
---|
214 | IF ( nxrpr+shift_x >= nxl-offset_x ) THEN |
---|
215 | j = j +1 |
---|
216 | IF ( j > 1000 ) THEN |
---|
217 | ! |
---|
218 | !-- Array bound exceeded |
---|
219 | message_string = 'data from subdomain of previous' // & |
---|
220 | ' run mapped more than 1000 times' |
---|
221 | CALL message( 'read_3d_binary', 'PA0284', 2, 2, -1, & |
---|
222 | 6, 1 ) |
---|
223 | ENDIF |
---|
224 | |
---|
225 | IF ( j == 1 ) THEN |
---|
226 | files_to_be_opened = files_to_be_opened + 1 |
---|
227 | file_list(files_to_be_opened) = i-1 |
---|
228 | ENDIF |
---|
229 | |
---|
230 | offset_xa(files_to_be_opened,j) = offset_x + shift_x |
---|
231 | offset_ya(files_to_be_opened,j) = offset_y + shift_y |
---|
232 | ! |
---|
233 | !-- Index bounds of overlapping data |
---|
234 | nxlfa(files_to_be_opened,j) = MAX( nxl-offset_x-shift_x, nxlpr ) |
---|
235 | nxrfa(files_to_be_opened,j) = MIN( nxr-offset_x-shift_x, nxrpr ) |
---|
236 | nysfa(files_to_be_opened,j) = MAX( nys-offset_y-shift_y, nyspr ) |
---|
237 | nynfa(files_to_be_opened,j) = MIN( nyn-offset_y-shift_y, nynpr ) |
---|
238 | |
---|
239 | ENDIF |
---|
240 | |
---|
241 | shift_x = shift_x + ( nx_on_file + 1 ) |
---|
242 | ENDDO |
---|
243 | |
---|
244 | ENDIF |
---|
245 | |
---|
246 | shift_y = shift_y + ( ny_on_file + 1 ) |
---|
247 | ENDDO |
---|
248 | |
---|
249 | IF ( j > 0 ) overlap_count(files_to_be_opened) = j |
---|
250 | |
---|
251 | ! |
---|
252 | !-- Test output, to be removed later |
---|
253 | IF ( j > 0 ) THEN |
---|
254 | WRITE (9,*) '*** reading from file: ', i, j, ' times' |
---|
255 | WRITE (9,*) ' nxl = ', nxl, ' nxr = ', nxr, ' nys = ', & |
---|
256 | nys, ' nyn = ', nyn |
---|
257 | WRITE (9,*) ' ' |
---|
258 | DO k = 1, j |
---|
259 | WRITE (9,*) 'k = ', k |
---|
260 | WRITE (9,'(6(A,I4))') 'nxlfa = ', nxlfa(files_to_be_opened,k),& |
---|
261 | ' nxrfa = ', nxrfa(files_to_be_opened,k), & |
---|
262 | ' offset_xa = ', offset_xa(files_to_be_opened,k), & |
---|
263 | ' nysfa = ', nysfa(files_to_be_opened,k), & |
---|
264 | ' nynfa = ', nynfa(files_to_be_opened,k), & |
---|
265 | ' offset_ya = ', offset_ya(files_to_be_opened,k) |
---|
266 | ENDDO |
---|
267 | CALL local_flush( 9 ) |
---|
268 | ENDIF |
---|
269 | |
---|
270 | |
---|
271 | ENDDO |
---|
272 | |
---|
273 | ! |
---|
274 | !-- Save the id-string of the current process, since myid_char may now be used |
---|
275 | !-- to open files created by PEs with other id. |
---|
276 | myid_char_save = myid_char |
---|
277 | |
---|
278 | ! |
---|
279 | !-- Test output (remove later) |
---|
280 | |
---|
281 | DO i = 1, numprocs_previous_run |
---|
282 | WRITE (9,*) 'i=',i-1, ' ibs= ',hor_index_bounds_previous_run(1:4,i-1) |
---|
283 | ENDDO |
---|
284 | CALL local_flush( 9 ) |
---|
285 | |
---|
286 | IF ( files_to_be_opened /= 1 .OR. numprocs /= numprocs_previous_run ) & |
---|
287 | THEN |
---|
288 | WRITE( message_string, * ) 'number of PEs or virtual PE-grid changed ', & |
---|
289 | 'in restart run& PE', myid, ' will read from files ', & |
---|
290 | file_list(1:files_to_be_opened) |
---|
291 | CALL message( 'read_3d_binary', 'PA0285', 0, 0, 0, 6, 0 ) |
---|
292 | ENDIF |
---|
293 | |
---|
294 | ! |
---|
295 | !-- Read data from all restart files determined above |
---|
296 | DO i = 1, files_to_be_opened |
---|
297 | |
---|
298 | j = file_list(i) |
---|
299 | ! |
---|
300 | !-- Set the filename (underscore followed by four digit processor id) |
---|
301 | WRITE (myid_char,'(''_'',I6.6)') j |
---|
302 | WRITE (9,*) 'myid=',myid,' opening file "',myid_char,'"' |
---|
303 | CALL local_flush( 9 ) |
---|
304 | |
---|
305 | ! |
---|
306 | !-- Open the restart file. If this file has been created by PE0 (_000000), |
---|
307 | !-- the global variables at the beginning of the file have to be skipped |
---|
308 | !-- first. |
---|
309 | CALL check_open( 13 ) |
---|
310 | WRITE (9,*) 'before skipping' |
---|
311 | CALL local_flush( 9 ) |
---|
312 | IF ( j == 0 ) CALL skip_var_list |
---|
313 | WRITE (9,*) 'skipping done' |
---|
314 | CALL local_flush( 9 ) |
---|
315 | |
---|
316 | ! |
---|
317 | !-- First compare the version numbers |
---|
318 | READ ( 13 ) version_on_file |
---|
319 | binary_version = '3.4' |
---|
320 | IF ( TRIM( version_on_file ) /= TRIM( binary_version ) ) THEN |
---|
321 | WRITE( message_string, * ) 'version mismatch concerning data ', & |
---|
322 | 'from prior run', & |
---|
323 | '&version on file = "', TRIM( version_on_file ), '"', & |
---|
324 | '&version in program = "', TRIM( binary_version ), '"' |
---|
325 | CALL message( 'read_3d_binary', 'PA0286', 1, 2, 0, 6, 0 ) |
---|
326 | ENDIF |
---|
327 | |
---|
328 | ! |
---|
329 | !-- Read number of processors, processor-id, and array ranges. |
---|
330 | !-- Compare the array ranges with those stored in the index bound array. |
---|
331 | READ ( 13 ) numprocs_on_file, myid_on_file, nxl_on_file, nxr_on_file, & |
---|
332 | nys_on_file, nyn_on_file, nzb_on_file, nzt_on_file |
---|
333 | |
---|
334 | IF ( nxl_on_file /= hor_index_bounds_previous_run(1,j) ) THEN |
---|
335 | WRITE( message_string, * ) 'problem with index bound nxl on ', & |
---|
336 | 'restart file "', myid_char, '"', & |
---|
337 | '&nxl = ', nxl_on_file, ' but it should be', & |
---|
338 | '&= ', hor_index_bounds_previous_run(1,j), & |
---|
339 | '&from the index bound information array' |
---|
340 | CALL message( 'read_3d_binary', 'PA0287', 2, 2, -1, 6, 1 ) |
---|
341 | ENDIF |
---|
342 | |
---|
343 | IF ( nxr_on_file /= hor_index_bounds_previous_run(2,j) ) THEN |
---|
344 | WRITE( message_string, * ) 'problem with index bound nxr on ', & |
---|
345 | 'restart file "', myid_char, '"' , & |
---|
346 | '&nxr = ', nxr_on_file, ' but it should be', & |
---|
347 | '&= ', hor_index_bounds_previous_run(2,j), & |
---|
348 | '&from the index bound information array' |
---|
349 | CALL message( 'read_3d_binary', 'PA0288', 2, 2, -1, 6, 1 ) |
---|
350 | |
---|
351 | ENDIF |
---|
352 | |
---|
353 | IF ( nys_on_file /= hor_index_bounds_previous_run(3,j) ) THEN |
---|
354 | WRITE( message_string, * ) 'problem with index bound nys on ', & |
---|
355 | 'restart file "', myid_char, '"', & |
---|
356 | '&nys = ', nys_on_file, ' but it should be', & |
---|
357 | '&= ', hor_index_bounds_previous_run(3,j), & |
---|
358 | '&from the index bound information array' |
---|
359 | CALL message( 'read_3d_binary', 'PA0289', 2, 2, -1, 6, 1 ) |
---|
360 | ENDIF |
---|
361 | |
---|
362 | IF ( nyn_on_file /= hor_index_bounds_previous_run(4,j) ) THEN |
---|
363 | WRITE( message_string, * ) 'problem with index bound nyn on ', & |
---|
364 | 'restart file "', myid_char, '"', & |
---|
365 | '&nyn = ', nyn_on_file, ' but it should be', & |
---|
366 | '&= ', hor_index_bounds_previous_run(4,j), & |
---|
367 | '&from the index bound information array' |
---|
368 | CALL message( 'read_3d_binary', 'PA0290', 2, 2, -1, 6, 1 ) |
---|
369 | ENDIF |
---|
370 | |
---|
371 | IF ( nzb_on_file /= nzb ) THEN |
---|
372 | WRITE( message_string, * ) 'mismatch between actual data and data ', & |
---|
373 | '&from prior run on PE ', myid, & |
---|
374 | '&nzb on file = ', nzb_on_file, & |
---|
375 | '&nzb = ', nzb |
---|
376 | CALL message( 'read_3d_binary', 'PA0291', 1, 2, 0, 6, 0 ) |
---|
377 | ENDIF |
---|
378 | |
---|
379 | IF ( nzt_on_file /= nzt ) THEN |
---|
380 | WRITE( message_string, * ) 'mismatch between actual data and data ', & |
---|
381 | '&from prior run on PE ', myid, & |
---|
382 | '&nzt on file = ', nzt_on_file, & |
---|
383 | '&nzt = ', nzt |
---|
384 | CALL message( 'read_3d_binary', 'PA0292', 1, 2, 0, 6, 0 ) |
---|
385 | ENDIF |
---|
386 | |
---|
387 | ! |
---|
388 | !-- Allocate temporary arrays sized as the arrays on the restart file |
---|
389 | ALLOCATE( tmp_2d(nys_on_file-nbgp:nyn_on_file+nbgp, & |
---|
390 | nxl_on_file-nbgp:nxr_on_file+nbgp), & |
---|
391 | tmp_3d(nzb:nzt+1,nys_on_file-nbgp:nyn_on_file+nbgp, & |
---|
392 | nxl_on_file-nbgp:nxr_on_file+nbgp) ) |
---|
393 | |
---|
394 | ! |
---|
395 | !-- Read arrays |
---|
396 | !-- ATTENTION: If the following read commands have been altered, the |
---|
397 | !-- ---------- version number of the variable binary_version must be altered, |
---|
398 | !-- too. Furthermore, the output list of arrays in write_3d_binary |
---|
399 | !-- must also be altered accordingly. |
---|
400 | READ ( 13 ) field_chr |
---|
401 | DO WHILE ( TRIM( field_chr ) /= '*** end ***' ) |
---|
402 | |
---|
403 | ! |
---|
404 | !-- Map data on file as often as needed (data are read only for k=1) |
---|
405 | DO k = 1, overlap_count(i) |
---|
406 | |
---|
407 | ! |
---|
408 | !-- Get the index range of the subdomain on file which overlap with the |
---|
409 | !-- current subdomain |
---|
410 | nxlf = nxlfa(i,k) |
---|
411 | nxlc = nxlfa(i,k) + offset_xa(i,k) |
---|
412 | nxrf = nxrfa(i,k) |
---|
413 | nxrc = nxrfa(i,k) + offset_xa(i,k) |
---|
414 | nysf = nysfa(i,k) |
---|
415 | nysc = nysfa(i,k) + offset_ya(i,k) |
---|
416 | nynf = nynfa(i,k) |
---|
417 | nync = nynfa(i,k) + offset_ya(i,k) |
---|
418 | |
---|
419 | |
---|
420 | WRITE (9,*) 'var = ', field_chr |
---|
421 | CALL local_flush( 9 ) |
---|
422 | |
---|
423 | SELECT CASE ( TRIM( field_chr ) ) |
---|
424 | |
---|
425 | CASE ( 'e' ) |
---|
426 | IF ( k == 1 ) READ ( 13 ) tmp_3d |
---|
427 | e(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
428 | tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
429 | |
---|
430 | CASE ( 'e_av' ) |
---|
431 | IF ( .NOT. ALLOCATED( e_av ) ) THEN |
---|
432 | ALLOCATE( e_av(nzb:nzt+1,nys-nbgp:nyn+nbgp,nxl-nbgp:nxr+nbgp) ) |
---|
433 | ENDIF |
---|
434 | IF ( k == 1 ) READ ( 13 ) tmp_3d |
---|
435 | e_av(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
436 | tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
437 | |
---|
438 | CASE ( 'iran' ) ! matching random numbers is still unresolved |
---|
439 | ! issue |
---|
440 | IF ( k == 1 ) READ ( 13 ) iran, iran_part |
---|
441 | |
---|
442 | CASE ( 'kh' ) |
---|
443 | IF ( k == 1 ) READ ( 13 ) tmp_3d |
---|
444 | kh(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
445 | tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
446 | |
---|
447 | CASE ( 'km' ) |
---|
448 | IF ( k == 1 ) READ ( 13 ) tmp_3d |
---|
449 | km(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
450 | tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
451 | |
---|
452 | CASE ( 'lpt_av' ) |
---|
453 | IF ( .NOT. ALLOCATED( lpt_av ) ) THEN |
---|
454 | ALLOCATE( lpt_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg )) |
---|
455 | ENDIF |
---|
456 | IF ( k == 1 ) READ ( 13 ) tmp_3d |
---|
457 | lpt_av(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
458 | tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
459 | |
---|
460 | CASE ( 'lwp_av' ) |
---|
461 | IF ( .NOT. ALLOCATED( lwp_av ) ) THEN |
---|
462 | ALLOCATE( lwp_av(nysg:nyng,nxlg:nxrg) ) |
---|
463 | ENDIF |
---|
464 | IF ( k == 1 ) READ ( 13 ) tmp_2d |
---|
465 | lwp_av(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
466 | tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
467 | |
---|
468 | CASE ( 'nr' ) |
---|
469 | IF ( k == 1 ) READ ( 13 ) tmp_3d |
---|
470 | nr(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
471 | tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
472 | |
---|
473 | CASE ( 'nr_av' ) |
---|
474 | IF ( .NOT. ALLOCATED( nr_av ) ) THEN |
---|
475 | ALLOCATE( nr_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) |
---|
476 | ENDIF |
---|
477 | IF ( k == 1 ) READ ( 13 ) tmp_3d |
---|
478 | nr_av(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
479 | tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
480 | |
---|
481 | CASE ( 'nrs' ) |
---|
482 | IF ( k == 1 ) READ ( 13 ) tmp_2d |
---|
483 | nrs(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
484 | tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
485 | |
---|
486 | CASE ( 'nrsws' ) |
---|
487 | IF ( k == 1 ) READ ( 13 ) tmp_2d |
---|
488 | nrsws(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
489 | tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
490 | |
---|
491 | CASE ( 'nrswst' ) |
---|
492 | IF ( k == 1 ) READ ( 13 ) tmp_2d |
---|
493 | nrswst(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
494 | tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
495 | |
---|
496 | CASE ( 'p' ) |
---|
497 | IF ( k == 1 ) READ ( 13 ) tmp_3d |
---|
498 | p(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
499 | tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
500 | |
---|
501 | CASE ( 'p_av' ) |
---|
502 | IF ( .NOT. ALLOCATED( p_av ) ) THEN |
---|
503 | ALLOCATE( p_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) |
---|
504 | ENDIF |
---|
505 | IF ( k == 1 ) READ ( 13 ) tmp_3d |
---|
506 | p_av(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
507 | tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
508 | |
---|
509 | CASE ( 'pc_av' ) |
---|
510 | IF ( .NOT. ALLOCATED( pc_av ) ) THEN |
---|
511 | ALLOCATE( pc_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) |
---|
512 | ENDIF |
---|
513 | IF ( k == 1 ) READ ( 13 ) tmp_3d |
---|
514 | pc_av(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
515 | tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
516 | |
---|
517 | CASE ( 'pr_av' ) |
---|
518 | IF ( .NOT. ALLOCATED( pr_av ) ) THEN |
---|
519 | ALLOCATE( pr_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) |
---|
520 | ENDIF |
---|
521 | IF ( k == 1 ) READ ( 13 ) tmp_3d |
---|
522 | pr_av(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
523 | tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
524 | |
---|
525 | CASE ( 'prr' ) |
---|
526 | IF ( .NOT. ALLOCATED( prr ) ) THEN |
---|
527 | ALLOCATE( prr(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) |
---|
528 | ENDIF |
---|
529 | IF ( k == 1 ) READ ( 13 ) tmp_3d |
---|
530 | prr(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
531 | tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
532 | |
---|
533 | CASE ( 'prr_av' ) |
---|
534 | IF ( .NOT. ALLOCATED( prr_av ) ) THEN |
---|
535 | ALLOCATE( prr_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) |
---|
536 | ENDIF |
---|
537 | IF ( k == 1 ) READ ( 13 ) tmp_3d |
---|
538 | prr_av(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
539 | tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
540 | |
---|
541 | CASE ( 'precipitation_amount' ) |
---|
542 | IF ( k == 1 ) READ ( 13 ) tmp_2d |
---|
543 | precipitation_amount(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
544 | tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
545 | |
---|
546 | CASE ( 'precipitation_rate_a' ) |
---|
547 | IF ( .NOT. ALLOCATED( precipitation_rate_av ) ) THEN |
---|
548 | ALLOCATE( precipitation_rate_av(nysg:nyng,nxlg:nxrg) ) |
---|
549 | ENDIF |
---|
550 | IF ( k == 1 ) READ ( 13 ) tmp_2d |
---|
551 | precipitation_rate_av(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
552 | tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
553 | |
---|
554 | CASE ( 'pt' ) |
---|
555 | IF ( k == 1 ) READ ( 13 ) tmp_3d |
---|
556 | pt(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
557 | tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
558 | |
---|
559 | CASE ( 'pt_av' ) |
---|
560 | IF ( .NOT. ALLOCATED( pt_av ) ) THEN |
---|
561 | ALLOCATE( pt_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) |
---|
562 | ENDIF |
---|
563 | IF ( k == 1 ) READ ( 13 ) tmp_3d |
---|
564 | pt_av(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
565 | tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
566 | |
---|
567 | CASE ( 'q' ) |
---|
568 | IF ( k == 1 ) READ ( 13 ) tmp_3d |
---|
569 | q(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
570 | tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
571 | |
---|
572 | CASE ( 'q_av' ) |
---|
573 | IF ( .NOT. ALLOCATED( q_av ) ) THEN |
---|
574 | ALLOCATE( q_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg )) |
---|
575 | ENDIF |
---|
576 | IF ( k == 1 ) READ ( 13 ) tmp_3d |
---|
577 | q_av(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
578 | tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
579 | |
---|
580 | CASE ( 'qc' ) |
---|
581 | IF ( k == 1 ) READ ( 13 ) tmp_3d |
---|
582 | qc(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
583 | tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
584 | |
---|
585 | CASE ( 'qc_av' ) |
---|
586 | IF ( .NOT. ALLOCATED( qc_av ) ) THEN |
---|
587 | ALLOCATE( qc_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) |
---|
588 | ENDIF |
---|
589 | IF ( k == 1 ) READ ( 13 ) tmp_3d |
---|
590 | qc_av(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
591 | tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
592 | |
---|
593 | CASE ( 'ql' ) |
---|
594 | IF ( k == 1 ) READ ( 13 ) tmp_3d |
---|
595 | ql(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
596 | tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
597 | |
---|
598 | CASE ( 'ql_av' ) |
---|
599 | IF ( .NOT. ALLOCATED( ql_av ) ) THEN |
---|
600 | ALLOCATE( ql_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) |
---|
601 | ENDIF |
---|
602 | IF ( k == 1 ) READ ( 13 ) tmp_3d |
---|
603 | ql_av(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
604 | tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
605 | |
---|
606 | CASE ( 'qr' ) |
---|
607 | IF ( k == 1 ) READ ( 13 ) tmp_3d |
---|
608 | qr(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
609 | tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
610 | |
---|
611 | CASE ( 'qr_av' ) |
---|
612 | IF ( .NOT. ALLOCATED( qr_av ) ) THEN |
---|
613 | ALLOCATE( qr_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) |
---|
614 | ENDIF |
---|
615 | IF ( k == 1 ) READ ( 13 ) tmp_3d |
---|
616 | qr_av(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
617 | tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
618 | |
---|
619 | CASE ( 'qrs' ) |
---|
620 | IF ( k == 1 ) READ ( 13 ) tmp_2d |
---|
621 | qrs(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
622 | tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
623 | |
---|
624 | CASE ( 'qrsws' ) |
---|
625 | IF ( k == 1 ) READ ( 13 ) tmp_2d |
---|
626 | qrsws(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
627 | tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
628 | |
---|
629 | CASE ( 'qrswst' ) |
---|
630 | IF ( k == 1 ) READ ( 13 ) tmp_2d |
---|
631 | qrswst(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
632 | tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
633 | |
---|
634 | CASE ( 'ql_c_av' ) |
---|
635 | IF ( .NOT. ALLOCATED( ql_c_av ) ) THEN |
---|
636 | ALLOCATE( ql_c_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) |
---|
637 | ENDIF |
---|
638 | IF ( k == 1 ) READ ( 13 ) tmp_3d |
---|
639 | ql_c_av(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
640 | tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
641 | |
---|
642 | CASE ( 'ql_v_av' ) |
---|
643 | IF ( .NOT. ALLOCATED( ql_v_av ) ) THEN |
---|
644 | ALLOCATE( ql_v_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) |
---|
645 | ENDIF |
---|
646 | IF ( k == 1 ) READ ( 13 ) tmp_3d |
---|
647 | ql_v_av(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
648 | tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
649 | |
---|
650 | CASE ( 'ql_vp_av' ) |
---|
651 | IF ( .NOT. ALLOCATED( ql_vp_av ) ) THEN |
---|
652 | ALLOCATE( ql_vp_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) |
---|
653 | ENDIF |
---|
654 | IF ( k == 1 ) READ ( 13 ) tmp_3d |
---|
655 | ql_vp_av(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
656 | tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
657 | |
---|
658 | CASE ( 'qs' ) |
---|
659 | IF ( k == 1 ) READ ( 13 ) tmp_2d |
---|
660 | qs(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
661 | tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
662 | |
---|
663 | CASE ( 'qsws' ) |
---|
664 | IF ( k == 1 ) READ ( 13 ) tmp_2d |
---|
665 | qsws(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
666 | tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
667 | |
---|
668 | CASE ( 'qsws_av' ) |
---|
669 | IF ( .NOT. ALLOCATED( qsws_av ) ) THEN |
---|
670 | ALLOCATE( qsws_av(nysg:nyng,nxlg:nxrg) ) |
---|
671 | ENDIF |
---|
672 | IF ( k == 1 ) READ ( 13 ) tmp_2d |
---|
673 | qsws_av(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
674 | tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
675 | |
---|
676 | CASE ( 'qswst' ) |
---|
677 | IF ( k == 1 ) READ ( 13 ) tmp_2d |
---|
678 | qswst(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
679 | tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
680 | |
---|
681 | CASE ( 'qv_av' ) |
---|
682 | IF ( .NOT. ALLOCATED( qv_av ) ) THEN |
---|
683 | ALLOCATE( qv_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) |
---|
684 | ENDIF |
---|
685 | IF ( k == 1 ) READ ( 13 ) tmp_3d |
---|
686 | qv_av(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
687 | tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
688 | |
---|
689 | CASE ( 'random_iv' ) ! still unresolved issue |
---|
690 | IF ( k == 1 ) READ ( 13 ) random_iv |
---|
691 | IF ( k == 1 ) READ ( 13 ) random_iy |
---|
692 | |
---|
693 | CASE ( 'seq_random_array' ) ! still unresolved issue |
---|
694 | IF ( k == 1 ) READ ( 13 ) id_random_array |
---|
695 | IF ( k == 1 ) READ ( 13 ) seq_random_array |
---|
696 | |
---|
697 | CASE ( 'rho_av' ) |
---|
698 | IF ( .NOT. ALLOCATED( rho_av ) ) THEN |
---|
699 | ALLOCATE( rho_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) |
---|
700 | ENDIF |
---|
701 | IF ( k == 1 ) READ ( 13 ) tmp_3d |
---|
702 | rho_av(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
703 | tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
704 | |
---|
705 | CASE ( 'rif' ) |
---|
706 | IF ( k == 1 ) READ ( 13 ) tmp_2d |
---|
707 | rif(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
708 | tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
709 | |
---|
710 | CASE ( 'rif_wall' ) |
---|
711 | IF ( k == 1 ) THEN |
---|
712 | ALLOCATE( tmp_4d(nzb:nzt+1,nys_on_file-nbgp:nyn_on_file+nbgp, & |
---|
713 | nxl_on_file-nbgp:nxr_on_file+nbgp,1:4) ) |
---|
714 | READ ( 13 ) tmp_4d |
---|
715 | ENDIF |
---|
716 | rif_wall(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp,:) = & |
---|
717 | tmp_4d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp,:) |
---|
718 | |
---|
719 | CASE ( 's_av' ) |
---|
720 | IF ( .NOT. ALLOCATED( s_av ) ) THEN |
---|
721 | ALLOCATE( s_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg)) |
---|
722 | ENDIF |
---|
723 | IF ( k == 1 ) READ ( 13 ) tmp_3d |
---|
724 | s_av(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
725 | tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
726 | |
---|
727 | CASE ( 'sa' ) |
---|
728 | IF ( k == 1 ) READ ( 13 ) tmp_3d |
---|
729 | sa(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
730 | tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
731 | |
---|
732 | CASE ( 'sa_av' ) |
---|
733 | IF ( .NOT. ALLOCATED( sa_av ) ) THEN |
---|
734 | ALLOCATE( sa_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) |
---|
735 | ENDIF |
---|
736 | IF ( k == 1 ) READ ( 13 ) tmp_3d |
---|
737 | sa_av(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
738 | tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
739 | |
---|
740 | CASE ( 'saswsb' ) |
---|
741 | IF ( k == 1 ) READ ( 13 ) tmp_2d |
---|
742 | saswsb(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
743 | tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
744 | |
---|
745 | CASE ( 'saswst' ) |
---|
746 | IF ( k == 1 ) READ ( 13 ) tmp_2d |
---|
747 | saswst(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
748 | tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
749 | |
---|
750 | CASE ( 'shf' ) |
---|
751 | IF ( k == 1 ) READ ( 13 ) tmp_2d |
---|
752 | shf(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
753 | tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
754 | |
---|
755 | CASE ( 'shf_av' ) |
---|
756 | IF ( .NOT. ALLOCATED( shf_av ) ) THEN |
---|
757 | ALLOCATE( shf_av(nysg:nyng,nxlg:nxrg) ) |
---|
758 | ENDIF |
---|
759 | IF ( k == 1 ) READ ( 13 ) tmp_2d |
---|
760 | shf_av(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
761 | tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
762 | |
---|
763 | CASE ( 'spectrum_x' ) |
---|
764 | IF ( k == 1 ) THEN |
---|
765 | IF ( nx_on_file /= nx ) THEN |
---|
766 | message_string = 'read_3d_binary: spectrum_x ' // & |
---|
767 | 'on restart file ignored because' // & |
---|
768 | '&total numbers of grid points (nx) ' // & |
---|
769 | 'do not match' |
---|
770 | CALL message( 'read_3d_binary', 'PA0293',& |
---|
771 | 0, 1, 0, 6, 0 ) |
---|
772 | READ ( 13 ) rdummy |
---|
773 | ELSE |
---|
774 | READ ( 13 ) spectrum_x |
---|
775 | ENDIF |
---|
776 | ENDIF |
---|
777 | |
---|
778 | CASE ( 'spectrum_y' ) |
---|
779 | IF ( k == 1 ) THEN |
---|
780 | IF ( ny_on_file /= ny ) THEN |
---|
781 | message_string = 'read_3d_binary: spectrum_y ' // & |
---|
782 | 'on restart file ignored because' // & |
---|
783 | '&total numbers of grid points (ny) '// & |
---|
784 | 'do not match' |
---|
785 | CALL message( 'read_3d_binary', 'PA0294', & |
---|
786 | 0, 1, 0, 6, 0 ) |
---|
787 | READ ( 13 ) rdummy |
---|
788 | ELSE |
---|
789 | READ ( 13 ) spectrum_y |
---|
790 | ENDIF |
---|
791 | ENDIF |
---|
792 | |
---|
793 | CASE ( 'ts' ) |
---|
794 | IF ( k == 1 ) READ ( 13 ) tmp_2d |
---|
795 | ts(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
796 | tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
797 | |
---|
798 | CASE ( 'ts_av' ) |
---|
799 | IF ( .NOT. ALLOCATED( ts_av ) ) THEN |
---|
800 | ALLOCATE( ts_av(nysg:nyng,nxlg:nxrg) ) |
---|
801 | ENDIF |
---|
802 | IF ( k == 1 ) READ ( 13 ) tmp_2d |
---|
803 | ts_av(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
804 | tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
805 | |
---|
806 | CASE ( 'tswst' ) |
---|
807 | IF ( k == 1 ) READ ( 13 ) tmp_2d |
---|
808 | tswst(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
809 | tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
810 | |
---|
811 | CASE ( 'u' ) |
---|
812 | IF ( k == 1 ) READ ( 13 ) tmp_3d |
---|
813 | u(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
814 | tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
815 | |
---|
816 | CASE ( 'u_av' ) |
---|
817 | IF ( .NOT. ALLOCATED( u_av ) ) THEN |
---|
818 | ALLOCATE( u_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) |
---|
819 | ENDIF |
---|
820 | IF ( k == 1 ) READ ( 13 ) tmp_3d |
---|
821 | u_av(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
822 | tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
823 | |
---|
824 | CASE ( 'u_m_l' ) |
---|
825 | IF ( k == 1 ) THEN |
---|
826 | ALLOCATE( tmp_3dwul(nzb:nzt+1, & |
---|
827 | nys_on_file-nbgp:nyn_on_file+nbgp,1:2) ) |
---|
828 | READ ( 13 ) tmp_3dwul |
---|
829 | ENDIF |
---|
830 | IF ( outflow_l ) THEN |
---|
831 | u_m_l(:,nysc-nbgp:nync+nbgp,:) = tmp_3dwul(:,nysf-nbgp:nynf+nbgp,:) |
---|
832 | ENDIF |
---|
833 | |
---|
834 | CASE ( 'u_m_n' ) |
---|
835 | IF ( k == 1 ) THEN |
---|
836 | ALLOCATE( tmp_3dwun(nzb:nzt+1,ny-1:ny, & |
---|
837 | nxl_on_file-nbgp:nxr_on_file+nbgp) ) |
---|
838 | READ ( 13 ) tmp_3dwun |
---|
839 | ENDIF |
---|
840 | IF ( outflow_n ) THEN |
---|
841 | u_m_n(:,:,nxlc-nbgp:nxrc+nbgp) = tmp_3dwun(:,:,nxlf-nbgp:nxrf+nbgp) |
---|
842 | ENDIF |
---|
843 | |
---|
844 | CASE ( 'u_m_r' ) |
---|
845 | IF ( k == 1 ) THEN |
---|
846 | ALLOCATE( tmp_3dwur(nzb:nzt+1,& |
---|
847 | nys_on_file-nbgp:nyn_on_file+nbgp,nx-1:nx) ) |
---|
848 | READ ( 13 ) tmp_3dwur |
---|
849 | ENDIF |
---|
850 | IF ( outflow_r ) THEN |
---|
851 | u_m_r(:,nysc-nbgp:nync+nbgp,:) = tmp_3dwur(:,nysf-nbgp:nynf+nbgp,:) |
---|
852 | ENDIF |
---|
853 | |
---|
854 | CASE ( 'u_m_s' ) |
---|
855 | IF ( k == 1 ) THEN |
---|
856 | ALLOCATE( tmp_3dwus(nzb:nzt+1,0:1, & |
---|
857 | nxl_on_file-nbgp:nxr_on_file+nbgp) ) |
---|
858 | READ ( 13 ) tmp_3dwus |
---|
859 | ENDIF |
---|
860 | IF ( outflow_s ) THEN |
---|
861 | u_m_s(:,:,nxlc-nbgp:nxrc+nbgp) = tmp_3dwus(:,:,nxlf-nbgp:nxrf+nbgp) |
---|
862 | ENDIF |
---|
863 | |
---|
864 | CASE ( 'us' ) |
---|
865 | IF ( k == 1 ) READ ( 13 ) tmp_2d |
---|
866 | us(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
867 | tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
868 | |
---|
869 | CASE ( 'usws' ) |
---|
870 | IF ( k == 1 ) READ ( 13 ) tmp_2d |
---|
871 | usws(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
872 | tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
873 | |
---|
874 | CASE ( 'uswst' ) |
---|
875 | IF ( k == 1 ) READ ( 13 ) tmp_2d |
---|
876 | uswst(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
877 | tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
878 | |
---|
879 | CASE ( 'us_av' ) |
---|
880 | IF ( .NOT. ALLOCATED( us_av ) ) THEN |
---|
881 | ALLOCATE( us_av(nysg:nyng,nxlg:nxrg) ) |
---|
882 | ENDIF |
---|
883 | IF ( k == 1 ) READ ( 13 ) tmp_2d |
---|
884 | us_av(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
885 | tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
886 | |
---|
887 | CASE ( 'v' ) |
---|
888 | IF ( k == 1 ) READ ( 13 ) tmp_3d |
---|
889 | v(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
890 | tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
891 | |
---|
892 | CASE ( 'v_av' ) |
---|
893 | IF ( .NOT. ALLOCATED( v_av ) ) THEN |
---|
894 | ALLOCATE( v_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) |
---|
895 | ENDIF |
---|
896 | IF ( k == 1 ) READ ( 13 ) tmp_3d |
---|
897 | v_av(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
898 | tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
899 | |
---|
900 | CASE ( 'v_m_l' ) |
---|
901 | IF ( k == 1 ) THEN |
---|
902 | ALLOCATE( tmp_3dwvl(nzb:nzt+1,& |
---|
903 | nys_on_file-nbgp:nyn_on_file+nbgp,0:1) ) |
---|
904 | READ ( 13 ) tmp_3dwvl |
---|
905 | ENDIF |
---|
906 | IF ( outflow_l ) THEN |
---|
907 | v_m_l(:,nysc-nbgp:nync+nbgp,:) = tmp_3dwvl(:,nysf-nbgp:nynf+nbgp,:) |
---|
908 | ENDIF |
---|
909 | |
---|
910 | CASE ( 'v_m_n' ) |
---|
911 | IF ( k == 1 ) THEN |
---|
912 | ALLOCATE( tmp_3dwvn(nzb:nzt+1,ny-1:ny, & |
---|
913 | nxl_on_file-nbgp:nxr_on_file+nbgp) ) |
---|
914 | READ ( 13 ) tmp_3dwvn |
---|
915 | ENDIF |
---|
916 | IF ( outflow_n ) THEN |
---|
917 | v_m_n(:,:,nxlc-nbgp:nxrc+nbgp) = tmp_3dwvn(:,:,nxlf-nbgp:nxrf+nbgp) |
---|
918 | ENDIF |
---|
919 | |
---|
920 | CASE ( 'v_m_r' ) |
---|
921 | IF ( k == 1 ) THEN |
---|
922 | ALLOCATE( tmp_3dwvr(nzb:nzt+1,& |
---|
923 | nys_on_file-nbgp:nyn_on_file+nbgp,nx-1:nx) ) |
---|
924 | READ ( 13 ) tmp_3dwvr |
---|
925 | ENDIF |
---|
926 | IF ( outflow_r ) THEN |
---|
927 | v_m_r(:,nysc-nbgp:nync+nbgp,:) = tmp_3dwvr(:,nysf-nbgp:nynf+nbgp,:) |
---|
928 | ENDIF |
---|
929 | |
---|
930 | CASE ( 'v_m_s' ) |
---|
931 | IF ( k == 1 ) THEN |
---|
932 | ALLOCATE( tmp_3dwvs(nzb:nzt+1,1:2, & |
---|
933 | nxl_on_file-nbgp:nxr_on_file+nbgp) ) |
---|
934 | READ ( 13 ) tmp_3dwvs |
---|
935 | ENDIF |
---|
936 | IF ( outflow_s ) THEN |
---|
937 | v_m_s(:,:,nxlc-nbgp:nxrc+nbgp) = tmp_3dwvs(:,:,nxlf-nbgp:nxrf+nbgp) |
---|
938 | ENDIF |
---|
939 | |
---|
940 | CASE ( 'vpt' ) |
---|
941 | IF ( k == 1 ) READ ( 13 ) tmp_3d |
---|
942 | vpt(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
943 | tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
944 | |
---|
945 | CASE ( 'vpt_av' ) |
---|
946 | IF ( .NOT. ALLOCATED( vpt_av ) ) THEN |
---|
947 | ALLOCATE( vpt_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) |
---|
948 | ENDIF |
---|
949 | IF ( k == 1 ) READ ( 13 ) tmp_3d |
---|
950 | vpt_av(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
951 | tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
952 | |
---|
953 | CASE ( 'vsws' ) |
---|
954 | IF ( k == 1 ) READ ( 13 ) tmp_2d |
---|
955 | vsws(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
956 | tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
957 | |
---|
958 | CASE ( 'vswst' ) |
---|
959 | IF ( k == 1 ) READ ( 13 ) tmp_2d |
---|
960 | vswst(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
961 | tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
962 | |
---|
963 | CASE ( 'w' ) |
---|
964 | IF ( k == 1 ) READ ( 13 ) tmp_3d |
---|
965 | w(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
966 | tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
967 | |
---|
968 | CASE ( 'w_av' ) |
---|
969 | IF ( .NOT. ALLOCATED( w_av ) ) THEN |
---|
970 | ALLOCATE( w_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) |
---|
971 | ENDIF |
---|
972 | IF ( k == 1 ) READ ( 13 ) tmp_3d |
---|
973 | w_av(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
974 | tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
975 | |
---|
976 | CASE ( 'w_m_l' ) |
---|
977 | IF ( k == 1 ) THEN |
---|
978 | ALLOCATE( tmp_3dwwl(nzb:nzt+1,& |
---|
979 | nys_on_file-nbgp:nyn_on_file+nbgp,0:1) ) |
---|
980 | READ ( 13 ) tmp_3dwwl |
---|
981 | ENDIF |
---|
982 | IF ( outflow_l ) THEN |
---|
983 | w_m_l(:,nysc-nbgp:nync+nbgp,:) = tmp_3dwwl(:,nysf-nbgp:nynf+nbgp,:) |
---|
984 | ENDIF |
---|
985 | |
---|
986 | CASE ( 'w_m_n' ) |
---|
987 | IF ( k == 1 ) THEN |
---|
988 | ALLOCATE( tmp_3dwwn(nzb:nzt+1,ny-1:ny, & |
---|
989 | nxl_on_file-nbgp:nxr_on_file+nbgp) ) |
---|
990 | READ ( 13 ) tmp_3dwwn |
---|
991 | ENDIF |
---|
992 | IF ( outflow_n ) THEN |
---|
993 | w_m_n(:,:,nxlc-nbgp:nxrc+nbgp) = tmp_3dwwn(:,:,nxlf-nbgp:nxrf+nbgp) |
---|
994 | ENDIF |
---|
995 | |
---|
996 | CASE ( 'w_m_r' ) |
---|
997 | IF ( k == 1 ) THEN |
---|
998 | ALLOCATE( tmp_3dwwr(nzb:nzt+1,& |
---|
999 | nys_on_file-nbgp:nyn_on_file+nbgp,nx-1:nx) ) |
---|
1000 | READ ( 13 ) tmp_3dwwr |
---|
1001 | ENDIF |
---|
1002 | IF ( outflow_r ) THEN |
---|
1003 | w_m_r(:,nysc-nbgp:nync+nbgp,:) = tmp_3dwwr(:,nysf-nbgp:nynf+nbgp,:) |
---|
1004 | ENDIF |
---|
1005 | |
---|
1006 | CASE ( 'w_m_s' ) |
---|
1007 | IF ( k == 1 ) THEN |
---|
1008 | ALLOCATE( tmp_3dwws(nzb:nzt+1,0:1, & |
---|
1009 | nxl_on_file-nbgp:nxr_on_file+nbgp) ) |
---|
1010 | READ ( 13 ) tmp_3dwws |
---|
1011 | ENDIF |
---|
1012 | IF ( outflow_s ) THEN |
---|
1013 | w_m_s(:,:,nxlc-nbgp:nxrc+nbgp) = tmp_3dwws(:,:,nxlf-nbgp:nxrf+nbgp) |
---|
1014 | ENDIF |
---|
1015 | DEALLOCATE( tmp_3dwws ) |
---|
1016 | |
---|
1017 | CASE ( 'z0' ) |
---|
1018 | IF ( k == 1 ) READ ( 13 ) tmp_2d |
---|
1019 | z0(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
1020 | tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
1021 | |
---|
1022 | CASE ( 'z0_av' ) |
---|
1023 | IF ( .NOT. ALLOCATED( z0_av ) ) THEN |
---|
1024 | ALLOCATE( z0_av(nysg:nyng,nxlg:nxrg) ) |
---|
1025 | ENDIF |
---|
1026 | IF ( k == 1 ) READ ( 13 ) tmp_2d |
---|
1027 | z0_av(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
1028 | tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
1029 | |
---|
1030 | CASE ( 'z0h' ) |
---|
1031 | IF ( k == 1 ) READ ( 13 ) tmp_2d |
---|
1032 | z0h(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
1033 | tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
1034 | |
---|
1035 | CASE ( 'z0h_av' ) |
---|
1036 | IF ( .NOT. ALLOCATED( z0h_av ) ) THEN |
---|
1037 | ALLOCATE( z0h_av(nysg:nyng,nxlg:nxrg) ) |
---|
1038 | ENDIF |
---|
1039 | IF ( k == 1 ) READ ( 13 ) tmp_2d |
---|
1040 | z0h_av(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
1041 | tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
1042 | |
---|
1043 | CASE DEFAULT |
---|
1044 | WRITE( message_string, * ) 'unknown field named "', & |
---|
1045 | TRIM( field_chr ), '" found in', & |
---|
1046 | '&data from prior run on PE ',myid |
---|
1047 | CALL message( 'read_3d_binary', 'PA0295', 1, 2, 0, 6, 0 ) |
---|
1048 | |
---|
1049 | END SELECT |
---|
1050 | |
---|
1051 | ENDDO ! overlap loop |
---|
1052 | |
---|
1053 | ! |
---|
1054 | !-- Deallocate arrays needed for specific variables only |
---|
1055 | IF ( ALLOCATED( tmp_3dwul ) ) DEALLOCATE( tmp_3dwul ) |
---|
1056 | IF ( ALLOCATED( tmp_3dwun ) ) DEALLOCATE( tmp_3dwun ) |
---|
1057 | IF ( ALLOCATED( tmp_3dwur ) ) DEALLOCATE( tmp_3dwur ) |
---|
1058 | IF ( ALLOCATED( tmp_3dwus ) ) DEALLOCATE( tmp_3dwus ) |
---|
1059 | IF ( ALLOCATED( tmp_3dwvl ) ) DEALLOCATE( tmp_3dwvl ) |
---|
1060 | IF ( ALLOCATED( tmp_3dwvn ) ) DEALLOCATE( tmp_3dwvn ) |
---|
1061 | IF ( ALLOCATED( tmp_3dwvr ) ) DEALLOCATE( tmp_3dwvr ) |
---|
1062 | IF ( ALLOCATED( tmp_3dwvs ) ) DEALLOCATE( tmp_3dwvs ) |
---|
1063 | IF ( ALLOCATED( tmp_3dwwl ) ) DEALLOCATE( tmp_3dwwl ) |
---|
1064 | IF ( ALLOCATED( tmp_3dwwn ) ) DEALLOCATE( tmp_3dwwn ) |
---|
1065 | IF ( ALLOCATED( tmp_3dwwr ) ) DEALLOCATE( tmp_3dwwr ) |
---|
1066 | IF ( ALLOCATED( tmp_3dwws ) ) DEALLOCATE( tmp_3dwws ) |
---|
1067 | IF ( ALLOCATED( tmp_4d ) ) DEALLOCATE( tmp_4d ) |
---|
1068 | |
---|
1069 | ! |
---|
1070 | !-- Read next character string |
---|
1071 | READ ( 13 ) field_chr |
---|
1072 | |
---|
1073 | ENDDO ! loop over variables |
---|
1074 | |
---|
1075 | ! |
---|
1076 | !-- Read user-defined restart data |
---|
1077 | CALL user_read_restart_data( i, nxlfa, nxl_on_file, nxrfa, nxr_on_file, & |
---|
1078 | nynfa, nyn_on_file, nysfa, nys_on_file, & |
---|
1079 | offset_xa, offset_ya, overlap_count(i), & |
---|
1080 | tmp_2d, tmp_3d ) |
---|
1081 | |
---|
1082 | ! |
---|
1083 | !-- Close the restart file |
---|
1084 | CALL close_file( 13 ) |
---|
1085 | |
---|
1086 | DEALLOCATE( tmp_2d, tmp_3d ) |
---|
1087 | |
---|
1088 | ENDDO ! loop over restart files |
---|
1089 | |
---|
1090 | |
---|
1091 | ! |
---|
1092 | !-- Restore the original filename for the restart file to be written |
---|
1093 | myid_char = myid_char_save |
---|
1094 | |
---|
1095 | |
---|
1096 | ! |
---|
1097 | !-- End of time measuring for reading binary data |
---|
1098 | CALL cpu_log( log_point_s(14), 'read_3d_binary', 'stop' ) |
---|
1099 | |
---|
1100 | END SUBROUTINE read_3d_binary |
---|