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