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

Last change on this file since 2305 was 2300, checked in by raasch, 7 years ago

NEC related code partly removed, host variable partly removed, host specific code completely removed, default values for host, loop_optimization and termination time_needed changed

  • Property svn:keywords set to Id
File size: 90.4 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
6! terms of the GNU General Public License as published by the Free Software
7! Foundation, either version 3 of the License, or (at your option) any later
8! version.
9!
10! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
11! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
12! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
13!
14! You should have received a copy of the GNU General Public License along with
15! PALM. If not, see <http://www.gnu.org/licenses/>.
16!
17! Copyright 1997-2017 Leibniz Universitaet Hannover
18!------------------------------------------------------------------------------!
19!
20! Current revisions:
21! -----------------
22!
23!
24! Former revisions:
25! -----------------
26! $Id: header.f90 2300 2017-06-29 13:31:14Z hoffmann $
27! host-specific code removed
28!
29! 2299 2017-06-29 10:14:38Z maronga
30! Modified output for spinups
31!
32! 2298 2017-06-29 09:28:18Z raasch
33! MPI2 related parts removed
34!
35! 2270 2017-06-09 12:18:47Z maronga
36! Renamed Prandtl layer to constant flux layer
37!
38! 2259 2017-06-08 09:09:11Z gronemeier
39! Implemented synthetic turbulence generator
40!
41! 2258 2017-06-08 07:55:13Z suehring
42! Bugfix, add pre-preprocessor directives to enable non-parrallel mode
43!
44! 2233 2017-05-30 18:08:54Z suehring
45!
46! 2232 2017-05-30 17:47:52Z suehring
47! Adjustments to new topography and surface concept
48! Generic tunnel setup added
49!
50! 2200 2017-04-11 11:37:51Z suehring
51! monotonic_adjustment removed
52!
53! 2118 2017-01-17 16:38:49Z raasch
54! OpenACC relatec code removed
55!
56! 2073 2016-11-30 14:34:05Z raasch
57! small bugfix concerning output of scalar profiles
58!
59! 2050 2016-11-08 15:00:55Z gronemeier
60! Implement turbulent outflow condition
61!
62! 2037 2016-10-26 11:15:40Z knoop
63! Anelastic approximation implemented
64!
65! 2000 2016-08-20 18:09:15Z knoop
66! Forced header and separation lines into 80 columns
67!
68! 1992 2016-08-12 15:14:59Z suehring
69! Adapted for top_scalarflux
70!
71! 1960 2016-07-12 16:34:24Z suehring
72! Treat humidity and passive scalar separately.
73! Modify misleading information concerning humidity.
74! Bugfix, change unit for humidity flux.
75!
76! 1957 2016-07-07 10:43:48Z suehring
77! flight module added
78!
79! 1931 2016-06-10 12:06:59Z suehring
80! Rename multigrid into multigrid_noopt
81!
82! 1902 2016-05-09 11:18:56Z suehring
83! Write information about masking_method only for multigrid solver
84!
85! 1849 2016-04-08 11:33:18Z hoffmann
86! Adapted for modularization of microphysics
87!
88! 1833 2016-04-07 14:23:03Z raasch
89! spectrum renamed spectra_mod, output of spectra related quantities moved to
90! spectra_mod
91!
92! 1831 2016-04-07 13:15:51Z hoffmann
93! turbulence renamed collision_turbulence,
94! drizzle renamed cloud_water_sedimentation
95!
96! 1826 2016-04-07 12:01:39Z maronga
97! Moved radiation model header output to the respective module.
98! Moved canopy model header output to the respective module.
99!
100! 1822 2016-04-07 07:49:42Z hoffmann
101! Tails removed. icloud_scheme replaced by microphysics_*
102!
103! 1817 2016-04-06 15:44:20Z maronga
104! Moved land_surface_model header output to the respective module.
105!
106! 1808 2016-04-05 19:44:00Z raasch
107! routine local_flush replaced by FORTRAN statement
108!
109! 1797 2016-03-21 16:50:28Z raasch
110! output of nesting datatransfer mode
111!
112! 1791 2016-03-11 10:41:25Z raasch
113! output of nesting informations of all domains
114!
115! 1788 2016-03-10 11:01:04Z maronga
116! Parameter dewfall removed
117!
118! 1786 2016-03-08 05:49:27Z raasch
119! cpp-direktives for spectra removed
120!
121! 1783 2016-03-06 18:36:17Z raasch
122! netcdf module and variable names changed, output of netcdf_deflate
123!
124! 1764 2016-02-28 12:45:19Z raasch
125! output of nesting informations
126!
127! 1697 2015-10-28 17:14:10Z raasch
128! small E- and F-FORMAT changes to avoid informative compiler messages about
129! insufficient field width
130!
131! 1691 2015-10-26 16:17:44Z maronga
132! Renamed prandtl_layer to constant_flux_layer, renames rif_min/rif_max to
133! zeta_min/zeta_max.
134!
135! 1682 2015-10-07 23:56:08Z knoop
136! Code annotations made doxygen readable
137!
138! 1675 2015-10-02 08:28:59Z gronemeier
139! Bugfix: Definition of topography grid levels
140!
141! 1660 2015-09-21 08:15:16Z gronemeier
142! Bugfix: Definition of building/street canyon height if vertical grid stretching
143!         starts below the maximum topography height.
144!
145! 1590 2015-05-08 13:56:27Z maronga
146! Bugfix: Added TRIM statements for character strings for LSM and radiation code
147!
148! 1585 2015-04-30 07:05:52Z maronga
149! Further output for radiation model(s).
150!
151! 1575 2015-03-27 09:56:27Z raasch
152! adjustments for psolver-queries, output of seed_follows_topography
153!
154! 1560 2015-03-06 10:48:54Z keck
155! output for recycling y shift
156!
157! 1557 2015-03-05 16:43:04Z suehring
158! output for monotonic limiter
159!
160! 1551 2015-03-03 14:18:16Z maronga
161! Added informal output for land surface model and radiation model. Removed typo.
162!
163! 1496 2014-12-02 17:25:50Z maronga
164! Renamed: "radiation -> "cloud_top_radiation"
165!
166! 1484 2014-10-21 10:53:05Z kanani
167! Changes due to new module structure of the plant canopy model:
168!   module plant_canopy_model_mod and output for new canopy model parameters
169!   (alpha_lad, beta_lad, lai_beta,...) added,
170!   drag_coefficient, leaf_surface_concentration and scalar_exchange_coefficient
171!   renamed to canopy_drag_coeff, leaf_surface_conc and leaf_scalar_exch_coeff,
172!   learde renamed leaf_area_density.
173! Bugfix: DO-WHILE-loop for lad header information additionally restricted
174! by maximum number of gradient levels (currently 10)
175!
176! 1482 2014-10-18 12:34:45Z raasch
177! information about calculated or predefined virtual processor topology adjusted
178!
179! 1468 2014-09-24 14:06:57Z maronga
180! Adapted for use on up to 6-digit processor cores
181!
182! 1429 2014-07-15 12:53:45Z knoop
183! header exended to provide ensemble_member_nr if specified
184!
185! 1376 2014-04-26 11:21:22Z boeske
186! Correction of typos
187!
188! 1365 2014-04-22 15:03:56Z boeske
189! New section 'Large scale forcing and nudging':
190! output of large scale forcing and nudging information,
191! new section for initial profiles created
192!
193! 1359 2014-04-11 17:15:14Z hoffmann
194! dt_sort_particles removed
195!
196! 1353 2014-04-08 15:21:23Z heinze
197! REAL constants provided with KIND-attribute
198!
199! 1327 2014-03-21 11:00:16Z raasch
200! parts concerning iso2d and avs output removed,
201! -netcdf output queries
202!
203! 1324 2014-03-21 09:13:16Z suehring
204! Bugfix: module spectrum added
205!
206! 1322 2014-03-20 16:38:49Z raasch
207! REAL functions provided with KIND-attribute,
208! some REAL constants defined as wp-kind
209!
210! 1320 2014-03-20 08:40:49Z raasch
211! ONLY-attribute added to USE-statements,
212! kind-parameters added to all INTEGER and REAL declaration statements,
213! kinds are defined in new module kinds,
214! revision history before 2012 removed,
215! comment fields (!:) to be used for variable explanations added to
216! all variable declaration statements
217!
218! 1308 2014-03-13 14:58:42Z fricke
219! output of the fixed number of output time levels
220! output_format adjusted for masked data if netcdf_data_format > 5
221!
222! 1299 2014-03-06 13:15:21Z heinze
223! output for using large_scale subsidence in combination
224! with large_scale_forcing
225! reformatting, more detailed explanations
226!
227! 1241 2013-10-30 11:36:58Z heinze
228! output for nudging + large scale forcing from external file
229!
230! 1216 2013-08-26 09:31:42Z raasch
231! output for transpose_compute_overlap
232!
233! 1212 2013-08-15 08:46:27Z raasch
234! output for poisfft_hybrid removed
235!
236! 1179 2013-06-14 05:57:58Z raasch
237! output of reference_state, use_reference renamed use_single_reference_value
238!
239! 1159 2013-05-21 11:58:22Z fricke
240! +use_cmax
241!
242! 1115 2013-03-26 18:16:16Z hoffmann
243! descriptions for Seifert-Beheng-cloud-physics-scheme added
244!
245! 1111 2013-03-08 23:54:10Z raasch
246! output of accelerator board information
247! ibc_p_b = 2 removed
248!
249! 1108 2013-03-05 07:03:32Z raasch
250! bugfix for r1106
251!
252! 1106 2013-03-04 05:31:38Z raasch
253! some format changes for coupled runs
254!
255! 1092 2013-02-02 11:24:22Z raasch
256! unused variables removed
257!
258! 1036 2012-10-22 13:43:42Z raasch
259! code put under GPL (PALM 3.9)
260!
261! 1031 2012-10-19 14:35:30Z raasch
262! output of netCDF data format modified
263!
264! 1015 2012-09-27 09:23:24Z raasch
265! output of Adjustment of mixing length to the Prandtl mixing length at first
266! grid point above ground removed
267!
268! 1003 2012-09-14 14:35:53Z raasch
269! output of information about equal/unequal subdomain size removed
270!
271! 1001 2012-09-13 14:08:46Z raasch
272! all actions concerning leapfrog- and upstream-spline-scheme removed
273!
274! 978 2012-08-09 08:28:32Z fricke
275! -km_damp_max, outflow_damping_width
276! +pt_damping_factor, pt_damping_width
277! +z0h
278!
279! 964 2012-07-26 09:14:24Z raasch
280! output of profil-related quantities removed
281!
282! 940 2012-07-09 14:31:00Z raasch
283! Output in case of simulations for pure neutral stratification (no pt-equation
284! solved)
285!
286! 927 2012-06-06 19:15:04Z raasch
287! output of masking_method for mg-solver
288!
289! 868 2012-03-28 12:21:07Z raasch
290! translation velocity in Galilean transformation changed to 0.6 * ug
291!
292! 833 2012-02-22 08:55:55Z maronga
293! Adjusted format for leaf area density
294!
295! 828 2012-02-21 12:00:36Z raasch
296! output of dissipation_classes + radius_classes
297!
298! 825 2012-02-19 03:03:44Z raasch
299! Output of cloud physics parameters/quantities complemented and restructured
300!
301! Revision 1.1  1997/08/11 06:17:20  raasch
302! Initial revision
303!
304!
305! Description:
306! ------------
307!> Writing a header with all important information about the current run.
308!> This subroutine is called three times, two times at the beginning
309!> (writing information on files RUN_CONTROL and HEADER) and one time at the
310!> end of the run, then writing additional information about CPU-usage on file
311!> header.
312!-----------------------------------------------------------------------------!
313 SUBROUTINE header
314 
315
316    USE arrays_3d,                                                             &
317        ONLY:  pt_init, q_init, s_init, sa_init, ug, vg, w_subs, zu, zw
318       
319    USE control_parameters
320       
321    USE cloud_parameters,                                                      &
322        ONLY:  cp, l_v, r_d
323
324    USE cpulog,                                                                &
325        ONLY:  log_point_s
326       
327    USE dvrp_variables,                                                        &
328        ONLY:  use_seperate_pe_for_dvrp_output
329       
330    USE flight_mod,                                                            &
331        ONLY:  flight_header
332       
333    USE grid_variables,                                                        &
334        ONLY:  dx, dy
335       
336    USE indices,                                                               &
337        ONLY:  mg_loc_ind, nnx, nny, nnz, nx, ny, nxl_mg, nxr_mg, nyn_mg,      &
338               nys_mg, nzt, nzt_mg
339       
340    USE kinds
341 
342    USE land_surface_model_mod,                                                &
343        ONLY: lsm_header
344
345    USE microphysics_mod,                                                      &
346        ONLY:  cloud_water_sedimentation, collision_turbulence,                &
347               c_sedimentation, limiter_sedimentation, nc_const,               &
348               ventilation_effect
349
350    USE model_1d,                                                              &
351        ONLY:  damp_level_ind_1d, dt_pr_1d, dt_run_control_1d, end_time_1d
352       
353    USE netcdf_interface,                                                      &
354        ONLY:  netcdf_data_format, netcdf_data_format_string, netcdf_deflate
355
356    USE particle_attributes,                                                   &
357        ONLY:  bc_par_b, bc_par_lr, bc_par_ns, bc_par_t, collision_kernel,     &
358               curvature_solution_effects,                                     &
359               density_ratio, dissipation_classes, dt_min_part, dt_prel,       &
360               dt_write_particle_data, end_time_prel,                          &
361               number_of_particle_groups, particle_advection,                  &
362               particle_advection_start,                                       &
363               particles_per_point, pdx, pdy, pdz,  psb, psl, psn, psr, pss,   &
364               pst, radius, radius_classes, random_start_position,             &
365               seed_follows_topography,                                        &
366               total_number_of_particles, use_sgs_for_particles,               &
367               vertical_particle_advection, write_particle_statistics
368       
369    USE pegrid
370
371    USE plant_canopy_model_mod,                                                &
372        ONLY:  pcm_header, plant_canopy
373
374    USE pmc_handle_communicator,                                               &
375        ONLY:  pmc_get_model_info
376
377    USE pmc_interface,                                                         &
378        ONLY:  nested_run, nesting_datatransfer_mode, nesting_mode
379
380    USE radiation_model_mod,                                                   &
381        ONLY:  radiation, radiation_header
382   
383    USE spectra_mod,                                                           &
384        ONLY:  calculate_spectra, spectra_header
385
386    USE surface_mod,                                                           &
387        ONLY:  surf_def_h
388
389    USE synthetic_turbulence_generator_mod,                                    &
390        ONLY:  stg_header
391
392    IMPLICIT NONE
393
394    CHARACTER (LEN=1)  ::  prec                !<
395   
396    CHARACTER (LEN=2)  ::  do2d_mode           !<
397   
398    CHARACTER (LEN=5)  ::  section_chr         !<
399   
400    CHARACTER (LEN=10) ::  coor_chr            !<
401    CHARACTER (LEN=10) ::  host_chr            !<
402   
403    CHARACTER (LEN=16) ::  begin_chr           !<
404   
405    CHARACTER (LEN=26) ::  ver_rev             !<
406
407    CHARACTER (LEN=32) ::  cpl_name            !<
408   
409    CHARACTER (LEN=40) ::  output_format       !<
410   
411    CHARACTER (LEN=70) ::  char1               !<
412    CHARACTER (LEN=70) ::  char2               !<
413    CHARACTER (LEN=70) ::  dopr_chr            !<
414    CHARACTER (LEN=70) ::  do2d_xy             !<
415    CHARACTER (LEN=70) ::  do2d_xz             !<
416    CHARACTER (LEN=70) ::  do2d_yz             !<
417    CHARACTER (LEN=70) ::  do3d_chr            !<
418    CHARACTER (LEN=70) ::  domask_chr          !<
419    CHARACTER (LEN=70) ::  run_classification  !<
420   
421    CHARACTER (LEN=85) ::  r_upper             !<
422    CHARACTER (LEN=85) ::  r_lower             !<
423   
424    CHARACTER (LEN=86) ::  coordinates         !<
425    CHARACTER (LEN=86) ::  gradients           !<
426    CHARACTER (LEN=86) ::  slices              !<
427    CHARACTER (LEN=86) ::  temperatures        !<
428    CHARACTER (LEN=86) ::  ugcomponent         !<
429    CHARACTER (LEN=86) ::  vgcomponent         !<
430
431    CHARACTER (LEN=1), DIMENSION(1:3) ::  dir = (/ 'x', 'y', 'z' /)  !<
432
433    INTEGER(iwp) ::  av             !<
434    INTEGER(iwp) ::  bh             !<
435    INTEGER(iwp) ::  blx            !<
436    INTEGER(iwp) ::  bly            !<
437    INTEGER(iwp) ::  bxl            !<
438    INTEGER(iwp) ::  bxr            !<
439    INTEGER(iwp) ::  byn            !<
440    INTEGER(iwp) ::  bys            !<
441    INTEGER(iwp) ::  ch             !<
442    INTEGER(iwp) ::  count          !<
443    INTEGER(iwp) ::  cpl_parent_id  !<
444    INTEGER(iwp) ::  cwx            !<
445    INTEGER(iwp) ::  cwy            !<
446    INTEGER(iwp) ::  cxl            !<
447    INTEGER(iwp) ::  cxr            !<
448    INTEGER(iwp) ::  cyn            !<
449    INTEGER(iwp) ::  cys            !<
450    INTEGER(iwp) ::  dim            !<
451    INTEGER(iwp) ::  i              !<
452    INTEGER(iwp) ::  io             !<
453    INTEGER(iwp) ::  j              !<
454    INTEGER(iwp) ::  k              !<
455    INTEGER(iwp) ::  l              !<
456    INTEGER(iwp) ::  ll             !<
457    INTEGER(iwp) ::  my_cpl_id      !<
458    INTEGER(iwp) ::  n              !<
459    INTEGER(iwp) ::  ncpl           !<
460    INTEGER(iwp) ::  npe_total      !<
461   
462
463    REAL(wp) ::  cpuseconds_per_simulated_second  !<
464    REAL(wp) ::  lower_left_coord_x               !< x-coordinate of nest domain
465    REAL(wp) ::  lower_left_coord_y               !< y-coordinate of nest domain
466
467!
468!-- Open the output file. At the end of the simulation, output is directed
469!-- to unit 19.
470    IF ( ( runnr == 0 .OR. force_print_header )  .AND. &
471         .NOT. simulated_time_at_begin /= simulated_time )  THEN
472       io = 15   !  header output on file RUN_CONTROL
473    ELSE
474       io = 19   !  header output on file HEADER
475    ENDIF
476    CALL check_open( io )
477
478!
479!-- At the end of the run, output file (HEADER) will be rewritten with
480!-- new information
481    IF ( io == 19 .AND. simulated_time_at_begin /= simulated_time ) REWIND( 19 )
482
483!
484!-- Determine kind of model run
485    IF ( TRIM( initializing_actions ) == 'read_restart_data' )  THEN
486       run_classification = 'restart run'
487    ELSEIF ( TRIM( initializing_actions ) == 'cyclic_fill' )  THEN
488       run_classification = 'run with cyclic fill of 3D - prerun data'
489    ELSEIF ( INDEX( initializing_actions, 'set_constant_profiles' ) /= 0 )  THEN
490       run_classification = 'run without 1D - prerun'
491    ELSEIF ( INDEX( initializing_actions, 'set_1d-model_profiles' ) /= 0 )  THEN
492       run_classification = 'run with 1D - prerun'
493    ELSEIF ( INDEX( initializing_actions, 'by_user' ) /=0 )  THEN
494       run_classification = 'run initialized by user'
495    ELSE
496       message_string = ' unknown action(s): ' // TRIM( initializing_actions )
497       CALL message( 'header', 'PA0191', 0, 0, 0, 6, 0 )
498    ENDIF
499    IF ( nested_run )  run_classification = 'nested ' // run_classification
500    IF ( ocean )  THEN
501       run_classification = 'ocean - ' // run_classification
502    ELSE
503       run_classification = 'atmosphere - ' // run_classification
504    ENDIF
505
506!
507!-- Run-identification, date, time, host
508    host_chr = host(1:10)
509    ver_rev = TRIM( version ) // '  ' // TRIM( revision )
510    WRITE ( io, 100 )  ver_rev, TRIM( run_classification )
511    IF ( TRIM( coupling_mode ) /= 'uncoupled' )  THEN
512       WRITE ( io, 101 )  coupling_mode
513    ENDIF
514#if defined( __parallel )
515    IF ( coupling_start_time /= 0.0_wp  .AND. .NOT. spinup )  THEN
516       IF ( coupling_start_time > simulated_time_at_begin )  THEN
517          WRITE ( io, 109 )
518       ELSE
519          WRITE ( io, 114 )
520       ENDIF
521    ENDIF
522#endif
523    IF ( ensemble_member_nr /= 0 )  THEN
524       WRITE ( io, 512 )  run_date, run_identifier, run_time, runnr,           &
525                       ADJUSTR( host_chr ), ensemble_member_nr
526    ELSE
527       WRITE ( io, 102 )  run_date, run_identifier, run_time, runnr,           &
528                       ADJUSTR( host_chr )
529    ENDIF
530#if defined( __parallel )
531    IF ( npex == -1  .AND.  npey == -1 )  THEN
532       char1 = 'calculated'
533    ELSE
534       char1 = 'predefined'
535    ENDIF
536    IF ( threads_per_task == 1 )  THEN
537       WRITE ( io, 103 )  numprocs, pdims(1), pdims(2), TRIM( char1 )
538    ELSE
539       WRITE ( io, 104 )  numprocs*threads_per_task, numprocs, &
540                          threads_per_task, pdims(1), pdims(2), TRIM( char1 )
541    ENDIF
542
543    IF ( pdims(2) == 1 )  THEN
544       WRITE ( io, 107 )  'x'
545    ELSEIF ( pdims(1) == 1 )  THEN
546       WRITE ( io, 107 )  'y'
547    ENDIF
548    IF ( use_seperate_pe_for_dvrp_output )  WRITE ( io, 105 )
549    IF ( numprocs /= maximum_parallel_io_streams )  THEN
550       WRITE ( io, 108 )  maximum_parallel_io_streams
551    ENDIF
552#endif
553
554!
555!-- Nesting informations
556    IF ( nested_run )  THEN
557
558       WRITE ( io, 600 )  TRIM( nesting_mode ),                                &
559                          TRIM( nesting_datatransfer_mode )
560       CALL pmc_get_model_info( ncpl = ncpl, cpl_id = my_cpl_id )
561
562       DO  n = 1, ncpl
563          CALL pmc_get_model_info( request_for_cpl_id = n, cpl_name = cpl_name,&
564                                   cpl_parent_id = cpl_parent_id,              &
565                                   lower_left_x = lower_left_coord_x,          &
566                                   lower_left_y = lower_left_coord_y,          &
567                                   npe_total = npe_total )
568          IF ( n == my_cpl_id )  THEN
569             char1 = '*'
570          ELSE
571             char1 = ' '
572          ENDIF
573          WRITE ( io, 601 )  TRIM( char1 ), n, cpl_parent_id, npe_total,       &
574                             lower_left_coord_x, lower_left_coord_y,           &
575                             TRIM( cpl_name )
576       ENDDO
577    ENDIF
578    WRITE ( io, 99 )
579
580!
581!-- Numerical schemes
582    WRITE ( io, 110 )
583    WRITE ( io, 121 )  TRIM( approximation )
584    IF ( psolver(1:7) == 'poisfft' )  THEN
585       WRITE ( io, 111 )  TRIM( fft_method )
586       IF ( transpose_compute_overlap )  WRITE( io, 115 )
587    ELSEIF ( psolver == 'sor' )  THEN
588       WRITE ( io, 112 )  nsor_ini, nsor, omega_sor
589    ELSEIF ( psolver(1:9) == 'multigrid' )  THEN
590       WRITE ( io, 135 )  TRIM(psolver), cycle_mg, maximum_grid_level, ngsrb
591       IF ( mg_cycles == -1 )  THEN
592          WRITE ( io, 140 )  residual_limit
593       ELSE
594          WRITE ( io, 141 )  mg_cycles
595       ENDIF
596       IF ( mg_switch_to_pe0_level == 0 )  THEN
597          WRITE ( io, 136 )  nxr_mg(1)-nxl_mg(1)+1, nyn_mg(1)-nys_mg(1)+1, &
598                             nzt_mg(1)
599       ELSEIF (  mg_switch_to_pe0_level /= -1 )  THEN
600          WRITE ( io, 137 )  mg_switch_to_pe0_level,            &
601                             mg_loc_ind(2,0)-mg_loc_ind(1,0)+1, &
602                             mg_loc_ind(4,0)-mg_loc_ind(3,0)+1, &
603                             nzt_mg(mg_switch_to_pe0_level),    &
604                             nxr_mg(1)-nxl_mg(1)+1, nyn_mg(1)-nys_mg(1)+1, &
605                             nzt_mg(1)
606       ENDIF
607       IF ( psolver == 'multigrid_noopt' .AND. masking_method )  WRITE ( io, 144 )
608    ENDIF
609    IF ( call_psolver_at_all_substeps  .AND. timestep_scheme(1:5) == 'runge' ) &
610    THEN
611       WRITE ( io, 142 )
612    ENDIF
613
614    IF ( momentum_advec == 'pw-scheme' )  THEN
615       WRITE ( io, 113 )
616    ELSEIF (momentum_advec == 'ws-scheme' )  THEN
617       WRITE ( io, 503 )
618    ENDIF
619    IF ( scalar_advec == 'pw-scheme' )  THEN
620       WRITE ( io, 116 )
621    ELSEIF ( scalar_advec == 'ws-scheme' )  THEN
622       WRITE ( io, 504 )
623    ELSE
624       WRITE ( io, 118 )
625    ENDIF
626
627    WRITE ( io, 139 )  TRIM( loop_optimization )
628
629    IF ( galilei_transformation )  THEN
630       IF ( use_ug_for_galilei_tr )  THEN
631          char1 = '0.6 * geostrophic wind'
632       ELSE
633          char1 = 'mean wind in model domain'
634       ENDIF
635       IF ( simulated_time_at_begin == simulated_time )  THEN
636          char2 = 'at the start of the run'
637       ELSE
638          char2 = 'at the end of the run'
639       ENDIF
640       WRITE ( io, 119 )  TRIM( char1 ), TRIM( char2 ),                        &
641                          advected_distance_x/1000.0_wp,                       &
642                          advected_distance_y/1000.0_wp
643    ENDIF
644    WRITE ( io, 122 )  timestep_scheme
645    IF ( use_upstream_for_tke )  WRITE ( io, 143 )
646    IF ( rayleigh_damping_factor /= 0.0_wp )  THEN
647       IF ( .NOT. ocean )  THEN
648          WRITE ( io, 123 )  'above', rayleigh_damping_height, &
649               rayleigh_damping_factor
650       ELSE
651          WRITE ( io, 123 )  'below', rayleigh_damping_height, &
652               rayleigh_damping_factor
653       ENDIF
654    ENDIF
655    IF ( neutral )  WRITE ( io, 131 )  pt_surface
656    IF ( humidity )  THEN
657       IF ( .NOT. cloud_physics )  THEN
658          WRITE ( io, 129 )
659       ELSE
660          WRITE ( io, 130 )
661       ENDIF
662    ENDIF
663    IF ( passive_scalar )  WRITE ( io, 134 )
664    IF ( conserve_volume_flow )  THEN
665       WRITE ( io, 150 )  conserve_volume_flow_mode
666       IF ( TRIM( conserve_volume_flow_mode ) == 'bulk_velocity' )  THEN
667          WRITE ( io, 151 )  u_bulk, v_bulk
668       ENDIF
669    ELSEIF ( dp_external )  THEN
670       IF ( dp_smooth )  THEN
671          WRITE ( io, 152 )  dpdxy, dp_level_b, ', vertically smoothed.'
672       ELSE
673          WRITE ( io, 152 )  dpdxy, dp_level_b, '.'
674       ENDIF
675    ENDIF
676    WRITE ( io, 99 )
677
678!
679!-- Runtime and timestep information
680    WRITE ( io, 200 )
681    IF ( .NOT. dt_fixed )  THEN
682       WRITE ( io, 201 )  dt_max, cfl_factor
683    ELSE
684       WRITE ( io, 202 )  dt
685    ENDIF
686    WRITE ( io, 203 )  simulated_time_at_begin, end_time
687
688    IF ( time_restart /= 9999999.9_wp  .AND. &
689         simulated_time_at_begin == simulated_time )  THEN
690       IF ( dt_restart == 9999999.9_wp )  THEN
691          WRITE ( io, 204 )  ' Restart at:       ',time_restart
692       ELSE
693          WRITE ( io, 205 )  ' Restart at:       ',time_restart, dt_restart
694       ENDIF
695    ENDIF
696
697    IF ( simulated_time_at_begin /= simulated_time )  THEN
698       i = MAX ( log_point_s(10)%counts, 1 )
699       IF ( ( simulated_time - simulated_time_at_begin ) == 0.0_wp )  THEN
700          cpuseconds_per_simulated_second = 0.0_wp
701       ELSE
702          cpuseconds_per_simulated_second = log_point_s(10)%sum / &
703                                            ( simulated_time -    &
704                                              simulated_time_at_begin )
705       ENDIF
706       WRITE ( io, 206 )  simulated_time, log_point_s(10)%sum,      &
707                          log_point_s(10)%sum / REAL( i, KIND=wp ), &
708                          cpuseconds_per_simulated_second
709       IF ( time_restart /= 9999999.9_wp  .AND.  time_restart < end_time )  THEN
710          IF ( dt_restart == 9999999.9_wp )  THEN
711             WRITE ( io, 204 )  ' Next restart at:     ',time_restart
712          ELSE
713             WRITE ( io, 205 )  ' Next restart at:     ',time_restart, dt_restart
714          ENDIF
715       ENDIF
716    ENDIF
717
718
719!
720!-- Start time for coupled runs, if independent precursor runs for atmosphere
721!-- and ocean are used or have been used. In this case, coupling_start_time
722!-- defines the time when the coupling is switched on.
723    IF ( coupling_start_time /= 0.0_wp )  THEN
724       WRITE ( io, 207 )  coupling_start_time
725    ENDIF
726
727!
728!-- Computational grid
729    IF ( .NOT. ocean )  THEN
730       WRITE ( io, 250 )  dx, dy, dz, (nx+1)*dx, (ny+1)*dy, zu(nzt+1)
731       IF ( dz_stretch_level_index < nzt+1 )  THEN
732          WRITE ( io, 252 )  dz_stretch_level, dz_stretch_level_index, &
733                             dz_stretch_factor, dz_max
734       ENDIF
735    ELSE
736       WRITE ( io, 250 )  dx, dy, dz, (nx+1)*dx, (ny+1)*dy, zu(0)
737       IF ( dz_stretch_level_index > 0 )  THEN
738          WRITE ( io, 252 )  dz_stretch_level, dz_stretch_level_index, &
739                             dz_stretch_factor, dz_max
740       ENDIF
741    ENDIF
742    WRITE ( io, 254 )  nx, ny, nzt+1, MIN( nnx, nx+1 ), MIN( nny, ny+1 ), &
743                       MIN( nnz+2, nzt+2 )
744    IF ( sloping_surface )  WRITE ( io, 260 )  alpha_surface
745
746!
747!-- Large scale forcing and nudging
748    WRITE ( io, 160 )
749    IF ( large_scale_forcing )  THEN
750       WRITE ( io, 162 )
751       WRITE ( io, 163 )
752
753       IF ( large_scale_subsidence )  THEN
754          IF ( .NOT. use_subsidence_tendencies )  THEN
755             WRITE ( io, 164 )
756          ELSE
757             WRITE ( io, 165 )
758          ENDIF
759       ENDIF
760
761       IF ( bc_pt_b == 'dirichlet' )  THEN
762          WRITE ( io, 180 )
763       ELSEIF ( bc_pt_b == 'neumann' )  THEN
764          WRITE ( io, 181 )
765       ENDIF
766
767       IF ( bc_q_b == 'dirichlet' )  THEN
768          WRITE ( io, 182 )
769       ELSEIF ( bc_q_b == 'neumann' )  THEN
770          WRITE ( io, 183 )
771       ENDIF
772
773       WRITE ( io, 167 )
774       IF ( nudging )  THEN
775          WRITE ( io, 170 )
776       ENDIF
777    ELSE
778       WRITE ( io, 161 )
779       WRITE ( io, 171 )
780    ENDIF
781    IF ( large_scale_subsidence )  THEN
782       WRITE ( io, 168 )
783       WRITE ( io, 169 )
784    ENDIF
785
786!
787!-- Profile for the large scale vertial velocity
788!-- Building output strings, starting with surface value
789    IF ( large_scale_subsidence )  THEN
790       temperatures = '   0.0'
791       gradients = '------'
792       slices = '     0'
793       coordinates = '   0.0'
794       i = 1
795       DO  WHILE ( subs_vertical_gradient_level_i(i) /= -9999 )
796
797          WRITE (coor_chr,'(E10.2,7X)')  &
798                                w_subs(subs_vertical_gradient_level_i(i))
799          temperatures = TRIM( temperatures ) // ' ' // TRIM( coor_chr )
800
801          WRITE (coor_chr,'(E10.2,7X)')  subs_vertical_gradient(i)
802          gradients = TRIM( gradients ) // ' ' // TRIM( coor_chr )
803
804          WRITE (coor_chr,'(I10,7X)')  subs_vertical_gradient_level_i(i)
805          slices = TRIM( slices ) // ' ' // TRIM( coor_chr )
806
807          WRITE (coor_chr,'(F10.2,7X)')  subs_vertical_gradient_level(i)
808          coordinates = TRIM( coordinates ) // ' '  // TRIM( coor_chr )
809
810          IF ( i == 10 )  THEN
811             EXIT
812          ELSE
813             i = i + 1
814          ENDIF
815
816       ENDDO
817
818 
819       IF ( .NOT. large_scale_forcing )  THEN
820          WRITE ( io, 426 )  TRIM( coordinates ), TRIM( temperatures ), &
821                             TRIM( gradients ), TRIM( slices )
822       ENDIF
823
824
825    ENDIF
826
827!-- Profile of the geostrophic wind (component ug)
828!-- Building output strings
829    WRITE ( ugcomponent, '(F6.2)' )  ug_surface
830    gradients = '------'
831    slices = '     0'
832    coordinates = '   0.0'
833    i = 1
834    DO  WHILE ( ug_vertical_gradient_level_ind(i) /= -9999 )
835     
836       WRITE (coor_chr,'(F6.2,1X)')  ug(ug_vertical_gradient_level_ind(i))
837       ugcomponent = TRIM( ugcomponent ) // '  ' // TRIM( coor_chr )
838
839       WRITE (coor_chr,'(F6.2,1X)')  ug_vertical_gradient(i)
840       gradients = TRIM( gradients ) // '  ' // TRIM( coor_chr )
841
842       WRITE (coor_chr,'(I6,1X)')  ug_vertical_gradient_level_ind(i)
843       slices = TRIM( slices ) // '  ' // TRIM( coor_chr )
844
845       WRITE (coor_chr,'(F6.1,1X)')  ug_vertical_gradient_level(i)
846       coordinates = TRIM( coordinates ) // '  ' // TRIM( coor_chr )
847
848       IF ( i == 10 )  THEN
849          EXIT
850       ELSE
851          i = i + 1
852       ENDIF
853
854    ENDDO
855
856    IF ( .NOT. large_scale_forcing )  THEN
857       WRITE ( io, 423 )  TRIM( coordinates ), TRIM( ugcomponent ), &
858                          TRIM( gradients ), TRIM( slices )
859    ENDIF
860
861!-- Profile of the geostrophic wind (component vg)
862!-- Building output strings
863    WRITE ( vgcomponent, '(F6.2)' )  vg_surface
864    gradients = '------'
865    slices = '     0'
866    coordinates = '   0.0'
867    i = 1
868    DO  WHILE ( vg_vertical_gradient_level_ind(i) /= -9999 )
869
870       WRITE (coor_chr,'(F6.2,1X)')  vg(vg_vertical_gradient_level_ind(i))
871       vgcomponent = TRIM( vgcomponent ) // '  ' // TRIM( coor_chr )
872
873       WRITE (coor_chr,'(F6.2,1X)')  vg_vertical_gradient(i)
874       gradients = TRIM( gradients ) // '  ' // TRIM( coor_chr )
875
876       WRITE (coor_chr,'(I6,1X)')  vg_vertical_gradient_level_ind(i)
877       slices = TRIM( slices ) // '  ' // TRIM( coor_chr )
878
879       WRITE (coor_chr,'(F6.1,1X)')  vg_vertical_gradient_level(i)
880       coordinates = TRIM( coordinates ) // '  ' // TRIM( coor_chr )
881
882       IF ( i == 10 )  THEN
883          EXIT
884       ELSE
885          i = i + 1
886       ENDIF
887 
888    ENDDO
889
890    IF ( .NOT. large_scale_forcing )  THEN
891       WRITE ( io, 424 )  TRIM( coordinates ), TRIM( vgcomponent ), &
892                          TRIM( gradients ), TRIM( slices )
893    ENDIF
894
895!
896!-- Topography
897    WRITE ( io, 270 )  topography
898    SELECT CASE ( TRIM( topography ) )
899
900       CASE ( 'flat' )
901          ! no actions necessary
902
903       CASE ( 'single_building' )
904          blx = INT( building_length_x / dx )
905          bly = INT( building_length_y / dy )
906          bh  = MINLOC( ABS( zw - building_height ), 1 ) - 1
907          IF ( ABS( zw(bh  ) - building_height ) == &
908               ABS( zw(bh+1) - building_height )    )  bh = bh + 1
909
910          IF ( building_wall_left == 9999999.9_wp )  THEN
911             building_wall_left = ( nx + 1 - blx ) / 2 * dx
912          ENDIF
913          bxl = INT ( building_wall_left / dx + 0.5_wp )
914          bxr = bxl + blx
915
916          IF ( building_wall_south == 9999999.9_wp )  THEN
917             building_wall_south = ( ny + 1 - bly ) / 2 * dy
918          ENDIF
919          bys = INT ( building_wall_south / dy + 0.5_wp )
920          byn = bys + bly
921
922          WRITE ( io, 271 )  building_length_x, building_length_y, &
923                             building_height, bxl, bxr, bys, byn
924
925       CASE ( 'single_street_canyon' )
926          ch  = MINLOC( ABS( zw - canyon_height ), 1 ) - 1
927          IF ( ABS( zw(ch  ) - canyon_height ) == &
928               ABS( zw(ch+1) - canyon_height )    )  ch = ch + 1
929          IF ( canyon_width_x /= 9999999.9_wp )  THEN
930!
931!--          Street canyon in y direction
932             cwx = NINT( canyon_width_x / dx )
933             IF ( canyon_wall_left == 9999999.9_wp )  THEN
934                canyon_wall_left = ( nx + 1 - cwx ) / 2 * dx
935             ENDIF
936             cxl = NINT( canyon_wall_left / dx )
937             cxr = cxl + cwx
938             WRITE ( io, 272 )  'y', canyon_height, ch, 'u', cxl, cxr
939
940          ELSEIF ( canyon_width_y /= 9999999.9_wp )  THEN
941!
942!--          Street canyon in x direction
943             cwy = NINT( canyon_width_y / dy )
944             IF ( canyon_wall_south == 9999999.9_wp )  THEN
945                canyon_wall_south = ( ny + 1 - cwy ) / 2 * dy
946             ENDIF
947             cys = NINT( canyon_wall_south / dy )
948             cyn = cys + cwy
949             WRITE ( io, 272 )  'x', canyon_height, ch, 'v', cys, cyn
950          ENDIF
951
952       CASE ( 'tunnel' )
953          IF ( tunnel_width_x /= 9999999.9_wp )  THEN
954!
955!--          Tunnel axis in y direction
956             IF ( tunnel_length == 9999999.9_wp  .OR.                          &
957                  tunnel_length >= ( nx + 1 ) * dx )  THEN
958                WRITE ( io, 273 )  'y', tunnel_height, tunnel_wall_depth,      &
959                                        tunnel_width_x
960             ELSE
961                WRITE ( io, 274 )  'y', tunnel_height, tunnel_wall_depth,      &
962                                        tunnel_width_x, tunnel_length
963             ENDIF
964
965          ELSEIF ( tunnel_width_y /= 9999999.9_wp )  THEN
966!
967!--          Tunnel axis in x direction
968             IF ( tunnel_length == 9999999.9_wp  .OR.                          &
969                  tunnel_length >= ( ny + 1 ) * dy )  THEN
970                WRITE ( io, 273 )  'x', tunnel_height, tunnel_wall_depth,      &
971                                        tunnel_width_y
972             ELSE
973                WRITE ( io, 274 )  'x', tunnel_height, tunnel_wall_depth,      &
974                                        tunnel_width_y, tunnel_length
975             ENDIF
976          ENDIF
977
978    END SELECT
979
980    IF ( TRIM( topography ) /= 'flat' )  THEN
981       IF ( TRIM( topography_grid_convention ) == ' ' )  THEN
982          IF ( TRIM( topography ) == 'single_building' .OR.  &
983               TRIM( topography ) == 'single_street_canyon' )  THEN
984             WRITE ( io, 278 )
985          ELSEIF ( TRIM( topography ) == 'read_from_file' )  THEN
986             WRITE ( io, 279 )
987          ENDIF
988       ELSEIF ( TRIM( topography_grid_convention ) == 'cell_edge' )  THEN
989          WRITE ( io, 278 )
990       ELSEIF ( TRIM( topography_grid_convention ) == 'cell_center' )  THEN
991          WRITE ( io, 279 )
992       ENDIF
993    ENDIF
994
995    IF ( synthetic_turbulence_generator )  CALL stg_header ( io )
996
997    IF ( plant_canopy )  CALL pcm_header ( io )
998
999    IF ( land_surface )  CALL lsm_header ( io )
1000
1001    IF ( radiation )  CALL radiation_header ( io )
1002
1003!
1004!-- Boundary conditions
1005    IF ( ibc_p_b == 0 )  THEN
1006       r_lower = 'p(0)     = 0      |'
1007    ELSEIF ( ibc_p_b == 1 )  THEN
1008       r_lower = 'p(0)     = p(1)   |'
1009    ENDIF
1010    IF ( ibc_p_t == 0 )  THEN
1011       r_upper  = 'p(nzt+1) = 0      |'
1012    ELSE
1013       r_upper  = 'p(nzt+1) = p(nzt) |'
1014    ENDIF
1015
1016    IF ( ibc_uv_b == 0 )  THEN
1017       r_lower = TRIM( r_lower ) // ' uv(0)     = -uv(1)                |'
1018    ELSE
1019       r_lower = TRIM( r_lower ) // ' uv(0)     = uv(1)                 |'
1020    ENDIF
1021    IF ( TRIM( bc_uv_t ) == 'dirichlet_0' )  THEN
1022       r_upper  = TRIM( r_upper  ) // ' uv(nzt+1) = 0                     |'
1023    ELSEIF ( ibc_uv_t == 0 )  THEN
1024       r_upper  = TRIM( r_upper  ) // ' uv(nzt+1) = ug(nzt+1), vg(nzt+1)  |'
1025    ELSE
1026       r_upper  = TRIM( r_upper  ) // ' uv(nzt+1) = uv(nzt)               |'
1027    ENDIF
1028
1029    IF ( ibc_pt_b == 0 )  THEN
1030       IF ( land_surface )  THEN
1031          r_lower = TRIM( r_lower ) // ' pt(0)     = from soil model'
1032       ELSE
1033          r_lower = TRIM( r_lower ) // ' pt(0)     = pt_surface'
1034       ENDIF
1035    ELSEIF ( ibc_pt_b == 1 )  THEN
1036       r_lower = TRIM( r_lower ) // ' pt(0)     = pt(1)'
1037    ELSEIF ( ibc_pt_b == 2 )  THEN
1038       r_lower = TRIM( r_lower ) // ' pt(0)     = from coupled model'
1039    ENDIF
1040    IF ( ibc_pt_t == 0 )  THEN
1041       r_upper  = TRIM( r_upper  ) // ' pt(nzt+1) = pt_top'
1042    ELSEIF( ibc_pt_t == 1 )  THEN
1043       r_upper  = TRIM( r_upper  ) // ' pt(nzt+1) = pt(nzt)'
1044    ELSEIF( ibc_pt_t == 2 )  THEN
1045       r_upper  = TRIM( r_upper  ) // ' pt(nzt+1) = pt(nzt) + dpt/dz_ini'
1046
1047    ENDIF
1048
1049    WRITE ( io, 300 )  r_lower, r_upper
1050
1051    IF ( .NOT. constant_diffusion )  THEN
1052       IF ( ibc_e_b == 1 )  THEN
1053          r_lower = 'e(0)     = e(1)'
1054       ELSE
1055          r_lower = 'e(0)     = e(1) = (u*/0.1)**2'
1056       ENDIF
1057       r_upper = 'e(nzt+1) = e(nzt) = e(nzt-1)'
1058
1059       WRITE ( io, 301 )  'e', r_lower, r_upper       
1060
1061    ENDIF
1062
1063    IF ( ocean )  THEN
1064       r_lower = 'sa(0)    = sa(1)'
1065       IF ( ibc_sa_t == 0 )  THEN
1066          r_upper =  'sa(nzt+1) = sa_surface'
1067       ELSE
1068          r_upper =  'sa(nzt+1) = sa(nzt)'
1069       ENDIF
1070       WRITE ( io, 301 ) 'sa', r_lower, r_upper
1071    ENDIF
1072
1073    IF ( humidity )  THEN
1074       IF ( ibc_q_b == 0 )  THEN
1075          IF ( land_surface )  THEN
1076             r_lower = 'q(0)     = from soil model'
1077          ELSE
1078             r_lower = 'q(0)     = q_surface'
1079          ENDIF
1080
1081       ELSE
1082          r_lower = 'q(0)      = q(1)'
1083       ENDIF
1084       IF ( ibc_q_t == 0 )  THEN
1085          r_upper =  'q(nzt+1) = q_top'
1086       ELSE
1087          r_upper =  'q(nzt+1) = q(nzt) + dq/dz'
1088       ENDIF
1089       WRITE ( io, 301 ) 'q', r_lower, r_upper
1090    ENDIF
1091
1092    IF ( passive_scalar )  THEN
1093       IF ( ibc_s_b == 0 )  THEN
1094          r_lower = 's(0)      = s_surface'
1095       ELSE
1096          r_lower = 's(0)      = s(1)'
1097       ENDIF
1098       IF ( ibc_s_t == 0 )  THEN
1099          r_upper =  's(nzt+1) = s_top'
1100       ELSEIF ( ibc_s_t == 1 )  THEN
1101          r_upper =  's(nzt+1) = s(nzt)'
1102       ELSEIF ( ibc_s_t == 2 )  THEN
1103          r_upper =  's(nzt+1) = s(nzt) + ds/dz'
1104       ENDIF
1105       WRITE ( io, 301 ) 's', r_lower, r_upper
1106    ENDIF
1107
1108    IF ( use_surface_fluxes )  THEN
1109       WRITE ( io, 303 )
1110       IF ( constant_heatflux )  THEN
1111          IF ( large_scale_forcing .AND. lsf_surf )  THEN
1112             IF ( surf_def_h(0)%ns >= 1 )  WRITE ( io, 306 )  surf_def_h(0)%shf(1)
1113          ELSE
1114             WRITE ( io, 306 )  surface_heatflux
1115          ENDIF
1116          IF ( random_heatflux )  WRITE ( io, 307 )
1117       ENDIF
1118       IF ( humidity  .AND.  constant_waterflux )  THEN
1119          IF ( large_scale_forcing .AND. lsf_surf )  THEN
1120             WRITE ( io, 311 ) surf_def_h(0)%qsws(1)
1121          ELSE
1122             WRITE ( io, 311 ) surface_waterflux
1123          ENDIF
1124       ENDIF
1125       IF ( passive_scalar  .AND.  constant_scalarflux )  THEN
1126          WRITE ( io, 313 ) surface_scalarflux
1127       ENDIF
1128    ENDIF
1129
1130    IF ( use_top_fluxes )  THEN
1131       WRITE ( io, 304 )
1132       IF ( coupling_mode == 'uncoupled' )  THEN
1133          WRITE ( io, 320 )  top_momentumflux_u, top_momentumflux_v
1134          IF ( constant_top_heatflux )  THEN
1135             WRITE ( io, 306 )  top_heatflux
1136          ENDIF
1137       ELSEIF ( coupling_mode == 'ocean_to_atmosphere' )  THEN
1138          WRITE ( io, 316 )
1139       ENDIF
1140       IF ( ocean  .AND.  constant_top_salinityflux )                          &
1141          WRITE ( io, 309 )  top_salinityflux
1142       IF ( humidity       )  WRITE ( io, 315 )
1143       IF ( passive_scalar .AND.  constant_top_scalarflux )                    &
1144          WRITE ( io, 302 ) top_scalarflux
1145    ENDIF
1146
1147    IF ( constant_flux_layer )  THEN
1148       WRITE ( io, 305 )  (zu(1)-zu(0)), roughness_length,                     &
1149                          z0h_factor*roughness_length, kappa,                  &
1150                          zeta_min, zeta_max
1151       IF ( .NOT. constant_heatflux )  WRITE ( io, 308 )
1152       IF ( humidity  .AND.  .NOT. constant_waterflux )  THEN
1153          WRITE ( io, 312 )
1154       ENDIF
1155       IF ( passive_scalar  .AND.  .NOT. constant_scalarflux )  THEN
1156          WRITE ( io, 314 )
1157       ENDIF
1158    ELSE
1159       IF ( INDEX(initializing_actions, 'set_1d-model_profiles') /= 0 )  THEN
1160          WRITE ( io, 310 )  zeta_min, zeta_max
1161       ENDIF
1162    ENDIF
1163
1164    WRITE ( io, 317 )  bc_lr, bc_ns
1165    IF ( .NOT. bc_lr_cyc  .OR.  .NOT. bc_ns_cyc )  THEN
1166       WRITE ( io, 318 )  use_cmax, pt_damping_width, pt_damping_factor       
1167       IF ( turbulent_inflow )  THEN
1168          IF ( .NOT. recycling_yshift ) THEN
1169             WRITE ( io, 319 )  recycling_width, recycling_plane, &
1170                                inflow_damping_height, inflow_damping_width
1171          ELSE
1172             WRITE ( io, 322 )  recycling_width, recycling_plane, &
1173                                inflow_damping_height, inflow_damping_width
1174          END IF
1175       ENDIF
1176       IF ( turbulent_outflow )  THEN
1177          WRITE ( io, 323 )  outflow_source_plane, INT(outflow_source_plane/dx)
1178       ENDIF
1179    ENDIF
1180
1181!
1182!-- Initial Profiles
1183    WRITE ( io, 321 )
1184!
1185!-- Initial wind profiles
1186    IF ( u_profile(1) /= 9999999.9_wp )  WRITE ( io, 427 )
1187
1188!
1189!-- Initial temperature profile
1190!-- Building output strings, starting with surface temperature
1191    WRITE ( temperatures, '(F6.2)' )  pt_surface
1192    gradients = '------'
1193    slices = '     0'
1194    coordinates = '   0.0'
1195    i = 1
1196    DO  WHILE ( pt_vertical_gradient_level_ind(i) /= -9999 )
1197
1198       WRITE (coor_chr,'(F7.2)')  pt_init(pt_vertical_gradient_level_ind(i))
1199       temperatures = TRIM( temperatures ) // ' ' // TRIM( coor_chr )
1200
1201       WRITE (coor_chr,'(F7.2)')  pt_vertical_gradient(i)
1202       gradients = TRIM( gradients ) // ' ' // TRIM( coor_chr )
1203
1204       WRITE (coor_chr,'(I7)')  pt_vertical_gradient_level_ind(i)
1205       slices = TRIM( slices ) // ' ' // TRIM( coor_chr )
1206
1207       WRITE (coor_chr,'(F7.1)')  pt_vertical_gradient_level(i)
1208       coordinates = TRIM( coordinates ) // ' '  // TRIM( coor_chr )
1209
1210       IF ( i == 10 )  THEN
1211          EXIT
1212       ELSE
1213          i = i + 1
1214       ENDIF
1215
1216    ENDDO
1217
1218    IF ( .NOT. nudging )  THEN
1219       WRITE ( io, 420 )  TRIM( coordinates ), TRIM( temperatures ), &
1220                          TRIM( gradients ), TRIM( slices )
1221    ELSE
1222       WRITE ( io, 428 ) 
1223    ENDIF
1224
1225!
1226!-- Initial humidity profile
1227!-- Building output strings, starting with surface humidity
1228    IF ( humidity )  THEN
1229       WRITE ( temperatures, '(E8.1)' )  q_surface
1230       gradients = '--------'
1231       slices = '       0'
1232       coordinates = '     0.0'
1233       i = 1
1234       DO  WHILE ( q_vertical_gradient_level_ind(i) /= -9999 )
1235         
1236          WRITE (coor_chr,'(E8.1,4X)')  q_init(q_vertical_gradient_level_ind(i))
1237          temperatures = TRIM( temperatures ) // '  ' // TRIM( coor_chr )
1238
1239          WRITE (coor_chr,'(E8.1,4X)')  q_vertical_gradient(i)
1240          gradients = TRIM( gradients ) // '  ' // TRIM( coor_chr )
1241         
1242          WRITE (coor_chr,'(I8,4X)')  q_vertical_gradient_level_ind(i)
1243          slices = TRIM( slices ) // '  ' // TRIM( coor_chr )
1244         
1245          WRITE (coor_chr,'(F8.1,4X)')  q_vertical_gradient_level(i)
1246          coordinates = TRIM( coordinates ) // '  '  // TRIM( coor_chr )
1247
1248          IF ( i == 10 )  THEN
1249             EXIT
1250          ELSE
1251             i = i + 1
1252          ENDIF
1253
1254       ENDDO
1255
1256       IF ( .NOT. nudging )  THEN
1257          WRITE ( io, 421 )  TRIM( coordinates ), TRIM( temperatures ),        &
1258                             TRIM( gradients ), TRIM( slices )
1259       ENDIF
1260    ENDIF
1261!
1262!-- Initial scalar profile
1263!-- Building output strings, starting with surface humidity
1264    IF ( passive_scalar )  THEN
1265       WRITE ( temperatures, '(E8.1)' )  s_surface
1266       gradients = '--------'
1267       slices = '       0'
1268       coordinates = '     0.0'
1269       i = 1
1270       DO  WHILE ( s_vertical_gradient_level_ind(i) /= -9999 )
1271         
1272          WRITE (coor_chr,'(E8.1,4X)')  s_init(s_vertical_gradient_level_ind(i))
1273          temperatures = TRIM( temperatures ) // '  ' // TRIM( coor_chr )
1274
1275          WRITE (coor_chr,'(E8.1,4X)')  s_vertical_gradient(i)
1276          gradients = TRIM( gradients ) // '  ' // TRIM( coor_chr )
1277         
1278          WRITE (coor_chr,'(I8,4X)')  s_vertical_gradient_level_ind(i)
1279          slices = TRIM( slices ) // '  ' // TRIM( coor_chr )
1280         
1281          WRITE (coor_chr,'(F8.1,4X)')  s_vertical_gradient_level(i)
1282          coordinates = TRIM( coordinates ) // '  '  // TRIM( coor_chr )
1283
1284          IF ( i == 10 )  THEN
1285             EXIT
1286          ELSE
1287             i = i + 1
1288          ENDIF
1289
1290       ENDDO
1291
1292       WRITE ( io, 422 )  TRIM( coordinates ), TRIM( temperatures ),           &
1293                          TRIM( gradients ), TRIM( slices )
1294    ENDIF   
1295
1296!
1297!-- Initial salinity profile
1298!-- Building output strings, starting with surface salinity
1299    IF ( ocean )  THEN
1300       WRITE ( temperatures, '(F6.2)' )  sa_surface
1301       gradients = '------'
1302       slices = '     0'
1303       coordinates = '   0.0'
1304       i = 1
1305       DO  WHILE ( sa_vertical_gradient_level_ind(i) /= -9999 )
1306
1307          WRITE (coor_chr,'(F7.2)')  sa_init(sa_vertical_gradient_level_ind(i))
1308          temperatures = TRIM( temperatures ) // ' ' // TRIM( coor_chr )
1309
1310          WRITE (coor_chr,'(F7.2)')  sa_vertical_gradient(i)
1311          gradients = TRIM( gradients ) // ' ' // TRIM( coor_chr )
1312
1313          WRITE (coor_chr,'(I7)')  sa_vertical_gradient_level_ind(i)
1314          slices = TRIM( slices ) // ' ' // TRIM( coor_chr )
1315
1316          WRITE (coor_chr,'(F7.1)')  sa_vertical_gradient_level(i)
1317          coordinates = TRIM( coordinates ) // ' '  // TRIM( coor_chr )
1318
1319          IF ( i == 10 )  THEN
1320             EXIT
1321          ELSE
1322             i = i + 1
1323          ENDIF
1324
1325       ENDDO
1326
1327       WRITE ( io, 425 )  TRIM( coordinates ), TRIM( temperatures ), &
1328                          TRIM( gradients ), TRIM( slices )
1329    ENDIF
1330
1331
1332!
1333!-- Listing of 1D-profiles
1334    WRITE ( io, 325 )  dt_dopr_listing
1335    IF ( averaging_interval_pr /= 0.0_wp )  THEN
1336       WRITE ( io, 326 )  averaging_interval_pr, dt_averaging_input_pr
1337    ENDIF
1338
1339!
1340!-- DATA output
1341    WRITE ( io, 330 )
1342    IF ( averaging_interval_pr /= 0.0_wp )  THEN
1343       WRITE ( io, 326 )  averaging_interval_pr, dt_averaging_input_pr
1344    ENDIF
1345
1346!
1347!-- 1D-profiles
1348    dopr_chr = 'Profile:'
1349    IF ( dopr_n /= 0 )  THEN
1350       WRITE ( io, 331 )
1351
1352       output_format = ''
1353       output_format = netcdf_data_format_string
1354       IF ( netcdf_deflate == 0 )  THEN
1355          WRITE ( io, 344 )  output_format
1356       ELSE
1357          WRITE ( io, 354 )  TRIM( output_format ), netcdf_deflate
1358       ENDIF
1359
1360       DO  i = 1, dopr_n
1361          dopr_chr = TRIM( dopr_chr ) // ' ' // TRIM( data_output_pr(i) ) // ','
1362          IF ( LEN_TRIM( dopr_chr ) >= 60 )  THEN
1363             WRITE ( io, 332 )  dopr_chr
1364             dopr_chr = '       :'
1365          ENDIF
1366       ENDDO
1367
1368       IF ( dopr_chr /= '' )  THEN
1369          WRITE ( io, 332 )  dopr_chr
1370       ENDIF
1371       WRITE ( io, 333 )  dt_dopr, averaging_interval_pr, dt_averaging_input_pr
1372       IF ( skip_time_dopr /= 0.0_wp )  WRITE ( io, 339 )  skip_time_dopr
1373    ENDIF
1374
1375!
1376!-- 2D-arrays
1377    DO  av = 0, 1
1378
1379       i = 1
1380       do2d_xy = ''
1381       do2d_xz = ''
1382       do2d_yz = ''
1383       DO  WHILE ( do2d(av,i) /= ' ' )
1384
1385          l = MAX( 2, LEN_TRIM( do2d(av,i) ) )
1386          do2d_mode = do2d(av,i)(l-1:l)
1387
1388          SELECT CASE ( do2d_mode )
1389             CASE ( 'xy' )
1390                ll = LEN_TRIM( do2d_xy )
1391                do2d_xy = do2d_xy(1:ll) // ' ' // do2d(av,i)(1:l-3) // ','
1392             CASE ( 'xz' )
1393                ll = LEN_TRIM( do2d_xz )
1394                do2d_xz = do2d_xz(1:ll) // ' ' // do2d(av,i)(1:l-3) // ','
1395             CASE ( 'yz' )
1396                ll = LEN_TRIM( do2d_yz )
1397                do2d_yz = do2d_yz(1:ll) // ' ' // do2d(av,i)(1:l-3) // ','
1398          END SELECT
1399
1400          i = i + 1
1401
1402       ENDDO
1403
1404       IF ( ( ( do2d_xy /= ''  .AND.  section(1,1) /= -9999 )  .OR.    &
1405              ( do2d_xz /= ''  .AND.  section(1,2) /= -9999 )  .OR.    &
1406              ( do2d_yz /= ''  .AND.  section(1,3) /= -9999 ) ) )  THEN
1407
1408          IF (  av == 0 )  THEN
1409             WRITE ( io, 334 )  ''
1410          ELSE
1411             WRITE ( io, 334 )  '(time-averaged)'
1412          ENDIF
1413
1414          IF ( do2d_at_begin )  THEN
1415             begin_chr = 'and at the start'
1416          ELSE
1417             begin_chr = ''
1418          ENDIF
1419
1420          output_format = ''
1421          output_format = netcdf_data_format_string
1422          IF ( netcdf_deflate == 0 )  THEN
1423             WRITE ( io, 344 )  output_format
1424          ELSE
1425             WRITE ( io, 354 )  TRIM( output_format ), netcdf_deflate
1426          ENDIF
1427
1428          IF ( do2d_xy /= ''  .AND.  section(1,1) /= -9999 )  THEN
1429             i = 1
1430             slices = '/'
1431             coordinates = '/'
1432!
1433!--          Building strings with index and coordinate information of the
1434!--          slices
1435             DO  WHILE ( section(i,1) /= -9999 )
1436
1437                WRITE (section_chr,'(I5)')  section(i,1)
1438                section_chr = ADJUSTL( section_chr )
1439                slices = TRIM( slices ) // TRIM( section_chr ) // '/'
1440
1441                IF ( section(i,1) == -1 )  THEN
1442                   WRITE (coor_chr,'(F10.1)')  -1.0_wp
1443                ELSE
1444                   WRITE (coor_chr,'(F10.1)')  zu(section(i,1))
1445                ENDIF
1446                coor_chr = ADJUSTL( coor_chr )
1447                coordinates = TRIM( coordinates ) // TRIM( coor_chr ) // '/'
1448
1449                i = i + 1
1450             ENDDO
1451             IF ( av == 0 )  THEN
1452                WRITE ( io, 335 )  'XY', do2d_xy, dt_do2d_xy, &
1453                                   TRIM( begin_chr ), 'k', TRIM( slices ), &
1454                                   TRIM( coordinates )
1455                IF ( skip_time_do2d_xy /= 0.0_wp )  THEN
1456                   WRITE ( io, 339 )  skip_time_do2d_xy
1457                ENDIF
1458             ELSE
1459                WRITE ( io, 342 )  'XY', do2d_xy, dt_data_output_av, &
1460                                   TRIM( begin_chr ), averaging_interval, &
1461                                   dt_averaging_input, 'k', TRIM( slices ), &
1462                                   TRIM( coordinates )
1463                IF ( skip_time_data_output_av /= 0.0_wp )  THEN
1464                   WRITE ( io, 339 )  skip_time_data_output_av
1465                ENDIF
1466             ENDIF
1467             IF ( netcdf_data_format > 4 )  THEN
1468                WRITE ( io, 352 )  ntdim_2d_xy(av)
1469             ELSE
1470                WRITE ( io, 353 )
1471             ENDIF
1472          ENDIF
1473
1474          IF ( do2d_xz /= ''  .AND.  section(1,2) /= -9999 )  THEN
1475             i = 1
1476             slices = '/'
1477             coordinates = '/'
1478!
1479!--          Building strings with index and coordinate information of the
1480!--          slices
1481             DO  WHILE ( section(i,2) /= -9999 )
1482
1483                WRITE (section_chr,'(I5)')  section(i,2)
1484                section_chr = ADJUSTL( section_chr )
1485                slices = TRIM( slices ) // TRIM( section_chr ) // '/'
1486
1487                WRITE (coor_chr,'(F10.1)')  section(i,2) * dy
1488                coor_chr = ADJUSTL( coor_chr )
1489                coordinates = TRIM( coordinates ) // TRIM( coor_chr ) // '/'
1490
1491                i = i + 1
1492             ENDDO
1493             IF ( av == 0 )  THEN
1494                WRITE ( io, 335 )  'XZ', do2d_xz, dt_do2d_xz, &
1495                                   TRIM( begin_chr ), 'j', TRIM( slices ), &
1496                                   TRIM( coordinates )
1497                IF ( skip_time_do2d_xz /= 0.0_wp )  THEN
1498                   WRITE ( io, 339 )  skip_time_do2d_xz
1499                ENDIF
1500             ELSE
1501                WRITE ( io, 342 )  'XZ', do2d_xz, dt_data_output_av, &
1502                                   TRIM( begin_chr ), averaging_interval, &
1503                                   dt_averaging_input, 'j', TRIM( slices ), &
1504                                   TRIM( coordinates )
1505                IF ( skip_time_data_output_av /= 0.0_wp )  THEN
1506                   WRITE ( io, 339 )  skip_time_data_output_av
1507                ENDIF
1508             ENDIF
1509             IF ( netcdf_data_format > 4 )  THEN
1510                WRITE ( io, 352 )  ntdim_2d_xz(av)
1511             ELSE
1512                WRITE ( io, 353 )
1513             ENDIF
1514          ENDIF
1515
1516          IF ( do2d_yz /= ''  .AND.  section(1,3) /= -9999 )  THEN
1517             i = 1
1518             slices = '/'
1519             coordinates = '/'
1520!
1521!--          Building strings with index and coordinate information of the
1522!--          slices
1523             DO  WHILE ( section(i,3) /= -9999 )
1524
1525                WRITE (section_chr,'(I5)')  section(i,3)
1526                section_chr = ADJUSTL( section_chr )
1527                slices = TRIM( slices ) // TRIM( section_chr ) // '/'
1528
1529                WRITE (coor_chr,'(F10.1)')  section(i,3) * dx
1530                coor_chr = ADJUSTL( coor_chr )
1531                coordinates = TRIM( coordinates ) // TRIM( coor_chr ) // '/'
1532
1533                i = i + 1
1534             ENDDO
1535             IF ( av == 0 )  THEN
1536                WRITE ( io, 335 )  'YZ', do2d_yz, dt_do2d_yz, &
1537                                   TRIM( begin_chr ), 'i', TRIM( slices ), &
1538                                   TRIM( coordinates )
1539                IF ( skip_time_do2d_yz /= 0.0_wp )  THEN
1540                   WRITE ( io, 339 )  skip_time_do2d_yz
1541                ENDIF
1542             ELSE
1543                WRITE ( io, 342 )  'YZ', do2d_yz, dt_data_output_av, &
1544                                   TRIM( begin_chr ), averaging_interval, &
1545                                   dt_averaging_input, 'i', TRIM( slices ), &
1546                                   TRIM( coordinates )
1547                IF ( skip_time_data_output_av /= 0.0_wp )  THEN
1548                   WRITE ( io, 339 )  skip_time_data_output_av
1549                ENDIF
1550             ENDIF
1551             IF ( netcdf_data_format > 4 )  THEN
1552                WRITE ( io, 352 )  ntdim_2d_yz(av)
1553             ELSE
1554                WRITE ( io, 353 )
1555             ENDIF
1556          ENDIF
1557
1558       ENDIF
1559
1560    ENDDO
1561
1562!
1563!-- 3d-arrays
1564    DO  av = 0, 1
1565
1566       i = 1
1567       do3d_chr = ''
1568       DO  WHILE ( do3d(av,i) /= ' ' )
1569
1570          do3d_chr = TRIM( do3d_chr ) // ' ' // TRIM( do3d(av,i) ) // ','
1571          i = i + 1
1572
1573       ENDDO
1574
1575       IF ( do3d_chr /= '' )  THEN
1576          IF ( av == 0 )  THEN
1577             WRITE ( io, 336 )  ''
1578          ELSE
1579             WRITE ( io, 336 )  '(time-averaged)'
1580          ENDIF
1581
1582          output_format = netcdf_data_format_string
1583          IF ( netcdf_deflate == 0 )  THEN
1584             WRITE ( io, 344 )  output_format
1585          ELSE
1586             WRITE ( io, 354 )  TRIM( output_format ), netcdf_deflate
1587          ENDIF
1588
1589          IF ( do3d_at_begin )  THEN
1590             begin_chr = 'and at the start'
1591          ELSE
1592             begin_chr = ''
1593          ENDIF
1594          IF ( av == 0 )  THEN
1595             WRITE ( io, 337 )  do3d_chr, dt_do3d, TRIM( begin_chr ), &
1596                                zu(nz_do3d), nz_do3d
1597          ELSE
1598             WRITE ( io, 343 )  do3d_chr, dt_data_output_av,           &
1599                                TRIM( begin_chr ), averaging_interval, &
1600                                dt_averaging_input, zu(nz_do3d), nz_do3d
1601          ENDIF
1602
1603          IF ( netcdf_data_format > 4 )  THEN
1604             WRITE ( io, 352 )  ntdim_3d(av)
1605          ELSE
1606             WRITE ( io, 353 )
1607          ENDIF
1608
1609          IF ( av == 0 )  THEN
1610             IF ( skip_time_do3d /= 0.0_wp )  THEN
1611                WRITE ( io, 339 )  skip_time_do3d
1612             ENDIF
1613          ELSE
1614             IF ( skip_time_data_output_av /= 0.0_wp )  THEN
1615                WRITE ( io, 339 )  skip_time_data_output_av
1616             ENDIF
1617          ENDIF
1618
1619       ENDIF
1620
1621    ENDDO
1622
1623!
1624!-- masked arrays
1625    IF ( masks > 0 )  WRITE ( io, 345 )  &
1626         mask_scale_x, mask_scale_y, mask_scale_z
1627    DO  mid = 1, masks
1628       DO  av = 0, 1
1629
1630          i = 1
1631          domask_chr = ''
1632          DO  WHILE ( domask(mid,av,i) /= ' ' )
1633             domask_chr = TRIM( domask_chr ) // ' ' //  &
1634                          TRIM( domask(mid,av,i) ) // ','
1635             i = i + 1
1636          ENDDO
1637
1638          IF ( domask_chr /= '' )  THEN
1639             IF ( av == 0 )  THEN
1640                WRITE ( io, 346 )  '', mid
1641             ELSE
1642                WRITE ( io, 346 )  ' (time-averaged)', mid
1643             ENDIF
1644
1645             output_format = netcdf_data_format_string
1646!--          Parallel output not implemented for mask data, hence
1647!--          output_format must be adjusted.
1648             IF ( netcdf_data_format == 5 ) output_format = 'netCDF4/HDF5'
1649             IF ( netcdf_data_format == 6 ) output_format = 'netCDF4/HDF5 classic'
1650             IF ( netcdf_deflate == 0 )  THEN
1651                WRITE ( io, 344 )  output_format
1652             ELSE
1653                WRITE ( io, 354 )  TRIM( output_format ), netcdf_deflate
1654             ENDIF
1655
1656             IF ( av == 0 )  THEN
1657                WRITE ( io, 347 )  domask_chr, dt_domask(mid)
1658             ELSE
1659                WRITE ( io, 348 )  domask_chr, dt_data_output_av, &
1660                                   averaging_interval, dt_averaging_input
1661             ENDIF
1662
1663             IF ( av == 0 )  THEN
1664                IF ( skip_time_domask(mid) /= 0.0_wp )  THEN
1665                   WRITE ( io, 339 )  skip_time_domask(mid)
1666                ENDIF
1667             ELSE
1668                IF ( skip_time_data_output_av /= 0.0_wp )  THEN
1669                   WRITE ( io, 339 )  skip_time_data_output_av
1670                ENDIF
1671             ENDIF
1672!
1673!--          output locations
1674             DO  dim = 1, 3
1675                IF ( mask(mid,dim,1) >= 0.0_wp )  THEN
1676                   count = 0
1677                   DO  WHILE ( mask(mid,dim,count+1) >= 0.0_wp )
1678                      count = count + 1
1679                   ENDDO
1680                   WRITE ( io, 349 )  dir(dim), dir(dim), mid, dir(dim), &
1681                                      mask(mid,dim,:count)
1682                ELSEIF ( mask_loop(mid,dim,1) < 0.0_wp .AND.  &
1683                         mask_loop(mid,dim,2) < 0.0_wp .AND.  &
1684                         mask_loop(mid,dim,3) == 0.0_wp )  THEN
1685                   WRITE ( io, 350 )  dir(dim), dir(dim)
1686                ELSEIF ( mask_loop(mid,dim,3) == 0.0_wp )  THEN
1687                   WRITE ( io, 351 )  dir(dim), dir(dim), mid, dir(dim), &
1688                                      mask_loop(mid,dim,1:2)
1689                ELSE
1690                   WRITE ( io, 351 )  dir(dim), dir(dim), mid, dir(dim), &
1691                                      mask_loop(mid,dim,1:3)
1692                ENDIF
1693             ENDDO
1694          ENDIF
1695
1696       ENDDO
1697    ENDDO
1698
1699!
1700!-- Timeseries
1701    IF ( dt_dots /= 9999999.9_wp )  THEN
1702       WRITE ( io, 340 )
1703
1704       output_format = netcdf_data_format_string
1705       IF ( netcdf_deflate == 0 )  THEN
1706          WRITE ( io, 344 )  output_format
1707       ELSE
1708          WRITE ( io, 354 )  TRIM( output_format ), netcdf_deflate
1709       ENDIF
1710       WRITE ( io, 341 )  dt_dots
1711    ENDIF
1712
1713#if defined( __dvrp_graphics )
1714!
1715!-- Dvrp-output
1716    IF ( dt_dvrp /= 9999999.9_wp )  THEN
1717       WRITE ( io, 360 )  dt_dvrp, TRIM( dvrp_output ), TRIM( dvrp_host ), &
1718                          TRIM( dvrp_username ), TRIM( dvrp_directory )
1719       i = 1
1720       l = 0
1721       m = 0
1722       DO WHILE ( mode_dvrp(i) /= ' ' )
1723          IF ( mode_dvrp(i)(1:10) == 'isosurface' )  THEN
1724             READ ( mode_dvrp(i), '(10X,I2)' )  j
1725             l = l + 1
1726             IF ( do3d(0,j) /= ' ' )  THEN
1727                WRITE ( io, 361 )  TRIM( do3d(0,j) ), threshold(l), &
1728                                   isosurface_color(:,l)
1729             ENDIF
1730          ELSEIF ( mode_dvrp(i)(1:6) == 'slicer' )  THEN
1731             READ ( mode_dvrp(i), '(6X,I2)' )  j
1732             m = m + 1
1733             IF ( do2d(0,j) /= ' ' )  THEN
1734                WRITE ( io, 362 )  TRIM( do2d(0,j) ), &
1735                                   slicer_range_limits_dvrp(:,m)
1736             ENDIF
1737          ENDIF
1738          i = i + 1
1739       ENDDO
1740
1741       WRITE ( io, 365 )  groundplate_color, superelevation_x, &
1742                          superelevation_y, superelevation, clip_dvrp_l, &
1743                          clip_dvrp_r, clip_dvrp_s, clip_dvrp_n
1744
1745       IF ( TRIM( topography ) /= 'flat' )  THEN
1746          WRITE ( io, 366 )  topography_color
1747          IF ( cluster_size > 1 )  THEN
1748             WRITE ( io, 367 )  cluster_size
1749          ENDIF
1750       ENDIF
1751
1752    ENDIF
1753#endif
1754!
1755!-- Output of virtual flight information
1756    IF ( virtual_flight )  CALL flight_header( io )
1757
1758!
1759!-- Output of spectra related quantities
1760    IF ( calculate_spectra )  CALL spectra_header( io )
1761
1762    WRITE ( io, 99 )
1763
1764!
1765!-- Physical quantities
1766    WRITE ( io, 400 )
1767
1768!
1769!-- Geostrophic parameters
1770    WRITE ( io, 410 )  phi, omega, f, fs
1771
1772!
1773!-- Other quantities
1774    WRITE ( io, 411 )  g
1775
1776    WRITE ( io, 412 )  TRIM( reference_state )
1777    IF ( use_single_reference_value )  THEN
1778       IF ( ocean )  THEN
1779          WRITE ( io, 413 )  prho_reference
1780       ELSE
1781          WRITE ( io, 414 )  pt_reference
1782       ENDIF
1783    ENDIF
1784
1785!
1786!-- Cloud physics parameters
1787    IF ( cloud_physics )  THEN
1788       WRITE ( io, 415 )
1789       WRITE ( io, 416 ) surface_pressure, r_d, rho_surface, cp, l_v
1790       IF ( microphysics_seifert )  THEN
1791          WRITE ( io, 510 ) 1.0E-6_wp * nc_const
1792          WRITE ( io, 511 ) c_sedimentation
1793       ENDIF
1794    ENDIF
1795
1796!
1797!-- Cloud physcis parameters / quantities / numerical methods
1798    WRITE ( io, 430 )
1799    IF ( humidity .AND. .NOT. cloud_physics .AND. .NOT. cloud_droplets)  THEN
1800       WRITE ( io, 431 )
1801    ELSEIF ( humidity  .AND.  cloud_physics )  THEN
1802       WRITE ( io, 432 )
1803       IF ( cloud_top_radiation )  WRITE ( io, 132 )
1804       IF ( microphysics_kessler )  THEN
1805          WRITE ( io, 133 )
1806       ELSEIF ( microphysics_seifert )  THEN
1807          IF ( cloud_water_sedimentation )  WRITE ( io, 506 )
1808          WRITE ( io, 505 )
1809          IF ( collision_turbulence )  WRITE ( io, 507 )
1810          IF ( ventilation_effect )  WRITE ( io, 508 )
1811          IF ( limiter_sedimentation )  WRITE ( io, 509 )
1812       ENDIF
1813    ELSEIF ( humidity  .AND.  cloud_droplets )  THEN
1814       WRITE ( io, 433 )
1815       IF ( curvature_solution_effects )  WRITE ( io, 434 )
1816       IF ( collision_kernel /= 'none' )  THEN
1817          WRITE ( io, 435 )  TRIM( collision_kernel )
1818          IF ( collision_kernel(6:9) == 'fast' )  THEN
1819             WRITE ( io, 436 )  radius_classes, dissipation_classes
1820          ENDIF
1821       ELSE
1822          WRITE ( io, 437 )
1823       ENDIF
1824    ENDIF
1825
1826!
1827!-- LES / turbulence parameters
1828    WRITE ( io, 450 )
1829
1830!--
1831! ... LES-constants used must still be added here
1832!--
1833    IF ( constant_diffusion )  THEN
1834       WRITE ( io, 451 )  km_constant, km_constant/prandtl_number, &
1835                          prandtl_number
1836    ENDIF
1837    IF ( .NOT. constant_diffusion)  THEN
1838       IF ( e_init > 0.0_wp )  WRITE ( io, 455 )  e_init
1839       IF ( e_min > 0.0_wp )  WRITE ( io, 454 )  e_min
1840       IF ( wall_adjustment )  WRITE ( io, 453 )  wall_adjustment_factor
1841    ENDIF
1842
1843!
1844!-- Special actions during the run
1845    WRITE ( io, 470 )
1846    IF ( create_disturbances )  THEN
1847       WRITE ( io, 471 )  dt_disturb, disturbance_amplitude,                   &
1848                          zu(disturbance_level_ind_b), disturbance_level_ind_b,&
1849                          zu(disturbance_level_ind_t), disturbance_level_ind_t
1850       IF ( .NOT. bc_lr_cyc  .OR.  .NOT. bc_ns_cyc )  THEN
1851          WRITE ( io, 472 )  inflow_disturbance_begin, inflow_disturbance_end
1852       ELSE
1853          WRITE ( io, 473 )  disturbance_energy_limit
1854       ENDIF
1855       WRITE ( io, 474 )  TRIM( random_generator )
1856    ENDIF
1857    IF ( pt_surface_initial_change /= 0.0_wp )  THEN
1858       WRITE ( io, 475 )  pt_surface_initial_change
1859    ENDIF
1860    IF ( humidity  .AND.  q_surface_initial_change /= 0.0_wp )  THEN
1861       WRITE ( io, 476 )  q_surface_initial_change       
1862    ENDIF
1863    IF ( passive_scalar  .AND.  q_surface_initial_change /= 0.0_wp )  THEN
1864       WRITE ( io, 477 )  q_surface_initial_change       
1865    ENDIF
1866
1867    IF ( particle_advection )  THEN
1868!
1869!--    Particle attributes
1870       WRITE ( io, 480 )  particle_advection_start, dt_prel, bc_par_lr, &
1871                          bc_par_ns, bc_par_b, bc_par_t, particle_maximum_age, &
1872                          end_time_prel
1873       IF ( use_sgs_for_particles )  WRITE ( io, 488 )  dt_min_part
1874       IF ( random_start_position )  WRITE ( io, 481 )
1875       IF ( seed_follows_topography )  WRITE ( io, 496 )
1876       IF ( particles_per_point > 1 )  WRITE ( io, 489 )  particles_per_point
1877       WRITE ( io, 495 )  total_number_of_particles
1878       IF ( dt_write_particle_data /= 9999999.9_wp )  THEN
1879          WRITE ( io, 485 )  dt_write_particle_data
1880          IF ( netcdf_data_format > 1 )  THEN
1881             output_format = 'netcdf (64 bit offset) and binary'
1882          ELSE
1883             output_format = 'netcdf and binary'
1884          ENDIF
1885          IF ( netcdf_deflate == 0 )  THEN
1886             WRITE ( io, 344 )  output_format
1887          ELSE
1888             WRITE ( io, 354 )  TRIM( output_format ), netcdf_deflate
1889          ENDIF
1890       ENDIF
1891       IF ( dt_dopts /= 9999999.9_wp )  WRITE ( io, 494 )  dt_dopts
1892       IF ( write_particle_statistics )  WRITE ( io, 486 )
1893
1894       WRITE ( io, 487 )  number_of_particle_groups
1895
1896       DO  i = 1, number_of_particle_groups
1897          IF ( i == 1  .AND.  density_ratio(i) == 9999999.9_wp )  THEN
1898             WRITE ( io, 490 )  i, 0.0_wp
1899             WRITE ( io, 492 )
1900          ELSE
1901             WRITE ( io, 490 )  i, radius(i)
1902             IF ( density_ratio(i) /= 0.0_wp )  THEN
1903                WRITE ( io, 491 )  density_ratio(i)
1904             ELSE
1905                WRITE ( io, 492 )
1906             ENDIF
1907          ENDIF
1908          WRITE ( io, 493 )  psl(i), psr(i), pss(i), psn(i), psb(i), pst(i), &
1909                             pdx(i), pdy(i), pdz(i)
1910          IF ( .NOT. vertical_particle_advection(i) )  WRITE ( io, 482 )
1911       ENDDO
1912
1913    ENDIF
1914
1915
1916!
1917!-- Parameters of 1D-model
1918    IF ( INDEX( initializing_actions, 'set_1d-model_profiles' ) /= 0 )  THEN
1919       WRITE ( io, 500 )  end_time_1d, dt_run_control_1d, dt_pr_1d, &
1920                          mixing_length_1d, dissipation_1d
1921       IF ( damp_level_ind_1d /= nzt+1 )  THEN
1922          WRITE ( io, 502 )  zu(damp_level_ind_1d), damp_level_ind_1d
1923       ENDIF
1924    ENDIF
1925
1926!
1927!-- User-defined information
1928    CALL user_header( io )
1929
1930    WRITE ( io, 99 )
1931
1932!
1933!-- Write buffer contents to disc immediately
1934    FLUSH( io )
1935
1936!
1937!-- Here the FORMATs start
1938
1939 99 FORMAT (1X,78('-'))
1940100 FORMAT (/1X,'******************************',4X,44('-')/        &
1941            1X,'* ',A,' *',4X,A/                               &
1942            1X,'******************************',4X,44('-'))
1943101 FORMAT (35X,'coupled run: ',A/ &
1944            35X,42('-'))
1945102 FORMAT (/' Date:                 ',A8,4X,'Run:       ',A20/      &
1946            ' Time:                 ',A8,4X,'Run-No.:   ',I2.2/     &
1947            ' Run on host:        ',A10)
1948#if defined( __parallel )
1949103 FORMAT (' Number of PEs:',10X,I6,4X,'Processor grid (x,y): (',I4,',',I4, &
1950              ')',1X,A)
1951104 FORMAT (' Number of PEs:',10X,I6,4X,'Tasks:',I4,'   threads per task:',I4/ &
1952              35X,'Processor grid (x,y): (',I4,',',I4,')',1X,A)
1953105 FORMAT (35X,'One additional PE is used to handle'/37X,'the dvrp output!')
1954107 FORMAT (35X,'A 1d-decomposition along ',A,' is used')
1955108 FORMAT (35X,'Max. # of parallel I/O streams is ',I5)
1956109 FORMAT (35X,'Precursor run for coupled atmos-ocean run'/ &
1957            35X,42('-'))
1958114 FORMAT (35X,'Coupled atmosphere-ocean run following'/ &
1959            35X,'independent precursor runs'/             &
1960            35X,42('-'))
1961#endif
1962110 FORMAT (/' Numerical Schemes:'/ &
1963             ' -----------------'/)
1964121 FORMAT (' --> Use the ',A,' approximation for the model equations.')
1965111 FORMAT (' --> Solve perturbation pressure via FFT using ',A,' routines')
1966112 FORMAT (' --> Solve perturbation pressure via SOR-Red/Black-Schema'/ &
1967            '     Iterations (initial/other): ',I3,'/',I3,'  omega =',F6.3)
1968113 FORMAT (' --> Momentum advection via Piascek-Williams-Scheme (Form C3)', &
1969                  ' or Upstream')
1970115 FORMAT ('     FFT and transpositions are overlapping')
1971116 FORMAT (' --> Scalar advection via Piascek-Williams-Scheme (Form C3)', &
1972                  ' or Upstream')
1973118 FORMAT (' --> Scalar advection via Bott-Chlond-Scheme')
1974119 FORMAT (' --> Galilei-Transform applied to horizontal advection:'/ &
1975            '     translation velocity = ',A/ &
1976            '     distance advected ',A,':  ',F8.3,' km(x)  ',F8.3,' km(y)')
1977122 FORMAT (' --> Time differencing scheme: ',A)
1978123 FORMAT (' --> Rayleigh-Damping active, starts ',A,' z = ',F8.2,' m'/ &
1979            '     maximum damping coefficient:',F6.3, ' 1/s')
1980129 FORMAT (' --> Additional prognostic equation for the specific humidity')
1981130 FORMAT (' --> Additional prognostic equation for the total water content')
1982131 FORMAT (' --> No pt-equation solved. Neutral stratification with pt = ', &
1983                  F6.2, ' K assumed')
1984132 FORMAT ('     Parameterization of long-wave radiation processes via'/ &
1985            '     effective emissivity scheme')
1986133 FORMAT ('     Precipitation parameterization via Kessler-Scheme')
1987134 FORMAT (' --> Additional prognostic equation for a passive scalar')
1988135 FORMAT (' --> Solve perturbation pressure via ',A,' method (', &
1989                  A,'-cycle)'/ &
1990            '     number of grid levels:                   ',I2/ &
1991            '     Gauss-Seidel red/black iterations:       ',I2)
1992136 FORMAT ('     gridpoints of coarsest subdomain (x,y,z): (',I3,',',I3,',', &
1993                  I3,')')
1994137 FORMAT ('     level data gathered on PE0 at level:     ',I2/ &
1995            '     gridpoints of coarsest subdomain (x,y,z): (',I3,',',I3,',', &
1996                  I3,')'/ &
1997            '     gridpoints of coarsest domain (x,y,z):    (',I3,',',I3,',', &
1998                  I3,')')
1999139 FORMAT (' --> Loop optimization method: ',A)
2000140 FORMAT ('     maximum residual allowed:                ',E10.3)
2001141 FORMAT ('     fixed number of multigrid cycles:        ',I4)
2002142 FORMAT ('     perturbation pressure is calculated at every Runge-Kutta ', &
2003                  'step')
2004143 FORMAT ('     Euler/upstream scheme is used for the SGS turbulent ', &
2005                  'kinetic energy')
2006144 FORMAT ('     masking method is used')
2007150 FORMAT (' --> Volume flow at the right and north boundary will be ', &
2008                  'conserved'/ &
2009            '     using the ',A,' mode')
2010151 FORMAT ('     with u_bulk = ',F7.3,' m/s and v_bulk = ',F7.3,' m/s')
2011152 FORMAT (' --> External pressure gradient directly prescribed by the user:',&
2012           /'     ',2(1X,E12.5),'Pa/m in x/y direction', &
2013           /'     starting from dp_level_b =', F8.3, 'm', A /)
2014160 FORMAT (//' Large scale forcing and nudging:'/ &
2015              ' -------------------------------'/)
2016161 FORMAT (' --> No large scale forcing from external is used (default) ')
2017162 FORMAT (' --> Large scale forcing from external file LSF_DATA is used: ')
2018163 FORMAT ('     - large scale advection tendencies ')
2019164 FORMAT ('     - large scale subsidence velocity w_subs ')
2020165 FORMAT ('     - large scale subsidence tendencies ')
2021167 FORMAT ('     - and geostrophic wind components ug and vg')
2022168 FORMAT (' --> Large-scale vertical motion is used in the ', &
2023                  'prognostic equation(s) for')
2024169 FORMAT ('     the scalar(s) only')
2025170 FORMAT (' --> Nudging is used')
2026171 FORMAT (' --> No nudging is used (default) ')
2027180 FORMAT ('     - prescribed surface values for temperature')
2028181 FORMAT ('     - prescribed surface fluxes for temperature')
2029182 FORMAT ('     - prescribed surface values for humidity')
2030183 FORMAT ('     - prescribed surface fluxes for humidity')
2031200 FORMAT (//' Run time and time step information:'/ &
2032             ' ----------------------------------'/)
2033201 FORMAT ( ' Timestep:             variable     maximum value: ',F6.3,' s', &
2034             '    CFL-factor:',F5.2)
2035202 FORMAT ( ' Timestep:          dt = ',F6.3,' s'/)
2036203 FORMAT ( ' Start time:          ',F9.3,' s'/ &
2037             ' End time:            ',F9.3,' s')
2038204 FORMAT ( A,F9.3,' s')
2039205 FORMAT ( A,F9.3,' s',5X,'restart every',17X,F9.3,' s')
2040206 FORMAT (/' Time reached:        ',F9.3,' s'/ &
2041             ' CPU-time used:       ',F9.3,' s     per timestep:               ', &
2042               '  ',F9.3,' s'/                                                    &
2043             '                                      per second of simulated tim', &
2044               'e: ',F9.3,' s')
2045207 FORMAT ( ' Coupling start time: ',F9.3,' s')
2046250 FORMAT (//' Computational grid and domain size:'/ &
2047              ' ----------------------------------'// &
2048              ' Grid length:      dx =    ',F7.3,' m    dy =    ',F7.3, &
2049              ' m    dz =    ',F7.3,' m'/ &
2050              ' Domain size:       x = ',F10.3,' m     y = ',F10.3, &
2051              ' m  z(u) = ',F10.3,' m'/)
2052252 FORMAT (' dz constant up to ',F10.3,' m (k=',I4,'), then stretched by', &
2053              ' factor:',F6.3/ &
2054            ' maximum dz not to be exceeded is dz_max = ',F10.3,' m'/)
2055254 FORMAT (' Number of gridpoints (x,y,z):  (0:',I4,', 0:',I4,', 0:',I4,')'/ &
2056            ' Subdomain size (x,y,z):        (  ',I4,',   ',I4,',   ',I4,')'/)
2057260 FORMAT (/' The model has a slope in x-direction. Inclination angle: ',F6.2,&
2058             ' degrees')
2059270 FORMAT (//' Topography information:'/ &
2060              ' ----------------------'// &
2061              1X,'Topography: ',A)
2062271 FORMAT (  ' Building size (x/y/z) in m: ',F5.1,' / ',F5.1,' / ',F5.1/ &
2063              ' Horizontal index bounds (l/r/s/n): ',I4,' / ',I4,' / ',I4, &
2064                ' / ',I4)
2065272 FORMAT (  ' Single quasi-2D street canyon of infinite length in ',A, &
2066              ' direction' / &
2067              ' Canyon height: ', F6.2, 'm, ch = ', I4, '.'      / &
2068              ' Canyon position (',A,'-walls): cxl = ', I4,', cxr = ', I4, '.')
2069273 FORMAT (  ' Tunnel of infinite length in ',A, &
2070              ' direction' / &
2071              ' Tunnel height: ', F6.2, / &
2072              ' Tunnel-wall depth: ', F6.2      / &
2073              ' Tunnel width: ', F6.2 )
2074274 FORMAT (  ' Tunnel in ', A, ' direction.' / &
2075              ' Tunnel height: ', F6.2, / &   
2076              ' Tunnel-wall depth: ', F6.2      / &
2077              ' Tunnel width: ', F6.2, / &
2078              ' Tunnel length: ', F6.2 )
2079278 FORMAT (' Topography grid definition convention:'/ &
2080            ' cell edge (staggered grid points'/  &
2081            ' (u in x-direction, v in y-direction))' /)
2082279 FORMAT (' Topography grid definition convention:'/ &
2083            ' cell center (scalar grid points)' /)
2084300 FORMAT (//' Boundary conditions:'/ &
2085             ' -------------------'// &
2086             '                     p                    uv             ', &
2087             '                     pt'// &
2088             ' B. bound.: ',A/ &
2089             ' T. bound.: ',A)
2090301 FORMAT (/'                     ',A// &
2091             ' B. bound.: ',A/ &
2092             ' T. bound.: ',A)
2093303 FORMAT (/' Bottom surface fluxes are used in diffusion terms at k=1')
2094304 FORMAT (/' Top surface fluxes are used in diffusion terms at k=nzt')
2095305 FORMAT (//'    Constant flux layer between bottom surface and first ',     &
2096              'computational u,v-level:'// &
2097             '       z_mo = ',F6.2,' m   z0 =',F7.4,' m   z0h =',F8.5,&
2098             ' m   kappa =',F5.2/ &
2099             '       Rif value range:   ',F8.2,' <= rif <=',F6.2)
2100306 FORMAT ('       Predefined constant heatflux:   ',F9.6,' K m/s')
2101307 FORMAT ('       Heatflux has a random normal distribution')
2102308 FORMAT ('       Predefined surface temperature')
2103309 FORMAT ('       Predefined constant salinityflux:   ',F9.6,' psu m/s')
2104310 FORMAT (//'    1D-Model:'// &
2105             '       Rif value range:   ',F6.2,' <= rif <=',F6.2)
2106311 FORMAT ('       Predefined constant humidity flux: ',E10.3,' kg/kg m/s')
2107312 FORMAT ('       Predefined surface humidity')
2108313 FORMAT ('       Predefined constant scalar flux: ',E10.3,' kg/(m**2 s)')
2109314 FORMAT ('       Predefined scalar value at the surface')
2110302 FORMAT ('       Predefined constant scalarflux:   ',F9.6,' kg/(m**2 s)')
2111315 FORMAT ('       Humidity flux at top surface is 0.0')
2112316 FORMAT ('       Sensible heatflux and momentum flux from coupled ', &
2113                    'atmosphere model')
2114317 FORMAT (//' Lateral boundaries:'/ &
2115            '       left/right:  ',A/    &
2116            '       north/south: ',A)
2117318 FORMAT (/'       use_cmax: ',L1 / &
2118            '       pt damping layer width = ',F8.2,' m, pt ', &
2119                    'damping factor =',F7.4)
2120319 FORMAT ('       turbulence recycling at inflow switched on'/ &
2121            '       width of recycling domain: ',F7.1,' m   grid index: ',I4/ &
2122            '       inflow damping height: ',F6.1,' m   width: ',F6.1,' m')
2123320 FORMAT ('       Predefined constant momentumflux:  u: ',F9.6,' m**2/s**2'/ &
2124            '                                          v: ',F9.6,' m**2/s**2')
2125321 FORMAT (//' Initial profiles:'/ &
2126              ' ----------------')
2127322 FORMAT ('       turbulence recycling at inflow switched on'/ &
2128            '       y shift of the recycled inflow turbulence switched on'/ &
2129            '       width of recycling domain: ',F7.1,' m   grid index: ',I4/ &
2130            '       inflow damping height: ',F6.1,' m   width: ',F6.1,' m'/)
2131323 FORMAT ('       turbulent outflow conditon switched on'/ &
2132            '       position of outflow source plane: ',F7.1,' m   ', &
2133                    'grid index: ', I4)
2134325 FORMAT (//' List output:'/ &
2135             ' -----------'//  &
2136            '    1D-Profiles:'/    &
2137            '       Output every             ',F8.2,' s')
2138326 FORMAT ('       Time averaged over       ',F8.2,' s'/ &
2139            '       Averaging input every    ',F8.2,' s')
2140330 FORMAT (//' Data output:'/ &
2141             ' -----------'/)
2142331 FORMAT (/'    1D-Profiles:')
2143332 FORMAT (/'       ',A)
2144333 FORMAT ('       Output every             ',F8.2,' s',/ &
2145            '       Time averaged over       ',F8.2,' s'/ &
2146            '       Averaging input every    ',F8.2,' s')
2147334 FORMAT (/'    2D-Arrays',A,':')
2148335 FORMAT (/'       ',A2,'-cross-section  Arrays: ',A/ &
2149            '       Output every             ',F8.2,' s  ',A/ &
2150            '       Cross sections at ',A1,' = ',A/ &
2151            '       scalar-coordinates:   ',A,' m'/)
2152336 FORMAT (/'    3D-Arrays',A,':')
2153337 FORMAT (/'       Arrays: ',A/ &
2154            '       Output every             ',F8.2,' s  ',A/ &
2155            '       Upper output limit at    ',F8.2,' m  (GP ',I4,')'/)
2156339 FORMAT ('       No output during initial ',F8.2,' s')
2157340 FORMAT (/'    Time series:')
2158341 FORMAT ('       Output every             ',F8.2,' s'/)
2159342 FORMAT (/'       ',A2,'-cross-section  Arrays: ',A/ &
2160            '       Output every             ',F8.2,' s  ',A/ &
2161            '       Time averaged over       ',F8.2,' s'/ &
2162            '       Averaging input every    ',F8.2,' s'/ &
2163            '       Cross sections at ',A1,' = ',A/ &
2164            '       scalar-coordinates:   ',A,' m'/)
2165343 FORMAT (/'       Arrays: ',A/ &
2166            '       Output every             ',F8.2,' s  ',A/ &
2167            '       Time averaged over       ',F8.2,' s'/ &
2168            '       Averaging input every    ',F8.2,' s'/ &
2169            '       Upper output limit at    ',F8.2,' m  (GP ',I4,')'/)
2170344 FORMAT ('       Output format: ',A/)
2171345 FORMAT (/'    Scaling lengths for output locations of all subsequent mask IDs:',/ &
2172            '       mask_scale_x (in x-direction): ',F9.3, ' m',/ &
2173            '       mask_scale_y (in y-direction): ',F9.3, ' m',/ &
2174            '       mask_scale_z (in z-direction): ',F9.3, ' m' )
2175346 FORMAT (/'    Masked data output',A,' for mask ID ',I2, ':')
2176347 FORMAT ('       Variables: ',A/ &
2177            '       Output every             ',F8.2,' s')
2178348 FORMAT ('       Variables: ',A/ &
2179            '       Output every             ',F8.2,' s'/ &
2180            '       Time averaged over       ',F8.2,' s'/ &
2181            '       Averaging input every    ',F8.2,' s')
2182349 FORMAT (/'       Output locations in ',A,'-direction in multiples of ', &
2183            'mask_scale_',A,' predefined by array mask_',I2.2,'_',A,':'/ &
2184            13('       ',8(F8.2,',')/) )
2185350 FORMAT (/'       Output locations in ',A,'-direction: ', &
2186            'all gridpoints along ',A,'-direction (default).' )
2187351 FORMAT (/'       Output locations in ',A,'-direction in multiples of ', &
2188            'mask_scale_',A,' constructed from array mask_',I2.2,'_',A,'_loop:'/ &
2189            '          loop begin:',F8.2,', end:',F8.2,', stride:',F8.2 )
2190352 FORMAT  (/'       Number of output time levels allowed: ',I3 /)
2191353 FORMAT  (/'       Number of output time levels allowed: unlimited' /)
2192354 FORMAT ('       Output format: ',A, '   compressed with level: ',I1/)
2193#if defined( __dvrp_graphics )
2194360 FORMAT ('    Plot-Sequence with dvrp-software:'/ &
2195            '       Output every      ',F7.1,' s'/ &
2196            '       Output mode:      ',A/ &
2197            '       Host / User:      ',A,' / ',A/ &
2198            '       Directory:        ',A// &
2199            '       The sequence contains:')
2200361 FORMAT (/'       Isosurface of "',A,'"    Threshold value: ', E12.3/ &
2201            '          Isosurface color: (',F4.2,',',F4.2,',',F4.2,') (R,G,B)')
2202362 FORMAT (/'       Slicer plane ',A/ &
2203            '       Slicer limits: [',F6.2,',',F6.2,']')
2204365 FORMAT (/'       Groundplate color: (',F4.2,',',F4.2,',',F4.2,') (R,G,B)'/ &
2205            '       Superelevation along (x,y,z): (',F4.1,',',F4.1,',',F4.1, &
2206                     ')'/ &
2207            '       Clipping limits: from x = ',F9.1,' m to x = ',F9.1,' m'/ &
2208            '                        from y = ',F9.1,' m to y = ',F9.1,' m')
2209366 FORMAT (/'       Topography color: (',F4.2,',',F4.2,',',F4.2,') (R,G,B)')
2210367 FORMAT ('       Polygon reduction for topography: cluster_size = ', I1)
2211#endif
2212400 FORMAT (//' Physical quantities:'/ &
2213              ' -------------------'/)
2214410 FORMAT ('    Geograph. latitude  :   phi    = ',F4.1,' degr'/   &
2215            '    Angular velocity    :   omega  =',E10.3,' rad/s'/  &
2216            '    Coriolis parameter  :   f      = ',F9.6,' 1/s'/    &
2217            '                            f*     = ',F9.6,' 1/s')
2218411 FORMAT (/'    Gravity             :   g      = ',F4.1,' m/s**2')
2219412 FORMAT (/'    Reference state used in buoyancy terms: ',A)
2220413 FORMAT ('       Reference density in buoyancy terms: ',F8.3,' kg/m**3')
2221414 FORMAT ('       Reference temperature in buoyancy terms: ',F8.4,' K')
2222415 FORMAT (/' Cloud physics parameters:'/ &
2223             ' ------------------------'/)
2224416 FORMAT ('    Surface pressure   :   p_0   = ',F7.2,' hPa'/      &
2225            '    Gas constant       :   R     = ',F5.1,' J/(kg K)'/ &
2226            '    Density of air     :   rho_0 =',F6.3,' kg/m**3'/  &
2227            '    Specific heat cap. :   c_p   = ',F6.1,' J/(kg K)'/ &
2228            '    Vapourization heat :   L_v   =',E9.2,' J/kg')
2229417 FORMAT ('    Geograph. longitude :   lambda = ',F4.1,' degr')
2230418 FORMAT (/'    Day of the year at model start :   day_init      =     ',I3 &
2231            /'    UTC time at model start        :   time_utc_init = ',F7.1' s')
2232420 FORMAT (/'    Characteristic levels of the initial temperature profile:'// &
2233            '       Height:        ',A,'  m'/ &
2234            '       Temperature:   ',A,'  K'/ &
2235            '       Gradient:      ',A,'  K/100m'/ &
2236            '       Gridpoint:     ',A)
2237421 FORMAT (/'    Characteristic levels of the initial humidity profile:'// &
2238            '       Height:      ',A,'  m'/ &
2239            '       Humidity:    ',A,'  kg/kg'/ &
2240            '       Gradient:    ',A,'  (kg/kg)/100m'/ &
2241            '       Gridpoint:   ',A)
2242422 FORMAT (/'    Characteristic levels of the initial scalar profile:'// &
2243            '       Height:                  ',A,'  m'/ &
2244            '       Scalar concentration:    ',A,'  kg/m**3'/ &
2245            '       Gradient:                ',A,'  (kg/m**3)/100m'/ &
2246            '       Gridpoint:               ',A)
2247423 FORMAT (/'    Characteristic levels of the geo. wind component ug:'// &
2248            '       Height:      ',A,'  m'/ &
2249            '       ug:          ',A,'  m/s'/ &
2250            '       Gradient:    ',A,'  1/100s'/ &
2251            '       Gridpoint:   ',A)
2252424 FORMAT (/'    Characteristic levels of the geo. wind component vg:'// &
2253            '       Height:      ',A,'  m'/ &
2254            '       vg:          ',A,'  m/s'/ &
2255            '       Gradient:    ',A,'  1/100s'/ &
2256            '       Gridpoint:   ',A)
2257425 FORMAT (/'    Characteristic levels of the initial salinity profile:'// &
2258            '       Height:     ',A,'  m'/ &
2259            '       Salinity:   ',A,'  psu'/ &
2260            '       Gradient:   ',A,'  psu/100m'/ &
2261            '       Gridpoint:  ',A)
2262426 FORMAT (/'    Characteristic levels of the subsidence/ascent profile:'// &
2263            '       Height:      ',A,'  m'/ &
2264            '       w_subs:      ',A,'  m/s'/ &
2265            '       Gradient:    ',A,'  (m/s)/100m'/ &
2266            '       Gridpoint:   ',A)
2267427 FORMAT (/'    Initial wind profiles (u,v) are interpolated from given'// &
2268                  ' profiles')
2269428 FORMAT (/'    Initial profiles (u, v, pt, q) are taken from file '/ &
2270             '    NUDGING_DATA')
2271430 FORMAT (//' Cloud physics quantities / methods:'/ &
2272              ' ----------------------------------'/)
2273431 FORMAT ('    Humidity is considered, bu no condensation')
2274432 FORMAT ('    Bulk scheme with liquid water potential temperature and'/ &
2275            '    total water content is used.'/ &
2276            '    Condensation is parameterized via 0% - or 100% scheme.')
2277433 FORMAT ('    Cloud droplets treated explicitly using the Lagrangian part', &
2278                 'icle model')
2279434 FORMAT ('    Curvature and solution effecs are considered for growth of', &
2280                 ' droplets < 1.0E-6 m')
2281435 FORMAT ('    Droplet collision is handled by ',A,'-kernel')
2282436 FORMAT ('       Fast kernel with fixed radius- and dissipation classes ', &
2283                    'are used'/ &
2284            '          number of radius classes:       ',I3,'    interval ', &
2285                       '[1.0E-6,2.0E-4] m'/ &
2286            '          number of dissipation classes:   ',I2,'    interval ', &
2287                       '[0,1000] cm**2/s**3')
2288437 FORMAT ('    Droplet collision is switched off')
2289450 FORMAT (//' LES / Turbulence quantities:'/ &
2290              ' ---------------------------'/)
2291451 FORMAT ('    Diffusion coefficients are constant:'/ &
2292            '    Km = ',F6.2,' m**2/s   Kh = ',F6.2,' m**2/s   Pr = ',F5.2)
2293453 FORMAT ('    Mixing length is limited to',F5.2,' * z')
2294454 FORMAT ('    TKE is not allowed to fall below ',E9.2,' (m/s)**2')
2295455 FORMAT ('    initial TKE is prescribed as ',E9.2,' (m/s)**2')
2296470 FORMAT (//' Actions during the simulation:'/ &
2297              ' -----------------------------'/)
2298471 FORMAT ('    Disturbance impulse (u,v) every :   ',F6.2,' s'/            &
2299            '    Disturbance amplitude           :    ',F5.2, ' m/s'/       &
2300            '    Lower disturbance level         : ',F8.2,' m (GP ',I4,')'/  &
2301            '    Upper disturbance level         : ',F8.2,' m (GP ',I4,')')
2302472 FORMAT ('    Disturbances continued during the run from i/j =',I4, &
2303                 ' to i/j =',I4)
2304473 FORMAT ('    Disturbances cease as soon as the disturbance energy exceeds',&
2305                 F6.3, ' m**2/s**2')
2306474 FORMAT ('    Random number generator used    : ',A/)
2307475 FORMAT ('    The surface temperature is increased (or decreased, ', &
2308                 'respectively, if'/ &
2309            '    the value is negative) by ',F5.2,' K at the beginning of the',&
2310                 ' 3D-simulation'/)
2311476 FORMAT ('    The surface humidity is increased (or decreased, ',&
2312                 'respectively, if the'/ &
2313            '    value is negative) by ',E8.1,' kg/kg at the beginning of', &
2314                 ' the 3D-simulation'/)
2315477 FORMAT ('    The scalar value is increased at the surface (or decreased, ',&
2316                 'respectively, if the'/ &
2317            '    value is negative) by ',E8.1,' kg/m**3 at the beginning of', &
2318                 ' the 3D-simulation'/)
2319480 FORMAT ('    Particles:'/ &
2320            '    ---------'// &
2321            '       Particle advection is active (switched on at t = ', F7.1, &
2322                    ' s)'/ &
2323            '       Start of new particle generations every  ',F6.1,' s'/ &
2324            '       Boundary conditions: left/right: ', A, ' north/south: ', A/&
2325            '                            bottom:     ', A, ' top:         ', A/&
2326            '       Maximum particle age:                 ',F9.1,' s'/ &
2327            '       Advection stopped at t = ',F9.1,' s'/)
2328481 FORMAT ('       Particles have random start positions'/)
2329482 FORMAT ('          Particles are advected only horizontally'/)
2330485 FORMAT ('       Particle data are written on file every ', F9.1, ' s')
2331486 FORMAT ('       Particle statistics are written on file'/)
2332487 FORMAT ('       Number of particle groups: ',I2/)
2333488 FORMAT ('       SGS velocity components are used for particle advection'/ &
2334            '          minimum timestep for advection:', F8.5/)
2335489 FORMAT ('       Number of particles simultaneously released at each ', &
2336                    'point: ', I5/)
2337490 FORMAT ('       Particle group ',I2,':'/ &
2338            '          Particle radius: ',E10.3, 'm')
2339491 FORMAT ('          Particle inertia is activated'/ &
2340            '             density_ratio (rho_fluid/rho_particle) =',F6.3/)
2341492 FORMAT ('          Particles are advected only passively (no inertia)'/)
2342493 FORMAT ('          Boundaries of particle source: x:',F8.1,' - ',F8.1,' m'/&
2343            '                                         y:',F8.1,' - ',F8.1,' m'/&
2344            '                                         z:',F8.1,' - ',F8.1,' m'/&
2345            '          Particle distances:  dx = ',F8.1,' m  dy = ',F8.1, &
2346                       ' m  dz = ',F8.1,' m'/)
2347494 FORMAT ('       Output of particle time series in NetCDF format every ', &
2348                    F8.2,' s'/)
2349495 FORMAT ('       Number of particles in total domain: ',I10/)
2350496 FORMAT ('       Initial vertical particle positions are interpreted ', &
2351                    'as relative to the given topography')
2352500 FORMAT (//' 1D-Model parameters:'/                           &
2353              ' -------------------'//                           &
2354            '    Simulation time:                   ',F8.1,' s'/ &
2355            '    Run-controll output every:         ',F8.1,' s'/ &
2356            '    Vertical profile output every:     ',F8.1,' s'/ &
2357            '    Mixing length calculation:         ',A/         &
2358            '    Dissipation calculation:           ',A/)
2359502 FORMAT ('    Damping layer starts from ',F7.1,' m (GP ',I4,')'/)
2360503 FORMAT (' --> Momentum advection via Wicker-Skamarock-Scheme 5th order')
2361504 FORMAT (' --> Scalar advection via Wicker-Skamarock-Scheme 5th order')
2362505 FORMAT ('    Precipitation parameterization via Seifert-Beheng-Scheme')
2363506 FORMAT ('    Cloud water sedimentation parameterization via Stokes law')
2364507 FORMAT ('    Turbulence effects on precipitation process')
2365508 FORMAT ('    Ventilation effects on evaporation of rain drops')
2366509 FORMAT ('    Slope limiter used for sedimentation process')
2367510 FORMAT ('    Droplet density    :   N_c   = ',F6.1,' 1/cm**3')
2368511 FORMAT ('    Sedimentation Courant number:                  '/&
2369            '                               C_s   =',F4.1,'        ')
2370512 FORMAT (/' Date:                 ',A8,6X,'Run:       ',A20/      &
2371            ' Time:                 ',A8,6X,'Run-No.:   ',I2.2/     &
2372            ' Run on host:        ',A10,6X,'En-No.:    ',I2.2)
2373600 FORMAT (/' Nesting informations:'/ &
2374            ' --------------------'/ &
2375            ' Nesting mode:                     ',A/ &
2376            ' Nesting-datatransfer mode:        ',A// &
2377            ' Nest id  parent  number   lower left coordinates   name'/ &
2378            ' (*=me)     id    of PEs      x (m)     y (m)' )
2379601 FORMAT (2X,A1,1X,I2.2,6X,I2.2,5X,I5,5X,F8.2,2X,F8.2,5X,A)
2380
2381 END SUBROUTINE header
Note: See TracBrowser for help on using the repository browser.