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