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