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