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