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

Last change on this file since 1787 was 1787, checked in by raasch, 8 years ago

last commit documented

  • Property svn:keywords set to Id
File size: 94.7 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!
22!
23! Former revisions:
24! -----------------
25! $Id: header.f90 1787 2016-03-08 06:57:00Z raasch $
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, dewfall, 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       IF ( dewfall )  THEN
969          WRITE( io, 442 )
970       ELSE
971          WRITE( io, 443 )
972       ENDIF
973
974       WRITE( io, 438 ) TRIM( veg_type_name(veg_type) ),                       &
975                        TRIM (soil_type_name(soil_type) )
976       WRITE( io, 439 ) TRIM( coordinates ), TRIM( temperatures ),             &
977                        TRIM( gradients ), TRIM( roots ), TRIM( slices )
978
979
980    ENDIF
981
982    IF ( radiation )  THEN
983!
984!--    Write radiation model header
985       WRITE( io, 444 )
986
987       IF ( radiation_scheme == "constant" )  THEN
988          WRITE( io, 445 ) net_radiation
989       ELSEIF ( radiation_scheme == "clear-sky" )  THEN
990          WRITE( io, 446 )
991       ELSEIF ( radiation_scheme == "rrtmg" )  THEN
992          WRITE( io, 447 )
993          IF ( .NOT. lw_radiation )  WRITE( io, 458 )
994          IF ( .NOT. sw_radiation )  WRITE( io, 459 )
995       ENDIF
996
997       IF ( albedo_type == 0 )  THEN
998          WRITE( io, 448 ) albedo
999       ELSE
1000          WRITE( io, 456 ) TRIM( albedo_type_name(albedo_type) )
1001       ENDIF
1002       IF ( constant_albedo )  THEN
1003          WRITE( io, 457 )
1004       ENDIF
1005       WRITE( io, 449 ) dt_radiation
1006    ENDIF
1007
1008
1009!
1010!-- Boundary conditions
1011    IF ( ibc_p_b == 0 )  THEN
1012       runten = 'p(0)     = 0      |'
1013    ELSEIF ( ibc_p_b == 1 )  THEN
1014       runten = 'p(0)     = p(1)   |'
1015    ENDIF
1016    IF ( ibc_p_t == 0 )  THEN
1017       roben  = 'p(nzt+1) = 0      |'
1018    ELSE
1019       roben  = 'p(nzt+1) = p(nzt) |'
1020    ENDIF
1021
1022    IF ( ibc_uv_b == 0 )  THEN
1023       runten = TRIM( runten ) // ' uv(0)     = -uv(1)                |'
1024    ELSE
1025       runten = TRIM( runten ) // ' uv(0)     = uv(1)                 |'
1026    ENDIF
1027    IF ( TRIM( bc_uv_t ) == 'dirichlet_0' )  THEN
1028       roben  = TRIM( roben  ) // ' uv(nzt+1) = 0                     |'
1029    ELSEIF ( ibc_uv_t == 0 )  THEN
1030       roben  = TRIM( roben  ) // ' uv(nzt+1) = ug(nzt+1), vg(nzt+1)  |'
1031    ELSE
1032       roben  = TRIM( roben  ) // ' uv(nzt+1) = uv(nzt)               |'
1033    ENDIF
1034
1035    IF ( ibc_pt_b == 0 )  THEN
1036       IF ( land_surface )  THEN
1037          runten = TRIM( runten ) // ' pt(0)     = from soil model'
1038       ELSE
1039          runten = TRIM( runten ) // ' pt(0)     = pt_surface'
1040       ENDIF
1041    ELSEIF ( ibc_pt_b == 1 )  THEN
1042       runten = TRIM( runten ) // ' pt(0)     = pt(1)'
1043    ELSEIF ( ibc_pt_b == 2 )  THEN
1044       runten = TRIM( runten ) // ' pt(0)     = from coupled model'
1045    ENDIF
1046    IF ( ibc_pt_t == 0 )  THEN
1047       roben  = TRIM( roben  ) // ' pt(nzt+1) = pt_top'
1048    ELSEIF( ibc_pt_t == 1 )  THEN
1049       roben  = TRIM( roben  ) // ' pt(nzt+1) = pt(nzt)'
1050    ELSEIF( ibc_pt_t == 2 )  THEN
1051       roben  = TRIM( roben  ) // ' pt(nzt+1) = pt(nzt) + dpt/dz_ini'
1052
1053    ENDIF
1054
1055    WRITE ( io, 300 )  runten, roben
1056
1057    IF ( .NOT. constant_diffusion )  THEN
1058       IF ( ibc_e_b == 1 )  THEN
1059          runten = 'e(0)     = e(1)'
1060       ELSE
1061          runten = 'e(0)     = e(1) = (u*/0.1)**2'
1062       ENDIF
1063       roben = 'e(nzt+1) = e(nzt) = e(nzt-1)'
1064
1065       WRITE ( io, 301 )  'e', runten, roben       
1066
1067    ENDIF
1068
1069    IF ( ocean )  THEN
1070       runten = 'sa(0)    = sa(1)'
1071       IF ( ibc_sa_t == 0 )  THEN
1072          roben =  'sa(nzt+1) = sa_surface'
1073       ELSE
1074          roben =  'sa(nzt+1) = sa(nzt)'
1075       ENDIF
1076       WRITE ( io, 301 ) 'sa', runten, roben
1077    ENDIF
1078
1079    IF ( humidity )  THEN
1080       IF ( ibc_q_b == 0 )  THEN
1081          IF ( land_surface )  THEN
1082             runten = 'q(0)     = from soil model'
1083          ELSE
1084             runten = 'q(0)     = q_surface'
1085          ENDIF
1086
1087       ELSE
1088          runten = 'q(0)     = q(1)'
1089       ENDIF
1090       IF ( ibc_q_t == 0 )  THEN
1091          roben =  'q(nzt)   = q_top'
1092       ELSE
1093          roben =  'q(nzt)   = q(nzt-1) + dq/dz'
1094       ENDIF
1095       WRITE ( io, 301 ) 'q', runten, roben
1096    ENDIF
1097
1098    IF ( passive_scalar )  THEN
1099       IF ( ibc_q_b == 0 )  THEN
1100          runten = 's(0)     = s_surface'
1101       ELSE
1102          runten = 's(0)     = s(1)'
1103       ENDIF
1104       IF ( ibc_q_t == 0 )  THEN
1105          roben =  's(nzt)   = s_top'
1106       ELSE
1107          roben =  's(nzt)   = s(nzt-1) + ds/dz'
1108       ENDIF
1109       WRITE ( io, 301 ) 's', runten, roben
1110    ENDIF
1111
1112    IF ( use_surface_fluxes )  THEN
1113       WRITE ( io, 303 )
1114       IF ( constant_heatflux )  THEN
1115          IF ( large_scale_forcing .AND. lsf_surf )  THEN
1116             WRITE ( io, 306 )  shf(0,0)
1117          ELSE
1118             WRITE ( io, 306 )  surface_heatflux
1119          ENDIF
1120          IF ( random_heatflux )  WRITE ( io, 307 )
1121       ENDIF
1122       IF ( humidity  .AND.  constant_waterflux )  THEN
1123          IF ( large_scale_forcing .AND. lsf_surf )  THEN
1124             WRITE ( io, 311 ) qsws(0,0)
1125          ELSE
1126             WRITE ( io, 311 ) surface_waterflux
1127          ENDIF
1128       ENDIF
1129       IF ( passive_scalar  .AND.  constant_waterflux )  THEN
1130          WRITE ( io, 313 ) surface_waterflux
1131       ENDIF
1132    ENDIF
1133
1134    IF ( use_top_fluxes )  THEN
1135       WRITE ( io, 304 )
1136       IF ( coupling_mode == 'uncoupled' )  THEN
1137          WRITE ( io, 320 )  top_momentumflux_u, top_momentumflux_v
1138          IF ( constant_top_heatflux )  THEN
1139             WRITE ( io, 306 )  top_heatflux
1140          ENDIF
1141       ELSEIF ( coupling_mode == 'ocean_to_atmosphere' )  THEN
1142          WRITE ( io, 316 )
1143       ENDIF
1144       IF ( ocean  .AND.  constant_top_salinityflux )  THEN
1145          WRITE ( io, 309 )  top_salinityflux
1146       ENDIF
1147       IF ( humidity  .OR.  passive_scalar )  THEN
1148          WRITE ( io, 315 )
1149       ENDIF
1150    ENDIF
1151
1152    IF ( constant_flux_layer )  THEN
1153       WRITE ( io, 305 )  (zu(1)-zu(0)), roughness_length,                     &
1154                          z0h_factor*roughness_length, kappa,                  &
1155                          zeta_min, zeta_max
1156       IF ( .NOT. constant_heatflux )  WRITE ( io, 308 )
1157       IF ( humidity  .AND.  .NOT. constant_waterflux )  THEN
1158          WRITE ( io, 312 )
1159       ENDIF
1160       IF ( passive_scalar  .AND.  .NOT. constant_waterflux )  THEN
1161          WRITE ( io, 314 )
1162       ENDIF
1163    ELSE
1164       IF ( INDEX(initializing_actions, 'set_1d-model_profiles') /= 0 )  THEN
1165          WRITE ( io, 310 )  zeta_min, zeta_max
1166       ENDIF
1167    ENDIF
1168
1169    WRITE ( io, 317 )  bc_lr, bc_ns
1170    IF ( .NOT. bc_lr_cyc  .OR.  .NOT. bc_ns_cyc )  THEN
1171       WRITE ( io, 318 )  use_cmax, pt_damping_width, pt_damping_factor       
1172       IF ( turbulent_inflow )  THEN
1173          IF ( .NOT. recycling_yshift ) THEN
1174             WRITE ( io, 319 )  recycling_width, recycling_plane, &
1175                                inflow_damping_height, inflow_damping_width
1176          ELSE
1177             WRITE ( io, 322 )  recycling_width, recycling_plane, &
1178                                inflow_damping_height, inflow_damping_width
1179          END IF
1180       ENDIF
1181    ENDIF
1182
1183!
1184!-- Initial Profiles
1185    WRITE ( io, 321 )
1186!
1187!-- Initial wind profiles
1188    IF ( u_profile(1) /= 9999999.9_wp )  WRITE ( io, 427 )
1189
1190!
1191!-- Initial temperature profile
1192!-- Building output strings, starting with surface temperature
1193    WRITE ( temperatures, '(F6.2)' )  pt_surface
1194    gradients = '------'
1195    slices = '     0'
1196    coordinates = '   0.0'
1197    i = 1
1198    DO  WHILE ( pt_vertical_gradient_level_ind(i) /= -9999 )
1199
1200       WRITE (coor_chr,'(F7.2)')  pt_init(pt_vertical_gradient_level_ind(i))
1201       temperatures = TRIM( temperatures ) // ' ' // TRIM( coor_chr )
1202
1203       WRITE (coor_chr,'(F7.2)')  pt_vertical_gradient(i)
1204       gradients = TRIM( gradients ) // ' ' // TRIM( coor_chr )
1205
1206       WRITE (coor_chr,'(I7)')  pt_vertical_gradient_level_ind(i)
1207       slices = TRIM( slices ) // ' ' // TRIM( coor_chr )
1208
1209       WRITE (coor_chr,'(F7.1)')  pt_vertical_gradient_level(i)
1210       coordinates = TRIM( coordinates ) // ' '  // TRIM( coor_chr )
1211
1212       IF ( i == 10 )  THEN
1213          EXIT
1214       ELSE
1215          i = i + 1
1216       ENDIF
1217
1218    ENDDO
1219
1220    IF ( .NOT. nudging )  THEN
1221       WRITE ( io, 420 )  TRIM( coordinates ), TRIM( temperatures ), &
1222                          TRIM( gradients ), TRIM( slices )
1223    ELSE
1224       WRITE ( io, 428 ) 
1225    ENDIF
1226
1227!
1228!-- Initial humidity profile
1229!-- Building output strings, starting with surface humidity
1230    IF ( humidity  .OR.  passive_scalar )  THEN
1231       WRITE ( temperatures, '(E8.1)' )  q_surface
1232       gradients = '--------'
1233       slices = '       0'
1234       coordinates = '     0.0'
1235       i = 1
1236       DO  WHILE ( q_vertical_gradient_level_ind(i) /= -9999 )
1237         
1238          WRITE (coor_chr,'(E8.1,4X)')  q_init(q_vertical_gradient_level_ind(i))
1239          temperatures = TRIM( temperatures ) // '  ' // TRIM( coor_chr )
1240
1241          WRITE (coor_chr,'(E8.1,4X)')  q_vertical_gradient(i)
1242          gradients = TRIM( gradients ) // '  ' // TRIM( coor_chr )
1243         
1244          WRITE (coor_chr,'(I8,4X)')  q_vertical_gradient_level_ind(i)
1245          slices = TRIM( slices ) // '  ' // TRIM( coor_chr )
1246         
1247          WRITE (coor_chr,'(F8.1,4X)')  q_vertical_gradient_level(i)
1248          coordinates = TRIM( coordinates ) // '  '  // TRIM( coor_chr )
1249
1250          IF ( i == 10 )  THEN
1251             EXIT
1252          ELSE
1253             i = i + 1
1254          ENDIF
1255
1256       ENDDO
1257
1258       IF ( humidity )  THEN
1259          IF ( .NOT. nudging )  THEN
1260             WRITE ( io, 421 )  TRIM( coordinates ), TRIM( temperatures ), &
1261                                TRIM( gradients ), TRIM( slices )
1262          ENDIF
1263       ELSE
1264          WRITE ( io, 422 )  TRIM( coordinates ), TRIM( temperatures ), &
1265                             TRIM( gradients ), TRIM( slices )
1266       ENDIF
1267    ENDIF
1268
1269!
1270!-- Initial salinity profile
1271!-- Building output strings, starting with surface salinity
1272    IF ( ocean )  THEN
1273       WRITE ( temperatures, '(F6.2)' )  sa_surface
1274       gradients = '------'
1275       slices = '     0'
1276       coordinates = '   0.0'
1277       i = 1
1278       DO  WHILE ( sa_vertical_gradient_level_ind(i) /= -9999 )
1279
1280          WRITE (coor_chr,'(F7.2)')  sa_init(sa_vertical_gradient_level_ind(i))
1281          temperatures = TRIM( temperatures ) // ' ' // TRIM( coor_chr )
1282
1283          WRITE (coor_chr,'(F7.2)')  sa_vertical_gradient(i)
1284          gradients = TRIM( gradients ) // ' ' // TRIM( coor_chr )
1285
1286          WRITE (coor_chr,'(I7)')  sa_vertical_gradient_level_ind(i)
1287          slices = TRIM( slices ) // ' ' // TRIM( coor_chr )
1288
1289          WRITE (coor_chr,'(F7.1)')  sa_vertical_gradient_level(i)
1290          coordinates = TRIM( coordinates ) // ' '  // TRIM( coor_chr )
1291
1292          IF ( i == 10 )  THEN
1293             EXIT
1294          ELSE
1295             i = i + 1
1296          ENDIF
1297
1298       ENDDO
1299
1300       WRITE ( io, 425 )  TRIM( coordinates ), TRIM( temperatures ), &
1301                          TRIM( gradients ), TRIM( slices )
1302    ENDIF
1303
1304
1305!
1306!-- Listing of 1D-profiles
1307    WRITE ( io, 325 )  dt_dopr_listing
1308    IF ( averaging_interval_pr /= 0.0_wp )  THEN
1309       WRITE ( io, 326 )  averaging_interval_pr, dt_averaging_input_pr
1310    ENDIF
1311
1312!
1313!-- DATA output
1314    WRITE ( io, 330 )
1315    IF ( averaging_interval_pr /= 0.0_wp )  THEN
1316       WRITE ( io, 326 )  averaging_interval_pr, dt_averaging_input_pr
1317    ENDIF
1318
1319!
1320!-- 1D-profiles
1321    dopr_chr = 'Profile:'
1322    IF ( dopr_n /= 0 )  THEN
1323       WRITE ( io, 331 )
1324
1325       output_format = ''
1326       output_format = netcdf_data_format_string
1327       IF ( netcdf_deflate == 0 )  THEN
1328          WRITE ( io, 344 )  output_format
1329       ELSE
1330          WRITE ( io, 354 )  TRIM( output_format ), netcdf_deflate
1331       ENDIF
1332
1333       DO  i = 1, dopr_n
1334          dopr_chr = TRIM( dopr_chr ) // ' ' // TRIM( data_output_pr(i) ) // ','
1335          IF ( LEN_TRIM( dopr_chr ) >= 60 )  THEN
1336             WRITE ( io, 332 )  dopr_chr
1337             dopr_chr = '       :'
1338          ENDIF
1339       ENDDO
1340
1341       IF ( dopr_chr /= '' )  THEN
1342          WRITE ( io, 332 )  dopr_chr
1343       ENDIF
1344       WRITE ( io, 333 )  dt_dopr, averaging_interval_pr, dt_averaging_input_pr
1345       IF ( skip_time_dopr /= 0.0_wp )  WRITE ( io, 339 )  skip_time_dopr
1346    ENDIF
1347
1348!
1349!-- 2D-arrays
1350    DO  av = 0, 1
1351
1352       i = 1
1353       do2d_xy = ''
1354       do2d_xz = ''
1355       do2d_yz = ''
1356       DO  WHILE ( do2d(av,i) /= ' ' )
1357
1358          l = MAX( 2, LEN_TRIM( do2d(av,i) ) )
1359          do2d_mode = do2d(av,i)(l-1:l)
1360
1361          SELECT CASE ( do2d_mode )
1362             CASE ( 'xy' )
1363                ll = LEN_TRIM( do2d_xy )
1364                do2d_xy = do2d_xy(1:ll) // ' ' // do2d(av,i)(1:l-3) // ','
1365             CASE ( 'xz' )
1366                ll = LEN_TRIM( do2d_xz )
1367                do2d_xz = do2d_xz(1:ll) // ' ' // do2d(av,i)(1:l-3) // ','
1368             CASE ( 'yz' )
1369                ll = LEN_TRIM( do2d_yz )
1370                do2d_yz = do2d_yz(1:ll) // ' ' // do2d(av,i)(1:l-3) // ','
1371          END SELECT
1372
1373          i = i + 1
1374
1375       ENDDO
1376
1377       IF ( ( ( do2d_xy /= ''  .AND.  section(1,1) /= -9999 )  .OR.    &
1378              ( do2d_xz /= ''  .AND.  section(1,2) /= -9999 )  .OR.    &
1379              ( do2d_yz /= ''  .AND.  section(1,3) /= -9999 ) ) )  THEN
1380
1381          IF (  av == 0 )  THEN
1382             WRITE ( io, 334 )  ''
1383          ELSE
1384             WRITE ( io, 334 )  '(time-averaged)'
1385          ENDIF
1386
1387          IF ( do2d_at_begin )  THEN
1388             begin_chr = 'and at the start'
1389          ELSE
1390             begin_chr = ''
1391          ENDIF
1392
1393          output_format = ''
1394          output_format = netcdf_data_format_string
1395          IF ( netcdf_deflate == 0 )  THEN
1396             WRITE ( io, 344 )  output_format
1397          ELSE
1398             WRITE ( io, 354 )  TRIM( output_format ), netcdf_deflate
1399          ENDIF
1400
1401          IF ( do2d_xy /= ''  .AND.  section(1,1) /= -9999 )  THEN
1402             i = 1
1403             slices = '/'
1404             coordinates = '/'
1405!
1406!--          Building strings with index and coordinate information of the
1407!--          slices
1408             DO  WHILE ( section(i,1) /= -9999 )
1409
1410                WRITE (section_chr,'(I5)')  section(i,1)
1411                section_chr = ADJUSTL( section_chr )
1412                slices = TRIM( slices ) // TRIM( section_chr ) // '/'
1413
1414                IF ( section(i,1) == -1 )  THEN
1415                   WRITE (coor_chr,'(F10.1)')  -1.0_wp
1416                ELSE
1417                   WRITE (coor_chr,'(F10.1)')  zu(section(i,1))
1418                ENDIF
1419                coor_chr = ADJUSTL( coor_chr )
1420                coordinates = TRIM( coordinates ) // TRIM( coor_chr ) // '/'
1421
1422                i = i + 1
1423             ENDDO
1424             IF ( av == 0 )  THEN
1425                WRITE ( io, 335 )  'XY', do2d_xy, dt_do2d_xy, &
1426                                   TRIM( begin_chr ), 'k', TRIM( slices ), &
1427                                   TRIM( coordinates )
1428                IF ( skip_time_do2d_xy /= 0.0_wp )  THEN
1429                   WRITE ( io, 339 )  skip_time_do2d_xy
1430                ENDIF
1431             ELSE
1432                WRITE ( io, 342 )  'XY', do2d_xy, dt_data_output_av, &
1433                                   TRIM( begin_chr ), averaging_interval, &
1434                                   dt_averaging_input, 'k', TRIM( slices ), &
1435                                   TRIM( coordinates )
1436                IF ( skip_time_data_output_av /= 0.0_wp )  THEN
1437                   WRITE ( io, 339 )  skip_time_data_output_av
1438                ENDIF
1439             ENDIF
1440             IF ( netcdf_data_format > 4 )  THEN
1441                WRITE ( io, 352 )  ntdim_2d_xy(av)
1442             ELSE
1443                WRITE ( io, 353 )
1444             ENDIF
1445          ENDIF
1446
1447          IF ( do2d_xz /= ''  .AND.  section(1,2) /= -9999 )  THEN
1448             i = 1
1449             slices = '/'
1450             coordinates = '/'
1451!
1452!--          Building strings with index and coordinate information of the
1453!--          slices
1454             DO  WHILE ( section(i,2) /= -9999 )
1455
1456                WRITE (section_chr,'(I5)')  section(i,2)
1457                section_chr = ADJUSTL( section_chr )
1458                slices = TRIM( slices ) // TRIM( section_chr ) // '/'
1459
1460                WRITE (coor_chr,'(F10.1)')  section(i,2) * dy
1461                coor_chr = ADJUSTL( coor_chr )
1462                coordinates = TRIM( coordinates ) // TRIM( coor_chr ) // '/'
1463
1464                i = i + 1
1465             ENDDO
1466             IF ( av == 0 )  THEN
1467                WRITE ( io, 335 )  'XZ', do2d_xz, dt_do2d_xz, &
1468                                   TRIM( begin_chr ), 'j', TRIM( slices ), &
1469                                   TRIM( coordinates )
1470                IF ( skip_time_do2d_xz /= 0.0_wp )  THEN
1471                   WRITE ( io, 339 )  skip_time_do2d_xz
1472                ENDIF
1473             ELSE
1474                WRITE ( io, 342 )  'XZ', do2d_xz, dt_data_output_av, &
1475                                   TRIM( begin_chr ), averaging_interval, &
1476                                   dt_averaging_input, 'j', TRIM( slices ), &
1477                                   TRIM( coordinates )
1478                IF ( skip_time_data_output_av /= 0.0_wp )  THEN
1479                   WRITE ( io, 339 )  skip_time_data_output_av
1480                ENDIF
1481             ENDIF
1482             IF ( netcdf_data_format > 4 )  THEN
1483                WRITE ( io, 352 )  ntdim_2d_xz(av)
1484             ELSE
1485                WRITE ( io, 353 )
1486             ENDIF
1487          ENDIF
1488
1489          IF ( do2d_yz /= ''  .AND.  section(1,3) /= -9999 )  THEN
1490             i = 1
1491             slices = '/'
1492             coordinates = '/'
1493!
1494!--          Building strings with index and coordinate information of the
1495!--          slices
1496             DO  WHILE ( section(i,3) /= -9999 )
1497
1498                WRITE (section_chr,'(I5)')  section(i,3)
1499                section_chr = ADJUSTL( section_chr )
1500                slices = TRIM( slices ) // TRIM( section_chr ) // '/'
1501
1502                WRITE (coor_chr,'(F10.1)')  section(i,3) * dx
1503                coor_chr = ADJUSTL( coor_chr )
1504                coordinates = TRIM( coordinates ) // TRIM( coor_chr ) // '/'
1505
1506                i = i + 1
1507             ENDDO
1508             IF ( av == 0 )  THEN
1509                WRITE ( io, 335 )  'YZ', do2d_yz, dt_do2d_yz, &
1510                                   TRIM( begin_chr ), 'i', TRIM( slices ), &
1511                                   TRIM( coordinates )
1512                IF ( skip_time_do2d_yz /= 0.0_wp )  THEN
1513                   WRITE ( io, 339 )  skip_time_do2d_yz
1514                ENDIF
1515             ELSE
1516                WRITE ( io, 342 )  'YZ', do2d_yz, dt_data_output_av, &
1517                                   TRIM( begin_chr ), averaging_interval, &
1518                                   dt_averaging_input, 'i', TRIM( slices ), &
1519                                   TRIM( coordinates )
1520                IF ( skip_time_data_output_av /= 0.0_wp )  THEN
1521                   WRITE ( io, 339 )  skip_time_data_output_av
1522                ENDIF
1523             ENDIF
1524             IF ( netcdf_data_format > 4 )  THEN
1525                WRITE ( io, 352 )  ntdim_2d_yz(av)
1526             ELSE
1527                WRITE ( io, 353 )
1528             ENDIF
1529          ENDIF
1530
1531       ENDIF
1532
1533    ENDDO
1534
1535!
1536!-- 3d-arrays
1537    DO  av = 0, 1
1538
1539       i = 1
1540       do3d_chr = ''
1541       DO  WHILE ( do3d(av,i) /= ' ' )
1542
1543          do3d_chr = TRIM( do3d_chr ) // ' ' // TRIM( do3d(av,i) ) // ','
1544          i = i + 1
1545
1546       ENDDO
1547
1548       IF ( do3d_chr /= '' )  THEN
1549          IF ( av == 0 )  THEN
1550             WRITE ( io, 336 )  ''
1551          ELSE
1552             WRITE ( io, 336 )  '(time-averaged)'
1553          ENDIF
1554
1555          output_format = netcdf_data_format_string
1556          IF ( netcdf_deflate == 0 )  THEN
1557             WRITE ( io, 344 )  output_format
1558          ELSE
1559             WRITE ( io, 354 )  TRIM( output_format ), netcdf_deflate
1560          ENDIF
1561
1562          IF ( do3d_at_begin )  THEN
1563             begin_chr = 'and at the start'
1564          ELSE
1565             begin_chr = ''
1566          ENDIF
1567          IF ( av == 0 )  THEN
1568             WRITE ( io, 337 )  do3d_chr, dt_do3d, TRIM( begin_chr ), &
1569                                zu(nz_do3d), nz_do3d
1570          ELSE
1571             WRITE ( io, 343 )  do3d_chr, dt_data_output_av,           &
1572                                TRIM( begin_chr ), averaging_interval, &
1573                                dt_averaging_input, zu(nz_do3d), nz_do3d
1574          ENDIF
1575
1576          IF ( netcdf_data_format > 4 )  THEN
1577             WRITE ( io, 352 )  ntdim_3d(av)
1578          ELSE
1579             WRITE ( io, 353 )
1580          ENDIF
1581
1582          IF ( av == 0 )  THEN
1583             IF ( skip_time_do3d /= 0.0_wp )  THEN
1584                WRITE ( io, 339 )  skip_time_do3d
1585             ENDIF
1586          ELSE
1587             IF ( skip_time_data_output_av /= 0.0_wp )  THEN
1588                WRITE ( io, 339 )  skip_time_data_output_av
1589             ENDIF
1590          ENDIF
1591
1592       ENDIF
1593
1594    ENDDO
1595
1596!
1597!-- masked arrays
1598    IF ( masks > 0 )  WRITE ( io, 345 )  &
1599         mask_scale_x, mask_scale_y, mask_scale_z
1600    DO  mid = 1, masks
1601       DO  av = 0, 1
1602
1603          i = 1
1604          domask_chr = ''
1605          DO  WHILE ( domask(mid,av,i) /= ' ' )
1606             domask_chr = TRIM( domask_chr ) // ' ' //  &
1607                          TRIM( domask(mid,av,i) ) // ','
1608             i = i + 1
1609          ENDDO
1610
1611          IF ( domask_chr /= '' )  THEN
1612             IF ( av == 0 )  THEN
1613                WRITE ( io, 346 )  '', mid
1614             ELSE
1615                WRITE ( io, 346 )  ' (time-averaged)', mid
1616             ENDIF
1617
1618             output_format = netcdf_data_format_string
1619!--          Parallel output not implemented for mask data, hence
1620!--          output_format must be adjusted.
1621             IF ( netcdf_data_format == 5 ) output_format = 'netCDF4/HDF5'
1622             IF ( netcdf_data_format == 6 ) output_format = 'netCDF4/HDF5 classic'
1623             IF ( netcdf_deflate == 0 )  THEN
1624                WRITE ( io, 344 )  output_format
1625             ELSE
1626                WRITE ( io, 354 )  TRIM( output_format ), netcdf_deflate
1627             ENDIF
1628
1629             IF ( av == 0 )  THEN
1630                WRITE ( io, 347 )  domask_chr, dt_domask(mid)
1631             ELSE
1632                WRITE ( io, 348 )  domask_chr, dt_data_output_av, &
1633                                   averaging_interval, dt_averaging_input
1634             ENDIF
1635
1636             IF ( av == 0 )  THEN
1637                IF ( skip_time_domask(mid) /= 0.0_wp )  THEN
1638                   WRITE ( io, 339 )  skip_time_domask(mid)
1639                ENDIF
1640             ELSE
1641                IF ( skip_time_data_output_av /= 0.0_wp )  THEN
1642                   WRITE ( io, 339 )  skip_time_data_output_av
1643                ENDIF
1644             ENDIF
1645!
1646!--          output locations
1647             DO  dim = 1, 3
1648                IF ( mask(mid,dim,1) >= 0.0_wp )  THEN
1649                   count = 0
1650                   DO  WHILE ( mask(mid,dim,count+1) >= 0.0_wp )
1651                      count = count + 1
1652                   ENDDO
1653                   WRITE ( io, 349 )  dir(dim), dir(dim), mid, dir(dim), &
1654                                      mask(mid,dim,:count)
1655                ELSEIF ( mask_loop(mid,dim,1) < 0.0_wp .AND.  &
1656                         mask_loop(mid,dim,2) < 0.0_wp .AND.  &
1657                         mask_loop(mid,dim,3) == 0.0_wp )  THEN
1658                   WRITE ( io, 350 )  dir(dim), dir(dim)
1659                ELSEIF ( mask_loop(mid,dim,3) == 0.0_wp )  THEN
1660                   WRITE ( io, 351 )  dir(dim), dir(dim), mid, dir(dim), &
1661                                      mask_loop(mid,dim,1:2)
1662                ELSE
1663                   WRITE ( io, 351 )  dir(dim), dir(dim), mid, dir(dim), &
1664                                      mask_loop(mid,dim,1:3)
1665                ENDIF
1666             ENDDO
1667          ENDIF
1668
1669       ENDDO
1670    ENDDO
1671
1672!
1673!-- Timeseries
1674    IF ( dt_dots /= 9999999.9_wp )  THEN
1675       WRITE ( io, 340 )
1676
1677       output_format = netcdf_data_format_string
1678       IF ( netcdf_deflate == 0 )  THEN
1679          WRITE ( io, 344 )  output_format
1680       ELSE
1681          WRITE ( io, 354 )  TRIM( output_format ), netcdf_deflate
1682       ENDIF
1683       WRITE ( io, 341 )  dt_dots
1684    ENDIF
1685
1686#if defined( __dvrp_graphics )
1687!
1688!-- Dvrp-output
1689    IF ( dt_dvrp /= 9999999.9_wp )  THEN
1690       WRITE ( io, 360 )  dt_dvrp, TRIM( dvrp_output ), TRIM( dvrp_host ), &
1691                          TRIM( dvrp_username ), TRIM( dvrp_directory )
1692       i = 1
1693       l = 0
1694       m = 0
1695       DO WHILE ( mode_dvrp(i) /= ' ' )
1696          IF ( mode_dvrp(i)(1:10) == 'isosurface' )  THEN
1697             READ ( mode_dvrp(i), '(10X,I2)' )  j
1698             l = l + 1
1699             IF ( do3d(0,j) /= ' ' )  THEN
1700                WRITE ( io, 361 )  TRIM( do3d(0,j) ), threshold(l), &
1701                                   isosurface_color(:,l)
1702             ENDIF
1703          ELSEIF ( mode_dvrp(i)(1:6) == 'slicer' )  THEN
1704             READ ( mode_dvrp(i), '(6X,I2)' )  j
1705             m = m + 1
1706             IF ( do2d(0,j) /= ' ' )  THEN
1707                WRITE ( io, 362 )  TRIM( do2d(0,j) ), &
1708                                   slicer_range_limits_dvrp(:,m)
1709             ENDIF
1710          ELSEIF ( mode_dvrp(i)(1:9) == 'particles' )  THEN
1711             WRITE ( io, 363 )  dvrp_psize
1712             IF ( particle_dvrpsize /= 'none' )  THEN
1713                WRITE ( io, 364 )  'size', TRIM( particle_dvrpsize ), &
1714                                   dvrpsize_interval
1715             ENDIF
1716             IF ( particle_color /= 'none' )  THEN
1717                WRITE ( io, 364 )  'color', TRIM( particle_color ), &
1718                                   color_interval
1719             ENDIF
1720          ENDIF
1721          i = i + 1
1722       ENDDO
1723
1724       WRITE ( io, 365 )  groundplate_color, superelevation_x, &
1725                          superelevation_y, superelevation, clip_dvrp_l, &
1726                          clip_dvrp_r, clip_dvrp_s, clip_dvrp_n
1727
1728       IF ( TRIM( topography ) /= 'flat' )  THEN
1729          WRITE ( io, 366 )  topography_color
1730          IF ( cluster_size > 1 )  THEN
1731             WRITE ( io, 367 )  cluster_size
1732          ENDIF
1733       ENDIF
1734
1735    ENDIF
1736#endif
1737
1738!
1739!-- Spectra output
1740    IF ( dt_dosp /= 9999999.9_wp )  THEN
1741       WRITE ( io, 370 )
1742
1743       output_format = netcdf_data_format_string
1744       IF ( netcdf_deflate == 0 )  THEN
1745          WRITE ( io, 344 )  output_format
1746       ELSE
1747          WRITE ( io, 354 )  TRIM( output_format ), netcdf_deflate
1748       ENDIF
1749       WRITE ( io, 371 )  dt_dosp
1750       IF ( skip_time_dosp /= 0.0_wp )  WRITE ( io, 339 )  skip_time_dosp
1751       WRITE ( io, 372 )  ( data_output_sp(i), i = 1,10 ),     &
1752                          ( spectra_direction(i), i = 1,10 ),  &
1753                          ( comp_spectra_level(i), i = 1,100 ), &
1754                          ( plot_spectra_level(i), i = 1,100 ), &
1755                          averaging_interval_sp, dt_averaging_input_pr
1756    ENDIF
1757
1758    WRITE ( io, 99 )
1759
1760!
1761!-- Physical quantities
1762    WRITE ( io, 400 )
1763
1764!
1765!-- Geostrophic parameters
1766    IF ( radiation .AND. radiation_scheme /= 'constant' )  THEN
1767       WRITE ( io, 417 )  lambda
1768    ENDIF
1769    WRITE ( io, 410 )  phi, omega, f, fs
1770
1771!
1772!-- Other quantities
1773    WRITE ( io, 411 )  g
1774    IF ( radiation .AND. radiation_scheme /= 'constant' )  THEN
1775       WRITE ( io, 418 )  day_init, time_utc_init
1776    ENDIF
1777
1778    WRITE ( io, 412 )  TRIM( reference_state )
1779    IF ( use_single_reference_value )  THEN
1780       IF ( ocean )  THEN
1781          WRITE ( io, 413 )  prho_reference
1782       ELSE
1783          WRITE ( io, 414 )  pt_reference
1784       ENDIF
1785    ENDIF
1786
1787!
1788!-- Cloud physics parameters
1789    IF ( cloud_physics )  THEN
1790       WRITE ( io, 415 )
1791       WRITE ( io, 416 ) surface_pressure, r_d, rho_surface, cp, l_v
1792       IF ( icloud_scheme == 0 )  THEN
1793          WRITE ( io, 510 ) 1.0E-6_wp * nc_const
1794          IF ( precipitation )  WRITE ( io, 511 ) c_sedimentation
1795       ENDIF
1796    ENDIF
1797
1798!
1799!-- Cloud physcis parameters / quantities / numerical methods
1800    WRITE ( io, 430 )
1801    IF ( humidity .AND. .NOT. cloud_physics .AND. .NOT. cloud_droplets)  THEN
1802       WRITE ( io, 431 )
1803    ELSEIF ( humidity  .AND.  cloud_physics )  THEN
1804       WRITE ( io, 432 )
1805       IF ( cloud_top_radiation )  WRITE ( io, 132 )
1806       IF ( icloud_scheme == 1 )  THEN
1807          IF ( precipitation )  WRITE ( io, 133 )
1808       ELSEIF ( icloud_scheme == 0 )  THEN
1809          IF ( drizzle )  WRITE ( io, 506 )
1810          IF ( precipitation )  THEN
1811             WRITE ( io, 505 )
1812             IF ( turbulence )  WRITE ( io, 507 )
1813             IF ( ventilation_effect )  WRITE ( io, 508 )
1814             IF ( limiter_sedimentation )  WRITE ( io, 509 )
1815          ENDIF
1816       ENDIF
1817    ELSEIF ( humidity  .AND.  cloud_droplets )  THEN
1818       WRITE ( io, 433 )
1819       IF ( curvature_solution_effects )  WRITE ( io, 434 )
1820       IF ( collision_kernel /= 'none' )  THEN
1821          WRITE ( io, 435 )  TRIM( collision_kernel )
1822          IF ( collision_kernel(6:9) == 'fast' )  THEN
1823             WRITE ( io, 436 )  radius_classes, dissipation_classes
1824          ENDIF
1825       ELSE
1826          WRITE ( io, 437 )
1827       ENDIF
1828    ENDIF
1829
1830!
1831!-- LES / turbulence parameters
1832    WRITE ( io, 450 )
1833
1834!--
1835! ... LES-constants used must still be added here
1836!--
1837    IF ( constant_diffusion )  THEN
1838       WRITE ( io, 451 )  km_constant, km_constant/prandtl_number, &
1839                          prandtl_number
1840    ENDIF
1841    IF ( .NOT. constant_diffusion)  THEN
1842       IF ( e_init > 0.0_wp )  WRITE ( io, 455 )  e_init
1843       IF ( e_min > 0.0_wp )  WRITE ( io, 454 )  e_min
1844       IF ( wall_adjustment )  WRITE ( io, 453 )  wall_adjustment_factor
1845    ENDIF
1846
1847!
1848!-- Special actions during the run
1849    WRITE ( io, 470 )
1850    IF ( create_disturbances )  THEN
1851       WRITE ( io, 471 )  dt_disturb, disturbance_amplitude,                   &
1852                          zu(disturbance_level_ind_b), disturbance_level_ind_b,&
1853                          zu(disturbance_level_ind_t), disturbance_level_ind_t
1854       IF ( .NOT. bc_lr_cyc  .OR.  .NOT. bc_ns_cyc )  THEN
1855          WRITE ( io, 472 )  inflow_disturbance_begin, inflow_disturbance_end
1856       ELSE
1857          WRITE ( io, 473 )  disturbance_energy_limit
1858       ENDIF
1859       WRITE ( io, 474 )  TRIM( random_generator )
1860    ENDIF
1861    IF ( pt_surface_initial_change /= 0.0_wp )  THEN
1862       WRITE ( io, 475 )  pt_surface_initial_change
1863    ENDIF
1864    IF ( humidity  .AND.  q_surface_initial_change /= 0.0_wp )  THEN
1865       WRITE ( io, 476 )  q_surface_initial_change       
1866    ENDIF
1867    IF ( passive_scalar  .AND.  q_surface_initial_change /= 0.0_wp )  THEN
1868       WRITE ( io, 477 )  q_surface_initial_change       
1869    ENDIF
1870
1871    IF ( particle_advection )  THEN
1872!
1873!--    Particle attributes
1874       WRITE ( io, 480 )  particle_advection_start, dt_prel, bc_par_lr, &
1875                          bc_par_ns, bc_par_b, bc_par_t, particle_maximum_age, &
1876                          end_time_prel
1877       IF ( use_sgs_for_particles )  WRITE ( io, 488 )  dt_min_part
1878       IF ( random_start_position )  WRITE ( io, 481 )
1879       IF ( seed_follows_topography )  WRITE ( io, 496 )
1880       IF ( particles_per_point > 1 )  WRITE ( io, 489 )  particles_per_point
1881       WRITE ( io, 495 )  total_number_of_particles
1882       IF ( use_particle_tails  .AND.  maximum_number_of_tailpoints /= 0 )  THEN
1883          WRITE ( io, 483 )  maximum_number_of_tailpoints
1884          IF ( minimum_tailpoint_distance /= 0 )  THEN
1885             WRITE ( io, 484 )  total_number_of_tails,      &
1886                                minimum_tailpoint_distance, &
1887                                maximum_tailpoint_age
1888          ENDIF
1889       ENDIF
1890       IF ( dt_write_particle_data /= 9999999.9_wp )  THEN
1891          WRITE ( io, 485 )  dt_write_particle_data
1892          IF ( netcdf_data_format > 1 )  THEN
1893             output_format = 'netcdf (64 bit offset) and binary'
1894          ELSE
1895             output_format = 'netcdf and binary'
1896          ENDIF
1897          IF ( netcdf_deflate == 0 )  THEN
1898             WRITE ( io, 344 )  output_format
1899          ELSE
1900             WRITE ( io, 354 )  TRIM( output_format ), netcdf_deflate
1901          ENDIF
1902       ENDIF
1903       IF ( dt_dopts /= 9999999.9_wp )  WRITE ( io, 494 )  dt_dopts
1904       IF ( write_particle_statistics )  WRITE ( io, 486 )
1905
1906       WRITE ( io, 487 )  number_of_particle_groups
1907
1908       DO  i = 1, number_of_particle_groups
1909          IF ( i == 1  .AND.  density_ratio(i) == 9999999.9_wp )  THEN
1910             WRITE ( io, 490 )  i, 0.0_wp
1911             WRITE ( io, 492 )
1912          ELSE
1913             WRITE ( io, 490 )  i, radius(i)
1914             IF ( density_ratio(i) /= 0.0_wp )  THEN
1915                WRITE ( io, 491 )  density_ratio(i)
1916             ELSE
1917                WRITE ( io, 492 )
1918             ENDIF
1919          ENDIF
1920          WRITE ( io, 493 )  psl(i), psr(i), pss(i), psn(i), psb(i), pst(i), &
1921                             pdx(i), pdy(i), pdz(i)
1922          IF ( .NOT. vertical_particle_advection(i) )  WRITE ( io, 482 )
1923       ENDDO
1924
1925    ENDIF
1926
1927
1928!
1929!-- Parameters of 1D-model
1930    IF ( INDEX( initializing_actions, 'set_1d-model_profiles' ) /= 0 )  THEN
1931       WRITE ( io, 500 )  end_time_1d, dt_run_control_1d, dt_pr_1d, &
1932                          mixing_length_1d, dissipation_1d
1933       IF ( damp_level_ind_1d /= nzt+1 )  THEN
1934          WRITE ( io, 502 )  zu(damp_level_ind_1d), damp_level_ind_1d
1935       ENDIF
1936    ENDIF
1937
1938!
1939!-- User-defined information
1940    CALL user_header( io )
1941
1942    WRITE ( io, 99 )
1943
1944!
1945!-- Write buffer contents to disc immediately
1946    CALL local_flush( io )
1947
1948!
1949!-- Here the FORMATs start
1950
1951 99 FORMAT (1X,78('-'))
1952100 FORMAT (/1X,'******************************',4X,44('-')/        &
1953            1X,'* ',A,' *',4X,A/                               &
1954            1X,'******************************',4X,44('-'))
1955101 FORMAT (35X,'coupled run using MPI-',I1,': ',A/ &
1956            35X,42('-'))
1957102 FORMAT (/' Date:                 ',A8,4X,'Run:       ',A20/      &
1958            ' Time:                 ',A8,4X,'Run-No.:   ',I2.2/     &
1959            ' Run on host:        ',A10)
1960#if defined( __parallel )
1961103 FORMAT (' Number of PEs:',10X,I6,4X,'Processor grid (x,y): (',I4,',',I4, &
1962              ')',1X,A)
1963104 FORMAT (' Number of PEs:',10X,I6,4X,'Tasks:',I4,'   threads per task:',I4/ &
1964              35X,'Processor grid (x,y): (',I4,',',I4,')',1X,A)
1965105 FORMAT (35X,'One additional PE is used to handle'/37X,'the dvrp output!')
1966106 FORMAT (35X,'A 1d-decomposition along x is forced'/ &
1967            35X,'because the job is running on an SMP-cluster')
1968107 FORMAT (35X,'A 1d-decomposition along ',A,' is used')
1969108 FORMAT (35X,'Max. # of parallel I/O streams is ',I5)
1970109 FORMAT (35X,'Precursor run for coupled atmos-ocean run'/ &
1971            35X,42('-'))
1972114 FORMAT (35X,'Coupled atmosphere-ocean run following'/ &
1973            35X,'independent precursor runs'/             &
1974            35X,42('-'))
1975117 FORMAT (' Accelerator boards / node:  ',I2)
1976#endif
1977110 FORMAT (/' Numerical Schemes:'/ &
1978             ' -----------------'/)
1979111 FORMAT (' --> Solve perturbation pressure via FFT using ',A,' routines')
1980112 FORMAT (' --> Solve perturbation pressure via SOR-Red/Black-Schema'/ &
1981            '     Iterations (initial/other): ',I3,'/',I3,'  omega =',F6.3)
1982113 FORMAT (' --> Momentum advection via Piascek-Williams-Scheme (Form C3)', &
1983                  ' or Upstream')
1984115 FORMAT ('     FFT and transpositions are overlapping')
1985116 FORMAT (' --> Scalar advection via Piascek-Williams-Scheme (Form C3)', &
1986                  ' or Upstream')
1987118 FORMAT (' --> Scalar advection via Bott-Chlond-Scheme')
1988119 FORMAT (' --> Galilei-Transform applied to horizontal advection:'/ &
1989            '     translation velocity = ',A/ &
1990            '     distance advected ',A,':  ',F8.3,' km(x)  ',F8.3,' km(y)')
1991120 FORMAT (' Accelerator boards: ',8X,I2)
1992122 FORMAT (' --> Time differencing scheme: ',A)
1993123 FORMAT (' --> Rayleigh-Damping active, starts ',A,' z = ',F8.2,' m'/ &
1994            '     maximum damping coefficient:',F6.3, ' 1/s')
1995129 FORMAT (' --> Additional prognostic equation for the specific humidity')
1996130 FORMAT (' --> Additional prognostic equation for the total water content')
1997131 FORMAT (' --> No pt-equation solved. Neutral stratification with pt = ', &
1998                  F6.2, ' K assumed')
1999132 FORMAT ('     Parameterization of long-wave radiation processes via'/ &
2000            '     effective emissivity scheme')
2001133 FORMAT ('     Precipitation parameterization via Kessler-Scheme')
2002134 FORMAT (' --> Additional prognostic equation for a passive scalar')
2003135 FORMAT (' --> Solve perturbation pressure via ',A,' method (', &
2004                  A,'-cycle)'/ &
2005            '     number of grid levels:                   ',I2/ &
2006            '     Gauss-Seidel red/black iterations:       ',I2)
2007136 FORMAT ('     gridpoints of coarsest subdomain (x,y,z): (',I3,',',I3,',', &
2008                  I3,')')
2009137 FORMAT ('     level data gathered on PE0 at level:     ',I2/ &
2010            '     gridpoints of coarsest subdomain (x,y,z): (',I3,',',I3,',', &
2011                  I3,')'/ &
2012            '     gridpoints of coarsest domain (x,y,z):    (',I3,',',I3,',', &
2013                  I3,')')
2014139 FORMAT (' --> Loop optimization method: ',A)
2015140 FORMAT ('     maximum residual allowed:                ',E10.3)
2016141 FORMAT ('     fixed number of multigrid cycles:        ',I4)
2017142 FORMAT ('     perturbation pressure is calculated at every Runge-Kutta ', &
2018                  'step')
2019143 FORMAT ('     Euler/upstream scheme is used for the SGS turbulent ', &
2020                  'kinetic energy')
2021144 FORMAT ('     masking method is used')
2022150 FORMAT (' --> Volume flow at the right and north boundary will be ', &
2023                  'conserved'/ &
2024            '     using the ',A,' mode')
2025151 FORMAT ('     with u_bulk = ',F7.3,' m/s and v_bulk = ',F7.3,' m/s')
2026152 FORMAT (' --> External pressure gradient directly prescribed by the user:',&
2027           /'     ',2(1X,E12.5),'Pa/m in x/y direction', &
2028           /'     starting from dp_level_b =', F8.3, 'm', A /)
2029160 FORMAT (//' Large scale forcing and nudging:'/ &
2030              ' -------------------------------'/)
2031161 FORMAT (' --> No large scale forcing from external is used (default) ')
2032162 FORMAT (' --> Large scale forcing from external file LSF_DATA is used: ')
2033163 FORMAT ('     - large scale advection tendencies ')
2034164 FORMAT ('     - large scale subsidence velocity w_subs ')
2035165 FORMAT ('     - large scale subsidence tendencies ')
2036167 FORMAT ('     - and geostrophic wind components ug and vg')
2037168 FORMAT (' --> Large-scale vertical motion is used in the ', &
2038                  'prognostic equation(s) for')
2039169 FORMAT ('     the scalar(s) only')
2040170 FORMAT (' --> Nudging is used')
2041171 FORMAT (' --> No nudging is used (default) ')
2042180 FORMAT ('     - prescribed surface values for temperature')
2043181 FORMAT ('     - prescribed surface fluxes for temperature')
2044182 FORMAT ('     - prescribed surface values for humidity')
2045183 FORMAT ('     - prescribed surface fluxes for humidity')
2046200 FORMAT (//' Run time and time step information:'/ &
2047             ' ----------------------------------'/)
2048201 FORMAT ( ' Timestep:             variable     maximum value: ',F6.3,' s', &
2049             '    CFL-factor:',F5.2)
2050202 FORMAT ( ' Timestep:          dt = ',F6.3,' s'/)
2051203 FORMAT ( ' Start time:          ',F9.3,' s'/ &
2052             ' End time:            ',F9.3,' s')
2053204 FORMAT ( A,F9.3,' s')
2054205 FORMAT ( A,F9.3,' s',5X,'restart every',17X,F9.3,' s')
2055206 FORMAT (/' Time reached:        ',F9.3,' s'/ &
2056             ' CPU-time used:       ',F9.3,' s     per timestep:               ', &
2057               '  ',F9.3,' s'/                                                    &
2058             '                                      per second of simulated tim', &
2059               'e: ',F9.3,' s')
2060207 FORMAT ( ' Coupling start time: ',F9.3,' s')
2061250 FORMAT (//' Computational grid and domain size:'/ &
2062              ' ----------------------------------'// &
2063              ' Grid length:      dx =    ',F7.3,' m    dy =    ',F7.3, &
2064              ' m    dz =    ',F7.3,' m'/ &
2065              ' Domain size:       x = ',F10.3,' m     y = ',F10.3, &
2066              ' m  z(u) = ',F10.3,' m'/)
2067252 FORMAT (' dz constant up to ',F10.3,' m (k=',I4,'), then stretched by', &
2068              ' factor:',F6.3/ &
2069            ' maximum dz not to be exceeded is dz_max = ',F10.3,' m'/)
2070254 FORMAT (' Number of gridpoints (x,y,z):  (0:',I4,', 0:',I4,', 0:',I4,')'/ &
2071            ' Subdomain size (x,y,z):        (  ',I4,',   ',I4,',   ',I4,')'/)
2072260 FORMAT (/' The model has a slope in x-direction. Inclination angle: ',F6.2,&
2073             ' degrees')
2074270 FORMAT (//' Topography information:'/ &
2075              ' ----------------------'// &
2076              1X,'Topography: ',A)
2077271 FORMAT (  ' Building size (x/y/z) in m: ',F5.1,' / ',F5.1,' / ',F5.1/ &
2078              ' Horizontal index bounds (l/r/s/n): ',I4,' / ',I4,' / ',I4, &
2079                ' / ',I4)
2080272 FORMAT (  ' Single quasi-2D street canyon of infinite length in ',A, &
2081              ' direction' / &
2082              ' Canyon height: ', F6.2, 'm, ch = ', I4, '.'      / &
2083              ' Canyon position (',A,'-walls): cxl = ', I4,', cxr = ', I4, '.')
2084278 FORMAT (' Topography grid definition convention:'/ &
2085            ' cell edge (staggered grid points'/  &
2086            ' (u in x-direction, v in y-direction))' /)
2087279 FORMAT (' Topography grid definition convention:'/ &
2088            ' cell center (scalar grid points)' /)
2089280 FORMAT (//' Vegetation canopy (drag) model:'/ &
2090              ' ------------------------------'// &
2091              ' Canopy mode: ', A / &
2092              ' Canopy height: ',F6.2,'m (',I4,' grid points)' / &
2093              ' Leaf drag coefficient: ',F6.2 /)
2094281 FORMAT (/ ' Scalar exchange coefficient: ',F6.2 / &
2095              ' Scalar concentration at leaf surfaces in kg/m**3: ',F6.2 /)
2096282 FORMAT (' Predefined constant heatflux at the top of the vegetation: ',F6.2,' K m/s')
2097283 FORMAT (/ ' Characteristic levels of the leaf area density:'// &
2098              ' Height:              ',A,'  m'/ &
2099              ' Leaf area density:   ',A,'  m**2/m**3'/ &
2100              ' Gradient:            ',A,'  m**2/m**4'/ &
2101              ' Gridpoint:           ',A)
2102284 FORMAT (//' Characteristic levels of the leaf area density and coefficients:'// &
2103              ' Height:              ',A,'  m'/ &
2104              ' Leaf area density:   ',A,'  m**2/m**3'/ &
2105              ' Coefficient alpha: ',F6.2 / &
2106              ' Coefficient beta: ',F6.2 / &
2107              ' Leaf area index: ',F6.2,'  m**2/m**2' /)
2108               
2109300 FORMAT (//' Boundary conditions:'/ &
2110             ' -------------------'// &
2111             '                     p                    uv             ', &
2112             '                     pt'// &
2113             ' B. bound.: ',A/ &
2114             ' T. bound.: ',A)
2115301 FORMAT (/'                     ',A// &
2116             ' B. bound.: ',A/ &
2117             ' T. bound.: ',A)
2118303 FORMAT (/' Bottom surface fluxes are used in diffusion terms at k=1')
2119304 FORMAT (/' Top surface fluxes are used in diffusion terms at k=nzt')
2120305 FORMAT (//'    Prandtl-Layer between bottom surface and first ', &
2121               'computational u,v-level:'// &
2122             '       zp = ',F6.2,' m   z0 =',F7.4,' m   z0h =',F8.5,&
2123             ' m   kappa =',F5.2/ &
2124             '       Rif value range:   ',F8.2,' <= rif <=',F6.2)
2125306 FORMAT ('       Predefined constant heatflux:   ',F9.6,' K m/s')
2126307 FORMAT ('       Heatflux has a random normal distribution')
2127308 FORMAT ('       Predefined surface temperature')
2128309 FORMAT ('       Predefined constant salinityflux:   ',F9.6,' psu m/s')
2129310 FORMAT (//'    1D-Model:'// &
2130             '       Rif value range:   ',F6.2,' <= rif <=',F6.2)
2131311 FORMAT ('       Predefined constant humidity flux: ',E10.3,' m/s')
2132312 FORMAT ('       Predefined surface humidity')
2133313 FORMAT ('       Predefined constant scalar flux: ',E10.3,' kg/(m**2 s)')
2134314 FORMAT ('       Predefined scalar value at the surface')
2135315 FORMAT ('       Humidity / scalar flux at top surface is 0.0')
2136316 FORMAT ('       Sensible heatflux and momentum flux from coupled ', &
2137                    'atmosphere model')
2138317 FORMAT (//' Lateral boundaries:'/ &
2139            '       left/right:  ',A/    &
2140            '       north/south: ',A)
2141318 FORMAT (/'       use_cmax: ',L1 / &
2142            '       pt damping layer width = ',F8.2,' m, pt ', &
2143                    'damping factor =',F7.4)
2144319 FORMAT ('       turbulence recycling at inflow switched on'/ &
2145            '       width of recycling domain: ',F7.1,' m   grid index: ',I4/ &
2146            '       inflow damping height: ',F6.1,' m   width: ',F6.1,' m')
2147320 FORMAT ('       Predefined constant momentumflux:  u: ',F9.6,' m**2/s**2'/ &
2148            '                                          v: ',F9.6,' m**2/s**2')
2149321 FORMAT (//' Initial profiles:'/ &
2150              ' ----------------')
2151322 FORMAT ('       turbulence recycling at inflow switched on'/ &
2152            '       y shift of the recycled inflow turbulence switched on'/ &
2153            '       width of recycling domain: ',F7.1,' m   grid index: ',I4/ &
2154            '       inflow damping height: ',F6.1,' m   width: ',F6.1,' m'/)
2155325 FORMAT (//' List output:'/ &
2156             ' -----------'//  &
2157            '    1D-Profiles:'/    &
2158            '       Output every             ',F8.2,' s')
2159326 FORMAT ('       Time averaged over       ',F8.2,' s'/ &
2160            '       Averaging input every    ',F8.2,' s')
2161330 FORMAT (//' Data output:'/ &
2162             ' -----------'/)
2163331 FORMAT (/'    1D-Profiles:')
2164332 FORMAT (/'       ',A)
2165333 FORMAT ('       Output every             ',F8.2,' s',/ &
2166            '       Time averaged over       ',F8.2,' s'/ &
2167            '       Averaging input every    ',F8.2,' s')
2168334 FORMAT (/'    2D-Arrays',A,':')
2169335 FORMAT (/'       ',A2,'-cross-section  Arrays: ',A/ &
2170            '       Output every             ',F8.2,' s  ',A/ &
2171            '       Cross sections at ',A1,' = ',A/ &
2172            '       scalar-coordinates:   ',A,' m'/)
2173336 FORMAT (/'    3D-Arrays',A,':')
2174337 FORMAT (/'       Arrays: ',A/ &
2175            '       Output every             ',F8.2,' s  ',A/ &
2176            '       Upper output limit at    ',F8.2,' m  (GP ',I4,')'/)
2177339 FORMAT ('       No output during initial ',F8.2,' s')
2178340 FORMAT (/'    Time series:')
2179341 FORMAT ('       Output every             ',F8.2,' s'/)
2180342 FORMAT (/'       ',A2,'-cross-section  Arrays: ',A/ &
2181            '       Output every             ',F8.2,' s  ',A/ &
2182            '       Time averaged over       ',F8.2,' s'/ &
2183            '       Averaging input every    ',F8.2,' s'/ &
2184            '       Cross sections at ',A1,' = ',A/ &
2185            '       scalar-coordinates:   ',A,' m'/)
2186343 FORMAT (/'       Arrays: ',A/ &
2187            '       Output every             ',F8.2,' s  ',A/ &
2188            '       Time averaged over       ',F8.2,' s'/ &
2189            '       Averaging input every    ',F8.2,' s'/ &
2190            '       Upper output limit at    ',F8.2,' m  (GP ',I4,')'/)
2191344 FORMAT ('       Output format: ',A/)
2192345 FORMAT (/'    Scaling lengths for output locations of all subsequent mask IDs:',/ &
2193            '       mask_scale_x (in x-direction): ',F9.3, ' m',/ &
2194            '       mask_scale_y (in y-direction): ',F9.3, ' m',/ &
2195            '       mask_scale_z (in z-direction): ',F9.3, ' m' )
2196346 FORMAT (/'    Masked data output',A,' for mask ID ',I2, ':')
2197347 FORMAT ('       Variables: ',A/ &
2198            '       Output every             ',F8.2,' s')
2199348 FORMAT ('       Variables: ',A/ &
2200            '       Output every             ',F8.2,' s'/ &
2201            '       Time averaged over       ',F8.2,' s'/ &
2202            '       Averaging input every    ',F8.2,' s')
2203349 FORMAT (/'       Output locations in ',A,'-direction in multiples of ', &
2204            'mask_scale_',A,' predefined by array mask_',I2.2,'_',A,':'/ &
2205            13('       ',8(F8.2,',')/) )
2206350 FORMAT (/'       Output locations in ',A,'-direction: ', &
2207            'all gridpoints along ',A,'-direction (default).' )
2208351 FORMAT (/'       Output locations in ',A,'-direction in multiples of ', &
2209            'mask_scale_',A,' constructed from array mask_',I2.2,'_',A,'_loop:'/ &
2210            '          loop begin:',F8.2,', end:',F8.2,', stride:',F8.2 )
2211352 FORMAT  (/'       Number of output time levels allowed: ',I3 /)
2212353 FORMAT  (/'       Number of output time levels allowed: unlimited' /)
2213354 FORMAT ('       Output format: ',A, '   compressed with level: ',I1/)
2214#if defined( __dvrp_graphics )
2215360 FORMAT ('    Plot-Sequence with dvrp-software:'/ &
2216            '       Output every      ',F7.1,' s'/ &
2217            '       Output mode:      ',A/ &
2218            '       Host / User:      ',A,' / ',A/ &
2219            '       Directory:        ',A// &
2220            '       The sequence contains:')
2221361 FORMAT (/'       Isosurface of "',A,'"    Threshold value: ', E12.3/ &
2222            '          Isosurface color: (',F4.2,',',F4.2,',',F4.2,') (R,G,B)')
2223362 FORMAT (/'       Slicer plane ',A/ &
2224            '       Slicer limits: [',F6.2,',',F6.2,']')
2225363 FORMAT (/'       Particles'/ &
2226            '          particle size:  ',F7.2,' m')
2227364 FORMAT ('          particle ',A,' controlled by "',A,'" with interval [', &
2228                       F6.2,',',F6.2,']')
2229365 FORMAT (/'       Groundplate color: (',F4.2,',',F4.2,',',F4.2,') (R,G,B)'/ &
2230            '       Superelevation along (x,y,z): (',F4.1,',',F4.1,',',F4.1, &
2231                     ')'/ &
2232            '       Clipping limits: from x = ',F9.1,' m to x = ',F9.1,' m'/ &
2233            '                        from y = ',F9.1,' m to y = ',F9.1,' m')
2234366 FORMAT (/'       Topography color: (',F4.2,',',F4.2,',',F4.2,') (R,G,B)')
2235367 FORMAT ('       Polygon reduction for topography: cluster_size = ', I1)
2236#endif
2237370 FORMAT ('    Spectra:')
2238371 FORMAT ('       Output every ',F7.1,' s'/)
2239372 FORMAT ('       Arrays:     ', 10(A5,',')/                         &
2240            '       Directions: ', 10(A5,',')/                         &
2241            '       height levels  k = ', 20(I3,',')/                  &
2242            '                          ', 20(I3,',')/                  &
2243            '                          ', 20(I3,',')/                  &
2244            '                          ', 20(I3,',')/                  &
2245            '                          ', 19(I3,','),I3,'.'/           &
2246            '       height levels selected for standard plot:'/        &
2247            '                      k = ', 20(I3,',')/                  &
2248            '                          ', 20(I3,',')/                  &
2249            '                          ', 20(I3,',')/                  &
2250            '                          ', 20(I3,',')/                  &
2251            '                          ', 19(I3,','),I3,'.'/           &
2252            '       Time averaged over ', F7.1, ' s,' /                &
2253            '       Profiles for the time averaging are taken every ', &
2254                    F6.1,' s')
2255400 FORMAT (//' Physical quantities:'/ &
2256              ' -------------------'/)
2257410 FORMAT ('    Geograph. latitude  :   phi    = ',F4.1,' degr'/   &
2258            '    Angular velocity    :   omega  =',E10.3,' rad/s'/  &
2259            '    Coriolis parameter  :   f      = ',F9.6,' 1/s'/    &
2260            '                            f*     = ',F9.6,' 1/s')
2261411 FORMAT (/'    Gravity             :   g      = ',F4.1,' m/s**2')
2262412 FORMAT (/'    Reference state used in buoyancy terms: ',A)
2263413 FORMAT ('       Reference density in buoyancy terms: ',F8.3,' kg/m**3')
2264414 FORMAT ('       Reference temperature in buoyancy terms: ',F8.4,' K')
2265415 FORMAT (/' Cloud physics parameters:'/ &
2266             ' ------------------------'/)
2267416 FORMAT ('    Surface pressure   :   p_0   = ',F7.2,' hPa'/      &
2268            '    Gas constant       :   R     = ',F5.1,' J/(kg K)'/ &
2269            '    Density of air     :   rho_0 =',F6.3,' kg/m**3'/  &
2270            '    Specific heat cap. :   c_p   = ',F6.1,' J/(kg K)'/ &
2271            '    Vapourization heat :   L_v   =',E9.2,' J/kg')
2272417 FORMAT ('    Geograph. longitude :   lambda = ',F4.1,' degr')
2273418 FORMAT (/'    Day of the year at model start :   day_init      =     ',I3 &
2274            /'    UTC time at model start        :   time_utc_init = ',F7.1' s')
2275419 FORMAT (//' Land surface model information:'/ &
2276              ' ------------------------------'/)
2277420 FORMAT (/'    Characteristic levels of the initial temperature profile:'// &
2278            '       Height:        ',A,'  m'/ &
2279            '       Temperature:   ',A,'  K'/ &
2280            '       Gradient:      ',A,'  K/100m'/ &
2281            '       Gridpoint:     ',A)
2282421 FORMAT (/'    Characteristic levels of the initial humidity profile:'// &
2283            '       Height:      ',A,'  m'/ &
2284            '       Humidity:    ',A,'  kg/kg'/ &
2285            '       Gradient:    ',A,'  (kg/kg)/100m'/ &
2286            '       Gridpoint:   ',A)
2287422 FORMAT (/'    Characteristic levels of the initial scalar profile:'// &
2288            '       Height:                  ',A,'  m'/ &
2289            '       Scalar concentration:    ',A,'  kg/m**3'/ &
2290            '       Gradient:                ',A,'  (kg/m**3)/100m'/ &
2291            '       Gridpoint:               ',A)
2292423 FORMAT (/'    Characteristic levels of the geo. wind component ug:'// &
2293            '       Height:      ',A,'  m'/ &
2294            '       ug:          ',A,'  m/s'/ &
2295            '       Gradient:    ',A,'  1/100s'/ &
2296            '       Gridpoint:   ',A)
2297424 FORMAT (/'    Characteristic levels of the geo. wind component vg:'// &
2298            '       Height:      ',A,'  m'/ &
2299            '       vg:          ',A,'  m/s'/ &
2300            '       Gradient:    ',A,'  1/100s'/ &
2301            '       Gridpoint:   ',A)
2302425 FORMAT (/'    Characteristic levels of the initial salinity profile:'// &
2303            '       Height:     ',A,'  m'/ &
2304            '       Salinity:   ',A,'  psu'/ &
2305            '       Gradient:   ',A,'  psu/100m'/ &
2306            '       Gridpoint:  ',A)
2307426 FORMAT (/'    Characteristic levels of the subsidence/ascent profile:'// &
2308            '       Height:      ',A,'  m'/ &
2309            '       w_subs:      ',A,'  m/s'/ &
2310            '       Gradient:    ',A,'  (m/s)/100m'/ &
2311            '       Gridpoint:   ',A)
2312427 FORMAT (/'    Initial wind profiles (u,v) are interpolated from given'// &
2313                  ' profiles')
2314428 FORMAT (/'    Initial profiles (u, v, pt, q) are taken from file '/ &
2315             '    NUDGING_DATA')
2316430 FORMAT (//' Cloud physics quantities / methods:'/ &
2317              ' ----------------------------------'/)
2318431 FORMAT ('    Humidity is treated as purely passive scalar (no condensati', &
2319                 'on)')
2320432 FORMAT ('    Bulk scheme with liquid water potential temperature and'/ &
2321            '    total water content is used.'/ &
2322            '    Condensation is parameterized via 0% - or 100% scheme.')
2323433 FORMAT ('    Cloud droplets treated explicitly using the Lagrangian part', &
2324                 'icle model')
2325434 FORMAT ('    Curvature and solution effecs are considered for growth of', &
2326                 ' droplets < 1.0E-6 m')
2327435 FORMAT ('    Droplet collision is handled by ',A,'-kernel')
2328436 FORMAT ('       Fast kernel with fixed radius- and dissipation classes ', &
2329                    'are used'/ &
2330            '          number of radius classes:       ',I3,'    interval ', &
2331                       '[1.0E-6,2.0E-4] m'/ &
2332            '          number of dissipation classes:   ',I2,'    interval ', &
2333                       '[0,1000] cm**2/s**3')
2334437 FORMAT ('    Droplet collision is switched off')
2335438 FORMAT (' --> Land surface type  : ',A,/ &
2336            ' --> Soil porosity type : ',A)
2337439 FORMAT (/'    Initial soil temperature and moisture profile:'// &
2338            '       Height:        ',A,'  m'/ &
2339            '       Temperature:   ',A,'  K'/ &
2340            '       Moisture:      ',A,'  m**3/m**3'/ &
2341            '       Root fraction: ',A,'  '/ &
2342            '       Gridpoint:     ',A)
2343440 FORMAT (/' --> Dewfall is allowed (default)')
2344441 FORMAT (' --> Dewfall is inhibited')
2345442 FORMAT (' --> Soil bottom is closed (water content is conserved, default)')
2346443 FORMAT (' --> Soil bottom is open (water content is not conserved)')
2347444 FORMAT (//' Radiation model information:'/                                 &
2348              ' ----------------------------'/)
2349445 FORMAT (' --> Using constant net radiation: net_radiation = ', F6.2, '  W/m**2')
2350446 FORMAT (' --> Simple radiation scheme for clear sky is used (no clouds,',  &
2351                   ' default)')
2352447 FORMAT (' --> RRTMG scheme is used')
2353448 FORMAT (/'     User-specific surface albedo: albedo =', F6.3)
2354449 FORMAT  ('     Timestep: dt_radiation = ', F5.2, '  s')
2355
2356450 FORMAT (//' LES / Turbulence quantities:'/ &
2357              ' ---------------------------'/)
2358451 FORMAT ('    Diffusion coefficients are constant:'/ &
2359            '    Km = ',F6.2,' m**2/s   Kh = ',F6.2,' m**2/s   Pr = ',F5.2)
2360453 FORMAT ('    Mixing length is limited to',F5.2,' * z')
2361454 FORMAT ('    TKE is not allowed to fall below ',E9.2,' (m/s)**2')
2362455 FORMAT ('    initial TKE is prescribed as ',E9.2,' (m/s)**2')
2363456 FORMAT (/'    Albedo is set for land surface type: ', A)
2364457 FORMAT (/'    --> Albedo is fixed during the run')
2365458 FORMAT (/'    --> Longwave radiation is disabled')
2366459 FORMAT (/'    --> Shortwave radiation is disabled.')
2367470 FORMAT (//' Actions during the simulation:'/ &
2368              ' -----------------------------'/)
2369471 FORMAT ('    Disturbance impulse (u,v) every :   ',F6.2,' s'/            &
2370            '    Disturbance amplitude           :    ',F5.2, ' m/s'/       &
2371            '    Lower disturbance level         : ',F8.2,' m (GP ',I4,')'/  &
2372            '    Upper disturbance level         : ',F8.2,' m (GP ',I4,')')
2373472 FORMAT ('    Disturbances continued during the run from i/j =',I4, &
2374                 ' to i/j =',I4)
2375473 FORMAT ('    Disturbances cease as soon as the disturbance energy exceeds',&
2376                 F6.3, ' m**2/s**2')
2377474 FORMAT ('    Random number generator used    : ',A/)
2378475 FORMAT ('    The surface temperature is increased (or decreased, ', &
2379                 'respectively, if'/ &
2380            '    the value is negative) by ',F5.2,' K at the beginning of the',&
2381                 ' 3D-simulation'/)
2382476 FORMAT ('    The surface humidity is increased (or decreased, ',&
2383                 'respectively, if the'/ &
2384            '    value is negative) by ',E8.1,' kg/kg at the beginning of', &
2385                 ' the 3D-simulation'/)
2386477 FORMAT ('    The scalar value is increased at the surface (or decreased, ',&
2387                 'respectively, if the'/ &
2388            '    value is negative) by ',E8.1,' kg/m**3 at the beginning of', &
2389                 ' the 3D-simulation'/)
2390480 FORMAT ('    Particles:'/ &
2391            '    ---------'// &
2392            '       Particle advection is active (switched on at t = ', F7.1, &
2393                    ' s)'/ &
2394            '       Start of new particle generations every  ',F6.1,' s'/ &
2395            '       Boundary conditions: left/right: ', A, ' north/south: ', A/&
2396            '                            bottom:     ', A, ' top:         ', A/&
2397            '       Maximum particle age:                 ',F9.1,' s'/ &
2398            '       Advection stopped at t = ',F9.1,' s'/)
2399481 FORMAT ('       Particles have random start positions'/)
2400482 FORMAT ('          Particles are advected only horizontally'/)
2401483 FORMAT ('       Particles have tails with a maximum of ',I3,' points')
2402484 FORMAT ('            Number of tails of the total domain: ',I10/ &
2403            '            Minimum distance between tailpoints: ',F8.2,' m'/ &
2404            '            Maximum age of the end of the tail:  ',F8.2,' s')
2405485 FORMAT ('       Particle data are written on file every ', F9.1, ' s')
2406486 FORMAT ('       Particle statistics are written on file'/)
2407487 FORMAT ('       Number of particle groups: ',I2/)
2408488 FORMAT ('       SGS velocity components are used for particle advection'/ &
2409            '          minimum timestep for advection:', F8.5/)
2410489 FORMAT ('       Number of particles simultaneously released at each ', &
2411                    'point: ', I5/)
2412490 FORMAT ('       Particle group ',I2,':'/ &
2413            '          Particle radius: ',E10.3, 'm')
2414491 FORMAT ('          Particle inertia is activated'/ &
2415            '             density_ratio (rho_fluid/rho_particle) =',F6.3/)
2416492 FORMAT ('          Particles are advected only passively (no inertia)'/)
2417493 FORMAT ('          Boundaries of particle source: x:',F8.1,' - ',F8.1,' m'/&
2418            '                                         y:',F8.1,' - ',F8.1,' m'/&
2419            '                                         z:',F8.1,' - ',F8.1,' m'/&
2420            '          Particle distances:  dx = ',F8.1,' m  dy = ',F8.1, &
2421                       ' m  dz = ',F8.1,' m'/)
2422494 FORMAT ('       Output of particle time series in NetCDF format every ', &
2423                    F8.2,' s'/)
2424495 FORMAT ('       Number of particles in total domain: ',I10/)
2425496 FORMAT ('       Initial vertical particle positions are interpreted ', &
2426                    'as relative to the given topography')
2427500 FORMAT (//' 1D-Model parameters:'/                           &
2428              ' -------------------'//                           &
2429            '    Simulation time:                   ',F8.1,' s'/ &
2430            '    Run-controll output every:         ',F8.1,' s'/ &
2431            '    Vertical profile output every:     ',F8.1,' s'/ &
2432            '    Mixing length calculation:         ',A/         &
2433            '    Dissipation calculation:           ',A/)
2434502 FORMAT ('    Damping layer starts from ',F7.1,' m (GP ',I4,')'/)
2435503 FORMAT (' --> Momentum advection via Wicker-Skamarock-Scheme 5th order')
2436504 FORMAT (' --> Scalar advection via Wicker-Skamarock-Scheme 5th order')
2437505 FORMAT ('    Precipitation parameterization via Seifert-Beheng-Scheme')
2438506 FORMAT ('    Drizzle parameterization via Stokes law')
2439507 FORMAT ('    Turbulence effects on precipitation process')
2440508 FORMAT ('    Ventilation effects on evaporation of rain drops')
2441509 FORMAT ('    Slope limiter used for sedimentation process')
2442510 FORMAT ('    Droplet density    :   N_c   = ',F6.1,' 1/cm**3')
2443511 FORMAT ('    Sedimentation Courant number:                  '/&
2444            '                               C_s   =',F4.1,'        ')
2445512 FORMAT (/' Date:                 ',A8,6X,'Run:       ',A20/      &
2446            ' Time:                 ',A8,6X,'Run-No.:   ',I2.2/     &
2447            ' Run on host:        ',A10,6X,'En-No.:    ',I2.2)
2448513 FORMAT (' --> Scalar advection via Wicker-Skamarock-Scheme 5th order ' // & 
2449            '+ monotonic adjustment')
2450600 FORMAT (/' Nesting informations:'/                                        &
2451            ' Nest id / name:                   ',I2.2,' / ',A,' (parent id: ',I2.2,')'/ &
2452            ' Nesting mode:                     ',A/ &
2453            ' Lower left corner coordinates:    ','x = ',F8.2,' m, y = ',F8.2,' m'/)
2454
2455 END SUBROUTINE header
Note: See TracBrowser for help on using the repository browser.