source: palm/trunk/SOURCE/header.f90 @ 1788

Last change on this file since 1788 was 1788, checked in by maronga, 8 years ago

added support for water and paved surfaced in land surface model / minor changes

  • Property svn:keywords set to Id
File size: 94.5 KB
Line 
1!> @file header.f90
2!--------------------------------------------------------------------------------!
3! This file is part of PALM.
4!
5! PALM is free software: you can redistribute it and/or modify it under the terms
6! of the GNU General Public License as published by the Free Software Foundation,
7! either version 3 of the License, or (at your option) any later version.
8!
9! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
10! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
11! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
12!
13! You should have received a copy of the GNU General Public License along with
14! PALM. If not, see <http://www.gnu.org/licenses/>.
15!
16! Copyright 1997-2015 Leibniz Universitaet Hannover
17!--------------------------------------------------------------------------------!
18!
19! Current revisions:
20! -----------------
21! Parameter dewfall removed
22!
23! Former revisions:
24! -----------------
25! $Id: header.f90 1788 2016-03-10 11:01:04Z maronga $
26!
27! 1786 2016-03-08 05:49:27Z raasch
28! cpp-direktives for spectra removed
29!
30! 1783 2016-03-06 18:36:17Z raasch
31! netcdf module and variable names changed, output of netcdf_deflate
32!
33! 1764 2016-02-28 12:45:19Z raasch
34! output of nesting informations
35!
36! 1697 2015-10-28 17:14:10Z raasch
37! small E- and F-FORMAT changes to avoid informative compiler messages about
38! insufficient field width
39!
40! 1691 2015-10-26 16:17:44Z maronga
41! Renamed prandtl_layer to constant_flux_layer, renames rif_min/rif_max to
42! zeta_min/zeta_max.
43!
44! 1682 2015-10-07 23:56:08Z knoop
45! Code annotations made doxygen readable
46!
47! 1675 2015-10-02 08:28:59Z gronemeier
48! Bugfix: Definition of topography grid levels
49!
50! 1660 2015-09-21 08:15:16Z gronemeier
51! Bugfix: Definition of building/street canyon height if vertical grid stretching
52!         starts below the maximum topography height.
53!
54! 1590 2015-05-08 13:56:27Z maronga
55! Bugfix: Added TRIM statements for character strings for LSM and radiation code
56!
57! 1585 2015-04-30 07:05:52Z maronga
58! Further output for radiation model(s).
59!
60! 1575 2015-03-27 09:56:27Z raasch
61! adjustments for psolver-queries, output of seed_follows_topography
62!
63! 1560 2015-03-06 10:48:54Z keck
64! output for recycling y shift
65!
66! 1557 2015-03-05 16:43:04Z suehring
67! output for monotonic limiter
68!
69! 1551 2015-03-03 14:18:16Z maronga
70! Added informal output for land surface model and radiation model. Removed typo.
71!
72! 1496 2014-12-02 17:25:50Z maronga
73! Renamed: "radiation -> "cloud_top_radiation"
74!
75! 1484 2014-10-21 10:53:05Z kanani
76! Changes due to new module structure of the plant canopy model:
77!   module plant_canopy_model_mod and output for new canopy model parameters
78!   (alpha_lad, beta_lad, lai_beta,...) added,
79!   drag_coefficient, leaf_surface_concentration and scalar_exchange_coefficient
80!   renamed to canopy_drag_coeff, leaf_surface_conc and leaf_scalar_exch_coeff,
81!   learde renamed leaf_area_density.
82! Bugfix: DO-WHILE-loop for lad header information additionally restricted
83! by maximum number of gradient levels (currently 10)
84!
85! 1482 2014-10-18 12:34:45Z raasch
86! information about calculated or predefined virtual processor topology adjusted
87!
88! 1468 2014-09-24 14:06:57Z maronga
89! Adapted for use on up to 6-digit processor cores
90!
91! 1429 2014-07-15 12:53:45Z knoop
92! header exended to provide ensemble_member_nr if specified
93!
94! 1376 2014-04-26 11:21:22Z boeske
95! Correction of typos
96!
97! 1365 2014-04-22 15:03:56Z boeske
98! New section 'Large scale forcing and nudging':
99! output of large scale forcing and nudging information,
100! new section for initial profiles created
101!
102! 1359 2014-04-11 17:15:14Z hoffmann
103! dt_sort_particles removed
104!
105! 1353 2014-04-08 15:21:23Z heinze
106! REAL constants provided with KIND-attribute
107!
108! 1327 2014-03-21 11:00:16Z raasch
109! parts concerning iso2d and avs output removed,
110! -netcdf output queries
111!
112! 1324 2014-03-21 09:13:16Z suehring
113! Bugfix: module spectrum added
114!
115! 1322 2014-03-20 16:38:49Z raasch
116! REAL functions provided with KIND-attribute,
117! some REAL constants defined as wp-kind
118!
119! 1320 2014-03-20 08:40:49Z raasch
120! ONLY-attribute added to USE-statements,
121! kind-parameters added to all INTEGER and REAL declaration statements,
122! kinds are defined in new module kinds,
123! revision history before 2012 removed,
124! comment fields (!:) to be used for variable explanations added to
125! all variable declaration statements
126!
127! 1308 2014-03-13 14:58:42Z fricke
128! output of the fixed number of output time levels
129! output_format adjusted for masked data if netcdf_data_format > 5
130!
131! 1299 2014-03-06 13:15:21Z heinze
132! output for using large_scale subsidence in combination
133! with large_scale_forcing
134! reformatting, more detailed explanations
135!
136! 1241 2013-10-30 11:36:58Z heinze
137! output for nudging + large scale forcing from external file
138!
139! 1216 2013-08-26 09:31:42Z raasch
140! output for transpose_compute_overlap
141!
142! 1212 2013-08-15 08:46:27Z raasch
143! output for poisfft_hybrid removed
144!
145! 1179 2013-06-14 05:57:58Z raasch
146! output of reference_state, use_reference renamed use_single_reference_value
147!
148! 1159 2013-05-21 11:58:22Z fricke
149! +use_cmax
150!
151! 1115 2013-03-26 18:16:16Z hoffmann
152! descriptions for Seifert-Beheng-cloud-physics-scheme added
153!
154! 1111 2013-03-08 23:54:10Z raasch
155! output of accelerator board information
156! ibc_p_b = 2 removed
157!
158! 1108 2013-03-05 07:03:32Z raasch
159! bugfix for r1106
160!
161! 1106 2013-03-04 05:31:38Z raasch
162! some format changes for coupled runs
163!
164! 1092 2013-02-02 11:24:22Z raasch
165! unused variables removed
166!
167! 1036 2012-10-22 13:43:42Z raasch
168! code put under GPL (PALM 3.9)
169!
170! 1031 2012-10-19 14:35:30Z raasch
171! output of netCDF data format modified
172!
173! 1015 2012-09-27 09:23:24Z raasch
174! output of Adjustment of mixing length to the Prandtl mixing length at first
175! grid point above ground removed
176!
177! 1003 2012-09-14 14:35:53Z raasch
178! output of information about equal/unequal subdomain size removed
179!
180! 1001 2012-09-13 14:08:46Z raasch
181! all actions concerning leapfrog- and upstream-spline-scheme removed
182!
183! 978 2012-08-09 08:28:32Z fricke
184! -km_damp_max, outflow_damping_width
185! +pt_damping_factor, pt_damping_width
186! +z0h
187!
188! 964 2012-07-26 09:14:24Z raasch
189! output of profil-related quantities removed
190!
191! 940 2012-07-09 14:31:00Z raasch
192! Output in case of simulations for pure neutral stratification (no pt-equation
193! solved)
194!
195! 927 2012-06-06 19:15:04Z raasch
196! output of masking_method for mg-solver
197!
198! 868 2012-03-28 12:21:07Z raasch
199! translation velocity in Galilean transformation changed to 0.6 * ug
200!
201! 833 2012-02-22 08:55:55Z maronga
202! Adjusted format for leaf area density
203!
204! 828 2012-02-21 12:00:36Z raasch
205! output of dissipation_classes + radius_classes
206!
207! 825 2012-02-19 03:03:44Z raasch
208! Output of cloud physics parameters/quantities complemented and restructured
209!
210! Revision 1.1  1997/08/11 06:17:20  raasch
211! Initial revision
212!
213!
214! Description:
215! ------------
216!> Writing a header with all important information about the current run.
217!> This subroutine is called three times, two times at the beginning
218!> (writing information on files RUN_CONTROL and HEADER) and one time at the
219!> end of the run, then writing additional information about CPU-usage on file
220!> header.
221!-----------------------------------------------------------------------------!
222 SUBROUTINE header
223 
224
225    USE arrays_3d,                                                             &
226        ONLY:  pt_init, qsws, q_init, sa_init, shf, ug, vg, w_subs, zu, zw
227       
228    USE control_parameters
229       
230    USE cloud_parameters,                                                      &
231        ONLY:  cp, curvature_solution_effects, c_sedimentation,                &
232               limiter_sedimentation, l_v, nc_const, r_d, ventilation_effect
233       
234    USE cpulog,                                                                &
235        ONLY:  log_point_s
236       
237    USE dvrp_variables,                                                        &
238        ONLY:  use_seperate_pe_for_dvrp_output
239       
240    USE grid_variables,                                                        &
241        ONLY:  dx, dy
242       
243    USE indices,                                                               &
244        ONLY:  mg_loc_ind, nnx, nny, nnz, nx, ny, nxl_mg, nxr_mg, nyn_mg,      &
245               nys_mg, nzt, nzt_mg
246       
247    USE kinds
248   
249    USE land_surface_model_mod,                                                &
250        ONLY:  conserve_water_content, land_surface, nzb_soil,                 &
251               nzt_soil, root_fraction, soil_moisture, soil_temperature,       &
252               soil_type, soil_type_name, veg_type, veg_type_name, zs
253 
254    USE model_1d,                                                              &
255        ONLY:  damp_level_ind_1d, dt_pr_1d, dt_run_control_1d, end_time_1d
256       
257    USE netcdf_interface,                                                      &
258        ONLY:  netcdf_data_format, netcdf_data_format_string, netcdf_deflate
259
260    USE particle_attributes,                                                   &
261        ONLY:  bc_par_b, bc_par_lr, bc_par_ns, bc_par_t, collision_kernel,     &
262               density_ratio, dissipation_classes, dt_min_part, dt_prel,       &
263               dt_write_particle_data, end_time_prel,                          &
264               maximum_number_of_tailpoints, maximum_tailpoint_age,            &
265               minimum_tailpoint_distance, number_of_particle_groups,          &
266               particle_advection, particle_advection_start,                   &
267               particles_per_point, pdx, pdy, pdz,  psb, psl, psn, psr, pss,   &
268               pst, radius, radius_classes, random_start_position,             &
269               seed_follows_topography,                                        &
270               total_number_of_particles, use_particle_tails,                  &
271               use_sgs_for_particles, total_number_of_tails,                   &
272               vertical_particle_advection, write_particle_statistics
273       
274    USE pegrid
275
276    USE plant_canopy_model_mod,                                                &
277        ONLY:  alpha_lad, beta_lad, calc_beta_lad_profile, canopy_drag_coeff,  &
278               canopy_mode, cthf, lad, lad_surface, lad_vertical_gradient,     &
279               lad_vertical_gradient_level, lad_vertical_gradient_level_ind,   &
280               lai_beta, leaf_scalar_exch_coeff, leaf_surface_conc, pch_index, &
281               plant_canopy
282
283    USE pmc_interface,                                                         &
284        ONLY:  cpl_id, cpl_parent_id, cpl_name, lower_left_coord_x,            &
285               lower_left_coord_y, nested_run, nesting_mode
286
287    USE radiation_model_mod,                                                   &
288        ONLY:  albedo, albedo_type, albedo_type_name, constant_albedo,         &
289               day_init, dt_radiation, lambda, lw_radiation, net_radiation,    &
290               radiation, radiation_scheme, sw_radiation, time_utc_init
291   
292    USE spectrum,                                                              &
293        ONLY:  comp_spectra_level, data_output_sp, plot_spectra_level,         &
294               spectra_direction
295
296    IMPLICIT NONE
297
298    CHARACTER (LEN=1)  ::  prec                !<
299   
300    CHARACTER (LEN=2)  ::  do2d_mode           !<
301   
302    CHARACTER (LEN=5)  ::  section_chr         !<
303   
304    CHARACTER (LEN=10) ::  coor_chr            !<
305    CHARACTER (LEN=10) ::  host_chr            !<
306   
307    CHARACTER (LEN=16) ::  begin_chr           !<
308   
309    CHARACTER (LEN=26) ::  ver_rev             !<
310   
311    CHARACTER (LEN=40) ::  output_format       !<
312   
313    CHARACTER (LEN=70) ::  char1               !<
314    CHARACTER (LEN=70) ::  char2               !<
315    CHARACTER (LEN=70) ::  dopr_chr            !<
316    CHARACTER (LEN=70) ::  do2d_xy             !<
317    CHARACTER (LEN=70) ::  do2d_xz             !<
318    CHARACTER (LEN=70) ::  do2d_yz             !<
319    CHARACTER (LEN=70) ::  do3d_chr            !<
320    CHARACTER (LEN=70) ::  domask_chr          !<
321    CHARACTER (LEN=70) ::  run_classification  !<
322   
323    CHARACTER (LEN=85) ::  roben               !<
324    CHARACTER (LEN=85) ::  runten              !<
325   
326    CHARACTER (LEN=86) ::  coordinates         !<
327    CHARACTER (LEN=86) ::  gradients           !<
328    CHARACTER (LEN=86) ::  leaf_area_density   !<
329    CHARACTER (LEN=86) ::  roots               !<
330    CHARACTER (LEN=86) ::  slices              !<
331    CHARACTER (LEN=86) ::  temperatures        !<
332    CHARACTER (LEN=86) ::  ugcomponent         !<
333    CHARACTER (LEN=86) ::  vgcomponent         !<
334
335    CHARACTER (LEN=1), DIMENSION(1:3) ::  dir = (/ 'x', 'y', 'z' /)  !<
336
337    INTEGER(iwp) ::  av        !<
338    INTEGER(iwp) ::  bh        !<
339    INTEGER(iwp) ::  blx       !<
340    INTEGER(iwp) ::  bly       !<
341    INTEGER(iwp) ::  bxl       !<
342    INTEGER(iwp) ::  bxr       !<
343    INTEGER(iwp) ::  byn       !<
344    INTEGER(iwp) ::  bys       !<
345    INTEGER(iwp) ::  ch        !<
346    INTEGER(iwp) ::  count     !<
347    INTEGER(iwp) ::  cwx       !<
348    INTEGER(iwp) ::  cwy       !<
349    INTEGER(iwp) ::  cxl       !<
350    INTEGER(iwp) ::  cxr       !<
351    INTEGER(iwp) ::  cyn       !<
352    INTEGER(iwp) ::  cys       !<
353    INTEGER(iwp) ::  dim       !<
354    INTEGER(iwp) ::  i         !<
355    INTEGER(iwp) ::  io        !<
356    INTEGER(iwp) ::  j         !<
357    INTEGER(iwp) ::  k         !<
358    INTEGER(iwp) ::  l         !<
359    INTEGER(iwp) ::  ll        !<
360    INTEGER(iwp) ::  mpi_type  !<
361   
362    REAL(wp) ::  canopy_height                    !< canopy height (in m)
363    REAL(wp) ::  cpuseconds_per_simulated_second  !<
364
365!
366!-- Open the output file. At the end of the simulation, output is directed
367!-- to unit 19.
368    IF ( ( runnr == 0 .OR. force_print_header )  .AND. &
369         .NOT. simulated_time_at_begin /= simulated_time )  THEN
370       io = 15   !  header output on file RUN_CONTROL
371    ELSE
372       io = 19   !  header output on file HEADER
373    ENDIF
374    CALL check_open( io )
375
376!
377!-- At the end of the run, output file (HEADER) will be rewritten with
378!-- new information
379    IF ( io == 19 .AND. simulated_time_at_begin /= simulated_time ) REWIND( 19 )
380
381!
382!-- Determine kind of model run
383    IF ( TRIM( initializing_actions ) == 'read_restart_data' )  THEN
384       run_classification = 'restart run'
385    ELSEIF ( TRIM( initializing_actions ) == 'cyclic_fill' )  THEN
386       run_classification = 'run with cyclic fill of 3D - prerun data'
387    ELSEIF ( INDEX( initializing_actions, 'set_constant_profiles' ) /= 0 )  THEN
388       run_classification = 'run without 1D - prerun'
389    ELSEIF ( INDEX( initializing_actions, 'set_1d-model_profiles' ) /= 0 )  THEN
390       run_classification = 'run with 1D - prerun'
391    ELSEIF ( INDEX( initializing_actions, 'by_user' ) /=0 )  THEN
392       run_classification = 'run initialized by user'
393    ELSE
394       message_string = ' unknown action(s): ' // TRIM( initializing_actions )
395       CALL message( 'header', 'PA0191', 0, 0, 0, 6, 0 )
396    ENDIF
397    IF ( nested_run )  run_classification = 'nested ' // run_classification
398    IF ( ocean )  THEN
399       run_classification = 'ocean - ' // run_classification
400    ELSE
401       run_classification = 'atmosphere - ' // run_classification
402    ENDIF
403
404!
405!-- Run-identification, date, time, host
406    host_chr = host(1:10)
407    ver_rev = TRIM( version ) // '  ' // TRIM( revision )
408    WRITE ( io, 100 )  ver_rev, TRIM( run_classification )
409    IF ( TRIM( coupling_mode ) /= 'uncoupled' )  THEN
410#if defined( __mpi2 )
411       mpi_type = 2
412#else
413       mpi_type = 1
414#endif
415       WRITE ( io, 101 )  mpi_type, coupling_mode
416    ENDIF
417#if defined( __parallel )
418    IF ( coupling_start_time /= 0.0_wp )  THEN
419       IF ( coupling_start_time > simulated_time_at_begin )  THEN
420          WRITE ( io, 109 )
421       ELSE
422          WRITE ( io, 114 )
423       ENDIF
424    ENDIF
425#endif
426    IF ( ensemble_member_nr /= 0 )  THEN
427       WRITE ( io, 512 )  run_date, run_identifier, run_time, runnr,           &
428                       ADJUSTR( host_chr ), ensemble_member_nr
429    ELSE
430       WRITE ( io, 102 )  run_date, run_identifier, run_time, runnr,           &
431                       ADJUSTR( host_chr )
432    ENDIF
433#if defined( __parallel )
434    IF ( npex == -1  .AND.  npey == -1 )  THEN
435       char1 = 'calculated'
436    ELSE
437       char1 = 'predefined'
438    ENDIF
439    IF ( threads_per_task == 1 )  THEN
440       WRITE ( io, 103 )  numprocs, pdims(1), pdims(2), TRIM( char1 )
441    ELSE
442       WRITE ( io, 104 )  numprocs*threads_per_task, numprocs, &
443                          threads_per_task, pdims(1), pdims(2), TRIM( char1 )
444    ENDIF
445    IF ( num_acc_per_node /= 0 )  WRITE ( io, 117 )  num_acc_per_node   
446    IF ( ( host(1:3) == 'ibm'  .OR.  host(1:3) == 'nec'  .OR.    &
447           host(1:2) == 'lc'   .OR.  host(1:3) == 'dec' )  .AND. &
448         npex == -1  .AND.  pdims(2) == 1 )                      &
449    THEN
450       WRITE ( io, 106 )
451    ELSEIF ( pdims(2) == 1 )  THEN
452       WRITE ( io, 107 )  'x'
453    ELSEIF ( pdims(1) == 1 )  THEN
454       WRITE ( io, 107 )  'y'
455    ENDIF
456    IF ( use_seperate_pe_for_dvrp_output )  WRITE ( io, 105 )
457    IF ( numprocs /= maximum_parallel_io_streams )  THEN
458       WRITE ( io, 108 )  maximum_parallel_io_streams
459    ENDIF
460#else
461    IF ( num_acc_per_node /= 0 )  WRITE ( io, 120 )  num_acc_per_node
462#endif
463
464!
465!-- Nesting informations
466    IF ( nested_run )  THEN
467       WRITE ( io, 600 )  cpl_id, TRIM( cpl_name ), cpl_parent_id,             &
468                          nesting_mode, lower_left_coord_x, lower_left_coord_y
469    ENDIF
470    WRITE ( io, 99 )
471
472!
473!-- Numerical schemes
474    WRITE ( io, 110 )
475    IF ( psolver(1:7) == 'poisfft' )  THEN
476       WRITE ( io, 111 )  TRIM( fft_method )
477       IF ( transpose_compute_overlap )  WRITE( io, 115 )
478    ELSEIF ( psolver == 'sor' )  THEN
479       WRITE ( io, 112 )  nsor_ini, nsor, omega_sor
480    ELSEIF ( psolver(1:9) == 'multigrid' )  THEN
481       WRITE ( io, 135 )  TRIM(psolver), cycle_mg, maximum_grid_level, ngsrb
482       IF ( mg_cycles == -1 )  THEN
483          WRITE ( io, 140 )  residual_limit
484       ELSE
485          WRITE ( io, 141 )  mg_cycles
486       ENDIF
487       IF ( mg_switch_to_pe0_level == 0 )  THEN
488          WRITE ( io, 136 )  nxr_mg(1)-nxl_mg(1)+1, nyn_mg(1)-nys_mg(1)+1, &
489                             nzt_mg(1)
490       ELSEIF (  mg_switch_to_pe0_level /= -1 )  THEN
491          WRITE ( io, 137 )  mg_switch_to_pe0_level,            &
492                             mg_loc_ind(2,0)-mg_loc_ind(1,0)+1, &
493                             mg_loc_ind(4,0)-mg_loc_ind(3,0)+1, &
494                             nzt_mg(mg_switch_to_pe0_level),    &
495                             nxr_mg(1)-nxl_mg(1)+1, nyn_mg(1)-nys_mg(1)+1, &
496                             nzt_mg(1)
497       ENDIF
498       IF ( masking_method )  WRITE ( io, 144 )
499    ENDIF
500    IF ( call_psolver_at_all_substeps  .AND. timestep_scheme(1:5) == 'runge' ) &
501    THEN
502       WRITE ( io, 142 )
503    ENDIF
504
505    IF ( momentum_advec == 'pw-scheme' )  THEN
506       WRITE ( io, 113 )
507    ELSEIF (momentum_advec == 'ws-scheme' )  THEN
508       WRITE ( io, 503 )
509    ENDIF
510    IF ( scalar_advec == 'pw-scheme' )  THEN
511       WRITE ( io, 116 )
512    ELSEIF ( scalar_advec == 'ws-scheme' )  THEN
513       WRITE ( io, 504 )
514    ELSEIF ( scalar_advec == 'ws-scheme-mono' )  THEN
515       WRITE ( io, 513 )
516    ELSE
517       WRITE ( io, 118 )
518    ENDIF
519
520    WRITE ( io, 139 )  TRIM( loop_optimization )
521
522    IF ( galilei_transformation )  THEN
523       IF ( use_ug_for_galilei_tr )  THEN
524          char1 = '0.6 * geostrophic wind'
525       ELSE
526          char1 = 'mean wind in model domain'
527       ENDIF
528       IF ( simulated_time_at_begin == simulated_time )  THEN
529          char2 = 'at the start of the run'
530       ELSE
531          char2 = 'at the end of the run'
532       ENDIF
533       WRITE ( io, 119 )  TRIM( char1 ), TRIM( char2 ),                        &
534                          advected_distance_x/1000.0_wp,                       &
535                          advected_distance_y/1000.0_wp
536    ENDIF
537    WRITE ( io, 122 )  timestep_scheme
538    IF ( use_upstream_for_tke )  WRITE ( io, 143 )
539    IF ( rayleigh_damping_factor /= 0.0_wp )  THEN
540       IF ( .NOT. ocean )  THEN
541          WRITE ( io, 123 )  'above', rayleigh_damping_height, &
542               rayleigh_damping_factor
543       ELSE
544          WRITE ( io, 123 )  'below', rayleigh_damping_height, &
545               rayleigh_damping_factor
546       ENDIF
547    ENDIF
548    IF ( neutral )  WRITE ( io, 131 )  pt_surface
549    IF ( humidity )  THEN
550       IF ( .NOT. cloud_physics )  THEN
551          WRITE ( io, 129 )
552       ELSE
553          WRITE ( io, 130 )
554       ENDIF
555    ENDIF
556    IF ( passive_scalar )  WRITE ( io, 134 )
557    IF ( conserve_volume_flow )  THEN
558       WRITE ( io, 150 )  conserve_volume_flow_mode
559       IF ( TRIM( conserve_volume_flow_mode ) == 'bulk_velocity' )  THEN
560          WRITE ( io, 151 )  u_bulk, v_bulk
561       ENDIF
562    ELSEIF ( dp_external )  THEN
563       IF ( dp_smooth )  THEN
564          WRITE ( io, 152 )  dpdxy, dp_level_b, ', vertically smoothed.'
565       ELSE
566          WRITE ( io, 152 )  dpdxy, dp_level_b, '.'
567       ENDIF
568    ENDIF
569    WRITE ( io, 99 )
570
571!
572!-- Runtime and timestep information
573    WRITE ( io, 200 )
574    IF ( .NOT. dt_fixed )  THEN
575       WRITE ( io, 201 )  dt_max, cfl_factor
576    ELSE
577       WRITE ( io, 202 )  dt
578    ENDIF
579    WRITE ( io, 203 )  simulated_time_at_begin, end_time
580
581    IF ( time_restart /= 9999999.9_wp  .AND. &
582         simulated_time_at_begin == simulated_time )  THEN
583       IF ( dt_restart == 9999999.9_wp )  THEN
584          WRITE ( io, 204 )  ' Restart at:       ',time_restart
585       ELSE
586          WRITE ( io, 205 )  ' Restart at:       ',time_restart, dt_restart
587       ENDIF
588    ENDIF
589
590    IF ( simulated_time_at_begin /= simulated_time )  THEN
591       i = MAX ( log_point_s(10)%counts, 1 )
592       IF ( ( simulated_time - simulated_time_at_begin ) == 0.0_wp )  THEN
593          cpuseconds_per_simulated_second = 0.0_wp
594       ELSE
595          cpuseconds_per_simulated_second = log_point_s(10)%sum / &
596                                            ( simulated_time -    &
597                                              simulated_time_at_begin )
598       ENDIF
599       WRITE ( io, 206 )  simulated_time, log_point_s(10)%sum,      &
600                          log_point_s(10)%sum / REAL( i, KIND=wp ), &
601                          cpuseconds_per_simulated_second
602       IF ( time_restart /= 9999999.9_wp  .AND.  time_restart < end_time )  THEN
603          IF ( dt_restart == 9999999.9_wp )  THEN
604             WRITE ( io, 204 )  ' Next restart at:     ',time_restart
605          ELSE
606             WRITE ( io, 205 )  ' Next restart at:     ',time_restart, dt_restart
607          ENDIF
608       ENDIF
609    ENDIF
610
611
612!
613!-- Start time for coupled runs, if independent precursor runs for atmosphere
614!-- and ocean are used or have been used. In this case, coupling_start_time
615!-- defines the time when the coupling is switched on.
616    IF ( coupling_start_time /= 0.0_wp )  THEN
617       WRITE ( io, 207 )  coupling_start_time
618    ENDIF
619
620!
621!-- Computational grid
622    IF ( .NOT. ocean )  THEN
623       WRITE ( io, 250 )  dx, dy, dz, (nx+1)*dx, (ny+1)*dy, zu(nzt+1)
624       IF ( dz_stretch_level_index < nzt+1 )  THEN
625          WRITE ( io, 252 )  dz_stretch_level, dz_stretch_level_index, &
626                             dz_stretch_factor, dz_max
627       ENDIF
628    ELSE
629       WRITE ( io, 250 )  dx, dy, dz, (nx+1)*dx, (ny+1)*dy, zu(0)
630       IF ( dz_stretch_level_index > 0 )  THEN
631          WRITE ( io, 252 )  dz_stretch_level, dz_stretch_level_index, &
632                             dz_stretch_factor, dz_max
633       ENDIF
634    ENDIF
635    WRITE ( io, 254 )  nx, ny, nzt+1, MIN( nnx, nx+1 ), MIN( nny, ny+1 ), &
636                       MIN( nnz+2, nzt+2 )
637    IF ( sloping_surface )  WRITE ( io, 260 )  alpha_surface
638
639!
640!-- Large scale forcing and nudging
641    WRITE ( io, 160 )
642    IF ( large_scale_forcing )  THEN
643       WRITE ( io, 162 )
644       WRITE ( io, 163 )
645
646       IF ( large_scale_subsidence )  THEN
647          IF ( .NOT. use_subsidence_tendencies )  THEN
648             WRITE ( io, 164 )
649          ELSE
650             WRITE ( io, 165 )
651          ENDIF
652       ENDIF
653
654       IF ( bc_pt_b == 'dirichlet' )  THEN
655          WRITE ( io, 180 )
656       ELSEIF ( bc_pt_b == 'neumann' )  THEN
657          WRITE ( io, 181 )
658       ENDIF
659
660       IF ( bc_q_b == 'dirichlet' )  THEN
661          WRITE ( io, 182 )
662       ELSEIF ( bc_q_b == 'neumann' )  THEN
663          WRITE ( io, 183 )
664       ENDIF
665
666       WRITE ( io, 167 )
667       IF ( nudging )  THEN
668          WRITE ( io, 170 )
669       ENDIF
670    ELSE
671       WRITE ( io, 161 )
672       WRITE ( io, 171 )
673    ENDIF
674    IF ( large_scale_subsidence )  THEN
675       WRITE ( io, 168 )
676       WRITE ( io, 169 )
677    ENDIF
678
679!
680!-- Profile for the large scale vertial velocity
681!-- Building output strings, starting with surface value
682    IF ( large_scale_subsidence )  THEN
683       temperatures = '   0.0'
684       gradients = '------'
685       slices = '     0'
686       coordinates = '   0.0'
687       i = 1
688       DO  WHILE ( subs_vertical_gradient_level_i(i) /= -9999 )
689
690          WRITE (coor_chr,'(E10.2,7X)')  &
691                                w_subs(subs_vertical_gradient_level_i(i))
692          temperatures = TRIM( temperatures ) // ' ' // TRIM( coor_chr )
693
694          WRITE (coor_chr,'(E10.2,7X)')  subs_vertical_gradient(i)
695          gradients = TRIM( gradients ) // ' ' // TRIM( coor_chr )
696
697          WRITE (coor_chr,'(I10,7X)')  subs_vertical_gradient_level_i(i)
698          slices = TRIM( slices ) // ' ' // TRIM( coor_chr )
699
700          WRITE (coor_chr,'(F10.2,7X)')  subs_vertical_gradient_level(i)
701          coordinates = TRIM( coordinates ) // ' '  // TRIM( coor_chr )
702
703          IF ( i == 10 )  THEN
704             EXIT
705          ELSE
706             i = i + 1
707          ENDIF
708
709       ENDDO
710
711 
712       IF ( .NOT. large_scale_forcing )  THEN
713          WRITE ( io, 426 )  TRIM( coordinates ), TRIM( temperatures ), &
714                             TRIM( gradients ), TRIM( slices )
715       ENDIF
716
717
718    ENDIF
719
720!-- Profile of the geostrophic wind (component ug)
721!-- Building output strings
722    WRITE ( ugcomponent, '(F6.2)' )  ug_surface
723    gradients = '------'
724    slices = '     0'
725    coordinates = '   0.0'
726    i = 1
727    DO  WHILE ( ug_vertical_gradient_level_ind(i) /= -9999 )
728     
729       WRITE (coor_chr,'(F6.2,1X)')  ug(ug_vertical_gradient_level_ind(i))
730       ugcomponent = TRIM( ugcomponent ) // '  ' // TRIM( coor_chr )
731
732       WRITE (coor_chr,'(F6.2,1X)')  ug_vertical_gradient(i)
733       gradients = TRIM( gradients ) // '  ' // TRIM( coor_chr )
734
735       WRITE (coor_chr,'(I6,1X)')  ug_vertical_gradient_level_ind(i)
736       slices = TRIM( slices ) // '  ' // TRIM( coor_chr )
737
738       WRITE (coor_chr,'(F6.1,1X)')  ug_vertical_gradient_level(i)
739       coordinates = TRIM( coordinates ) // '  ' // TRIM( coor_chr )
740
741       IF ( i == 10 )  THEN
742          EXIT
743       ELSE
744          i = i + 1
745       ENDIF
746
747    ENDDO
748
749    IF ( .NOT. large_scale_forcing )  THEN
750       WRITE ( io, 423 )  TRIM( coordinates ), TRIM( ugcomponent ), &
751                          TRIM( gradients ), TRIM( slices )
752    ENDIF
753
754!-- Profile of the geostrophic wind (component vg)
755!-- Building output strings
756    WRITE ( vgcomponent, '(F6.2)' )  vg_surface
757    gradients = '------'
758    slices = '     0'
759    coordinates = '   0.0'
760    i = 1
761    DO  WHILE ( vg_vertical_gradient_level_ind(i) /= -9999 )
762
763       WRITE (coor_chr,'(F6.2,1X)')  vg(vg_vertical_gradient_level_ind(i))
764       vgcomponent = TRIM( vgcomponent ) // '  ' // TRIM( coor_chr )
765
766       WRITE (coor_chr,'(F6.2,1X)')  vg_vertical_gradient(i)
767       gradients = TRIM( gradients ) // '  ' // TRIM( coor_chr )
768
769       WRITE (coor_chr,'(I6,1X)')  vg_vertical_gradient_level_ind(i)
770       slices = TRIM( slices ) // '  ' // TRIM( coor_chr )
771
772       WRITE (coor_chr,'(F6.1,1X)')  vg_vertical_gradient_level(i)
773       coordinates = TRIM( coordinates ) // '  ' // TRIM( coor_chr )
774
775       IF ( i == 10 )  THEN
776          EXIT
777       ELSE
778          i = i + 1
779       ENDIF
780 
781    ENDDO
782
783    IF ( .NOT. large_scale_forcing )  THEN
784       WRITE ( io, 424 )  TRIM( coordinates ), TRIM( vgcomponent ), &
785                          TRIM( gradients ), TRIM( slices )
786    ENDIF
787
788!
789!-- Topography
790    WRITE ( io, 270 )  topography
791    SELECT CASE ( TRIM( topography ) )
792
793       CASE ( 'flat' )
794          ! no actions necessary
795
796       CASE ( 'single_building' )
797          blx = INT( building_length_x / dx )
798          bly = INT( building_length_y / dy )
799          bh  = MINLOC( ABS( zw - building_height ), 1 ) - 1
800          IF ( ABS( zw(bh  ) - building_height ) == &
801               ABS( zw(bh+1) - building_height )    )  bh = bh + 1
802
803          IF ( building_wall_left == 9999999.9_wp )  THEN
804             building_wall_left = ( nx + 1 - blx ) / 2 * dx
805          ENDIF
806          bxl = INT ( building_wall_left / dx + 0.5_wp )
807          bxr = bxl + blx
808
809          IF ( building_wall_south == 9999999.9_wp )  THEN
810             building_wall_south = ( ny + 1 - bly ) / 2 * dy
811          ENDIF
812          bys = INT ( building_wall_south / dy + 0.5_wp )
813          byn = bys + bly
814
815          WRITE ( io, 271 )  building_length_x, building_length_y, &
816                             building_height, bxl, bxr, bys, byn
817
818       CASE ( 'single_street_canyon' )
819          ch  = MINLOC( ABS( zw - canyon_height ), 1 ) - 1
820          IF ( ABS( zw(ch  ) - canyon_height ) == &
821               ABS( zw(ch+1) - canyon_height )    )  ch = ch + 1
822          IF ( canyon_width_x /= 9999999.9_wp )  THEN
823!
824!--          Street canyon in y direction
825             cwx = NINT( canyon_width_x / dx )
826             IF ( canyon_wall_left == 9999999.9_wp )  THEN
827                canyon_wall_left = ( nx + 1 - cwx ) / 2 * dx
828             ENDIF
829             cxl = NINT( canyon_wall_left / dx )
830             cxr = cxl + cwx
831             WRITE ( io, 272 )  'y', canyon_height, ch, 'u', cxl, cxr
832
833          ELSEIF ( canyon_width_y /= 9999999.9_wp )  THEN
834!
835!--          Street canyon in x direction
836             cwy = NINT( canyon_width_y / dy )
837             IF ( canyon_wall_south == 9999999.9_wp )  THEN
838                canyon_wall_south = ( ny + 1 - cwy ) / 2 * dy
839             ENDIF
840             cys = NINT( canyon_wall_south / dy )
841             cyn = cys + cwy
842             WRITE ( io, 272 )  'x', canyon_height, ch, 'v', cys, cyn
843          ENDIF
844
845    END SELECT
846
847    IF ( TRIM( topography ) /= 'flat' )  THEN
848       IF ( TRIM( topography_grid_convention ) == ' ' )  THEN
849          IF ( TRIM( topography ) == 'single_building' .OR.  &
850               TRIM( topography ) == 'single_street_canyon' )  THEN
851             WRITE ( io, 278 )
852          ELSEIF ( TRIM( topography ) == 'read_from_file' )  THEN
853             WRITE ( io, 279 )
854          ENDIF
855       ELSEIF ( TRIM( topography_grid_convention ) == 'cell_edge' )  THEN
856          WRITE ( io, 278 )
857       ELSEIF ( TRIM( topography_grid_convention ) == 'cell_center' )  THEN
858          WRITE ( io, 279 )
859       ENDIF
860    ENDIF
861
862    IF ( plant_canopy )  THEN
863   
864       canopy_height = pch_index * dz
865
866       WRITE ( io, 280 )  canopy_mode, canopy_height, pch_index,               &
867                          canopy_drag_coeff
868       IF ( passive_scalar )  THEN
869          WRITE ( io, 281 )  leaf_scalar_exch_coeff,                           &
870                             leaf_surface_conc
871       ENDIF
872
873!
874!--    Heat flux at the top of vegetation
875       WRITE ( io, 282 )  cthf
876
877!
878!--    Leaf area density profile, calculated either from given vertical
879!--    gradients or from beta probability density function.
880       IF (  .NOT.  calc_beta_lad_profile )  THEN
881
882!--       Building output strings, starting with surface value
883          WRITE ( leaf_area_density, '(F7.4)' )  lad_surface
884          gradients = '------'
885          slices = '     0'
886          coordinates = '   0.0'
887          i = 1
888          DO  WHILE ( i < 11  .AND.  lad_vertical_gradient_level_ind(i) /= -9999 )
889
890             WRITE (coor_chr,'(F7.2)')  lad(lad_vertical_gradient_level_ind(i))
891             leaf_area_density = TRIM( leaf_area_density ) // ' ' // TRIM( coor_chr )
892 
893             WRITE (coor_chr,'(F7.2)')  lad_vertical_gradient(i)
894             gradients = TRIM( gradients ) // ' ' // TRIM( coor_chr )
895
896             WRITE (coor_chr,'(I7)')  lad_vertical_gradient_level_ind(i)
897             slices = TRIM( slices ) // ' ' // TRIM( coor_chr )
898
899             WRITE (coor_chr,'(F7.1)')  lad_vertical_gradient_level(i)
900             coordinates = TRIM( coordinates ) // ' '  // TRIM( coor_chr )
901
902             i = i + 1
903          ENDDO
904
905          WRITE ( io, 283 )  TRIM( coordinates ), TRIM( leaf_area_density ),              &
906                             TRIM( gradients ), TRIM( slices )
907
908       ELSE
909       
910          WRITE ( leaf_area_density, '(F7.4)' )  lad_surface
911          coordinates = '   0.0'
912         
913          DO  k = 1, pch_index
914
915             WRITE (coor_chr,'(F7.2)')  lad(k)
916             leaf_area_density = TRIM( leaf_area_density ) // ' ' // TRIM( coor_chr )
917 
918             WRITE (coor_chr,'(F7.1)')  zu(k)
919             coordinates = TRIM( coordinates ) // ' '  // TRIM( coor_chr )
920
921          ENDDO       
922
923          WRITE ( io, 284 ) TRIM( coordinates ), TRIM( leaf_area_density ), alpha_lad,    &
924                            beta_lad, lai_beta
925
926       ENDIF 
927
928    ENDIF
929
930
931    IF ( land_surface )  THEN
932
933       temperatures = ''
934       gradients    = '' ! use for humidity here
935       coordinates  = '' ! use for height
936       roots        = '' ! use for root fraction
937       slices       = '' ! use for index
938
939       i = 1
940       DO i = nzb_soil, nzt_soil
941          WRITE (coor_chr,'(F10.2,7X)') soil_temperature(i)
942          temperatures = TRIM( temperatures ) // ' ' // TRIM( coor_chr )
943
944          WRITE (coor_chr,'(F10.2,7X)') soil_moisture(i)
945          gradients = TRIM( gradients ) // ' ' // TRIM( coor_chr )
946
947          WRITE (coor_chr,'(F10.2,7X)')  - zs(i)
948          coordinates = TRIM( coordinates ) // ' '  // TRIM( coor_chr )
949
950          WRITE (coor_chr,'(F10.2,7X)')  root_fraction(i)
951          roots = TRIM( roots ) // ' '  // TRIM( coor_chr )
952
953          WRITE (coor_chr,'(I10,7X)')  i
954          slices = TRIM( slices ) // ' '  // TRIM( coor_chr )
955
956
957       ENDDO
958
959!
960!--    Write land surface model header
961       WRITE( io, 419 )
962       IF ( conserve_water_content )  THEN
963          WRITE( io, 440 )
964       ELSE
965          WRITE( io, 441 )
966       ENDIF
967
968       WRITE( io, 438 ) TRIM( veg_type_name(veg_type) ),                       &
969                        TRIM (soil_type_name(soil_type) )
970       WRITE( io, 439 ) TRIM( coordinates ), TRIM( temperatures ),             &
971                        TRIM( gradients ), TRIM( roots ), TRIM( slices )
972
973
974    ENDIF
975
976    IF ( radiation )  THEN
977!
978!--    Write radiation model header
979       WRITE( io, 444 )
980
981       IF ( radiation_scheme == "constant" )  THEN
982          WRITE( io, 445 ) net_radiation
983       ELSEIF ( radiation_scheme == "clear-sky" )  THEN
984          WRITE( io, 446 )
985       ELSEIF ( radiation_scheme == "rrtmg" )  THEN
986          WRITE( io, 447 )
987          IF ( .NOT. lw_radiation )  WRITE( io, 458 )
988          IF ( .NOT. sw_radiation )  WRITE( io, 459 )
989       ENDIF
990
991       IF ( albedo_type == 0 )  THEN
992          WRITE( io, 448 ) albedo
993       ELSE
994          WRITE( io, 456 ) TRIM( albedo_type_name(albedo_type) )
995       ENDIF
996       IF ( constant_albedo )  THEN
997          WRITE( io, 457 )
998       ENDIF
999       WRITE( io, 449 ) dt_radiation
1000    ENDIF
1001
1002
1003!
1004!-- Boundary conditions
1005    IF ( ibc_p_b == 0 )  THEN
1006       runten = 'p(0)     = 0      |'
1007    ELSEIF ( ibc_p_b == 1 )  THEN
1008       runten = 'p(0)     = p(1)   |'
1009    ENDIF
1010    IF ( ibc_p_t == 0 )  THEN
1011       roben  = 'p(nzt+1) = 0      |'
1012    ELSE
1013       roben  = 'p(nzt+1) = p(nzt) |'
1014    ENDIF
1015
1016    IF ( ibc_uv_b == 0 )  THEN
1017       runten = TRIM( runten ) // ' uv(0)     = -uv(1)                |'
1018    ELSE
1019       runten = TRIM( runten ) // ' uv(0)     = uv(1)                 |'
1020    ENDIF
1021    IF ( TRIM( bc_uv_t ) == 'dirichlet_0' )  THEN
1022       roben  = TRIM( roben  ) // ' uv(nzt+1) = 0                     |'
1023    ELSEIF ( ibc_uv_t == 0 )  THEN
1024       roben  = TRIM( roben  ) // ' uv(nzt+1) = ug(nzt+1), vg(nzt+1)  |'
1025    ELSE
1026       roben  = TRIM( roben  ) // ' uv(nzt+1) = uv(nzt)               |'
1027    ENDIF
1028
1029    IF ( ibc_pt_b == 0 )  THEN
1030       IF ( land_surface )  THEN
1031          runten = TRIM( runten ) // ' pt(0)     = from soil model'
1032       ELSE
1033          runten = TRIM( runten ) // ' pt(0)     = pt_surface'
1034       ENDIF
1035    ELSEIF ( ibc_pt_b == 1 )  THEN
1036       runten = TRIM( runten ) // ' pt(0)     = pt(1)'
1037    ELSEIF ( ibc_pt_b == 2 )  THEN
1038       runten = TRIM( runten ) // ' pt(0)     = from coupled model'
1039    ENDIF
1040    IF ( ibc_pt_t == 0 )  THEN
1041       roben  = TRIM( roben  ) // ' pt(nzt+1) = pt_top'
1042    ELSEIF( ibc_pt_t == 1 )  THEN
1043       roben  = TRIM( roben  ) // ' pt(nzt+1) = pt(nzt)'
1044    ELSEIF( ibc_pt_t == 2 )  THEN
1045       roben  = TRIM( roben  ) // ' pt(nzt+1) = pt(nzt) + dpt/dz_ini'
1046
1047    ENDIF
1048
1049    WRITE ( io, 300 )  runten, roben
1050
1051    IF ( .NOT. constant_diffusion )  THEN
1052       IF ( ibc_e_b == 1 )  THEN
1053          runten = 'e(0)     = e(1)'
1054       ELSE
1055          runten = 'e(0)     = e(1) = (u*/0.1)**2'
1056       ENDIF
1057       roben = 'e(nzt+1) = e(nzt) = e(nzt-1)'
1058
1059       WRITE ( io, 301 )  'e', runten, roben       
1060
1061    ENDIF
1062
1063    IF ( ocean )  THEN
1064       runten = 'sa(0)    = sa(1)'
1065       IF ( ibc_sa_t == 0 )  THEN
1066          roben =  'sa(nzt+1) = sa_surface'
1067       ELSE
1068          roben =  'sa(nzt+1) = sa(nzt)'
1069       ENDIF
1070       WRITE ( io, 301 ) 'sa', runten, roben
1071    ENDIF
1072
1073    IF ( humidity )  THEN
1074       IF ( ibc_q_b == 0 )  THEN
1075          IF ( land_surface )  THEN
1076             runten = 'q(0)     = from soil model'
1077          ELSE
1078             runten = 'q(0)     = q_surface'
1079          ENDIF
1080
1081       ELSE
1082          runten = 'q(0)     = q(1)'
1083       ENDIF
1084       IF ( ibc_q_t == 0 )  THEN
1085          roben =  'q(nzt)   = q_top'
1086       ELSE
1087          roben =  'q(nzt)   = q(nzt-1) + dq/dz'
1088       ENDIF
1089       WRITE ( io, 301 ) 'q', runten, roben
1090    ENDIF
1091
1092    IF ( passive_scalar )  THEN
1093       IF ( ibc_q_b == 0 )  THEN
1094          runten = 's(0)     = s_surface'
1095       ELSE
1096          runten = 's(0)     = s(1)'
1097       ENDIF
1098       IF ( ibc_q_t == 0 )  THEN
1099          roben =  's(nzt)   = s_top'
1100       ELSE
1101          roben =  's(nzt)   = s(nzt-1) + ds/dz'
1102       ENDIF
1103       WRITE ( io, 301 ) 's', runten, roben
1104    ENDIF
1105
1106    IF ( use_surface_fluxes )  THEN
1107       WRITE ( io, 303 )
1108       IF ( constant_heatflux )  THEN
1109          IF ( large_scale_forcing .AND. lsf_surf )  THEN
1110             WRITE ( io, 306 )  shf(0,0)
1111          ELSE
1112             WRITE ( io, 306 )  surface_heatflux
1113          ENDIF
1114          IF ( random_heatflux )  WRITE ( io, 307 )
1115       ENDIF
1116       IF ( humidity  .AND.  constant_waterflux )  THEN
1117          IF ( large_scale_forcing .AND. lsf_surf )  THEN
1118             WRITE ( io, 311 ) qsws(0,0)
1119          ELSE
1120             WRITE ( io, 311 ) surface_waterflux
1121          ENDIF
1122       ENDIF
1123       IF ( passive_scalar  .AND.  constant_waterflux )  THEN
1124          WRITE ( io, 313 ) surface_waterflux
1125       ENDIF
1126    ENDIF
1127
1128    IF ( use_top_fluxes )  THEN
1129       WRITE ( io, 304 )
1130       IF ( coupling_mode == 'uncoupled' )  THEN
1131          WRITE ( io, 320 )  top_momentumflux_u, top_momentumflux_v
1132          IF ( constant_top_heatflux )  THEN
1133             WRITE ( io, 306 )  top_heatflux
1134          ENDIF
1135       ELSEIF ( coupling_mode == 'ocean_to_atmosphere' )  THEN
1136          WRITE ( io, 316 )
1137       ENDIF
1138       IF ( ocean  .AND.  constant_top_salinityflux )  THEN
1139          WRITE ( io, 309 )  top_salinityflux
1140       ENDIF
1141       IF ( humidity  .OR.  passive_scalar )  THEN
1142          WRITE ( io, 315 )
1143       ENDIF
1144    ENDIF
1145
1146    IF ( constant_flux_layer )  THEN
1147       WRITE ( io, 305 )  (zu(1)-zu(0)), roughness_length,                     &
1148                          z0h_factor*roughness_length, kappa,                  &
1149                          zeta_min, zeta_max
1150       IF ( .NOT. constant_heatflux )  WRITE ( io, 308 )
1151       IF ( humidity  .AND.  .NOT. constant_waterflux )  THEN
1152          WRITE ( io, 312 )
1153       ENDIF
1154       IF ( passive_scalar  .AND.  .NOT. constant_waterflux )  THEN
1155          WRITE ( io, 314 )
1156       ENDIF
1157    ELSE
1158       IF ( INDEX(initializing_actions, 'set_1d-model_profiles') /= 0 )  THEN
1159          WRITE ( io, 310 )  zeta_min, zeta_max
1160       ENDIF
1161    ENDIF
1162
1163    WRITE ( io, 317 )  bc_lr, bc_ns
1164    IF ( .NOT. bc_lr_cyc  .OR.  .NOT. bc_ns_cyc )  THEN
1165       WRITE ( io, 318 )  use_cmax, pt_damping_width, pt_damping_factor       
1166       IF ( turbulent_inflow )  THEN
1167          IF ( .NOT. recycling_yshift ) THEN
1168             WRITE ( io, 319 )  recycling_width, recycling_plane, &
1169                                inflow_damping_height, inflow_damping_width
1170          ELSE
1171             WRITE ( io, 322 )  recycling_width, recycling_plane, &
1172                                inflow_damping_height, inflow_damping_width
1173          END IF
1174       ENDIF
1175    ENDIF
1176
1177!
1178!-- Initial Profiles
1179    WRITE ( io, 321 )
1180!
1181!-- Initial wind profiles
1182    IF ( u_profile(1) /= 9999999.9_wp )  WRITE ( io, 427 )
1183
1184!
1185!-- Initial temperature profile
1186!-- Building output strings, starting with surface temperature
1187    WRITE ( temperatures, '(F6.2)' )  pt_surface
1188    gradients = '------'
1189    slices = '     0'
1190    coordinates = '   0.0'
1191    i = 1
1192    DO  WHILE ( pt_vertical_gradient_level_ind(i) /= -9999 )
1193
1194       WRITE (coor_chr,'(F7.2)')  pt_init(pt_vertical_gradient_level_ind(i))
1195       temperatures = TRIM( temperatures ) // ' ' // TRIM( coor_chr )
1196
1197       WRITE (coor_chr,'(F7.2)')  pt_vertical_gradient(i)
1198       gradients = TRIM( gradients ) // ' ' // TRIM( coor_chr )
1199
1200       WRITE (coor_chr,'(I7)')  pt_vertical_gradient_level_ind(i)
1201       slices = TRIM( slices ) // ' ' // TRIM( coor_chr )
1202
1203       WRITE (coor_chr,'(F7.1)')  pt_vertical_gradient_level(i)
1204       coordinates = TRIM( coordinates ) // ' '  // TRIM( coor_chr )
1205
1206       IF ( i == 10 )  THEN
1207          EXIT
1208       ELSE
1209          i = i + 1
1210       ENDIF
1211
1212    ENDDO
1213
1214    IF ( .NOT. nudging )  THEN
1215       WRITE ( io, 420 )  TRIM( coordinates ), TRIM( temperatures ), &
1216                          TRIM( gradients ), TRIM( slices )
1217    ELSE
1218       WRITE ( io, 428 ) 
1219    ENDIF
1220
1221!
1222!-- Initial humidity profile
1223!-- Building output strings, starting with surface humidity
1224    IF ( humidity  .OR.  passive_scalar )  THEN
1225       WRITE ( temperatures, '(E8.1)' )  q_surface
1226       gradients = '--------'
1227       slices = '       0'
1228       coordinates = '     0.0'
1229       i = 1
1230       DO  WHILE ( q_vertical_gradient_level_ind(i) /= -9999 )
1231         
1232          WRITE (coor_chr,'(E8.1,4X)')  q_init(q_vertical_gradient_level_ind(i))
1233          temperatures = TRIM( temperatures ) // '  ' // TRIM( coor_chr )
1234
1235          WRITE (coor_chr,'(E8.1,4X)')  q_vertical_gradient(i)
1236          gradients = TRIM( gradients ) // '  ' // TRIM( coor_chr )
1237         
1238          WRITE (coor_chr,'(I8,4X)')  q_vertical_gradient_level_ind(i)
1239          slices = TRIM( slices ) // '  ' // TRIM( coor_chr )
1240         
1241          WRITE (coor_chr,'(F8.1,4X)')  q_vertical_gradient_level(i)
1242          coordinates = TRIM( coordinates ) // '  '  // TRIM( coor_chr )
1243
1244          IF ( i == 10 )  THEN
1245             EXIT
1246          ELSE
1247             i = i + 1
1248          ENDIF
1249
1250       ENDDO
1251
1252       IF ( humidity )  THEN
1253          IF ( .NOT. nudging )  THEN
1254             WRITE ( io, 421 )  TRIM( coordinates ), TRIM( temperatures ), &
1255                                TRIM( gradients ), TRIM( slices )
1256          ENDIF
1257       ELSE
1258          WRITE ( io, 422 )  TRIM( coordinates ), TRIM( temperatures ), &
1259                             TRIM( gradients ), TRIM( slices )
1260       ENDIF
1261    ENDIF
1262
1263!
1264!-- Initial salinity profile
1265!-- Building output strings, starting with surface salinity
1266    IF ( ocean )  THEN
1267       WRITE ( temperatures, '(F6.2)' )  sa_surface
1268       gradients = '------'
1269       slices = '     0'
1270       coordinates = '   0.0'
1271       i = 1
1272       DO  WHILE ( sa_vertical_gradient_level_ind(i) /= -9999 )
1273
1274          WRITE (coor_chr,'(F7.2)')  sa_init(sa_vertical_gradient_level_ind(i))
1275          temperatures = TRIM( temperatures ) // ' ' // TRIM( coor_chr )
1276
1277          WRITE (coor_chr,'(F7.2)')  sa_vertical_gradient(i)
1278          gradients = TRIM( gradients ) // ' ' // TRIM( coor_chr )
1279
1280          WRITE (coor_chr,'(I7)')  sa_vertical_gradient_level_ind(i)
1281          slices = TRIM( slices ) // ' ' // TRIM( coor_chr )
1282
1283          WRITE (coor_chr,'(F7.1)')  sa_vertical_gradient_level(i)
1284          coordinates = TRIM( coordinates ) // ' '  // TRIM( coor_chr )
1285
1286          IF ( i == 10 )  THEN
1287             EXIT
1288          ELSE
1289             i = i + 1
1290          ENDIF
1291
1292       ENDDO
1293
1294       WRITE ( io, 425 )  TRIM( coordinates ), TRIM( temperatures ), &
1295                          TRIM( gradients ), TRIM( slices )
1296    ENDIF
1297
1298
1299!
1300!-- Listing of 1D-profiles
1301    WRITE ( io, 325 )  dt_dopr_listing
1302    IF ( averaging_interval_pr /= 0.0_wp )  THEN
1303       WRITE ( io, 326 )  averaging_interval_pr, dt_averaging_input_pr
1304    ENDIF
1305
1306!
1307!-- DATA output
1308    WRITE ( io, 330 )
1309    IF ( averaging_interval_pr /= 0.0_wp )  THEN
1310       WRITE ( io, 326 )  averaging_interval_pr, dt_averaging_input_pr
1311    ENDIF
1312
1313!
1314!-- 1D-profiles
1315    dopr_chr = 'Profile:'
1316    IF ( dopr_n /= 0 )  THEN
1317       WRITE ( io, 331 )
1318
1319       output_format = ''
1320       output_format = netcdf_data_format_string
1321       IF ( netcdf_deflate == 0 )  THEN
1322          WRITE ( io, 344 )  output_format
1323       ELSE
1324          WRITE ( io, 354 )  TRIM( output_format ), netcdf_deflate
1325       ENDIF
1326
1327       DO  i = 1, dopr_n
1328          dopr_chr = TRIM( dopr_chr ) // ' ' // TRIM( data_output_pr(i) ) // ','
1329          IF ( LEN_TRIM( dopr_chr ) >= 60 )  THEN
1330             WRITE ( io, 332 )  dopr_chr
1331             dopr_chr = '       :'
1332          ENDIF
1333       ENDDO
1334
1335       IF ( dopr_chr /= '' )  THEN
1336          WRITE ( io, 332 )  dopr_chr
1337       ENDIF
1338       WRITE ( io, 333 )  dt_dopr, averaging_interval_pr, dt_averaging_input_pr
1339       IF ( skip_time_dopr /= 0.0_wp )  WRITE ( io, 339 )  skip_time_dopr
1340    ENDIF
1341
1342!
1343!-- 2D-arrays
1344    DO  av = 0, 1
1345
1346       i = 1
1347       do2d_xy = ''
1348       do2d_xz = ''
1349       do2d_yz = ''
1350       DO  WHILE ( do2d(av,i) /= ' ' )
1351
1352          l = MAX( 2, LEN_TRIM( do2d(av,i) ) )
1353          do2d_mode = do2d(av,i)(l-1:l)
1354
1355          SELECT CASE ( do2d_mode )
1356             CASE ( 'xy' )
1357                ll = LEN_TRIM( do2d_xy )
1358                do2d_xy = do2d_xy(1:ll) // ' ' // do2d(av,i)(1:l-3) // ','
1359             CASE ( 'xz' )
1360                ll = LEN_TRIM( do2d_xz )
1361                do2d_xz = do2d_xz(1:ll) // ' ' // do2d(av,i)(1:l-3) // ','
1362             CASE ( 'yz' )
1363                ll = LEN_TRIM( do2d_yz )
1364                do2d_yz = do2d_yz(1:ll) // ' ' // do2d(av,i)(1:l-3) // ','
1365          END SELECT
1366
1367          i = i + 1
1368
1369       ENDDO
1370
1371       IF ( ( ( do2d_xy /= ''  .AND.  section(1,1) /= -9999 )  .OR.    &
1372              ( do2d_xz /= ''  .AND.  section(1,2) /= -9999 )  .OR.    &
1373              ( do2d_yz /= ''  .AND.  section(1,3) /= -9999 ) ) )  THEN
1374
1375          IF (  av == 0 )  THEN
1376             WRITE ( io, 334 )  ''
1377          ELSE
1378             WRITE ( io, 334 )  '(time-averaged)'
1379          ENDIF
1380
1381          IF ( do2d_at_begin )  THEN
1382             begin_chr = 'and at the start'
1383          ELSE
1384             begin_chr = ''
1385          ENDIF
1386
1387          output_format = ''
1388          output_format = netcdf_data_format_string
1389          IF ( netcdf_deflate == 0 )  THEN
1390             WRITE ( io, 344 )  output_format
1391          ELSE
1392             WRITE ( io, 354 )  TRIM( output_format ), netcdf_deflate
1393          ENDIF
1394
1395          IF ( do2d_xy /= ''  .AND.  section(1,1) /= -9999 )  THEN
1396             i = 1
1397             slices = '/'
1398             coordinates = '/'
1399!
1400!--          Building strings with index and coordinate information of the
1401!--          slices
1402             DO  WHILE ( section(i,1) /= -9999 )
1403
1404                WRITE (section_chr,'(I5)')  section(i,1)
1405                section_chr = ADJUSTL( section_chr )
1406                slices = TRIM( slices ) // TRIM( section_chr ) // '/'
1407
1408                IF ( section(i,1) == -1 )  THEN
1409                   WRITE (coor_chr,'(F10.1)')  -1.0_wp
1410                ELSE
1411                   WRITE (coor_chr,'(F10.1)')  zu(section(i,1))
1412                ENDIF
1413                coor_chr = ADJUSTL( coor_chr )
1414                coordinates = TRIM( coordinates ) // TRIM( coor_chr ) // '/'
1415
1416                i = i + 1
1417             ENDDO
1418             IF ( av == 0 )  THEN
1419                WRITE ( io, 335 )  'XY', do2d_xy, dt_do2d_xy, &
1420                                   TRIM( begin_chr ), 'k', TRIM( slices ), &
1421                                   TRIM( coordinates )
1422                IF ( skip_time_do2d_xy /= 0.0_wp )  THEN
1423                   WRITE ( io, 339 )  skip_time_do2d_xy
1424                ENDIF
1425             ELSE
1426                WRITE ( io, 342 )  'XY', do2d_xy, dt_data_output_av, &
1427                                   TRIM( begin_chr ), averaging_interval, &
1428                                   dt_averaging_input, 'k', TRIM( slices ), &
1429                                   TRIM( coordinates )
1430                IF ( skip_time_data_output_av /= 0.0_wp )  THEN
1431                   WRITE ( io, 339 )  skip_time_data_output_av
1432                ENDIF
1433             ENDIF
1434             IF ( netcdf_data_format > 4 )  THEN
1435                WRITE ( io, 352 )  ntdim_2d_xy(av)
1436             ELSE
1437                WRITE ( io, 353 )
1438             ENDIF
1439          ENDIF
1440
1441          IF ( do2d_xz /= ''  .AND.  section(1,2) /= -9999 )  THEN
1442             i = 1
1443             slices = '/'
1444             coordinates = '/'
1445!
1446!--          Building strings with index and coordinate information of the
1447!--          slices
1448             DO  WHILE ( section(i,2) /= -9999 )
1449
1450                WRITE (section_chr,'(I5)')  section(i,2)
1451                section_chr = ADJUSTL( section_chr )
1452                slices = TRIM( slices ) // TRIM( section_chr ) // '/'
1453
1454                WRITE (coor_chr,'(F10.1)')  section(i,2) * dy
1455                coor_chr = ADJUSTL( coor_chr )
1456                coordinates = TRIM( coordinates ) // TRIM( coor_chr ) // '/'
1457
1458                i = i + 1
1459             ENDDO
1460             IF ( av == 0 )  THEN
1461                WRITE ( io, 335 )  'XZ', do2d_xz, dt_do2d_xz, &
1462                                   TRIM( begin_chr ), 'j', TRIM( slices ), &
1463                                   TRIM( coordinates )
1464                IF ( skip_time_do2d_xz /= 0.0_wp )  THEN
1465                   WRITE ( io, 339 )  skip_time_do2d_xz
1466                ENDIF
1467             ELSE
1468                WRITE ( io, 342 )  'XZ', do2d_xz, dt_data_output_av, &
1469                                   TRIM( begin_chr ), averaging_interval, &
1470                                   dt_averaging_input, 'j', TRIM( slices ), &
1471                                   TRIM( coordinates )
1472                IF ( skip_time_data_output_av /= 0.0_wp )  THEN
1473                   WRITE ( io, 339 )  skip_time_data_output_av
1474                ENDIF
1475             ENDIF
1476             IF ( netcdf_data_format > 4 )  THEN
1477                WRITE ( io, 352 )  ntdim_2d_xz(av)
1478             ELSE
1479                WRITE ( io, 353 )
1480             ENDIF
1481          ENDIF
1482
1483          IF ( do2d_yz /= ''  .AND.  section(1,3) /= -9999 )  THEN
1484             i = 1
1485             slices = '/'
1486             coordinates = '/'
1487!
1488!--          Building strings with index and coordinate information of the
1489!--          slices
1490             DO  WHILE ( section(i,3) /= -9999 )
1491
1492                WRITE (section_chr,'(I5)')  section(i,3)
1493                section_chr = ADJUSTL( section_chr )
1494                slices = TRIM( slices ) // TRIM( section_chr ) // '/'
1495
1496                WRITE (coor_chr,'(F10.1)')  section(i,3) * dx
1497                coor_chr = ADJUSTL( coor_chr )
1498                coordinates = TRIM( coordinates ) // TRIM( coor_chr ) // '/'
1499
1500                i = i + 1
1501             ENDDO
1502             IF ( av == 0 )  THEN
1503                WRITE ( io, 335 )  'YZ', do2d_yz, dt_do2d_yz, &
1504                                   TRIM( begin_chr ), 'i', TRIM( slices ), &
1505                                   TRIM( coordinates )
1506                IF ( skip_time_do2d_yz /= 0.0_wp )  THEN
1507                   WRITE ( io, 339 )  skip_time_do2d_yz
1508                ENDIF
1509             ELSE
1510                WRITE ( io, 342 )  'YZ', do2d_yz, dt_data_output_av, &
1511                                   TRIM( begin_chr ), averaging_interval, &
1512                                   dt_averaging_input, 'i', TRIM( slices ), &
1513                                   TRIM( coordinates )
1514                IF ( skip_time_data_output_av /= 0.0_wp )  THEN
1515                   WRITE ( io, 339 )  skip_time_data_output_av
1516                ENDIF
1517             ENDIF
1518             IF ( netcdf_data_format > 4 )  THEN
1519                WRITE ( io, 352 )  ntdim_2d_yz(av)
1520             ELSE
1521                WRITE ( io, 353 )
1522             ENDIF
1523          ENDIF
1524
1525       ENDIF
1526
1527    ENDDO
1528
1529!
1530!-- 3d-arrays
1531    DO  av = 0, 1
1532
1533       i = 1
1534       do3d_chr = ''
1535       DO  WHILE ( do3d(av,i) /= ' ' )
1536
1537          do3d_chr = TRIM( do3d_chr ) // ' ' // TRIM( do3d(av,i) ) // ','
1538          i = i + 1
1539
1540       ENDDO
1541
1542       IF ( do3d_chr /= '' )  THEN
1543          IF ( av == 0 )  THEN
1544             WRITE ( io, 336 )  ''
1545          ELSE
1546             WRITE ( io, 336 )  '(time-averaged)'
1547          ENDIF
1548
1549          output_format = netcdf_data_format_string
1550          IF ( netcdf_deflate == 0 )  THEN
1551             WRITE ( io, 344 )  output_format
1552          ELSE
1553             WRITE ( io, 354 )  TRIM( output_format ), netcdf_deflate
1554          ENDIF
1555
1556          IF ( do3d_at_begin )  THEN
1557             begin_chr = 'and at the start'
1558          ELSE
1559             begin_chr = ''
1560          ENDIF
1561          IF ( av == 0 )  THEN
1562             WRITE ( io, 337 )  do3d_chr, dt_do3d, TRIM( begin_chr ), &
1563                                zu(nz_do3d), nz_do3d
1564          ELSE
1565             WRITE ( io, 343 )  do3d_chr, dt_data_output_av,           &
1566                                TRIM( begin_chr ), averaging_interval, &
1567                                dt_averaging_input, zu(nz_do3d), nz_do3d
1568          ENDIF
1569
1570          IF ( netcdf_data_format > 4 )  THEN
1571             WRITE ( io, 352 )  ntdim_3d(av)
1572          ELSE
1573             WRITE ( io, 353 )
1574          ENDIF
1575
1576          IF ( av == 0 )  THEN
1577             IF ( skip_time_do3d /= 0.0_wp )  THEN
1578                WRITE ( io, 339 )  skip_time_do3d
1579             ENDIF
1580          ELSE
1581             IF ( skip_time_data_output_av /= 0.0_wp )  THEN
1582                WRITE ( io, 339 )  skip_time_data_output_av
1583             ENDIF
1584          ENDIF
1585
1586       ENDIF
1587
1588    ENDDO
1589
1590!
1591!-- masked arrays
1592    IF ( masks > 0 )  WRITE ( io, 345 )  &
1593         mask_scale_x, mask_scale_y, mask_scale_z
1594    DO  mid = 1, masks
1595       DO  av = 0, 1
1596
1597          i = 1
1598          domask_chr = ''
1599          DO  WHILE ( domask(mid,av,i) /= ' ' )
1600             domask_chr = TRIM( domask_chr ) // ' ' //  &
1601                          TRIM( domask(mid,av,i) ) // ','
1602             i = i + 1
1603          ENDDO
1604
1605          IF ( domask_chr /= '' )  THEN
1606             IF ( av == 0 )  THEN
1607                WRITE ( io, 346 )  '', mid
1608             ELSE
1609                WRITE ( io, 346 )  ' (time-averaged)', mid
1610             ENDIF
1611
1612             output_format = netcdf_data_format_string
1613!--          Parallel output not implemented for mask data, hence
1614!--          output_format must be adjusted.
1615             IF ( netcdf_data_format == 5 ) output_format = 'netCDF4/HDF5'
1616             IF ( netcdf_data_format == 6 ) output_format = 'netCDF4/HDF5 classic'
1617             IF ( netcdf_deflate == 0 )  THEN
1618                WRITE ( io, 344 )  output_format
1619             ELSE
1620                WRITE ( io, 354 )  TRIM( output_format ), netcdf_deflate
1621             ENDIF
1622
1623             IF ( av == 0 )  THEN
1624                WRITE ( io, 347 )  domask_chr, dt_domask(mid)
1625             ELSE
1626                WRITE ( io, 348 )  domask_chr, dt_data_output_av, &
1627                                   averaging_interval, dt_averaging_input
1628             ENDIF
1629
1630             IF ( av == 0 )  THEN
1631                IF ( skip_time_domask(mid) /= 0.0_wp )  THEN
1632                   WRITE ( io, 339 )  skip_time_domask(mid)
1633                ENDIF
1634             ELSE
1635                IF ( skip_time_data_output_av /= 0.0_wp )  THEN
1636                   WRITE ( io, 339 )  skip_time_data_output_av
1637                ENDIF
1638             ENDIF
1639!
1640!--          output locations
1641             DO  dim = 1, 3
1642                IF ( mask(mid,dim,1) >= 0.0_wp )  THEN
1643                   count = 0
1644                   DO  WHILE ( mask(mid,dim,count+1) >= 0.0_wp )
1645                      count = count + 1
1646                   ENDDO
1647                   WRITE ( io, 349 )  dir(dim), dir(dim), mid, dir(dim), &
1648                                      mask(mid,dim,:count)
1649                ELSEIF ( mask_loop(mid,dim,1) < 0.0_wp .AND.  &
1650                         mask_loop(mid,dim,2) < 0.0_wp .AND.  &
1651                         mask_loop(mid,dim,3) == 0.0_wp )  THEN
1652                   WRITE ( io, 350 )  dir(dim), dir(dim)
1653                ELSEIF ( mask_loop(mid,dim,3) == 0.0_wp )  THEN
1654                   WRITE ( io, 351 )  dir(dim), dir(dim), mid, dir(dim), &
1655                                      mask_loop(mid,dim,1:2)
1656                ELSE
1657                   WRITE ( io, 351 )  dir(dim), dir(dim), mid, dir(dim), &
1658                                      mask_loop(mid,dim,1:3)
1659                ENDIF
1660             ENDDO
1661          ENDIF
1662
1663       ENDDO
1664    ENDDO
1665
1666!
1667!-- Timeseries
1668    IF ( dt_dots /= 9999999.9_wp )  THEN
1669       WRITE ( io, 340 )
1670
1671       output_format = netcdf_data_format_string
1672       IF ( netcdf_deflate == 0 )  THEN
1673          WRITE ( io, 344 )  output_format
1674       ELSE
1675          WRITE ( io, 354 )  TRIM( output_format ), netcdf_deflate
1676       ENDIF
1677       WRITE ( io, 341 )  dt_dots
1678    ENDIF
1679
1680#if defined( __dvrp_graphics )
1681!
1682!-- Dvrp-output
1683    IF ( dt_dvrp /= 9999999.9_wp )  THEN
1684       WRITE ( io, 360 )  dt_dvrp, TRIM( dvrp_output ), TRIM( dvrp_host ), &
1685                          TRIM( dvrp_username ), TRIM( dvrp_directory )
1686       i = 1
1687       l = 0
1688       m = 0
1689       DO WHILE ( mode_dvrp(i) /= ' ' )
1690          IF ( mode_dvrp(i)(1:10) == 'isosurface' )  THEN
1691             READ ( mode_dvrp(i), '(10X,I2)' )  j
1692             l = l + 1
1693             IF ( do3d(0,j) /= ' ' )  THEN
1694                WRITE ( io, 361 )  TRIM( do3d(0,j) ), threshold(l), &
1695                                   isosurface_color(:,l)
1696             ENDIF
1697          ELSEIF ( mode_dvrp(i)(1:6) == 'slicer' )  THEN
1698             READ ( mode_dvrp(i), '(6X,I2)' )  j
1699             m = m + 1
1700             IF ( do2d(0,j) /= ' ' )  THEN
1701                WRITE ( io, 362 )  TRIM( do2d(0,j) ), &
1702                                   slicer_range_limits_dvrp(:,m)
1703             ENDIF
1704          ELSEIF ( mode_dvrp(i)(1:9) == 'particles' )  THEN
1705             WRITE ( io, 363 )  dvrp_psize
1706             IF ( particle_dvrpsize /= 'none' )  THEN
1707                WRITE ( io, 364 )  'size', TRIM( particle_dvrpsize ), &
1708                                   dvrpsize_interval
1709             ENDIF
1710             IF ( particle_color /= 'none' )  THEN
1711                WRITE ( io, 364 )  'color', TRIM( particle_color ), &
1712                                   color_interval
1713             ENDIF
1714          ENDIF
1715          i = i + 1
1716       ENDDO
1717
1718       WRITE ( io, 365 )  groundplate_color, superelevation_x, &
1719                          superelevation_y, superelevation, clip_dvrp_l, &
1720                          clip_dvrp_r, clip_dvrp_s, clip_dvrp_n
1721
1722       IF ( TRIM( topography ) /= 'flat' )  THEN
1723          WRITE ( io, 366 )  topography_color
1724          IF ( cluster_size > 1 )  THEN
1725             WRITE ( io, 367 )  cluster_size
1726          ENDIF
1727       ENDIF
1728
1729    ENDIF
1730#endif
1731
1732!
1733!-- Spectra output
1734    IF ( dt_dosp /= 9999999.9_wp )  THEN
1735       WRITE ( io, 370 )
1736
1737       output_format = netcdf_data_format_string
1738       IF ( netcdf_deflate == 0 )  THEN
1739          WRITE ( io, 344 )  output_format
1740       ELSE
1741          WRITE ( io, 354 )  TRIM( output_format ), netcdf_deflate
1742       ENDIF
1743       WRITE ( io, 371 )  dt_dosp
1744       IF ( skip_time_dosp /= 0.0_wp )  WRITE ( io, 339 )  skip_time_dosp
1745       WRITE ( io, 372 )  ( data_output_sp(i), i = 1,10 ),     &
1746                          ( spectra_direction(i), i = 1,10 ),  &
1747                          ( comp_spectra_level(i), i = 1,100 ), &
1748                          ( plot_spectra_level(i), i = 1,100 ), &
1749                          averaging_interval_sp, dt_averaging_input_pr
1750    ENDIF
1751
1752    WRITE ( io, 99 )
1753
1754!
1755!-- Physical quantities
1756    WRITE ( io, 400 )
1757
1758!
1759!-- Geostrophic parameters
1760    IF ( radiation .AND. radiation_scheme /= 'constant' )  THEN
1761       WRITE ( io, 417 )  lambda
1762    ENDIF
1763    WRITE ( io, 410 )  phi, omega, f, fs
1764
1765!
1766!-- Other quantities
1767    WRITE ( io, 411 )  g
1768    IF ( radiation .AND. radiation_scheme /= 'constant' )  THEN
1769       WRITE ( io, 418 )  day_init, time_utc_init
1770    ENDIF
1771
1772    WRITE ( io, 412 )  TRIM( reference_state )
1773    IF ( use_single_reference_value )  THEN
1774       IF ( ocean )  THEN
1775          WRITE ( io, 413 )  prho_reference
1776       ELSE
1777          WRITE ( io, 414 )  pt_reference
1778       ENDIF
1779    ENDIF
1780
1781!
1782!-- Cloud physics parameters
1783    IF ( cloud_physics )  THEN
1784       WRITE ( io, 415 )
1785       WRITE ( io, 416 ) surface_pressure, r_d, rho_surface, cp, l_v
1786       IF ( icloud_scheme == 0 )  THEN
1787          WRITE ( io, 510 ) 1.0E-6_wp * nc_const
1788          IF ( precipitation )  WRITE ( io, 511 ) c_sedimentation
1789       ENDIF
1790    ENDIF
1791
1792!
1793!-- Cloud physcis parameters / quantities / numerical methods
1794    WRITE ( io, 430 )
1795    IF ( humidity .AND. .NOT. cloud_physics .AND. .NOT. cloud_droplets)  THEN
1796       WRITE ( io, 431 )
1797    ELSEIF ( humidity  .AND.  cloud_physics )  THEN
1798       WRITE ( io, 432 )
1799       IF ( cloud_top_radiation )  WRITE ( io, 132 )
1800       IF ( icloud_scheme == 1 )  THEN
1801          IF ( precipitation )  WRITE ( io, 133 )
1802       ELSEIF ( icloud_scheme == 0 )  THEN
1803          IF ( drizzle )  WRITE ( io, 506 )
1804          IF ( precipitation )  THEN
1805             WRITE ( io, 505 )
1806             IF ( turbulence )  WRITE ( io, 507 )
1807             IF ( ventilation_effect )  WRITE ( io, 508 )
1808             IF ( limiter_sedimentation )  WRITE ( io, 509 )
1809          ENDIF
1810       ENDIF
1811    ELSEIF ( humidity  .AND.  cloud_droplets )  THEN
1812       WRITE ( io, 433 )
1813       IF ( curvature_solution_effects )  WRITE ( io, 434 )
1814       IF ( collision_kernel /= 'none' )  THEN
1815          WRITE ( io, 435 )  TRIM( collision_kernel )
1816          IF ( collision_kernel(6:9) == 'fast' )  THEN
1817             WRITE ( io, 436 )  radius_classes, dissipation_classes
1818          ENDIF
1819       ELSE
1820          WRITE ( io, 437 )
1821       ENDIF
1822    ENDIF
1823
1824!
1825!-- LES / turbulence parameters
1826    WRITE ( io, 450 )
1827
1828!--
1829! ... LES-constants used must still be added here
1830!--
1831    IF ( constant_diffusion )  THEN
1832       WRITE ( io, 451 )  km_constant, km_constant/prandtl_number, &
1833                          prandtl_number
1834    ENDIF
1835    IF ( .NOT. constant_diffusion)  THEN
1836       IF ( e_init > 0.0_wp )  WRITE ( io, 455 )  e_init
1837       IF ( e_min > 0.0_wp )  WRITE ( io, 454 )  e_min
1838       IF ( wall_adjustment )  WRITE ( io, 453 )  wall_adjustment_factor
1839    ENDIF
1840
1841!
1842!-- Special actions during the run
1843    WRITE ( io, 470 )
1844    IF ( create_disturbances )  THEN
1845       WRITE ( io, 471 )  dt_disturb, disturbance_amplitude,                   &
1846                          zu(disturbance_level_ind_b), disturbance_level_ind_b,&
1847                          zu(disturbance_level_ind_t), disturbance_level_ind_t
1848       IF ( .NOT. bc_lr_cyc  .OR.  .NOT. bc_ns_cyc )  THEN
1849          WRITE ( io, 472 )  inflow_disturbance_begin, inflow_disturbance_end
1850       ELSE
1851          WRITE ( io, 473 )  disturbance_energy_limit
1852       ENDIF
1853       WRITE ( io, 474 )  TRIM( random_generator )
1854    ENDIF
1855    IF ( pt_surface_initial_change /= 0.0_wp )  THEN
1856       WRITE ( io, 475 )  pt_surface_initial_change
1857    ENDIF
1858    IF ( humidity  .AND.  q_surface_initial_change /= 0.0_wp )  THEN
1859       WRITE ( io, 476 )  q_surface_initial_change       
1860    ENDIF
1861    IF ( passive_scalar  .AND.  q_surface_initial_change /= 0.0_wp )  THEN
1862       WRITE ( io, 477 )  q_surface_initial_change       
1863    ENDIF
1864
1865    IF ( particle_advection )  THEN
1866!
1867!--    Particle attributes
1868       WRITE ( io, 480 )  particle_advection_start, dt_prel, bc_par_lr, &
1869                          bc_par_ns, bc_par_b, bc_par_t, particle_maximum_age, &
1870                          end_time_prel
1871       IF ( use_sgs_for_particles )  WRITE ( io, 488 )  dt_min_part
1872       IF ( random_start_position )  WRITE ( io, 481 )
1873       IF ( seed_follows_topography )  WRITE ( io, 496 )
1874       IF ( particles_per_point > 1 )  WRITE ( io, 489 )  particles_per_point
1875       WRITE ( io, 495 )  total_number_of_particles
1876       IF ( use_particle_tails  .AND.  maximum_number_of_tailpoints /= 0 )  THEN
1877          WRITE ( io, 483 )  maximum_number_of_tailpoints
1878          IF ( minimum_tailpoint_distance /= 0 )  THEN
1879             WRITE ( io, 484 )  total_number_of_tails,      &
1880                                minimum_tailpoint_distance, &
1881                                maximum_tailpoint_age
1882          ENDIF
1883       ENDIF
1884       IF ( dt_write_particle_data /= 9999999.9_wp )  THEN
1885          WRITE ( io, 485 )  dt_write_particle_data
1886          IF ( netcdf_data_format > 1 )  THEN
1887             output_format = 'netcdf (64 bit offset) and binary'
1888          ELSE
1889             output_format = 'netcdf and binary'
1890          ENDIF
1891          IF ( netcdf_deflate == 0 )  THEN
1892             WRITE ( io, 344 )  output_format
1893          ELSE
1894             WRITE ( io, 354 )  TRIM( output_format ), netcdf_deflate
1895          ENDIF
1896       ENDIF
1897       IF ( dt_dopts /= 9999999.9_wp )  WRITE ( io, 494 )  dt_dopts
1898       IF ( write_particle_statistics )  WRITE ( io, 486 )
1899
1900       WRITE ( io, 487 )  number_of_particle_groups
1901
1902       DO  i = 1, number_of_particle_groups
1903          IF ( i == 1  .AND.  density_ratio(i) == 9999999.9_wp )  THEN
1904             WRITE ( io, 490 )  i, 0.0_wp
1905             WRITE ( io, 492 )
1906          ELSE
1907             WRITE ( io, 490 )  i, radius(i)
1908             IF ( density_ratio(i) /= 0.0_wp )  THEN
1909                WRITE ( io, 491 )  density_ratio(i)
1910             ELSE
1911                WRITE ( io, 492 )
1912             ENDIF
1913          ENDIF
1914          WRITE ( io, 493 )  psl(i), psr(i), pss(i), psn(i), psb(i), pst(i), &
1915                             pdx(i), pdy(i), pdz(i)
1916          IF ( .NOT. vertical_particle_advection(i) )  WRITE ( io, 482 )
1917       ENDDO
1918
1919    ENDIF
1920
1921
1922!
1923!-- Parameters of 1D-model
1924    IF ( INDEX( initializing_actions, 'set_1d-model_profiles' ) /= 0 )  THEN
1925       WRITE ( io, 500 )  end_time_1d, dt_run_control_1d, dt_pr_1d, &
1926                          mixing_length_1d, dissipation_1d
1927       IF ( damp_level_ind_1d /= nzt+1 )  THEN
1928          WRITE ( io, 502 )  zu(damp_level_ind_1d), damp_level_ind_1d
1929       ENDIF
1930    ENDIF
1931
1932!
1933!-- User-defined information
1934    CALL user_header( io )
1935
1936    WRITE ( io, 99 )
1937
1938!
1939!-- Write buffer contents to disc immediately
1940    CALL local_flush( io )
1941
1942!
1943!-- Here the FORMATs start
1944
1945 99 FORMAT (1X,78('-'))
1946100 FORMAT (/1X,'******************************',4X,44('-')/        &
1947            1X,'* ',A,' *',4X,A/                               &
1948            1X,'******************************',4X,44('-'))
1949101 FORMAT (35X,'coupled run using MPI-',I1,': ',A/ &
1950            35X,42('-'))
1951102 FORMAT (/' Date:                 ',A8,4X,'Run:       ',A20/      &
1952            ' Time:                 ',A8,4X,'Run-No.:   ',I2.2/     &
1953            ' Run on host:        ',A10)
1954#if defined( __parallel )
1955103 FORMAT (' Number of PEs:',10X,I6,4X,'Processor grid (x,y): (',I4,',',I4, &
1956              ')',1X,A)
1957104 FORMAT (' Number of PEs:',10X,I6,4X,'Tasks:',I4,'   threads per task:',I4/ &
1958              35X,'Processor grid (x,y): (',I4,',',I4,')',1X,A)
1959105 FORMAT (35X,'One additional PE is used to handle'/37X,'the dvrp output!')
1960106 FORMAT (35X,'A 1d-decomposition along x is forced'/ &
1961            35X,'because the job is running on an SMP-cluster')
1962107 FORMAT (35X,'A 1d-decomposition along ',A,' is used')
1963108 FORMAT (35X,'Max. # of parallel I/O streams is ',I5)
1964109 FORMAT (35X,'Precursor run for coupled atmos-ocean run'/ &
1965            35X,42('-'))
1966114 FORMAT (35X,'Coupled atmosphere-ocean run following'/ &
1967            35X,'independent precursor runs'/             &
1968            35X,42('-'))
1969117 FORMAT (' Accelerator boards / node:  ',I2)
1970#endif
1971110 FORMAT (/' Numerical Schemes:'/ &
1972             ' -----------------'/)
1973111 FORMAT (' --> Solve perturbation pressure via FFT using ',A,' routines')
1974112 FORMAT (' --> Solve perturbation pressure via SOR-Red/Black-Schema'/ &
1975            '     Iterations (initial/other): ',I3,'/',I3,'  omega =',F6.3)
1976113 FORMAT (' --> Momentum advection via Piascek-Williams-Scheme (Form C3)', &
1977                  ' or Upstream')
1978115 FORMAT ('     FFT and transpositions are overlapping')
1979116 FORMAT (' --> Scalar advection via Piascek-Williams-Scheme (Form C3)', &
1980                  ' or Upstream')
1981118 FORMAT (' --> Scalar advection via Bott-Chlond-Scheme')
1982119 FORMAT (' --> Galilei-Transform applied to horizontal advection:'/ &
1983            '     translation velocity = ',A/ &
1984            '     distance advected ',A,':  ',F8.3,' km(x)  ',F8.3,' km(y)')
1985120 FORMAT (' Accelerator boards: ',8X,I2)
1986122 FORMAT (' --> Time differencing scheme: ',A)
1987123 FORMAT (' --> Rayleigh-Damping active, starts ',A,' z = ',F8.2,' m'/ &
1988            '     maximum damping coefficient:',F6.3, ' 1/s')
1989129 FORMAT (' --> Additional prognostic equation for the specific humidity')
1990130 FORMAT (' --> Additional prognostic equation for the total water content')
1991131 FORMAT (' --> No pt-equation solved. Neutral stratification with pt = ', &
1992                  F6.2, ' K assumed')
1993132 FORMAT ('     Parameterization of long-wave radiation processes via'/ &
1994            '     effective emissivity scheme')
1995133 FORMAT ('     Precipitation parameterization via Kessler-Scheme')
1996134 FORMAT (' --> Additional prognostic equation for a passive scalar')
1997135 FORMAT (' --> Solve perturbation pressure via ',A,' method (', &
1998                  A,'-cycle)'/ &
1999            '     number of grid levels:                   ',I2/ &
2000            '     Gauss-Seidel red/black iterations:       ',I2)
2001136 FORMAT ('     gridpoints of coarsest subdomain (x,y,z): (',I3,',',I3,',', &
2002                  I3,')')
2003137 FORMAT ('     level data gathered on PE0 at level:     ',I2/ &
2004            '     gridpoints of coarsest subdomain (x,y,z): (',I3,',',I3,',', &
2005                  I3,')'/ &
2006            '     gridpoints of coarsest domain (x,y,z):    (',I3,',',I3,',', &
2007                  I3,')')
2008139 FORMAT (' --> Loop optimization method: ',A)
2009140 FORMAT ('     maximum residual allowed:                ',E10.3)
2010141 FORMAT ('     fixed number of multigrid cycles:        ',I4)
2011142 FORMAT ('     perturbation pressure is calculated at every Runge-Kutta ', &
2012                  'step')
2013143 FORMAT ('     Euler/upstream scheme is used for the SGS turbulent ', &
2014                  'kinetic energy')
2015144 FORMAT ('     masking method is used')
2016150 FORMAT (' --> Volume flow at the right and north boundary will be ', &
2017                  'conserved'/ &
2018            '     using the ',A,' mode')
2019151 FORMAT ('     with u_bulk = ',F7.3,' m/s and v_bulk = ',F7.3,' m/s')
2020152 FORMAT (' --> External pressure gradient directly prescribed by the user:',&
2021           /'     ',2(1X,E12.5),'Pa/m in x/y direction', &
2022           /'     starting from dp_level_b =', F8.3, 'm', A /)
2023160 FORMAT (//' Large scale forcing and nudging:'/ &
2024              ' -------------------------------'/)
2025161 FORMAT (' --> No large scale forcing from external is used (default) ')
2026162 FORMAT (' --> Large scale forcing from external file LSF_DATA is used: ')
2027163 FORMAT ('     - large scale advection tendencies ')
2028164 FORMAT ('     - large scale subsidence velocity w_subs ')
2029165 FORMAT ('     - large scale subsidence tendencies ')
2030167 FORMAT ('     - and geostrophic wind components ug and vg')
2031168 FORMAT (' --> Large-scale vertical motion is used in the ', &
2032                  'prognostic equation(s) for')
2033169 FORMAT ('     the scalar(s) only')
2034170 FORMAT (' --> Nudging is used')
2035171 FORMAT (' --> No nudging is used (default) ')
2036180 FORMAT ('     - prescribed surface values for temperature')
2037181 FORMAT ('     - prescribed surface fluxes for temperature')
2038182 FORMAT ('     - prescribed surface values for humidity')
2039183 FORMAT ('     - prescribed surface fluxes for humidity')
2040200 FORMAT (//' Run time and time step information:'/ &
2041             ' ----------------------------------'/)
2042201 FORMAT ( ' Timestep:             variable     maximum value: ',F6.3,' s', &
2043             '    CFL-factor:',F5.2)
2044202 FORMAT ( ' Timestep:          dt = ',F6.3,' s'/)
2045203 FORMAT ( ' Start time:          ',F9.3,' s'/ &
2046             ' End time:            ',F9.3,' s')
2047204 FORMAT ( A,F9.3,' s')
2048205 FORMAT ( A,F9.3,' s',5X,'restart every',17X,F9.3,' s')
2049206 FORMAT (/' Time reached:        ',F9.3,' s'/ &
2050             ' CPU-time used:       ',F9.3,' s     per timestep:               ', &
2051               '  ',F9.3,' s'/                                                    &
2052             '                                      per second of simulated tim', &
2053               'e: ',F9.3,' s')
2054207 FORMAT ( ' Coupling start time: ',F9.3,' s')
2055250 FORMAT (//' Computational grid and domain size:'/ &
2056              ' ----------------------------------'// &
2057              ' Grid length:      dx =    ',F7.3,' m    dy =    ',F7.3, &
2058              ' m    dz =    ',F7.3,' m'/ &
2059              ' Domain size:       x = ',F10.3,' m     y = ',F10.3, &
2060              ' m  z(u) = ',F10.3,' m'/)
2061252 FORMAT (' dz constant up to ',F10.3,' m (k=',I4,'), then stretched by', &
2062              ' factor:',F6.3/ &
2063            ' maximum dz not to be exceeded is dz_max = ',F10.3,' m'/)
2064254 FORMAT (' Number of gridpoints (x,y,z):  (0:',I4,', 0:',I4,', 0:',I4,')'/ &
2065            ' Subdomain size (x,y,z):        (  ',I4,',   ',I4,',   ',I4,')'/)
2066260 FORMAT (/' The model has a slope in x-direction. Inclination angle: ',F6.2,&
2067             ' degrees')
2068270 FORMAT (//' Topography information:'/ &
2069              ' ----------------------'// &
2070              1X,'Topography: ',A)
2071271 FORMAT (  ' Building size (x/y/z) in m: ',F5.1,' / ',F5.1,' / ',F5.1/ &
2072              ' Horizontal index bounds (l/r/s/n): ',I4,' / ',I4,' / ',I4, &
2073                ' / ',I4)
2074272 FORMAT (  ' Single quasi-2D street canyon of infinite length in ',A, &
2075              ' direction' / &
2076              ' Canyon height: ', F6.2, 'm, ch = ', I4, '.'      / &
2077              ' Canyon position (',A,'-walls): cxl = ', I4,', cxr = ', I4, '.')
2078278 FORMAT (' Topography grid definition convention:'/ &
2079            ' cell edge (staggered grid points'/  &
2080            ' (u in x-direction, v in y-direction))' /)
2081279 FORMAT (' Topography grid definition convention:'/ &
2082            ' cell center (scalar grid points)' /)
2083280 FORMAT (//' Vegetation canopy (drag) model:'/ &
2084              ' ------------------------------'// &
2085              ' Canopy mode: ', A / &
2086              ' Canopy height: ',F6.2,'m (',I4,' grid points)' / &
2087              ' Leaf drag coefficient: ',F6.2 /)
2088281 FORMAT (/ ' Scalar exchange coefficient: ',F6.2 / &
2089              ' Scalar concentration at leaf surfaces in kg/m**3: ',F6.2 /)
2090282 FORMAT (' Predefined constant heatflux at the top of the vegetation: ',F6.2,' K m/s')
2091283 FORMAT (/ ' Characteristic levels of the leaf area density:'// &
2092              ' Height:              ',A,'  m'/ &
2093              ' Leaf area density:   ',A,'  m**2/m**3'/ &
2094              ' Gradient:            ',A,'  m**2/m**4'/ &
2095              ' Gridpoint:           ',A)
2096284 FORMAT (//' Characteristic levels of the leaf area density and coefficients:'// &
2097              ' Height:              ',A,'  m'/ &
2098              ' Leaf area density:   ',A,'  m**2/m**3'/ &
2099              ' Coefficient alpha: ',F6.2 / &
2100              ' Coefficient beta: ',F6.2 / &
2101              ' Leaf area index: ',F6.2,'  m**2/m**2' /)
2102               
2103300 FORMAT (//' Boundary conditions:'/ &
2104             ' -------------------'// &
2105             '                     p                    uv             ', &
2106             '                     pt'// &
2107             ' B. bound.: ',A/ &
2108             ' T. bound.: ',A)
2109301 FORMAT (/'                     ',A// &
2110             ' B. bound.: ',A/ &
2111             ' T. bound.: ',A)
2112303 FORMAT (/' Bottom surface fluxes are used in diffusion terms at k=1')
2113304 FORMAT (/' Top surface fluxes are used in diffusion terms at k=nzt')
2114305 FORMAT (//'    Prandtl-Layer between bottom surface and first ', &
2115               'computational u,v-level:'// &
2116             '       zp = ',F6.2,' m   z0 =',F7.4,' m   z0h =',F8.5,&
2117             ' m   kappa =',F5.2/ &
2118             '       Rif value range:   ',F8.2,' <= rif <=',F6.2)
2119306 FORMAT ('       Predefined constant heatflux:   ',F9.6,' K m/s')
2120307 FORMAT ('       Heatflux has a random normal distribution')
2121308 FORMAT ('       Predefined surface temperature')
2122309 FORMAT ('       Predefined constant salinityflux:   ',F9.6,' psu m/s')
2123310 FORMAT (//'    1D-Model:'// &
2124             '       Rif value range:   ',F6.2,' <= rif <=',F6.2)
2125311 FORMAT ('       Predefined constant humidity flux: ',E10.3,' m/s')
2126312 FORMAT ('       Predefined surface humidity')
2127313 FORMAT ('       Predefined constant scalar flux: ',E10.3,' kg/(m**2 s)')
2128314 FORMAT ('       Predefined scalar value at the surface')
2129315 FORMAT ('       Humidity / scalar flux at top surface is 0.0')
2130316 FORMAT ('       Sensible heatflux and momentum flux from coupled ', &
2131                    'atmosphere model')
2132317 FORMAT (//' Lateral boundaries:'/ &
2133            '       left/right:  ',A/    &
2134            '       north/south: ',A)
2135318 FORMAT (/'       use_cmax: ',L1 / &
2136            '       pt damping layer width = ',F8.2,' m, pt ', &
2137                    'damping factor =',F7.4)
2138319 FORMAT ('       turbulence recycling at inflow switched on'/ &
2139            '       width of recycling domain: ',F7.1,' m   grid index: ',I4/ &
2140            '       inflow damping height: ',F6.1,' m   width: ',F6.1,' m')
2141320 FORMAT ('       Predefined constant momentumflux:  u: ',F9.6,' m**2/s**2'/ &
2142            '                                          v: ',F9.6,' m**2/s**2')
2143321 FORMAT (//' Initial profiles:'/ &
2144              ' ----------------')
2145322 FORMAT ('       turbulence recycling at inflow switched on'/ &
2146            '       y shift of the recycled inflow turbulence switched on'/ &
2147            '       width of recycling domain: ',F7.1,' m   grid index: ',I4/ &
2148            '       inflow damping height: ',F6.1,' m   width: ',F6.1,' m'/)
2149325 FORMAT (//' List output:'/ &
2150             ' -----------'//  &
2151            '    1D-Profiles:'/    &
2152            '       Output every             ',F8.2,' s')
2153326 FORMAT ('       Time averaged over       ',F8.2,' s'/ &
2154            '       Averaging input every    ',F8.2,' s')
2155330 FORMAT (//' Data output:'/ &
2156             ' -----------'/)
2157331 FORMAT (/'    1D-Profiles:')
2158332 FORMAT (/'       ',A)
2159333 FORMAT ('       Output every             ',F8.2,' s',/ &
2160            '       Time averaged over       ',F8.2,' s'/ &
2161            '       Averaging input every    ',F8.2,' s')
2162334 FORMAT (/'    2D-Arrays',A,':')
2163335 FORMAT (/'       ',A2,'-cross-section  Arrays: ',A/ &
2164            '       Output every             ',F8.2,' s  ',A/ &
2165            '       Cross sections at ',A1,' = ',A/ &
2166            '       scalar-coordinates:   ',A,' m'/)
2167336 FORMAT (/'    3D-Arrays',A,':')
2168337 FORMAT (/'       Arrays: ',A/ &
2169            '       Output every             ',F8.2,' s  ',A/ &
2170            '       Upper output limit at    ',F8.2,' m  (GP ',I4,')'/)
2171339 FORMAT ('       No output during initial ',F8.2,' s')
2172340 FORMAT (/'    Time series:')
2173341 FORMAT ('       Output every             ',F8.2,' s'/)
2174342 FORMAT (/'       ',A2,'-cross-section  Arrays: ',A/ &
2175            '       Output every             ',F8.2,' s  ',A/ &
2176            '       Time averaged over       ',F8.2,' s'/ &
2177            '       Averaging input every    ',F8.2,' s'/ &
2178            '       Cross sections at ',A1,' = ',A/ &
2179            '       scalar-coordinates:   ',A,' m'/)
2180343 FORMAT (/'       Arrays: ',A/ &
2181            '       Output every             ',F8.2,' s  ',A/ &
2182            '       Time averaged over       ',F8.2,' s'/ &
2183            '       Averaging input every    ',F8.2,' s'/ &
2184            '       Upper output limit at    ',F8.2,' m  (GP ',I4,')'/)
2185344 FORMAT ('       Output format: ',A/)
2186345 FORMAT (/'    Scaling lengths for output locations of all subsequent mask IDs:',/ &
2187            '       mask_scale_x (in x-direction): ',F9.3, ' m',/ &
2188            '       mask_scale_y (in y-direction): ',F9.3, ' m',/ &
2189            '       mask_scale_z (in z-direction): ',F9.3, ' m' )
2190346 FORMAT (/'    Masked data output',A,' for mask ID ',I2, ':')
2191347 FORMAT ('       Variables: ',A/ &
2192            '       Output every             ',F8.2,' s')
2193348 FORMAT ('       Variables: ',A/ &
2194            '       Output every             ',F8.2,' s'/ &
2195            '       Time averaged over       ',F8.2,' s'/ &
2196            '       Averaging input every    ',F8.2,' s')
2197349 FORMAT (/'       Output locations in ',A,'-direction in multiples of ', &
2198            'mask_scale_',A,' predefined by array mask_',I2.2,'_',A,':'/ &
2199            13('       ',8(F8.2,',')/) )
2200350 FORMAT (/'       Output locations in ',A,'-direction: ', &
2201            'all gridpoints along ',A,'-direction (default).' )
2202351 FORMAT (/'       Output locations in ',A,'-direction in multiples of ', &
2203            'mask_scale_',A,' constructed from array mask_',I2.2,'_',A,'_loop:'/ &
2204            '          loop begin:',F8.2,', end:',F8.2,', stride:',F8.2 )
2205352 FORMAT  (/'       Number of output time levels allowed: ',I3 /)
2206353 FORMAT  (/'       Number of output time levels allowed: unlimited' /)
2207354 FORMAT ('       Output format: ',A, '   compressed with level: ',I1/)
2208#if defined( __dvrp_graphics )
2209360 FORMAT ('    Plot-Sequence with dvrp-software:'/ &
2210            '       Output every      ',F7.1,' s'/ &
2211            '       Output mode:      ',A/ &
2212            '       Host / User:      ',A,' / ',A/ &
2213            '       Directory:        ',A// &
2214            '       The sequence contains:')
2215361 FORMAT (/'       Isosurface of "',A,'"    Threshold value: ', E12.3/ &
2216            '          Isosurface color: (',F4.2,',',F4.2,',',F4.2,') (R,G,B)')
2217362 FORMAT (/'       Slicer plane ',A/ &
2218            '       Slicer limits: [',F6.2,',',F6.2,']')
2219363 FORMAT (/'       Particles'/ &
2220            '          particle size:  ',F7.2,' m')
2221364 FORMAT ('          particle ',A,' controlled by "',A,'" with interval [', &
2222                       F6.2,',',F6.2,']')
2223365 FORMAT (/'       Groundplate color: (',F4.2,',',F4.2,',',F4.2,') (R,G,B)'/ &
2224            '       Superelevation along (x,y,z): (',F4.1,',',F4.1,',',F4.1, &
2225                     ')'/ &
2226            '       Clipping limits: from x = ',F9.1,' m to x = ',F9.1,' m'/ &
2227            '                        from y = ',F9.1,' m to y = ',F9.1,' m')
2228366 FORMAT (/'       Topography color: (',F4.2,',',F4.2,',',F4.2,') (R,G,B)')
2229367 FORMAT ('       Polygon reduction for topography: cluster_size = ', I1)
2230#endif
2231370 FORMAT ('    Spectra:')
2232371 FORMAT ('       Output every ',F7.1,' s'/)
2233372 FORMAT ('       Arrays:     ', 10(A5,',')/                         &
2234            '       Directions: ', 10(A5,',')/                         &
2235            '       height levels  k = ', 20(I3,',')/                  &
2236            '                          ', 20(I3,',')/                  &
2237            '                          ', 20(I3,',')/                  &
2238            '                          ', 20(I3,',')/                  &
2239            '                          ', 19(I3,','),I3,'.'/           &
2240            '       height levels selected for standard plot:'/        &
2241            '                      k = ', 20(I3,',')/                  &
2242            '                          ', 20(I3,',')/                  &
2243            '                          ', 20(I3,',')/                  &
2244            '                          ', 20(I3,',')/                  &
2245            '                          ', 19(I3,','),I3,'.'/           &
2246            '       Time averaged over ', F7.1, ' s,' /                &
2247            '       Profiles for the time averaging are taken every ', &
2248                    F6.1,' s')
2249400 FORMAT (//' Physical quantities:'/ &
2250              ' -------------------'/)
2251410 FORMAT ('    Geograph. latitude  :   phi    = ',F4.1,' degr'/   &
2252            '    Angular velocity    :   omega  =',E10.3,' rad/s'/  &
2253            '    Coriolis parameter  :   f      = ',F9.6,' 1/s'/    &
2254            '                            f*     = ',F9.6,' 1/s')
2255411 FORMAT (/'    Gravity             :   g      = ',F4.1,' m/s**2')
2256412 FORMAT (/'    Reference state used in buoyancy terms: ',A)
2257413 FORMAT ('       Reference density in buoyancy terms: ',F8.3,' kg/m**3')
2258414 FORMAT ('       Reference temperature in buoyancy terms: ',F8.4,' K')
2259415 FORMAT (/' Cloud physics parameters:'/ &
2260             ' ------------------------'/)
2261416 FORMAT ('    Surface pressure   :   p_0   = ',F7.2,' hPa'/      &
2262            '    Gas constant       :   R     = ',F5.1,' J/(kg K)'/ &
2263            '    Density of air     :   rho_0 =',F6.3,' kg/m**3'/  &
2264            '    Specific heat cap. :   c_p   = ',F6.1,' J/(kg K)'/ &
2265            '    Vapourization heat :   L_v   =',E9.2,' J/kg')
2266417 FORMAT ('    Geograph. longitude :   lambda = ',F4.1,' degr')
2267418 FORMAT (/'    Day of the year at model start :   day_init      =     ',I3 &
2268            /'    UTC time at model start        :   time_utc_init = ',F7.1' s')
2269419 FORMAT (//' Land surface model information:'/ &
2270              ' ------------------------------'/)
2271420 FORMAT (/'    Characteristic levels of the initial temperature profile:'// &
2272            '       Height:        ',A,'  m'/ &
2273            '       Temperature:   ',A,'  K'/ &
2274            '       Gradient:      ',A,'  K/100m'/ &
2275            '       Gridpoint:     ',A)
2276421 FORMAT (/'    Characteristic levels of the initial humidity profile:'// &
2277            '       Height:      ',A,'  m'/ &
2278            '       Humidity:    ',A,'  kg/kg'/ &
2279            '       Gradient:    ',A,'  (kg/kg)/100m'/ &
2280            '       Gridpoint:   ',A)
2281422 FORMAT (/'    Characteristic levels of the initial scalar profile:'// &
2282            '       Height:                  ',A,'  m'/ &
2283            '       Scalar concentration:    ',A,'  kg/m**3'/ &
2284            '       Gradient:                ',A,'  (kg/m**3)/100m'/ &
2285            '       Gridpoint:               ',A)
2286423 FORMAT (/'    Characteristic levels of the geo. wind component ug:'// &
2287            '       Height:      ',A,'  m'/ &
2288            '       ug:          ',A,'  m/s'/ &
2289            '       Gradient:    ',A,'  1/100s'/ &
2290            '       Gridpoint:   ',A)
2291424 FORMAT (/'    Characteristic levels of the geo. wind component vg:'// &
2292            '       Height:      ',A,'  m'/ &
2293            '       vg:          ',A,'  m/s'/ &
2294            '       Gradient:    ',A,'  1/100s'/ &
2295            '       Gridpoint:   ',A)
2296425 FORMAT (/'    Characteristic levels of the initial salinity profile:'// &
2297            '       Height:     ',A,'  m'/ &
2298            '       Salinity:   ',A,'  psu'/ &
2299            '       Gradient:   ',A,'  psu/100m'/ &
2300            '       Gridpoint:  ',A)
2301426 FORMAT (/'    Characteristic levels of the subsidence/ascent profile:'// &
2302            '       Height:      ',A,'  m'/ &
2303            '       w_subs:      ',A,'  m/s'/ &
2304            '       Gradient:    ',A,'  (m/s)/100m'/ &
2305            '       Gridpoint:   ',A)
2306427 FORMAT (/'    Initial wind profiles (u,v) are interpolated from given'// &
2307                  ' profiles')
2308428 FORMAT (/'    Initial profiles (u, v, pt, q) are taken from file '/ &
2309             '    NUDGING_DATA')
2310430 FORMAT (//' Cloud physics quantities / methods:'/ &
2311              ' ----------------------------------'/)
2312431 FORMAT ('    Humidity is treated as purely passive scalar (no condensati', &
2313                 'on)')
2314432 FORMAT ('    Bulk scheme with liquid water potential temperature and'/ &
2315            '    total water content is used.'/ &
2316            '    Condensation is parameterized via 0% - or 100% scheme.')
2317433 FORMAT ('    Cloud droplets treated explicitly using the Lagrangian part', &
2318                 'icle model')
2319434 FORMAT ('    Curvature and solution effecs are considered for growth of', &
2320                 ' droplets < 1.0E-6 m')
2321435 FORMAT ('    Droplet collision is handled by ',A,'-kernel')
2322436 FORMAT ('       Fast kernel with fixed radius- and dissipation classes ', &
2323                    'are used'/ &
2324            '          number of radius classes:       ',I3,'    interval ', &
2325                       '[1.0E-6,2.0E-4] m'/ &
2326            '          number of dissipation classes:   ',I2,'    interval ', &
2327                       '[0,1000] cm**2/s**3')
2328437 FORMAT ('    Droplet collision is switched off')
2329438 FORMAT (' --> Land surface type  : ',A,/ &
2330            ' --> Soil porosity type : ',A)
2331439 FORMAT (/'    Initial soil temperature and moisture profile:'// &
2332            '       Height:        ',A,'  m'/ &
2333            '       Temperature:   ',A,'  K'/ &
2334            '       Moisture:      ',A,'  m**3/m**3'/ &
2335            '       Root fraction: ',A,'  '/ &
2336            '       Gridpoint:     ',A)
2337440 FORMAT (' --> Soil bottom is closed (water content is conserved, default)')
2338441 FORMAT (' --> Soil bottom is open (water content is not conserved)')
2339444 FORMAT (//' Radiation model information:'/                                 &
2340              ' ----------------------------'/)
2341445 FORMAT (' --> Using constant net radiation: net_radiation = ', F6.2, '  W/m**2')
2342446 FORMAT (' --> Simple radiation scheme for clear sky is used (no clouds,',  &
2343                   ' default)')
2344447 FORMAT (' --> RRTMG scheme is used')
2345448 FORMAT (/'     User-specific surface albedo: albedo =', F6.3)
2346449 FORMAT  ('     Timestep: dt_radiation = ', F5.2, '  s')
2347
2348450 FORMAT (//' LES / Turbulence quantities:'/ &
2349              ' ---------------------------'/)
2350451 FORMAT ('    Diffusion coefficients are constant:'/ &
2351            '    Km = ',F6.2,' m**2/s   Kh = ',F6.2,' m**2/s   Pr = ',F5.2)
2352453 FORMAT ('    Mixing length is limited to',F5.2,' * z')
2353454 FORMAT ('    TKE is not allowed to fall below ',E9.2,' (m/s)**2')
2354455 FORMAT ('    initial TKE is prescribed as ',E9.2,' (m/s)**2')
2355456 FORMAT (/'    Albedo is set for land surface type: ', A)
2356457 FORMAT (/'    --> Albedo is fixed during the run')
2357458 FORMAT (/'    --> Longwave radiation is disabled')
2358459 FORMAT (/'    --> Shortwave radiation is disabled.')
2359470 FORMAT (//' Actions during the simulation:'/ &
2360              ' -----------------------------'/)
2361471 FORMAT ('    Disturbance impulse (u,v) every :   ',F6.2,' s'/            &
2362            '    Disturbance amplitude           :    ',F5.2, ' m/s'/       &
2363            '    Lower disturbance level         : ',F8.2,' m (GP ',I4,')'/  &
2364            '    Upper disturbance level         : ',F8.2,' m (GP ',I4,')')
2365472 FORMAT ('    Disturbances continued during the run from i/j =',I4, &
2366                 ' to i/j =',I4)
2367473 FORMAT ('    Disturbances cease as soon as the disturbance energy exceeds',&
2368                 F6.3, ' m**2/s**2')
2369474 FORMAT ('    Random number generator used    : ',A/)
2370475 FORMAT ('    The surface temperature is increased (or decreased, ', &
2371                 'respectively, if'/ &
2372            '    the value is negative) by ',F5.2,' K at the beginning of the',&
2373                 ' 3D-simulation'/)
2374476 FORMAT ('    The surface humidity is increased (or decreased, ',&
2375                 'respectively, if the'/ &
2376            '    value is negative) by ',E8.1,' kg/kg at the beginning of', &
2377                 ' the 3D-simulation'/)
2378477 FORMAT ('    The scalar value is increased at the surface (or decreased, ',&
2379                 'respectively, if the'/ &
2380            '    value is negative) by ',E8.1,' kg/m**3 at the beginning of', &
2381                 ' the 3D-simulation'/)
2382480 FORMAT ('    Particles:'/ &
2383            '    ---------'// &
2384            '       Particle advection is active (switched on at t = ', F7.1, &
2385                    ' s)'/ &
2386            '       Start of new particle generations every  ',F6.1,' s'/ &
2387            '       Boundary conditions: left/right: ', A, ' north/south: ', A/&
2388            '                            bottom:     ', A, ' top:         ', A/&
2389            '       Maximum particle age:                 ',F9.1,' s'/ &
2390            '       Advection stopped at t = ',F9.1,' s'/)
2391481 FORMAT ('       Particles have random start positions'/)
2392482 FORMAT ('          Particles are advected only horizontally'/)
2393483 FORMAT ('       Particles have tails with a maximum of ',I3,' points')
2394484 FORMAT ('            Number of tails of the total domain: ',I10/ &
2395            '            Minimum distance between tailpoints: ',F8.2,' m'/ &
2396            '            Maximum age of the end of the tail:  ',F8.2,' s')
2397485 FORMAT ('       Particle data are written on file every ', F9.1, ' s')
2398486 FORMAT ('       Particle statistics are written on file'/)
2399487 FORMAT ('       Number of particle groups: ',I2/)
2400488 FORMAT ('       SGS velocity components are used for particle advection'/ &
2401            '          minimum timestep for advection:', F8.5/)
2402489 FORMAT ('       Number of particles simultaneously released at each ', &
2403                    'point: ', I5/)
2404490 FORMAT ('       Particle group ',I2,':'/ &
2405            '          Particle radius: ',E10.3, 'm')
2406491 FORMAT ('          Particle inertia is activated'/ &
2407            '             density_ratio (rho_fluid/rho_particle) =',F6.3/)
2408492 FORMAT ('          Particles are advected only passively (no inertia)'/)
2409493 FORMAT ('          Boundaries of particle source: x:',F8.1,' - ',F8.1,' m'/&
2410            '                                         y:',F8.1,' - ',F8.1,' m'/&
2411            '                                         z:',F8.1,' - ',F8.1,' m'/&
2412            '          Particle distances:  dx = ',F8.1,' m  dy = ',F8.1, &
2413                       ' m  dz = ',F8.1,' m'/)
2414494 FORMAT ('       Output of particle time series in NetCDF format every ', &
2415                    F8.2,' s'/)
2416495 FORMAT ('       Number of particles in total domain: ',I10/)
2417496 FORMAT ('       Initial vertical particle positions are interpreted ', &
2418                    'as relative to the given topography')
2419500 FORMAT (//' 1D-Model parameters:'/                           &
2420              ' -------------------'//                           &
2421            '    Simulation time:                   ',F8.1,' s'/ &
2422            '    Run-controll output every:         ',F8.1,' s'/ &
2423            '    Vertical profile output every:     ',F8.1,' s'/ &
2424            '    Mixing length calculation:         ',A/         &
2425            '    Dissipation calculation:           ',A/)
2426502 FORMAT ('    Damping layer starts from ',F7.1,' m (GP ',I4,')'/)
2427503 FORMAT (' --> Momentum advection via Wicker-Skamarock-Scheme 5th order')
2428504 FORMAT (' --> Scalar advection via Wicker-Skamarock-Scheme 5th order')
2429505 FORMAT ('    Precipitation parameterization via Seifert-Beheng-Scheme')
2430506 FORMAT ('    Drizzle parameterization via Stokes law')
2431507 FORMAT ('    Turbulence effects on precipitation process')
2432508 FORMAT ('    Ventilation effects on evaporation of rain drops')
2433509 FORMAT ('    Slope limiter used for sedimentation process')
2434510 FORMAT ('    Droplet density    :   N_c   = ',F6.1,' 1/cm**3')
2435511 FORMAT ('    Sedimentation Courant number:                  '/&
2436            '                               C_s   =',F4.1,'        ')
2437512 FORMAT (/' Date:                 ',A8,6X,'Run:       ',A20/      &
2438            ' Time:                 ',A8,6X,'Run-No.:   ',I2.2/     &
2439            ' Run on host:        ',A10,6X,'En-No.:    ',I2.2)
2440513 FORMAT (' --> Scalar advection via Wicker-Skamarock-Scheme 5th order ' // & 
2441            '+ monotonic adjustment')
2442600 FORMAT (/' Nesting informations:'/                                        &
2443            ' Nest id / name:                   ',I2.2,' / ',A,' (parent id: ',I2.2,')'/ &
2444            ' Nesting mode:                     ',A/ &
2445            ' Lower left corner coordinates:    ','x = ',F8.2,' m, y = ',F8.2,' m'/)
2446
2447 END SUBROUTINE header
Note: See TracBrowser for help on using the repository browser.