1 | !> @file write_restart_data_mod.f90 |
---|
2 | !------------------------------------------------------------------------------! |
---|
3 | ! This file is part of the PALM model system. |
---|
4 | ! |
---|
5 | ! PALM is free software: you can redistribute it and/or modify it under the |
---|
6 | ! terms of the GNU General Public License as published by the Free Software |
---|
7 | ! Foundation, either version 3 of the License, or (at your option) any later |
---|
8 | ! version. |
---|
9 | ! |
---|
10 | ! PALM is distributed in the hope that it will be useful, but WITHOUT ANY |
---|
11 | ! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR |
---|
12 | ! A PARTICULAR PURPOSE. See the GNU General Public License for more details. |
---|
13 | ! |
---|
14 | ! You should have received a copy of the GNU General Public License along with |
---|
15 | ! PALM. If not, see <http://www.gnu.org/licenses/>. |
---|
16 | ! |
---|
17 | ! Copyright 1997-2018 Leibniz Universitaet Hannover |
---|
18 | !------------------------------------------------------------------------------! |
---|
19 | ! |
---|
20 | ! Current revisions: |
---|
21 | ! ----------------- |
---|
22 | ! |
---|
23 | ! |
---|
24 | ! Former revisions: |
---|
25 | ! ----------------- |
---|
26 | ! $Id: write_restart_data_mod.f90 2894 2018-03-15 09:17:58Z Giersch $ |
---|
27 | ! Initial revision |
---|
28 | ! |
---|
29 | ! |
---|
30 | ! Description: |
---|
31 | ! ------------ |
---|
32 | !> Writes restart data into binary file(s) for restart runs. |
---|
33 | !------------------------------------------------------------------------------! |
---|
34 | MODULE write_restart_data_mod |
---|
35 | |
---|
36 | |
---|
37 | USE control_parameters |
---|
38 | |
---|
39 | USE kinds |
---|
40 | |
---|
41 | USE pegrid, & |
---|
42 | ONLY: myid, numprocs |
---|
43 | |
---|
44 | |
---|
45 | IMPLICIT NONE |
---|
46 | |
---|
47 | |
---|
48 | INTERFACE wrd_global |
---|
49 | MODULE PROCEDURE wrd_global |
---|
50 | END INTERFACE wrd_global |
---|
51 | |
---|
52 | INTERFACE wrd_local |
---|
53 | MODULE PROCEDURE wrd_local |
---|
54 | END INTERFACE wrd_local |
---|
55 | |
---|
56 | |
---|
57 | PUBLIC wrd_local, wrd_global |
---|
58 | |
---|
59 | |
---|
60 | CONTAINS |
---|
61 | |
---|
62 | |
---|
63 | ! Description: |
---|
64 | ! ------------ |
---|
65 | !> Global data of control variables and arrays is written out for |
---|
66 | !> restarts (binary format). |
---|
67 | !> This information is only written to the file opened by PE0. |
---|
68 | !------------------------------------------------------------------------------! |
---|
69 | SUBROUTINE wrd_global |
---|
70 | |
---|
71 | |
---|
72 | USE arrays_3d, & |
---|
73 | ONLY: inflow_damping_factor, mean_inflow_profiles, pt_init, & |
---|
74 | q_init, ref_state, s_init, sa_init, u_init, ug, v_init, vg |
---|
75 | |
---|
76 | USE flight_mod, & |
---|
77 | ONLY: flight_wrd_global |
---|
78 | |
---|
79 | USE grid_variables, & |
---|
80 | ONLY: dx, dy |
---|
81 | |
---|
82 | USE indices, & |
---|
83 | ONLY: nz, nx, ny |
---|
84 | |
---|
85 | USE microphysics_mod, & |
---|
86 | ONLY: c_sedimentation, cloud_water_sedimentation, & |
---|
87 | collision_turbulence, limiter_sedimentation, nc_const, & |
---|
88 | ventilation_effect |
---|
89 | |
---|
90 | USE model_1d_mod, & |
---|
91 | ONLY: damp_level_1d, dt_pr_1d, dt_run_control_1d, end_time_1d |
---|
92 | |
---|
93 | USE netcdf_interface, & |
---|
94 | ONLY: netcdf_precision, output_for_t0 |
---|
95 | |
---|
96 | USE particle_attributes, & |
---|
97 | ONLY: curvature_solution_effects |
---|
98 | |
---|
99 | USE pegrid, & |
---|
100 | ONLY: hor_index_bounds, collective_wait |
---|
101 | |
---|
102 | USE radiation_model_mod, & |
---|
103 | ONLY: time_radiation |
---|
104 | |
---|
105 | USE spectra_mod, & |
---|
106 | ONLY: average_count_sp |
---|
107 | |
---|
108 | USE synthetic_turbulence_generator_mod, & |
---|
109 | ONLY: stg_wrd_global |
---|
110 | |
---|
111 | USE statistics, & |
---|
112 | ONLY: statistic_regions, hom, hom_sum, u_max, u_max_ijk, v_max, & |
---|
113 | v_max_ijk, w_max, w_max_ijk |
---|
114 | |
---|
115 | USE user_write_restart_data_mod, & |
---|
116 | ONLY: user_wrd_global |
---|
117 | |
---|
118 | USE vertical_nesting_mod, & |
---|
119 | ONLY: vnest_init |
---|
120 | |
---|
121 | USE wind_turbine_model_mod, & |
---|
122 | ONLY: wtm_wrd_global |
---|
123 | |
---|
124 | |
---|
125 | IMPLICIT NONE |
---|
126 | |
---|
127 | CHARACTER (LEN=10) :: binary_version_global !< |
---|
128 | |
---|
129 | |
---|
130 | binary_version_global = '4.7' |
---|
131 | |
---|
132 | CALL wrd_write_string( 'binary_version_global' ) |
---|
133 | WRITE ( 14 ) binary_version_global |
---|
134 | |
---|
135 | CALL wrd_write_string( 'numprocs' ) |
---|
136 | WRITE ( 14 ) numprocs |
---|
137 | |
---|
138 | CALL wrd_write_string( 'hor_index_bounds' ) |
---|
139 | WRITE ( 14 ) hor_index_bounds |
---|
140 | |
---|
141 | CALL wrd_write_string( 'nz' ) |
---|
142 | WRITE ( 14 ) nz |
---|
143 | |
---|
144 | CALL wrd_write_string( 'max_pr_user' ) |
---|
145 | WRITE ( 14 ) max_pr_user |
---|
146 | |
---|
147 | CALL wrd_write_string( 'statistic_regions' ) |
---|
148 | WRITE ( 14 ) statistic_regions |
---|
149 | |
---|
150 | ! |
---|
151 | !-- Caution: After changes in the following parameter-list, the |
---|
152 | !-- ------- version number stored in the variable binary_version_global has to |
---|
153 | !-- be increased. The same changes must also be done in the parameter- |
---|
154 | !-- list in rrd_global. |
---|
155 | |
---|
156 | CALL wrd_write_string( 'advected_distance_x' ) |
---|
157 | WRITE ( 14 ) advected_distance_x |
---|
158 | |
---|
159 | CALL wrd_write_string( 'advected_distance_y' ) |
---|
160 | WRITE ( 14 ) advected_distance_y |
---|
161 | |
---|
162 | CALL wrd_write_string( 'alpha_surface' ) |
---|
163 | WRITE ( 14 ) alpha_surface |
---|
164 | |
---|
165 | CALL wrd_write_string( 'average_count_pr' ) |
---|
166 | WRITE ( 14 ) average_count_pr |
---|
167 | |
---|
168 | CALL wrd_write_string( 'average_count_sp' ) |
---|
169 | WRITE ( 14 ) average_count_sp |
---|
170 | |
---|
171 | CALL wrd_write_string( 'average_count_3d' ) |
---|
172 | WRITE ( 14 ) average_count_3d |
---|
173 | |
---|
174 | CALL wrd_write_string( 'bc_e_b' ) |
---|
175 | WRITE ( 14 ) bc_e_b |
---|
176 | |
---|
177 | CALL wrd_write_string( 'bc_lr' ) |
---|
178 | WRITE ( 14 ) bc_lr |
---|
179 | |
---|
180 | CALL wrd_write_string( 'bc_ns' ) |
---|
181 | WRITE ( 14 ) bc_ns |
---|
182 | |
---|
183 | CALL wrd_write_string( 'bc_p_b' ) |
---|
184 | WRITE ( 14 ) bc_p_b |
---|
185 | |
---|
186 | CALL wrd_write_string( 'bc_p_t' ) |
---|
187 | WRITE ( 14 ) bc_p_t |
---|
188 | |
---|
189 | CALL wrd_write_string( 'bc_pt_b' ) |
---|
190 | WRITE ( 14 ) bc_pt_b |
---|
191 | |
---|
192 | CALL wrd_write_string( 'bc_pt_t' ) |
---|
193 | WRITE ( 14 ) bc_pt_t |
---|
194 | |
---|
195 | CALL wrd_write_string( 'bc_pt_t_val' ) |
---|
196 | WRITE ( 14 ) bc_pt_t_val |
---|
197 | |
---|
198 | CALL wrd_write_string( 'bc_q_b' ) |
---|
199 | WRITE ( 14 ) bc_q_b |
---|
200 | |
---|
201 | CALL wrd_write_string( 'bc_q_t' ) |
---|
202 | WRITE ( 14 ) bc_q_t |
---|
203 | |
---|
204 | CALL wrd_write_string( 'bc_q_t_val' ) |
---|
205 | WRITE ( 14 ) bc_q_t_val |
---|
206 | |
---|
207 | CALL wrd_write_string( 'bc_s_b' ) |
---|
208 | WRITE ( 14 ) bc_s_b |
---|
209 | |
---|
210 | CALL wrd_write_string( 'bc_s_t' ) |
---|
211 | WRITE ( 14 ) bc_s_t |
---|
212 | |
---|
213 | CALL wrd_write_string( 'bc_sa_t' ) |
---|
214 | WRITE ( 14 ) bc_sa_t |
---|
215 | |
---|
216 | CALL wrd_write_string( 'bc_uv_b' ) |
---|
217 | WRITE ( 14 ) bc_uv_b |
---|
218 | |
---|
219 | CALL wrd_write_string( 'bc_uv_t' ) |
---|
220 | WRITE ( 14 ) bc_uv_t |
---|
221 | |
---|
222 | CALL wrd_write_string( 'bottom_salinityflux' ) |
---|
223 | WRITE ( 14 ) bottom_salinityflux |
---|
224 | |
---|
225 | CALL wrd_write_string( 'building_height' ) |
---|
226 | WRITE ( 14 ) building_height |
---|
227 | |
---|
228 | CALL wrd_write_string( 'building_length_x' ) |
---|
229 | WRITE ( 14 ) building_length_x |
---|
230 | |
---|
231 | CALL wrd_write_string( 'building_length_y' ) |
---|
232 | WRITE ( 14 ) building_length_y |
---|
233 | |
---|
234 | CALL wrd_write_string( 'building_wall_left' ) |
---|
235 | WRITE ( 14 ) building_wall_left |
---|
236 | |
---|
237 | CALL wrd_write_string( 'building_wall_south' ) |
---|
238 | WRITE ( 14 ) building_wall_south |
---|
239 | |
---|
240 | CALL wrd_write_string( 'c_sedimentation' ) |
---|
241 | WRITE ( 14 ) c_sedimentation |
---|
242 | |
---|
243 | CALL wrd_write_string( 'call_psolver_at_all_substeps' ) |
---|
244 | WRITE ( 14 ) call_psolver_at_all_substeps |
---|
245 | |
---|
246 | CALL wrd_write_string( 'canyon_height' ) |
---|
247 | WRITE ( 14 ) canyon_height |
---|
248 | |
---|
249 | CALL wrd_write_string( 'canyon_wall_left' ) |
---|
250 | WRITE ( 14 ) canyon_wall_left |
---|
251 | |
---|
252 | CALL wrd_write_string( 'canyon_wall_south' ) |
---|
253 | WRITE ( 14 ) canyon_wall_south |
---|
254 | |
---|
255 | CALL wrd_write_string( 'canyon_width_x' ) |
---|
256 | WRITE ( 14 ) canyon_width_x |
---|
257 | |
---|
258 | CALL wrd_write_string( 'canyon_width_y' ) |
---|
259 | WRITE ( 14 ) canyon_width_y |
---|
260 | |
---|
261 | CALL wrd_write_string( 'cfl_factor' ) |
---|
262 | WRITE ( 14 ) cfl_factor |
---|
263 | |
---|
264 | CALL wrd_write_string( 'cloud_droplets' ) |
---|
265 | WRITE ( 14 ) cloud_droplets |
---|
266 | |
---|
267 | CALL wrd_write_string( 'cloud_physics' ) |
---|
268 | WRITE ( 14 ) cloud_physics |
---|
269 | |
---|
270 | CALL wrd_write_string( 'cloud_scheme' ) |
---|
271 | WRITE ( 14 ) cloud_scheme |
---|
272 | |
---|
273 | CALL wrd_write_string( 'cloud_top_radiation' ) |
---|
274 | WRITE ( 14 ) cloud_top_radiation |
---|
275 | |
---|
276 | CALL wrd_write_string( 'cloud_water_sedimentation' ) |
---|
277 | WRITE ( 14 ) cloud_water_sedimentation |
---|
278 | |
---|
279 | CALL wrd_write_string( 'collective_wait' ) |
---|
280 | WRITE ( 14 ) collective_wait |
---|
281 | |
---|
282 | CALL wrd_write_string( 'collision_turbulence' ) |
---|
283 | WRITE ( 14 ) collision_turbulence |
---|
284 | |
---|
285 | CALL wrd_write_string( 'conserve_volume_flow' ) |
---|
286 | WRITE ( 14 ) conserve_volume_flow |
---|
287 | |
---|
288 | CALL wrd_write_string( 'conserve_volume_flow_mode' ) |
---|
289 | WRITE ( 14 ) conserve_volume_flow_mode |
---|
290 | |
---|
291 | CALL wrd_write_string( 'constant_flux_layer' ) |
---|
292 | WRITE ( 14 ) constant_flux_layer |
---|
293 | |
---|
294 | CALL wrd_write_string( 'coupling_start_time' ) |
---|
295 | WRITE ( 14 ) coupling_start_time |
---|
296 | |
---|
297 | CALL wrd_write_string( 'current_timestep_number' ) |
---|
298 | WRITE ( 14 ) current_timestep_number |
---|
299 | |
---|
300 | CALL wrd_write_string( 'curvature_solution_effects' ) |
---|
301 | WRITE ( 14 ) curvature_solution_effects |
---|
302 | |
---|
303 | CALL wrd_write_string( 'cycle_mg' ) |
---|
304 | WRITE ( 14 ) cycle_mg |
---|
305 | |
---|
306 | CALL wrd_write_string( 'damp_level_1d' ) |
---|
307 | WRITE ( 14 ) damp_level_1d |
---|
308 | |
---|
309 | CALL wrd_write_string( 'dissipation_1d' ) |
---|
310 | WRITE ( 14 ) dissipation_1d |
---|
311 | |
---|
312 | CALL wrd_write_string( 'do2d_xy_time_count' ) |
---|
313 | WRITE ( 14 ) do2d_xy_time_count |
---|
314 | |
---|
315 | CALL wrd_write_string( 'do2d_xz_time_count' ) |
---|
316 | WRITE ( 14 ) do2d_xz_time_count |
---|
317 | |
---|
318 | CALL wrd_write_string( 'do2d_yz_time_count' ) |
---|
319 | WRITE ( 14 ) do2d_yz_time_count |
---|
320 | |
---|
321 | CALL wrd_write_string( 'do3d_time_count' ) |
---|
322 | WRITE ( 14 ) do3d_time_count |
---|
323 | |
---|
324 | CALL wrd_write_string( 'dp_external' ) |
---|
325 | WRITE ( 14 ) dp_external |
---|
326 | |
---|
327 | CALL wrd_write_string( 'dp_level_b' ) |
---|
328 | WRITE ( 14 ) dp_level_b |
---|
329 | |
---|
330 | CALL wrd_write_string( 'dp_smooth' ) |
---|
331 | WRITE ( 14 ) dp_smooth |
---|
332 | |
---|
333 | CALL wrd_write_string( 'dpdxy' ) |
---|
334 | WRITE ( 14 ) dpdxy |
---|
335 | |
---|
336 | CALL wrd_write_string( 'dt_3d' ) |
---|
337 | WRITE ( 14 ) dt_3d |
---|
338 | |
---|
339 | CALL wrd_write_string( 'dt_pr_1d' ) |
---|
340 | WRITE ( 14 ) dt_pr_1d |
---|
341 | |
---|
342 | CALL wrd_write_string( 'dt_run_control_1d' ) |
---|
343 | WRITE ( 14 ) dt_run_control_1d |
---|
344 | |
---|
345 | CALL wrd_write_string( 'dvrp_filecount' ) |
---|
346 | WRITE ( 14 ) dvrp_filecount |
---|
347 | |
---|
348 | CALL wrd_write_string( 'dx' ) |
---|
349 | WRITE ( 14 ) dx |
---|
350 | |
---|
351 | CALL wrd_write_string( 'dy' ) |
---|
352 | WRITE ( 14 ) dy |
---|
353 | |
---|
354 | CALL wrd_write_string( 'dz' ) |
---|
355 | WRITE ( 14 ) dz |
---|
356 | |
---|
357 | CALL wrd_write_string( 'dz_max' ) |
---|
358 | WRITE ( 14 ) dz_max |
---|
359 | |
---|
360 | CALL wrd_write_string( 'dz_stretch_factor' ) |
---|
361 | WRITE ( 14 ) dz_stretch_factor |
---|
362 | |
---|
363 | CALL wrd_write_string( 'dz_stretch_level' ) |
---|
364 | WRITE ( 14 ) dz_stretch_level |
---|
365 | |
---|
366 | CALL wrd_write_string( 'e_min' ) |
---|
367 | WRITE ( 14 ) e_min |
---|
368 | |
---|
369 | CALL wrd_write_string( 'end_time_1d' ) |
---|
370 | WRITE ( 14 ) end_time_1d |
---|
371 | |
---|
372 | CALL wrd_write_string( 'fft_method' ) |
---|
373 | WRITE ( 14 ) fft_method |
---|
374 | |
---|
375 | CALL wrd_write_string( 'first_call_lpm' ) |
---|
376 | WRITE ( 14 ) first_call_lpm |
---|
377 | |
---|
378 | CALL wrd_write_string( 'galilei_transformation' ) |
---|
379 | WRITE ( 14 ) galilei_transformation |
---|
380 | |
---|
381 | CALL wrd_write_string( 'hom' ) |
---|
382 | WRITE ( 14 ) hom |
---|
383 | |
---|
384 | CALL wrd_write_string( 'hom_sum' ) |
---|
385 | WRITE ( 14 ) hom_sum |
---|
386 | |
---|
387 | CALL wrd_write_string( 'humidity' ) |
---|
388 | WRITE ( 14 ) humidity |
---|
389 | |
---|
390 | IF ( ALLOCATED( inflow_damping_factor ) ) THEN |
---|
391 | CALL wrd_write_string( 'inflow_damping_factor' ) |
---|
392 | WRITE ( 14 ) inflow_damping_factor |
---|
393 | ENDIF |
---|
394 | |
---|
395 | CALL wrd_write_string( 'inflow_damping_height' ) |
---|
396 | WRITE ( 14 ) inflow_damping_height |
---|
397 | |
---|
398 | CALL wrd_write_string( 'inflow_damping_width' ) |
---|
399 | WRITE ( 14 ) inflow_damping_width |
---|
400 | |
---|
401 | CALL wrd_write_string( 'inflow_disturbance_begin' ) |
---|
402 | WRITE ( 14 ) inflow_disturbance_begin |
---|
403 | |
---|
404 | CALL wrd_write_string( 'inflow_disturbance_end' ) |
---|
405 | WRITE ( 14 ) inflow_disturbance_end |
---|
406 | |
---|
407 | CALL wrd_write_string( 'km_constant' ) |
---|
408 | WRITE ( 14 ) km_constant |
---|
409 | |
---|
410 | CALL wrd_write_string( 'large_scale_forcing' ) |
---|
411 | WRITE ( 14 ) large_scale_forcing |
---|
412 | |
---|
413 | CALL wrd_write_string( 'large_scale_subsidence' ) |
---|
414 | WRITE ( 14 ) large_scale_subsidence |
---|
415 | |
---|
416 | CALL wrd_write_string( 'latitude' ) |
---|
417 | WRITE ( 14 ) latitude |
---|
418 | |
---|
419 | CALL wrd_write_string( 'limiter_sedimentation' ) |
---|
420 | WRITE ( 14 ) limiter_sedimentation |
---|
421 | |
---|
422 | CALL wrd_write_string( 'longitude' ) |
---|
423 | WRITE ( 14 ) longitude |
---|
424 | |
---|
425 | CALL wrd_write_string( 'loop_optimization' ) |
---|
426 | WRITE ( 14 ) loop_optimization |
---|
427 | |
---|
428 | CALL wrd_write_string( 'masking_method' ) |
---|
429 | WRITE ( 14 ) masking_method |
---|
430 | |
---|
431 | IF ( ALLOCATED( mean_inflow_profiles ) ) THEN |
---|
432 | CALL wrd_write_string( 'mean_inflow_profiles' ) |
---|
433 | WRITE ( 14 ) mean_inflow_profiles |
---|
434 | ENDIF |
---|
435 | |
---|
436 | CALL wrd_write_string( 'mg_cycles' ) |
---|
437 | WRITE ( 14 ) mg_cycles |
---|
438 | |
---|
439 | CALL wrd_write_string( 'mg_switch_to_pe0_level' ) |
---|
440 | WRITE ( 14 ) mg_switch_to_pe0_level |
---|
441 | |
---|
442 | CALL wrd_write_string( 'mixing_length_1d' ) |
---|
443 | WRITE ( 14 ) mixing_length_1d |
---|
444 | |
---|
445 | CALL wrd_write_string( 'momentum_advec' ) |
---|
446 | WRITE ( 14 ) momentum_advec |
---|
447 | |
---|
448 | CALL wrd_write_string( 'most_method' ) |
---|
449 | WRITE ( 14 ) most_method |
---|
450 | |
---|
451 | CALL wrd_write_string( 'nc_const' ) |
---|
452 | WRITE ( 14 ) nc_const |
---|
453 | |
---|
454 | CALL wrd_write_string( 'netcdf_precision' ) |
---|
455 | WRITE ( 14 ) netcdf_precision |
---|
456 | |
---|
457 | CALL wrd_write_string( 'neutral' ) |
---|
458 | WRITE ( 14 ) neutral |
---|
459 | |
---|
460 | CALL wrd_write_string( 'ngsrb' ) |
---|
461 | WRITE ( 14 ) ngsrb |
---|
462 | |
---|
463 | CALL wrd_write_string( 'nsor' ) |
---|
464 | WRITE ( 14 ) nsor |
---|
465 | |
---|
466 | CALL wrd_write_string( 'nsor_ini' ) |
---|
467 | WRITE ( 14 ) nsor_ini |
---|
468 | |
---|
469 | CALL wrd_write_string( 'nudging' ) |
---|
470 | WRITE ( 14 ) nudging |
---|
471 | |
---|
472 | CALL wrd_write_string( 'num_leg' ) |
---|
473 | WRITE ( 14 ) num_leg |
---|
474 | |
---|
475 | CALL wrd_write_string( 'nx' ) |
---|
476 | WRITE ( 14 ) nx |
---|
477 | |
---|
478 | CALL wrd_write_string( 'ny' ) |
---|
479 | WRITE ( 14 ) ny |
---|
480 | |
---|
481 | CALL wrd_write_string( 'ocean' ) |
---|
482 | WRITE ( 14 ) ocean |
---|
483 | |
---|
484 | CALL wrd_write_string( 'old_dt' ) |
---|
485 | WRITE ( 14 ) old_dt |
---|
486 | |
---|
487 | CALL wrd_write_string( 'omega' ) |
---|
488 | WRITE ( 14 ) omega |
---|
489 | |
---|
490 | CALL wrd_write_string( 'omega_sor' ) |
---|
491 | WRITE ( 14 ) omega_sor |
---|
492 | |
---|
493 | CALL wrd_write_string( 'output_for_t0' ) |
---|
494 | WRITE ( 14 ) output_for_t0 |
---|
495 | |
---|
496 | CALL wrd_write_string( 'passive_scalar' ) |
---|
497 | WRITE ( 14 ) passive_scalar |
---|
498 | |
---|
499 | CALL wrd_write_string( 'prandtl_number' ) |
---|
500 | WRITE ( 14 ) prandtl_number |
---|
501 | |
---|
502 | CALL wrd_write_string( 'precipitation' ) |
---|
503 | WRITE ( 14 ) precipitation |
---|
504 | |
---|
505 | CALL wrd_write_string( 'psolver' ) |
---|
506 | WRITE ( 14 ) psolver |
---|
507 | |
---|
508 | CALL wrd_write_string( 'pt_damping_factor' ) |
---|
509 | WRITE ( 14 ) pt_damping_factor |
---|
510 | |
---|
511 | CALL wrd_write_string( 'pt_damping_width' ) |
---|
512 | WRITE ( 14 ) pt_damping_width |
---|
513 | |
---|
514 | CALL wrd_write_string( 'pt_init' ) |
---|
515 | WRITE ( 14 ) pt_init |
---|
516 | |
---|
517 | CALL wrd_write_string( 'pt_reference' ) |
---|
518 | WRITE ( 14 ) pt_reference |
---|
519 | |
---|
520 | CALL wrd_write_string( 'pt_surface' ) |
---|
521 | WRITE ( 14 ) pt_surface |
---|
522 | |
---|
523 | CALL wrd_write_string( 'pt_surface_initial_change' ) |
---|
524 | WRITE ( 14 ) pt_surface_initial_change |
---|
525 | |
---|
526 | CALL wrd_write_string( 'pt_vertical_gradient' ) |
---|
527 | WRITE ( 14 ) pt_vertical_gradient |
---|
528 | |
---|
529 | CALL wrd_write_string( 'pt_vertical_gradient_level' ) |
---|
530 | WRITE ( 14 ) pt_vertical_gradient_level |
---|
531 | |
---|
532 | CALL wrd_write_string( 'pt_vertical_gradient_level_ind' ) |
---|
533 | WRITE ( 14 ) pt_vertical_gradient_level_ind |
---|
534 | |
---|
535 | CALL wrd_write_string( 'q_init' ) |
---|
536 | WRITE ( 14 ) q_init |
---|
537 | |
---|
538 | CALL wrd_write_string( 'q_surface' ) |
---|
539 | WRITE ( 14 ) q_surface |
---|
540 | |
---|
541 | CALL wrd_write_string( 'q_surface_initial_change' ) |
---|
542 | WRITE ( 14 ) q_surface_initial_change |
---|
543 | |
---|
544 | CALL wrd_write_string( 'q_vertical_gradient' ) |
---|
545 | WRITE ( 14 ) q_vertical_gradient |
---|
546 | |
---|
547 | CALL wrd_write_string( 'q_vertical_gradient_level' ) |
---|
548 | WRITE ( 14 ) q_vertical_gradient_level |
---|
549 | |
---|
550 | CALL wrd_write_string( 'q_vertical_gradient_level_ind' ) |
---|
551 | WRITE ( 14 ) q_vertical_gradient_level_ind |
---|
552 | |
---|
553 | CALL wrd_write_string( 'random_generator' ) |
---|
554 | WRITE ( 14 ) random_generator |
---|
555 | |
---|
556 | CALL wrd_write_string( 'random_heatflux' ) |
---|
557 | WRITE ( 14 ) random_heatflux |
---|
558 | |
---|
559 | CALL wrd_write_string( 'rans_mode' ) |
---|
560 | WRITE ( 14 ) rans_mode |
---|
561 | |
---|
562 | CALL wrd_write_string( 'rayleigh_damping_factor' ) |
---|
563 | WRITE ( 14 ) rayleigh_damping_factor |
---|
564 | |
---|
565 | CALL wrd_write_string( 'rayleigh_damping_height' ) |
---|
566 | WRITE ( 14 ) rayleigh_damping_height |
---|
567 | |
---|
568 | CALL wrd_write_string( 'recycling_width' ) |
---|
569 | WRITE ( 14 ) recycling_width |
---|
570 | |
---|
571 | CALL wrd_write_string( 'recycling_yshift' ) |
---|
572 | WRITE ( 14 ) recycling_yshift |
---|
573 | |
---|
574 | CALL wrd_write_string( 'ref_state' ) |
---|
575 | WRITE ( 14 ) ref_state |
---|
576 | |
---|
577 | CALL wrd_write_string( 'reference_state' ) |
---|
578 | WRITE ( 14 ) reference_state |
---|
579 | |
---|
580 | CALL wrd_write_string( 'residual_limit' ) |
---|
581 | WRITE ( 14 ) residual_limit |
---|
582 | |
---|
583 | CALL wrd_write_string( 'roughness_length' ) |
---|
584 | WRITE ( 14 ) roughness_length |
---|
585 | |
---|
586 | CALL wrd_write_string( 'run_coupled' ) |
---|
587 | WRITE ( 14 ) run_coupled |
---|
588 | |
---|
589 | CALL wrd_write_string( 'runnr' ) |
---|
590 | WRITE ( 14 ) runnr |
---|
591 | |
---|
592 | CALL wrd_write_string( 's_init' ) |
---|
593 | WRITE ( 14 ) s_init |
---|
594 | |
---|
595 | CALL wrd_write_string( 's_surface' ) |
---|
596 | WRITE ( 14 ) s_surface |
---|
597 | |
---|
598 | CALL wrd_write_string( 's_surface_initial_change' ) |
---|
599 | WRITE ( 14 ) s_surface_initial_change |
---|
600 | |
---|
601 | CALL wrd_write_string( 's_vertical_gradient' ) |
---|
602 | WRITE ( 14 ) s_vertical_gradient |
---|
603 | |
---|
604 | CALL wrd_write_string( 's_vertical_gradient_level' ) |
---|
605 | WRITE ( 14 ) s_vertical_gradient_level |
---|
606 | |
---|
607 | CALL wrd_write_string( 's_vertical_gradient_level_ind' ) |
---|
608 | WRITE ( 14 ) s_vertical_gradient_level_ind |
---|
609 | |
---|
610 | CALL wrd_write_string( 'sa_init' ) |
---|
611 | WRITE ( 14 ) sa_init |
---|
612 | |
---|
613 | CALL wrd_write_string( 'sa_surface' ) |
---|
614 | WRITE ( 14 ) sa_surface |
---|
615 | |
---|
616 | CALL wrd_write_string( 'sa_vertical_gradient' ) |
---|
617 | WRITE ( 14 ) sa_vertical_gradient |
---|
618 | |
---|
619 | CALL wrd_write_string( 'sa_vertical_gradient_level' ) |
---|
620 | WRITE ( 14 ) sa_vertical_gradient_level |
---|
621 | |
---|
622 | CALL wrd_write_string( 'scalar_advec' ) |
---|
623 | WRITE ( 14 ) scalar_advec |
---|
624 | |
---|
625 | CALL wrd_write_string( 'simulated_time' ) |
---|
626 | WRITE ( 14 ) simulated_time |
---|
627 | |
---|
628 | CALL wrd_write_string( 'surface_heatflux' ) |
---|
629 | WRITE ( 14 ) surface_heatflux |
---|
630 | |
---|
631 | CALL wrd_write_string( 'surface_pressure' ) |
---|
632 | WRITE ( 14 ) surface_pressure |
---|
633 | |
---|
634 | CALL wrd_write_string( 'surface_scalarflux' ) |
---|
635 | WRITE ( 14 ) surface_scalarflux |
---|
636 | |
---|
637 | CALL wrd_write_string( 'surface_waterflux' ) |
---|
638 | WRITE ( 14 ) surface_waterflux |
---|
639 | |
---|
640 | CALL wrd_write_string( 'time_coupling' ) |
---|
641 | WRITE ( 14 ) time_coupling |
---|
642 | |
---|
643 | CALL wrd_write_string( 'time_disturb' ) |
---|
644 | WRITE ( 14 ) time_disturb |
---|
645 | |
---|
646 | CALL wrd_write_string( 'time_do2d_xy' ) |
---|
647 | WRITE ( 14 ) time_do2d_xy |
---|
648 | |
---|
649 | CALL wrd_write_string( 'time_do2d_xz' ) |
---|
650 | WRITE ( 14 ) time_do2d_xz |
---|
651 | |
---|
652 | CALL wrd_write_string( 'time_do2d_yz' ) |
---|
653 | WRITE ( 14 ) time_do2d_yz |
---|
654 | |
---|
655 | CALL wrd_write_string( 'time_do3d' ) |
---|
656 | WRITE ( 14 ) time_do3d |
---|
657 | |
---|
658 | CALL wrd_write_string( 'time_do_av' ) |
---|
659 | WRITE ( 14 ) time_do_av |
---|
660 | |
---|
661 | CALL wrd_write_string( 'time_do_sla' ) |
---|
662 | WRITE ( 14 ) time_do_sla |
---|
663 | |
---|
664 | CALL wrd_write_string( 'time_domask' ) |
---|
665 | WRITE ( 14 ) time_domask |
---|
666 | |
---|
667 | CALL wrd_write_string( 'time_dopr' ) |
---|
668 | WRITE ( 14 ) time_dopr |
---|
669 | |
---|
670 | CALL wrd_write_string( 'time_dopr_av' ) |
---|
671 | WRITE ( 14 ) time_dopr_av |
---|
672 | |
---|
673 | CALL wrd_write_string( 'time_dopr_listing' ) |
---|
674 | WRITE ( 14 ) time_dopr_listing |
---|
675 | |
---|
676 | CALL wrd_write_string( 'time_dopts' ) |
---|
677 | WRITE ( 14 ) time_dopts |
---|
678 | |
---|
679 | CALL wrd_write_string( 'time_dosp' ) |
---|
680 | WRITE ( 14 ) time_dosp |
---|
681 | |
---|
682 | CALL wrd_write_string( 'time_dots' ) |
---|
683 | WRITE ( 14 ) time_dots |
---|
684 | |
---|
685 | CALL wrd_write_string( 'time_dvrp' ) |
---|
686 | WRITE ( 14 ) time_dvrp |
---|
687 | |
---|
688 | CALL wrd_write_string( 'time_radiation' ) |
---|
689 | WRITE ( 14 ) time_radiation |
---|
690 | |
---|
691 | CALL wrd_write_string( 'time_restart' ) |
---|
692 | WRITE ( 14 ) time_restart |
---|
693 | |
---|
694 | CALL wrd_write_string( 'time_run_control' ) |
---|
695 | WRITE ( 14 ) time_run_control |
---|
696 | |
---|
697 | CALL wrd_write_string( 'time_since_reference_point' ) |
---|
698 | WRITE ( 14 ) time_since_reference_point |
---|
699 | |
---|
700 | CALL wrd_write_string( 'timestep_scheme' ) |
---|
701 | WRITE ( 14 ) timestep_scheme |
---|
702 | |
---|
703 | CALL wrd_write_string( 'top_heatflux' ) |
---|
704 | WRITE ( 14 ) top_heatflux |
---|
705 | |
---|
706 | CALL wrd_write_string( 'top_momentumflux_u' ) |
---|
707 | WRITE ( 14 ) top_momentumflux_u |
---|
708 | |
---|
709 | CALL wrd_write_string( 'top_momentumflux_v' ) |
---|
710 | WRITE ( 14 ) top_momentumflux_v |
---|
711 | |
---|
712 | CALL wrd_write_string( 'top_salinityflux' ) |
---|
713 | WRITE ( 14 ) top_salinityflux |
---|
714 | |
---|
715 | CALL wrd_write_string( 'top_scalarflux' ) |
---|
716 | WRITE ( 14 ) top_scalarflux |
---|
717 | |
---|
718 | CALL wrd_write_string( 'topography' ) |
---|
719 | WRITE ( 14 ) topography |
---|
720 | |
---|
721 | CALL wrd_write_string( 'topography_grid_convention' ) |
---|
722 | WRITE ( 14 ) topography_grid_convention |
---|
723 | |
---|
724 | CALL wrd_write_string( 'tsc' ) |
---|
725 | WRITE ( 14 ) tsc |
---|
726 | |
---|
727 | CALL wrd_write_string( 'tunnel_height' ) |
---|
728 | WRITE ( 14 ) tunnel_height |
---|
729 | |
---|
730 | CALL wrd_write_string( 'tunnel_length' ) |
---|
731 | WRITE ( 14 ) tunnel_length |
---|
732 | |
---|
733 | CALL wrd_write_string( 'tunnel_wall_depth' ) |
---|
734 | WRITE ( 14 ) tunnel_wall_depth |
---|
735 | |
---|
736 | CALL wrd_write_string( 'tunnel_width_x' ) |
---|
737 | WRITE ( 14 ) tunnel_width_x |
---|
738 | |
---|
739 | CALL wrd_write_string( 'tunnel_width_y' ) |
---|
740 | WRITE ( 14 ) tunnel_width_y |
---|
741 | |
---|
742 | CALL wrd_write_string( 'turbulence_closure' ) |
---|
743 | WRITE ( 14 ) turbulence_closure |
---|
744 | |
---|
745 | CALL wrd_write_string( 'turbulent_inflow' ) |
---|
746 | WRITE ( 14 ) turbulent_inflow |
---|
747 | |
---|
748 | CALL wrd_write_string( 'u_bulk' ) |
---|
749 | WRITE ( 14 ) u_bulk |
---|
750 | |
---|
751 | CALL wrd_write_string( 'u_init' ) |
---|
752 | WRITE ( 14 ) u_init |
---|
753 | |
---|
754 | CALL wrd_write_string( 'u_max' ) |
---|
755 | WRITE ( 14 ) u_max |
---|
756 | |
---|
757 | CALL wrd_write_string( 'u_max_ijk' ) |
---|
758 | WRITE ( 14 ) u_max_ijk |
---|
759 | |
---|
760 | CALL wrd_write_string( 'ug' ) |
---|
761 | WRITE ( 14 ) ug |
---|
762 | |
---|
763 | CALL wrd_write_string( 'ug_surface' ) |
---|
764 | WRITE ( 14 ) ug_surface |
---|
765 | |
---|
766 | CALL wrd_write_string( 'ug_vertical_gradient' ) |
---|
767 | WRITE ( 14 ) ug_vertical_gradient |
---|
768 | |
---|
769 | CALL wrd_write_string( 'ug_vertical_gradient_level' ) |
---|
770 | WRITE ( 14 ) ug_vertical_gradient_level |
---|
771 | |
---|
772 | CALL wrd_write_string( 'ug_vertical_gradient_level_ind' ) |
---|
773 | WRITE ( 14 ) ug_vertical_gradient_level_ind |
---|
774 | |
---|
775 | CALL wrd_write_string( 'use_surface_fluxes' ) |
---|
776 | WRITE ( 14 ) use_surface_fluxes |
---|
777 | |
---|
778 | CALL wrd_write_string( 'use_top_fluxes' ) |
---|
779 | WRITE ( 14 ) use_top_fluxes |
---|
780 | |
---|
781 | CALL wrd_write_string( 'use_ug_for_galilei_tr' ) |
---|
782 | WRITE ( 14 ) use_ug_for_galilei_tr |
---|
783 | |
---|
784 | CALL wrd_write_string( 'use_upstream_for_tke' ) |
---|
785 | WRITE ( 14 ) use_upstream_for_tke |
---|
786 | |
---|
787 | CALL wrd_write_string( 'v_bulk' ) |
---|
788 | WRITE ( 14 ) v_bulk |
---|
789 | |
---|
790 | CALL wrd_write_string( 'v_init' ) |
---|
791 | WRITE ( 14 ) v_init |
---|
792 | |
---|
793 | CALL wrd_write_string( 'v_max' ) |
---|
794 | WRITE ( 14 ) v_max |
---|
795 | |
---|
796 | CALL wrd_write_string( 'v_max_ijk' ) |
---|
797 | WRITE ( 14 ) v_max_ijk |
---|
798 | |
---|
799 | CALL wrd_write_string( 'ventilation_effect' ) |
---|
800 | WRITE ( 14 ) ventilation_effect |
---|
801 | |
---|
802 | CALL wrd_write_string( 'vg' ) |
---|
803 | WRITE ( 14 ) vg |
---|
804 | |
---|
805 | CALL wrd_write_string( 'vg_surface' ) |
---|
806 | WRITE ( 14 ) vg_surface |
---|
807 | |
---|
808 | CALL wrd_write_string( 'vg_vertical_gradient' ) |
---|
809 | WRITE ( 14 ) vg_vertical_gradient |
---|
810 | |
---|
811 | CALL wrd_write_string( 'vg_vertical_gradient_level' ) |
---|
812 | WRITE ( 14 ) vg_vertical_gradient_level |
---|
813 | |
---|
814 | CALL wrd_write_string( 'vg_vertical_gradient_level_ind' ) |
---|
815 | WRITE ( 14 ) vg_vertical_gradient_level_ind |
---|
816 | |
---|
817 | CALL wrd_write_string( 'virtual_flight' ) |
---|
818 | WRITE ( 14 ) virtual_flight |
---|
819 | |
---|
820 | CALL wrd_write_string( 'vnest_init' ) |
---|
821 | WRITE ( 14 ) vnest_init |
---|
822 | |
---|
823 | CALL wrd_write_string( 'volume_flow_area' ) |
---|
824 | WRITE ( 14 ) volume_flow_area |
---|
825 | |
---|
826 | CALL wrd_write_string( 'volume_flow_initial' ) |
---|
827 | WRITE ( 14 ) volume_flow_initial |
---|
828 | |
---|
829 | CALL wrd_write_string( 'subs_vertical_gradient' ) |
---|
830 | WRITE ( 14 ) subs_vertical_gradient |
---|
831 | |
---|
832 | CALL wrd_write_string( 'subs_vertical_gradient_level' ) |
---|
833 | WRITE ( 14 ) subs_vertical_gradient_level |
---|
834 | |
---|
835 | CALL wrd_write_string( 'subs_vertical_gradient_level_i' ) |
---|
836 | WRITE ( 14 ) subs_vertical_gradient_level_i |
---|
837 | |
---|
838 | CALL wrd_write_string( 'w_max' ) |
---|
839 | WRITE ( 14 ) w_max |
---|
840 | |
---|
841 | CALL wrd_write_string( 'w_max_ijk' ) |
---|
842 | WRITE ( 14 ) w_max_ijk |
---|
843 | |
---|
844 | CALL wrd_write_string( 'wall_adjustment' ) |
---|
845 | WRITE ( 14 ) wall_adjustment |
---|
846 | |
---|
847 | CALL wrd_write_string( 'wall_heatflux' ) |
---|
848 | WRITE ( 14 ) wall_heatflux |
---|
849 | |
---|
850 | CALL wrd_write_string( 'wall_humidityflux' ) |
---|
851 | WRITE ( 14 ) wall_humidityflux |
---|
852 | |
---|
853 | CALL wrd_write_string( 'wall_salinityflux' ) |
---|
854 | WRITE ( 14 ) wall_salinityflux |
---|
855 | |
---|
856 | CALL wrd_write_string( 'wall_scalarflux' ) |
---|
857 | WRITE ( 14 ) wall_scalarflux |
---|
858 | |
---|
859 | CALL wrd_write_string( 'y_shift' ) |
---|
860 | WRITE ( 14 ) y_shift |
---|
861 | |
---|
862 | CALL wrd_write_string( 'z0h_factor' ) |
---|
863 | WRITE ( 14 ) z0h_factor |
---|
864 | |
---|
865 | CALL wrd_write_string( 'zeta_max' ) |
---|
866 | WRITE ( 14 ) zeta_max |
---|
867 | |
---|
868 | CALL wrd_write_string( 'zeta_min' ) |
---|
869 | WRITE ( 14 ) zeta_min |
---|
870 | |
---|
871 | |
---|
872 | ! |
---|
873 | !-- The order of the calls can be different as in read_restart_data_mod where |
---|
874 | !-- the restart data will be read |
---|
875 | ! |
---|
876 | !-- If required, write restart data for wind turbine model. |
---|
877 | IF ( wind_turbine ) CALL wtm_wrd_global |
---|
878 | |
---|
879 | ! |
---|
880 | !-- If required, write restart data for virtual measurements. |
---|
881 | IF ( virtual_flight ) CALL flight_wrd_global |
---|
882 | |
---|
883 | ! |
---|
884 | !-- If required, write restart data for turbulence generator. |
---|
885 | IF ( syn_turb_gen ) CALL stg_wrd_global |
---|
886 | |
---|
887 | ! |
---|
888 | !-- Write restart data for user data. |
---|
889 | CALL user_wrd_global |
---|
890 | |
---|
891 | |
---|
892 | END SUBROUTINE wrd_global |
---|
893 | |
---|
894 | |
---|
895 | !------------------------------------------------------------------------------! |
---|
896 | ! Description: |
---|
897 | ! ------------ |
---|
898 | !> Processor specific data of variables and arrays is written out for |
---|
899 | !> restarts (binary format). |
---|
900 | !> This information is written to the file opened by each PE. |
---|
901 | !------------------------------------------------------------------------------! |
---|
902 | SUBROUTINE wrd_local |
---|
903 | |
---|
904 | |
---|
905 | USE arrays_3d, & |
---|
906 | ONLY: e, kh, km, p, pt, q, ql, qc, nc, nr, prr, & |
---|
907 | precipitation_amount, qr, s, sa, u, u_m_l, u_m_n, u_m_r, & |
---|
908 | u_m_s, v, v_m_l, v_m_n, v_m_r, v_m_s, vpt, w, w_m_l, w_m_n, & |
---|
909 | w_m_r, w_m_s |
---|
910 | |
---|
911 | USE averaging |
---|
912 | |
---|
913 | USE chemistry_model_mod, & |
---|
914 | ONLY: chem_wrd_local |
---|
915 | |
---|
916 | USE indices, & |
---|
917 | ONLY: nxl, nxr, nys, nyn, nzb, nzt |
---|
918 | |
---|
919 | USE land_surface_model_mod, & |
---|
920 | ONLY: lsm_wrd_local |
---|
921 | |
---|
922 | USE particle_attributes, & |
---|
923 | ONLY: iran_part |
---|
924 | |
---|
925 | USE radiation_model_mod, & |
---|
926 | ONLY: radiation, radiation_wrd_local |
---|
927 | |
---|
928 | USE random_function_mod, & |
---|
929 | ONLY: random_iv, random_iy |
---|
930 | |
---|
931 | USE random_generator_parallel, & |
---|
932 | ONLY: id_random_array, seq_random_array |
---|
933 | |
---|
934 | USE spectra_mod, & |
---|
935 | ONLY: spectrum_x, spectrum_y |
---|
936 | |
---|
937 | USE surface_mod, & |
---|
938 | ONLY : surface_wrd_local |
---|
939 | |
---|
940 | USE urban_surface_mod, & |
---|
941 | ONLY: usm_wrd_local |
---|
942 | |
---|
943 | USE user_write_restart_data_mod, & |
---|
944 | ONLY: user_wrd_local |
---|
945 | |
---|
946 | |
---|
947 | IMPLICIT NONE |
---|
948 | |
---|
949 | CHARACTER (LEN=10) :: binary_version_local !< |
---|
950 | |
---|
951 | |
---|
952 | ! |
---|
953 | !-- Write arrays. |
---|
954 | binary_version_local = '4.7' |
---|
955 | |
---|
956 | CALL wrd_write_string( 'binary_version_local' ) |
---|
957 | WRITE ( 14 ) binary_version_local |
---|
958 | |
---|
959 | WRITE ( 14 ) numprocs, myid, nxl, nxr, nys, nyn, nzb, nzt |
---|
960 | |
---|
961 | ! |
---|
962 | !-- Attention: After changes to the following output commands the version number |
---|
963 | !-- --------- of the variable binary_version_local must be changed! |
---|
964 | !-- Also, the list of arrays to be read in rrd_local must be |
---|
965 | !-- adjusted accordingly. |
---|
966 | CALL wrd_write_string( 'e' ) |
---|
967 | WRITE ( 14 ) e |
---|
968 | |
---|
969 | IF ( ALLOCATED( e_av ) ) THEN |
---|
970 | CALL wrd_write_string( 'e_av' ) |
---|
971 | WRITE ( 14 ) e_av |
---|
972 | ENDIF |
---|
973 | |
---|
974 | CALL wrd_write_string( 'iran' ) |
---|
975 | WRITE ( 14 ) iran, iran_part |
---|
976 | |
---|
977 | CALL wrd_write_string( 'kh' ) |
---|
978 | WRITE ( 14 ) kh |
---|
979 | |
---|
980 | |
---|
981 | IF ( ALLOCATED( kh_av ) ) THEN |
---|
982 | CALL wrd_write_string( 'kh_av' ) |
---|
983 | WRITE ( 14 ) kh_av |
---|
984 | ENDIF |
---|
985 | |
---|
986 | CALL wrd_write_string( 'km' ) |
---|
987 | WRITE ( 14 ) km |
---|
988 | |
---|
989 | IF ( ALLOCATED( km_av ) ) THEN |
---|
990 | CALL wrd_write_string( 'km_av' ) |
---|
991 | WRITE ( 14 ) km_av |
---|
992 | ENDIF |
---|
993 | |
---|
994 | IF ( ALLOCATED( lpt_av ) ) THEN |
---|
995 | CALL wrd_write_string( 'lpt_av' ) |
---|
996 | WRITE ( 14 ) lpt_av |
---|
997 | ENDIF |
---|
998 | |
---|
999 | IF ( ALLOCATED( lwp_av ) ) THEN |
---|
1000 | CALL wrd_write_string( 'lwp_av' ) |
---|
1001 | WRITE ( 14 ) lwp_av |
---|
1002 | ENDIF |
---|
1003 | |
---|
1004 | CALL wrd_write_string( 'p' ) |
---|
1005 | WRITE ( 14 ) p |
---|
1006 | |
---|
1007 | IF ( ALLOCATED( p_av ) ) THEN |
---|
1008 | CALL wrd_write_string( 'p_av' ) |
---|
1009 | WRITE ( 14 ) p_av |
---|
1010 | ENDIF |
---|
1011 | |
---|
1012 | IF ( ALLOCATED( pc_av ) ) THEN |
---|
1013 | CALL wrd_write_string( 'pc_av' ) |
---|
1014 | WRITE ( 14 ) pc_av |
---|
1015 | ENDIF |
---|
1016 | |
---|
1017 | IF ( ALLOCATED( pr_av ) ) THEN |
---|
1018 | CALL wrd_write_string( 'pr_av' ) |
---|
1019 | WRITE ( 14 ) pr_av |
---|
1020 | ENDIF |
---|
1021 | |
---|
1022 | IF ( ALLOCATED( prr ) ) THEN |
---|
1023 | CALL wrd_write_string( 'prr' ) |
---|
1024 | WRITE ( 14 ) prr |
---|
1025 | ENDIF |
---|
1026 | |
---|
1027 | IF ( ALLOCATED( prr_av ) ) THEN |
---|
1028 | CALL wrd_write_string( 'prr_av' ) |
---|
1029 | WRITE ( 14 ) prr_av |
---|
1030 | ENDIF |
---|
1031 | |
---|
1032 | IF ( ALLOCATED( precipitation_amount ) ) THEN |
---|
1033 | CALL wrd_write_string( 'precipitation_amount' ) |
---|
1034 | WRITE ( 14 ) precipitation_amount |
---|
1035 | ENDIF |
---|
1036 | |
---|
1037 | IF ( ALLOCATED( precipitation_rate_av ) ) THEN |
---|
1038 | CALL wrd_write_string( 'precipitation_rate_av' ) |
---|
1039 | WRITE ( 14 ) precipitation_rate_av |
---|
1040 | ENDIF |
---|
1041 | |
---|
1042 | CALL wrd_write_string( 'pt' ) |
---|
1043 | WRITE ( 14 ) pt |
---|
1044 | |
---|
1045 | IF ( ALLOCATED( pt_av ) ) THEN |
---|
1046 | CALL wrd_write_string( 'pt_av' ) |
---|
1047 | WRITE ( 14 ) pt_av |
---|
1048 | ENDIF |
---|
1049 | |
---|
1050 | IF ( humidity ) THEN |
---|
1051 | |
---|
1052 | CALL wrd_write_string( 'q' ) |
---|
1053 | WRITE ( 14 ) q |
---|
1054 | |
---|
1055 | IF ( ALLOCATED( q_av ) ) THEN |
---|
1056 | CALL wrd_write_string( 'q_av' ) |
---|
1057 | WRITE ( 14 ) q_av |
---|
1058 | ENDIF |
---|
1059 | |
---|
1060 | IF ( cloud_physics .OR. cloud_droplets ) THEN |
---|
1061 | |
---|
1062 | CALL wrd_write_string( 'ql' ) |
---|
1063 | WRITE ( 14 ) ql |
---|
1064 | |
---|
1065 | IF ( ALLOCATED( ql_av ) ) THEN |
---|
1066 | CALL wrd_write_string( 'ql_av' ) |
---|
1067 | WRITE ( 14 ) ql_av |
---|
1068 | ENDIF |
---|
1069 | |
---|
1070 | IF ( .NOT. cloud_droplets ) THEN |
---|
1071 | |
---|
1072 | CALL wrd_write_string( 'qc' ) |
---|
1073 | WRITE ( 14 ) qc |
---|
1074 | |
---|
1075 | IF ( ALLOCATED( qc_av ) ) THEN |
---|
1076 | CALL wrd_write_string( 'qc_av' ) |
---|
1077 | WRITE ( 14 ) qc_av |
---|
1078 | ENDIF |
---|
1079 | |
---|
1080 | IF ( microphysics_morrison ) THEN |
---|
1081 | |
---|
1082 | CALL wrd_write_string( 'nc' ) |
---|
1083 | WRITE ( 14 ) nc |
---|
1084 | |
---|
1085 | IF ( ALLOCATED( nc_av ) ) THEN |
---|
1086 | CALL wrd_write_string( 'nc_av' ) |
---|
1087 | WRITE ( 14 ) nc_av |
---|
1088 | ENDIF |
---|
1089 | |
---|
1090 | ENDIF |
---|
1091 | |
---|
1092 | IF ( microphysics_seifert ) THEN |
---|
1093 | |
---|
1094 | CALL wrd_write_string( 'nr' ) |
---|
1095 | WRITE ( 14 ) nr |
---|
1096 | |
---|
1097 | IF ( ALLOCATED( nr_av ) ) THEN |
---|
1098 | CALL wrd_write_string( 'nr_av' ) |
---|
1099 | WRITE ( 14 ) nr_av |
---|
1100 | ENDIF |
---|
1101 | |
---|
1102 | CALL wrd_write_string( 'qr' ) |
---|
1103 | WRITE ( 14 ) qr |
---|
1104 | |
---|
1105 | IF ( ALLOCATED( qr_av ) ) THEN |
---|
1106 | CALL wrd_write_string( 'qr_av' ) |
---|
1107 | WRITE ( 14 ) qr_av |
---|
1108 | ENDIF |
---|
1109 | |
---|
1110 | ENDIF |
---|
1111 | ENDIF |
---|
1112 | ENDIF |
---|
1113 | |
---|
1114 | IF ( ALLOCATED( qsws_av ) ) THEN |
---|
1115 | CALL wrd_write_string( 'qsws_av' ) |
---|
1116 | WRITE ( 14 ) qsws_av |
---|
1117 | ENDIF |
---|
1118 | |
---|
1119 | ENDIF |
---|
1120 | |
---|
1121 | IF ( passive_scalar ) THEN |
---|
1122 | |
---|
1123 | CALL wrd_write_string( 's' ) |
---|
1124 | WRITE ( 14 ) s |
---|
1125 | |
---|
1126 | IF ( ALLOCATED( s_av ) ) THEN |
---|
1127 | CALL wrd_write_string( 's_av' ) |
---|
1128 | WRITE ( 14 ) s_av |
---|
1129 | ENDIF |
---|
1130 | |
---|
1131 | IF ( ALLOCATED( ssws_av ) ) THEN |
---|
1132 | CALL wrd_write_string( 'ssws_av' ) |
---|
1133 | WRITE ( 14 ) ssws_av |
---|
1134 | ENDIF |
---|
1135 | |
---|
1136 | ENDIF |
---|
1137 | |
---|
1138 | IF ( ocean ) THEN |
---|
1139 | |
---|
1140 | IF ( ALLOCATED( rho_ocean_av ) ) THEN |
---|
1141 | CALL wrd_write_string( 'rho_ocean_av' ) |
---|
1142 | WRITE ( 14 ) rho_ocean_av |
---|
1143 | ENDIF |
---|
1144 | |
---|
1145 | CALL wrd_write_string( 'sa' ) |
---|
1146 | WRITE ( 14 ) sa |
---|
1147 | |
---|
1148 | IF ( ALLOCATED( sa_av ) ) THEN |
---|
1149 | CALL wrd_write_string( 'sa_av' ) |
---|
1150 | WRITE ( 14 ) sa_av |
---|
1151 | ENDIF |
---|
1152 | |
---|
1153 | ENDIF |
---|
1154 | |
---|
1155 | IF ( ALLOCATED( ql_c_av ) ) THEN |
---|
1156 | CALL wrd_write_string( 'ql_c_av' ) |
---|
1157 | WRITE ( 14 ) ql_c_av |
---|
1158 | ENDIF |
---|
1159 | |
---|
1160 | IF ( ALLOCATED( ql_v_av ) ) THEN |
---|
1161 | CALL wrd_write_string( 'ql_v_av' ) |
---|
1162 | WRITE ( 14 ) ql_v_av |
---|
1163 | ENDIF |
---|
1164 | |
---|
1165 | IF ( ALLOCATED( ql_vp_av ) ) THEN |
---|
1166 | CALL wrd_write_string( 'ql_vp_av' ) |
---|
1167 | WRITE ( 14 ) ql_vp_av |
---|
1168 | ENDIF |
---|
1169 | |
---|
1170 | IF ( ALLOCATED( qv_av ) ) THEN |
---|
1171 | CALL wrd_write_string( 'qv_av' ) |
---|
1172 | WRITE ( 14 ) qv_av |
---|
1173 | ENDIF |
---|
1174 | |
---|
1175 | CALL wrd_write_string( 'random_iv' ) |
---|
1176 | WRITE ( 14 ) random_iv |
---|
1177 | WRITE ( 14 ) random_iy |
---|
1178 | |
---|
1179 | IF ( ALLOCATED( seq_random_array ) ) THEN |
---|
1180 | CALL wrd_write_string( 'seq_random_array' ) |
---|
1181 | WRITE ( 14 ) id_random_array |
---|
1182 | WRITE ( 14 ) seq_random_array |
---|
1183 | ENDIF |
---|
1184 | |
---|
1185 | IF ( ALLOCATED( s_av ) ) THEN |
---|
1186 | CALL wrd_write_string( 's_av' ) |
---|
1187 | WRITE ( 14 ) s_av |
---|
1188 | ENDIF |
---|
1189 | |
---|
1190 | IF ( ALLOCATED( shf_av ) ) THEN |
---|
1191 | CALL wrd_write_string( 'shf_av' ) |
---|
1192 | WRITE ( 14 ) shf_av |
---|
1193 | ENDIF |
---|
1194 | |
---|
1195 | IF ( ALLOCATED( spectrum_x ) ) THEN |
---|
1196 | CALL wrd_write_string( 'spectrum_x' ) |
---|
1197 | WRITE ( 14 ) spectrum_x |
---|
1198 | CALL wrd_write_string( 'spectrum_y' ) |
---|
1199 | WRITE ( 14 ) spectrum_y |
---|
1200 | ENDIF |
---|
1201 | |
---|
1202 | IF ( ALLOCATED( ts_av ) ) THEN |
---|
1203 | CALL wrd_write_string( 'ts_av' ) |
---|
1204 | WRITE ( 14 ) ts_av |
---|
1205 | ENDIF |
---|
1206 | |
---|
1207 | CALL wrd_write_string( 'u' ) |
---|
1208 | WRITE ( 14 ) u |
---|
1209 | |
---|
1210 | IF ( ALLOCATED( u_av ) ) THEN |
---|
1211 | CALL wrd_write_string( 'u_av' ) |
---|
1212 | WRITE ( 14 ) u_av |
---|
1213 | ENDIF |
---|
1214 | |
---|
1215 | IF ( ALLOCATED( u_m_l ) ) THEN |
---|
1216 | CALL wrd_write_string( 'u_m_l' ) |
---|
1217 | WRITE ( 14 ) u_m_l |
---|
1218 | ENDIF |
---|
1219 | |
---|
1220 | IF ( ALLOCATED( u_m_n ) ) THEN |
---|
1221 | CALL wrd_write_string( 'u_m_n' ) |
---|
1222 | WRITE ( 14 ) u_m_n |
---|
1223 | ENDIF |
---|
1224 | |
---|
1225 | IF ( ALLOCATED( u_m_r ) ) THEN |
---|
1226 | CALL wrd_write_string( 'u_m_r' ) |
---|
1227 | WRITE ( 14 ) u_m_r |
---|
1228 | ENDIF |
---|
1229 | |
---|
1230 | IF ( ALLOCATED( u_m_s ) ) THEN |
---|
1231 | CALL wrd_write_string( 'u_m_s' ) |
---|
1232 | WRITE ( 14 ) u_m_s |
---|
1233 | ENDIF |
---|
1234 | |
---|
1235 | IF ( ALLOCATED( us_av ) ) THEN |
---|
1236 | CALL wrd_write_string( 'us_av' ) |
---|
1237 | WRITE ( 14 ) us_av |
---|
1238 | ENDIF |
---|
1239 | |
---|
1240 | CALL wrd_write_string( 'v' ) |
---|
1241 | WRITE ( 14 ) v |
---|
1242 | |
---|
1243 | IF ( ALLOCATED( v_av ) ) THEN |
---|
1244 | CALL wrd_write_string( 'v_av' ) |
---|
1245 | WRITE ( 14 ) v_av |
---|
1246 | ENDIF |
---|
1247 | |
---|
1248 | IF ( ALLOCATED( v_m_l ) ) THEN |
---|
1249 | CALL wrd_write_string( 'v_m_l' ) |
---|
1250 | WRITE ( 14 ) v_m_l |
---|
1251 | ENDIF |
---|
1252 | |
---|
1253 | IF ( ALLOCATED( v_m_n ) ) THEN |
---|
1254 | CALL wrd_write_string( 'v_m_n' ) |
---|
1255 | WRITE ( 14 ) v_m_n |
---|
1256 | ENDIF |
---|
1257 | |
---|
1258 | IF ( ALLOCATED( v_m_r ) ) THEN |
---|
1259 | CALL wrd_write_string( 'v_m_r' ) |
---|
1260 | WRITE ( 14 ) v_m_r |
---|
1261 | ENDIF |
---|
1262 | |
---|
1263 | IF ( ALLOCATED( v_m_s ) ) THEN |
---|
1264 | CALL wrd_write_string( 'v_m_s' ) |
---|
1265 | WRITE ( 14 ) v_m_s |
---|
1266 | ENDIF |
---|
1267 | |
---|
1268 | IF ( humidity ) THEN |
---|
1269 | |
---|
1270 | CALL wrd_write_string( 'vpt' ) |
---|
1271 | WRITE ( 14 ) vpt |
---|
1272 | |
---|
1273 | IF ( ALLOCATED( vpt_av ) ) THEN |
---|
1274 | CALL wrd_write_string( 'vpt_av' ) |
---|
1275 | WRITE ( 14 ) vpt_av |
---|
1276 | ENDIF |
---|
1277 | |
---|
1278 | ENDIF |
---|
1279 | |
---|
1280 | CALL wrd_write_string( 'w' ) |
---|
1281 | WRITE ( 14 ) w |
---|
1282 | |
---|
1283 | IF ( ALLOCATED( w_av ) ) THEN |
---|
1284 | CALL wrd_write_string( 'w_av' ) |
---|
1285 | WRITE ( 14 ) w_av |
---|
1286 | ENDIF |
---|
1287 | |
---|
1288 | IF ( ALLOCATED( w_m_l ) ) THEN |
---|
1289 | CALL wrd_write_string( 'w_m_l' ) |
---|
1290 | WRITE ( 14 ) w_m_l |
---|
1291 | ENDIF |
---|
1292 | |
---|
1293 | IF ( ALLOCATED( w_m_n ) ) THEN |
---|
1294 | CALL wrd_write_string( 'w_m_n' ) |
---|
1295 | WRITE ( 14 ) w_m_n |
---|
1296 | ENDIF |
---|
1297 | |
---|
1298 | IF ( ALLOCATED( w_m_r ) ) THEN |
---|
1299 | CALL wrd_write_string( 'w_m_r' ) |
---|
1300 | WRITE ( 14 ) w_m_r |
---|
1301 | ENDIF |
---|
1302 | |
---|
1303 | IF ( ALLOCATED( w_m_s ) ) THEN |
---|
1304 | CALL wrd_write_string( 'w_m_s' ) |
---|
1305 | WRITE ( 14 ) w_m_s |
---|
1306 | ENDIF |
---|
1307 | |
---|
1308 | IF ( ALLOCATED( z0_av ) ) THEN |
---|
1309 | CALL wrd_write_string( 'z0_av' ) |
---|
1310 | WRITE ( 14 ) z0_av |
---|
1311 | ENDIF |
---|
1312 | |
---|
1313 | IF ( ALLOCATED( z0h_av ) ) THEN |
---|
1314 | CALL wrd_write_string( 'z0h_av' ) |
---|
1315 | WRITE ( 14 ) z0h_av |
---|
1316 | ENDIF |
---|
1317 | |
---|
1318 | IF ( ALLOCATED( z0q_av ) ) THEN |
---|
1319 | CALL wrd_write_string( 'z0q_av' ) |
---|
1320 | WRITE ( 14 ) z0q_av |
---|
1321 | ENDIF |
---|
1322 | |
---|
1323 | IF ( land_surface .OR. urban_surface ) THEN |
---|
1324 | |
---|
1325 | IF ( ALLOCATED( ghf_av ) ) THEN |
---|
1326 | CALL wrd_write_string( 'ghf_av' ) |
---|
1327 | WRITE ( 14 ) ghf_av |
---|
1328 | ENDIF |
---|
1329 | |
---|
1330 | IF ( ALLOCATED( r_a_av ) ) THEN |
---|
1331 | CALL wrd_write_string( 'r_a_av' ) |
---|
1332 | WRITE ( 14 ) r_a_av |
---|
1333 | ENDIF |
---|
1334 | |
---|
1335 | ENDIF |
---|
1336 | |
---|
1337 | IF ( ALLOCATED( tsurf_av ) ) THEN |
---|
1338 | CALL wrd_write_string( 'tsurf_av' ) |
---|
1339 | WRITE ( 14 ) tsurf_av |
---|
1340 | ENDIF |
---|
1341 | |
---|
1342 | ! |
---|
1343 | !-- Write surface-related restart data. |
---|
1344 | CALL surface_wrd_local |
---|
1345 | |
---|
1346 | ! |
---|
1347 | !-- If required, write restart data for urban surface model. |
---|
1348 | IF ( urban_surface ) THEN |
---|
1349 | CALL usm_wrd_local |
---|
1350 | ENDIF |
---|
1351 | |
---|
1352 | ! |
---|
1353 | !-- If required, write restart data for land surface model. |
---|
1354 | IF ( land_surface ) THEN |
---|
1355 | CALL lsm_wrd_local |
---|
1356 | ENDIF |
---|
1357 | |
---|
1358 | ! |
---|
1359 | !-- If required, write restart data for radiation model. |
---|
1360 | IF ( radiation ) THEN |
---|
1361 | CALL radiation_wrd_local |
---|
1362 | ENDIF |
---|
1363 | |
---|
1364 | ! |
---|
1365 | !-- If required, write restart data for chemistry model. |
---|
1366 | IF ( air_chemistry ) THEN |
---|
1367 | CALL chem_wrd_local |
---|
1368 | ENDIF |
---|
1369 | |
---|
1370 | ! |
---|
1371 | !-- Write user-related restart data. |
---|
1372 | CALL user_wrd_local |
---|
1373 | |
---|
1374 | !-- Write end label. |
---|
1375 | CALL wrd_write_string( '*** end ***' ) |
---|
1376 | |
---|
1377 | END SUBROUTINE wrd_local |
---|
1378 | |
---|
1379 | |
---|
1380 | END MODULE write_restart_data_mod |
---|