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