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 1960 2016-07-12 16:34:24Z suehring $ |
---|
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, s, sa, saswsb, saswst, & |
---|
110 | ss, ssws, sswst, rif_wall, shf, ss, ts, tswst, u, u_m_l, u_m_n, & |
---|
111 | u_m_r, u_m_s, us, usws, uswst, v, v_m_l, v_m_n, v_m_r, v_m_s, & |
---|
112 | vpt, vsws, vswst, 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' ) |
---|
989 | IF ( k == 1 ) READ ( 13 ) tmp_3d |
---|
990 | s(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
991 | tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
992 | |
---|
993 | CASE ( 's_av' ) |
---|
994 | IF ( .NOT. ALLOCATED( s_av ) ) THEN |
---|
995 | ALLOCATE( s_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg)) |
---|
996 | ENDIF |
---|
997 | IF ( k == 1 ) READ ( 13 ) tmp_3d |
---|
998 | s_av(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
999 | tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
1000 | |
---|
1001 | CASE ( 'sa' ) |
---|
1002 | IF ( k == 1 ) READ ( 13 ) tmp_3d |
---|
1003 | sa(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
1004 | tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
1005 | |
---|
1006 | CASE ( 'sa_av' ) |
---|
1007 | IF ( .NOT. ALLOCATED( sa_av ) ) THEN |
---|
1008 | ALLOCATE( sa_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) |
---|
1009 | ENDIF |
---|
1010 | IF ( k == 1 ) READ ( 13 ) tmp_3d |
---|
1011 | sa_av(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
1012 | tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
1013 | |
---|
1014 | CASE ( 'saswsb' ) |
---|
1015 | IF ( k == 1 ) READ ( 13 ) tmp_2d |
---|
1016 | saswsb(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
1017 | tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
1018 | |
---|
1019 | CASE ( 'saswst' ) |
---|
1020 | IF ( k == 1 ) READ ( 13 ) tmp_2d |
---|
1021 | saswst(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
1022 | tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
1023 | |
---|
1024 | CASE ( 'shf' ) |
---|
1025 | IF ( k == 1 ) READ ( 13 ) tmp_2d |
---|
1026 | shf(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
1027 | tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
1028 | |
---|
1029 | CASE ( 'shf_av' ) |
---|
1030 | IF ( .NOT. ALLOCATED( shf_av ) ) THEN |
---|
1031 | ALLOCATE( shf_av(nysg:nyng,nxlg:nxrg) ) |
---|
1032 | ENDIF |
---|
1033 | IF ( k == 1 ) READ ( 13 ) tmp_2d |
---|
1034 | shf_av(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
1035 | tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
1036 | |
---|
1037 | CASE ( 'shf_eb_av' ) |
---|
1038 | IF ( .NOT. ALLOCATED( shf_eb_av ) ) THEN |
---|
1039 | ALLOCATE( shf_eb_av(nysg:nyng,nxlg:nxrg) ) |
---|
1040 | ENDIF |
---|
1041 | IF ( k == 1 ) READ ( 13 ) tmp_2d |
---|
1042 | shf_eb_av(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
1043 | tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
1044 | |
---|
1045 | CASE ( 'spectrum_x' ) |
---|
1046 | IF ( k == 1 ) THEN |
---|
1047 | IF ( nx_on_file /= nx ) THEN |
---|
1048 | message_string = 'read_3d_binary: spectrum_x ' // & |
---|
1049 | 'on restart file ignored because' // & |
---|
1050 | '&total numbers of grid points (nx) ' // & |
---|
1051 | 'do not match' |
---|
1052 | CALL message( 'read_3d_binary', 'PA0293',& |
---|
1053 | 0, 1, 0, 6, 0 ) |
---|
1054 | READ ( 13 ) rdummy |
---|
1055 | ELSE |
---|
1056 | READ ( 13 ) spectrum_x |
---|
1057 | ENDIF |
---|
1058 | ENDIF |
---|
1059 | |
---|
1060 | CASE ( 'spectrum_y' ) |
---|
1061 | IF ( k == 1 ) THEN |
---|
1062 | IF ( ny_on_file /= ny ) THEN |
---|
1063 | message_string = 'read_3d_binary: spectrum_y ' // & |
---|
1064 | 'on restart file ignored because' // & |
---|
1065 | '&total numbers of grid points (ny) '// & |
---|
1066 | 'do not match' |
---|
1067 | CALL message( 'read_3d_binary', 'PA0294', & |
---|
1068 | 0, 1, 0, 6, 0 ) |
---|
1069 | READ ( 13 ) rdummy |
---|
1070 | ELSE |
---|
1071 | READ ( 13 ) spectrum_y |
---|
1072 | ENDIF |
---|
1073 | ENDIF |
---|
1074 | |
---|
1075 | CASE ( 'ss' ) |
---|
1076 | IF ( k == 1 ) READ ( 13 ) tmp_2d |
---|
1077 | ss(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
1078 | tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
1079 | |
---|
1080 | CASE ( 'ssws' ) |
---|
1081 | IF ( k == 1 ) READ ( 13 ) tmp_2d |
---|
1082 | ssws(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
1083 | tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
1084 | |
---|
1085 | CASE ( 'ssws_av' ) |
---|
1086 | IF ( .NOT. ALLOCATED( ssws_av ) ) THEN |
---|
1087 | ALLOCATE( ssws_av(nysg:nyng,nxlg:nxrg) ) |
---|
1088 | ENDIF |
---|
1089 | IF ( k == 1 ) READ ( 13 ) tmp_2d |
---|
1090 | ssws_av(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
1091 | tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
1092 | |
---|
1093 | CASE ( 'sswst' ) |
---|
1094 | IF ( k == 1 ) READ ( 13 ) tmp_2d |
---|
1095 | sswst(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
1096 | tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
1097 | |
---|
1098 | CASE ( 'ts' ) |
---|
1099 | IF ( k == 1 ) READ ( 13 ) tmp_2d |
---|
1100 | ts(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
1101 | tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
1102 | |
---|
1103 | CASE ( 'ts_av' ) |
---|
1104 | IF ( .NOT. ALLOCATED( ts_av ) ) THEN |
---|
1105 | ALLOCATE( ts_av(nysg:nyng,nxlg:nxrg) ) |
---|
1106 | ENDIF |
---|
1107 | IF ( k == 1 ) READ ( 13 ) tmp_2d |
---|
1108 | ts_av(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
1109 | tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
1110 | |
---|
1111 | CASE ( 'tswst' ) |
---|
1112 | IF ( k == 1 ) READ ( 13 ) tmp_2d |
---|
1113 | tswst(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
1114 | tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
1115 | |
---|
1116 | CASE ( 't_soil' ) |
---|
1117 | IF ( k == 1 ) READ ( 13 ) tmp_3d_soil1 |
---|
1118 | t_soil(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
1119 | tmp_3d_soil1(:,nysf-nbgp:nynf+nbgp, & |
---|
1120 | nxlf-nbgp:nxrf+nbgp) |
---|
1121 | |
---|
1122 | CASE ( 't_soil_av' ) |
---|
1123 | IF ( .NOT. ALLOCATED( t_soil_av ) ) THEN |
---|
1124 | ALLOCATE( t_soil_av(nzb_soil:nzt_soil,nysg:nyng,nxlg:nxrg) ) |
---|
1125 | ENDIF |
---|
1126 | IF ( k == 1 ) READ ( 13 ) tmp_3d_soil2(:,:,:) |
---|
1127 | t_soil_av(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
1128 | tmp_3d_soil2(:,nysf-nbgp:nynf+nbgp, & |
---|
1129 | nxlf-nbgp:nxrf+nbgp) |
---|
1130 | |
---|
1131 | CASE ( 'u' ) |
---|
1132 | IF ( k == 1 ) READ ( 13 ) tmp_3d |
---|
1133 | u(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
1134 | tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
1135 | |
---|
1136 | CASE ( 'u_av' ) |
---|
1137 | IF ( .NOT. ALLOCATED( u_av ) ) THEN |
---|
1138 | ALLOCATE( u_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) |
---|
1139 | ENDIF |
---|
1140 | IF ( k == 1 ) READ ( 13 ) tmp_3d |
---|
1141 | u_av(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
1142 | tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
1143 | |
---|
1144 | CASE ( 'u_m_l' ) |
---|
1145 | IF ( k == 1 ) THEN |
---|
1146 | ALLOCATE( tmp_3dwul(nzb:nzt+1, & |
---|
1147 | nys_on_file-nbgp:nyn_on_file+nbgp,1:2) ) |
---|
1148 | READ ( 13 ) tmp_3dwul |
---|
1149 | ENDIF |
---|
1150 | IF ( outflow_l ) THEN |
---|
1151 | u_m_l(:,nysc-nbgp:nync+nbgp,:) = tmp_3dwul(:,nysf-nbgp:nynf+nbgp,:) |
---|
1152 | ENDIF |
---|
1153 | |
---|
1154 | CASE ( 'u_m_n' ) |
---|
1155 | IF ( k == 1 ) THEN |
---|
1156 | ALLOCATE( tmp_3dwun(nzb:nzt+1,ny-1:ny, & |
---|
1157 | nxl_on_file-nbgp:nxr_on_file+nbgp) ) |
---|
1158 | READ ( 13 ) tmp_3dwun |
---|
1159 | ENDIF |
---|
1160 | IF ( outflow_n ) THEN |
---|
1161 | u_m_n(:,:,nxlc-nbgp:nxrc+nbgp) = tmp_3dwun(:,:,nxlf-nbgp:nxrf+nbgp) |
---|
1162 | ENDIF |
---|
1163 | |
---|
1164 | CASE ( 'u_m_r' ) |
---|
1165 | IF ( k == 1 ) THEN |
---|
1166 | ALLOCATE( tmp_3dwur(nzb:nzt+1,& |
---|
1167 | nys_on_file-nbgp:nyn_on_file+nbgp,nx-1:nx) ) |
---|
1168 | READ ( 13 ) tmp_3dwur |
---|
1169 | ENDIF |
---|
1170 | IF ( outflow_r ) THEN |
---|
1171 | u_m_r(:,nysc-nbgp:nync+nbgp,:) = tmp_3dwur(:,nysf-nbgp:nynf+nbgp,:) |
---|
1172 | ENDIF |
---|
1173 | |
---|
1174 | CASE ( 'u_m_s' ) |
---|
1175 | IF ( k == 1 ) THEN |
---|
1176 | ALLOCATE( tmp_3dwus(nzb:nzt+1,0:1, & |
---|
1177 | nxl_on_file-nbgp:nxr_on_file+nbgp) ) |
---|
1178 | READ ( 13 ) tmp_3dwus |
---|
1179 | ENDIF |
---|
1180 | IF ( outflow_s ) THEN |
---|
1181 | u_m_s(:,:,nxlc-nbgp:nxrc+nbgp) = tmp_3dwus(:,:,nxlf-nbgp:nxrf+nbgp) |
---|
1182 | ENDIF |
---|
1183 | |
---|
1184 | CASE ( 'us' ) |
---|
1185 | IF ( k == 1 ) READ ( 13 ) tmp_2d |
---|
1186 | us(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
1187 | tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
1188 | |
---|
1189 | CASE ( 'usws' ) |
---|
1190 | IF ( k == 1 ) READ ( 13 ) tmp_2d |
---|
1191 | usws(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
1192 | tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
1193 | |
---|
1194 | CASE ( 'uswst' ) |
---|
1195 | IF ( k == 1 ) READ ( 13 ) tmp_2d |
---|
1196 | uswst(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
1197 | tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
1198 | |
---|
1199 | CASE ( 'us_av' ) |
---|
1200 | IF ( .NOT. ALLOCATED( us_av ) ) THEN |
---|
1201 | ALLOCATE( us_av(nysg:nyng,nxlg:nxrg) ) |
---|
1202 | ENDIF |
---|
1203 | IF ( k == 1 ) READ ( 13 ) tmp_2d |
---|
1204 | us_av(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
1205 | tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
1206 | |
---|
1207 | CASE ( 'v' ) |
---|
1208 | IF ( k == 1 ) READ ( 13 ) tmp_3d |
---|
1209 | v(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
1210 | tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
1211 | |
---|
1212 | CASE ( 'v_av' ) |
---|
1213 | IF ( .NOT. ALLOCATED( v_av ) ) THEN |
---|
1214 | ALLOCATE( v_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) |
---|
1215 | ENDIF |
---|
1216 | IF ( k == 1 ) READ ( 13 ) tmp_3d |
---|
1217 | v_av(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
1218 | tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
1219 | |
---|
1220 | CASE ( 'v_m_l' ) |
---|
1221 | IF ( k == 1 ) THEN |
---|
1222 | ALLOCATE( tmp_3dwvl(nzb:nzt+1,& |
---|
1223 | nys_on_file-nbgp:nyn_on_file+nbgp,0:1) ) |
---|
1224 | READ ( 13 ) tmp_3dwvl |
---|
1225 | ENDIF |
---|
1226 | IF ( outflow_l ) THEN |
---|
1227 | v_m_l(:,nysc-nbgp:nync+nbgp,:) = tmp_3dwvl(:,nysf-nbgp:nynf+nbgp,:) |
---|
1228 | ENDIF |
---|
1229 | |
---|
1230 | CASE ( 'v_m_n' ) |
---|
1231 | IF ( k == 1 ) THEN |
---|
1232 | ALLOCATE( tmp_3dwvn(nzb:nzt+1,ny-1:ny, & |
---|
1233 | nxl_on_file-nbgp:nxr_on_file+nbgp) ) |
---|
1234 | READ ( 13 ) tmp_3dwvn |
---|
1235 | ENDIF |
---|
1236 | IF ( outflow_n ) THEN |
---|
1237 | v_m_n(:,:,nxlc-nbgp:nxrc+nbgp) = tmp_3dwvn(:,:,nxlf-nbgp:nxrf+nbgp) |
---|
1238 | ENDIF |
---|
1239 | |
---|
1240 | CASE ( 'v_m_r' ) |
---|
1241 | IF ( k == 1 ) THEN |
---|
1242 | ALLOCATE( tmp_3dwvr(nzb:nzt+1,& |
---|
1243 | nys_on_file-nbgp:nyn_on_file+nbgp,nx-1:nx) ) |
---|
1244 | READ ( 13 ) tmp_3dwvr |
---|
1245 | ENDIF |
---|
1246 | IF ( outflow_r ) THEN |
---|
1247 | v_m_r(:,nysc-nbgp:nync+nbgp,:) = tmp_3dwvr(:,nysf-nbgp:nynf+nbgp,:) |
---|
1248 | ENDIF |
---|
1249 | |
---|
1250 | CASE ( 'v_m_s' ) |
---|
1251 | IF ( k == 1 ) THEN |
---|
1252 | ALLOCATE( tmp_3dwvs(nzb:nzt+1,1:2, & |
---|
1253 | nxl_on_file-nbgp:nxr_on_file+nbgp) ) |
---|
1254 | READ ( 13 ) tmp_3dwvs |
---|
1255 | ENDIF |
---|
1256 | IF ( outflow_s ) THEN |
---|
1257 | v_m_s(:,:,nxlc-nbgp:nxrc+nbgp) = tmp_3dwvs(:,:,nxlf-nbgp:nxrf+nbgp) |
---|
1258 | ENDIF |
---|
1259 | |
---|
1260 | CASE ( 'vpt' ) |
---|
1261 | IF ( k == 1 ) READ ( 13 ) tmp_3d |
---|
1262 | vpt(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
1263 | tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
1264 | |
---|
1265 | CASE ( 'vpt_av' ) |
---|
1266 | IF ( .NOT. ALLOCATED( vpt_av ) ) THEN |
---|
1267 | ALLOCATE( vpt_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) |
---|
1268 | ENDIF |
---|
1269 | IF ( k == 1 ) READ ( 13 ) tmp_3d |
---|
1270 | vpt_av(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
1271 | tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
1272 | |
---|
1273 | CASE ( 'vsws' ) |
---|
1274 | IF ( k == 1 ) READ ( 13 ) tmp_2d |
---|
1275 | vsws(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
1276 | tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
1277 | |
---|
1278 | CASE ( 'vswst' ) |
---|
1279 | IF ( k == 1 ) READ ( 13 ) tmp_2d |
---|
1280 | vswst(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
1281 | tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
1282 | |
---|
1283 | CASE ( 'w' ) |
---|
1284 | IF ( k == 1 ) READ ( 13 ) tmp_3d |
---|
1285 | w(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
1286 | tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
1287 | |
---|
1288 | CASE ( 'w_av' ) |
---|
1289 | IF ( .NOT. ALLOCATED( w_av ) ) THEN |
---|
1290 | ALLOCATE( w_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) |
---|
1291 | ENDIF |
---|
1292 | IF ( k == 1 ) READ ( 13 ) tmp_3d |
---|
1293 | w_av(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
1294 | tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
1295 | |
---|
1296 | CASE ( 'w_m_l' ) |
---|
1297 | IF ( k == 1 ) THEN |
---|
1298 | ALLOCATE( tmp_3dwwl(nzb:nzt+1,& |
---|
1299 | nys_on_file-nbgp:nyn_on_file+nbgp,0:1) ) |
---|
1300 | READ ( 13 ) tmp_3dwwl |
---|
1301 | ENDIF |
---|
1302 | IF ( outflow_l ) THEN |
---|
1303 | w_m_l(:,nysc-nbgp:nync+nbgp,:) = tmp_3dwwl(:,nysf-nbgp:nynf+nbgp,:) |
---|
1304 | ENDIF |
---|
1305 | |
---|
1306 | CASE ( 'w_m_n' ) |
---|
1307 | IF ( k == 1 ) THEN |
---|
1308 | ALLOCATE( tmp_3dwwn(nzb:nzt+1,ny-1:ny, & |
---|
1309 | nxl_on_file-nbgp:nxr_on_file+nbgp) ) |
---|
1310 | READ ( 13 ) tmp_3dwwn |
---|
1311 | ENDIF |
---|
1312 | IF ( outflow_n ) THEN |
---|
1313 | w_m_n(:,:,nxlc-nbgp:nxrc+nbgp) = tmp_3dwwn(:,:,nxlf-nbgp:nxrf+nbgp) |
---|
1314 | ENDIF |
---|
1315 | |
---|
1316 | CASE ( 'w_m_r' ) |
---|
1317 | IF ( k == 1 ) THEN |
---|
1318 | ALLOCATE( tmp_3dwwr(nzb:nzt+1,& |
---|
1319 | nys_on_file-nbgp:nyn_on_file+nbgp,nx-1:nx) ) |
---|
1320 | READ ( 13 ) tmp_3dwwr |
---|
1321 | ENDIF |
---|
1322 | IF ( outflow_r ) THEN |
---|
1323 | w_m_r(:,nysc-nbgp:nync+nbgp,:) = tmp_3dwwr(:,nysf-nbgp:nynf+nbgp,:) |
---|
1324 | ENDIF |
---|
1325 | |
---|
1326 | CASE ( 'w_m_s' ) |
---|
1327 | IF ( k == 1 ) THEN |
---|
1328 | ALLOCATE( tmp_3dwws(nzb:nzt+1,0:1, & |
---|
1329 | nxl_on_file-nbgp:nxr_on_file+nbgp) ) |
---|
1330 | READ ( 13 ) tmp_3dwws |
---|
1331 | ENDIF |
---|
1332 | IF ( outflow_s ) THEN |
---|
1333 | w_m_s(:,:,nxlc-nbgp:nxrc+nbgp) = tmp_3dwws(:,:,nxlf-nbgp:nxrf+nbgp) |
---|
1334 | ENDIF |
---|
1335 | DEALLOCATE( tmp_3dwws ) |
---|
1336 | |
---|
1337 | CASE ( 'z0' ) |
---|
1338 | IF ( k == 1 ) READ ( 13 ) tmp_2d |
---|
1339 | z0(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
1340 | tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
1341 | |
---|
1342 | CASE ( 'z0_av' ) |
---|
1343 | IF ( .NOT. ALLOCATED( z0_av ) ) THEN |
---|
1344 | ALLOCATE( z0_av(nysg:nyng,nxlg:nxrg) ) |
---|
1345 | ENDIF |
---|
1346 | IF ( k == 1 ) READ ( 13 ) tmp_2d |
---|
1347 | z0_av(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
1348 | tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
1349 | |
---|
1350 | CASE ( 'z0h' ) |
---|
1351 | IF ( k == 1 ) READ ( 13 ) tmp_2d |
---|
1352 | z0h(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
1353 | tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
1354 | |
---|
1355 | CASE ( 'z0h_av' ) |
---|
1356 | IF ( .NOT. ALLOCATED( z0h_av ) ) THEN |
---|
1357 | ALLOCATE( z0h_av(nysg:nyng,nxlg:nxrg) ) |
---|
1358 | ENDIF |
---|
1359 | IF ( k == 1 ) READ ( 13 ) tmp_2d |
---|
1360 | z0h_av(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
1361 | tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
1362 | |
---|
1363 | CASE ( 'z0q' ) |
---|
1364 | IF ( k == 1 ) READ ( 13 ) tmp_2d |
---|
1365 | z0q(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
1366 | tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
1367 | |
---|
1368 | CASE ( 'z0q_av' ) |
---|
1369 | IF ( .NOT. ALLOCATED( z0q_av ) ) THEN |
---|
1370 | ALLOCATE( z0q_av(nysg:nyng,nxlg:nxrg) ) |
---|
1371 | ENDIF |
---|
1372 | IF ( k == 1 ) READ ( 13 ) tmp_2d |
---|
1373 | z0q_av(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
1374 | tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
1375 | |
---|
1376 | CASE DEFAULT |
---|
1377 | WRITE( message_string, * ) 'unknown field named "', & |
---|
1378 | TRIM( field_chr ), '" found in', & |
---|
1379 | '&data from prior run on PE ',myid |
---|
1380 | CALL message( 'read_3d_binary', 'PA0295', 1, 2, 0, 6, 0 ) |
---|
1381 | |
---|
1382 | END SELECT |
---|
1383 | |
---|
1384 | ENDDO ! overlap loop |
---|
1385 | |
---|
1386 | ! |
---|
1387 | !-- Deallocate arrays needed for specific variables only |
---|
1388 | IF ( ALLOCATED( tmp_3dwul ) ) DEALLOCATE( tmp_3dwul ) |
---|
1389 | IF ( ALLOCATED( tmp_3dwun ) ) DEALLOCATE( tmp_3dwun ) |
---|
1390 | IF ( ALLOCATED( tmp_3dwur ) ) DEALLOCATE( tmp_3dwur ) |
---|
1391 | IF ( ALLOCATED( tmp_3dwus ) ) DEALLOCATE( tmp_3dwus ) |
---|
1392 | IF ( ALLOCATED( tmp_3dwvl ) ) DEALLOCATE( tmp_3dwvl ) |
---|
1393 | IF ( ALLOCATED( tmp_3dwvn ) ) DEALLOCATE( tmp_3dwvn ) |
---|
1394 | IF ( ALLOCATED( tmp_3dwvr ) ) DEALLOCATE( tmp_3dwvr ) |
---|
1395 | IF ( ALLOCATED( tmp_3dwvs ) ) DEALLOCATE( tmp_3dwvs ) |
---|
1396 | IF ( ALLOCATED( tmp_3dwwl ) ) DEALLOCATE( tmp_3dwwl ) |
---|
1397 | IF ( ALLOCATED( tmp_3dwwn ) ) DEALLOCATE( tmp_3dwwn ) |
---|
1398 | IF ( ALLOCATED( tmp_3dwwr ) ) DEALLOCATE( tmp_3dwwr ) |
---|
1399 | IF ( ALLOCATED( tmp_3dwws ) ) DEALLOCATE( tmp_3dwws ) |
---|
1400 | IF ( ALLOCATED( tmp_4d ) ) DEALLOCATE( tmp_4d ) |
---|
1401 | |
---|
1402 | ! |
---|
1403 | !-- Read next character string |
---|
1404 | READ ( 13 ) field_chr |
---|
1405 | |
---|
1406 | ENDDO ! loop over variables |
---|
1407 | |
---|
1408 | ! |
---|
1409 | !-- Read user-defined restart data |
---|
1410 | CALL user_read_restart_data( i, nxlfa, nxl_on_file, nxrfa, nxr_on_file, & |
---|
1411 | nynfa, nyn_on_file, nysfa, nys_on_file, & |
---|
1412 | offset_xa, offset_ya, overlap_count(i), & |
---|
1413 | tmp_2d, tmp_3d ) |
---|
1414 | |
---|
1415 | ! |
---|
1416 | !-- Close the restart file |
---|
1417 | CALL close_file( 13 ) |
---|
1418 | |
---|
1419 | DEALLOCATE( tmp_2d, tmp_3d ) |
---|
1420 | IF ( ALLOCATED( tmp_3d_soil1 ) ) DEALLOCATE( tmp_3d_soil1 ) |
---|
1421 | IF ( ALLOCATED( tmp_3d_soil2 ) ) DEALLOCATE( tmp_3d_soil2 ) |
---|
1422 | |
---|
1423 | ENDDO ! loop over restart files |
---|
1424 | |
---|
1425 | |
---|
1426 | ! |
---|
1427 | !-- Restore the original filename for the restart file to be written |
---|
1428 | myid_char = myid_char_save |
---|
1429 | |
---|
1430 | |
---|
1431 | ! |
---|
1432 | !-- End of time measuring for reading binary data |
---|
1433 | CALL cpu_log( log_point_s(14), 'read_3d_binary', 'stop' ) |
---|
1434 | |
---|
1435 | END SUBROUTINE read_3d_binary |
---|