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