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