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