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

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

write_binary is of type LOGICAL now, MPI2-related code removed, obsolete variables removed, sendrecv_in_background related parts removed, missing variable descriptions added

  • Property svn:keywords set to Id
File size: 90.6 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 2298 2017-06-29 09:28:18Z raasch $
27! MPI2 related parts removed
28!
29! 2270 2017-06-09 12:18:47Z maronga
30! Renamed Prandtl layer to constant flux layer
31!
32! 2259 2017-06-08 09:09:11Z gronemeier
33! Implemented synthetic turbulence generator
34!
35! 2258 2017-06-08 07:55:13Z suehring
36! Bugfix, add pre-preprocessor directives to enable non-parrallel mode
37!
38! 2233 2017-05-30 18:08:54Z suehring
39!
40! 2232 2017-05-30 17:47:52Z suehring
41! Adjustments to new topography and surface concept
42! Generic tunnel setup added
43!
44! 2200 2017-04-11 11:37:51Z suehring
45! monotonic_adjustment removed
46!
47! 2118 2017-01-17 16:38:49Z raasch
48! OpenACC relatec code removed
49!
50! 2073 2016-11-30 14:34:05Z raasch
51! small bugfix concerning output of scalar profiles
52!
53! 2050 2016-11-08 15:00:55Z gronemeier
54! Implement turbulent outflow condition
55!
56! 2037 2016-10-26 11:15:40Z knoop
57! Anelastic approximation implemented
58!
59! 2000 2016-08-20 18:09:15Z knoop
60! Forced header and separation lines into 80 columns
61!
62! 1992 2016-08-12 15:14:59Z suehring
63! Adapted for top_scalarflux
64!
65! 1960 2016-07-12 16:34:24Z suehring
66! Treat humidity and passive scalar separately.
67! Modify misleading information concerning humidity.
68! Bugfix, change unit for humidity flux.
69!
70! 1957 2016-07-07 10:43:48Z suehring
71! flight module added
72!
73! 1931 2016-06-10 12:06:59Z suehring
74! Rename multigrid into multigrid_noopt
75!
76! 1902 2016-05-09 11:18:56Z suehring
77! Write information about masking_method only for multigrid solver
78!
79! 1849 2016-04-08 11:33:18Z hoffmann
80! Adapted for modularization of microphysics
81!
82! 1833 2016-04-07 14:23:03Z raasch
83! spectrum renamed spectra_mod, output of spectra related quantities moved to
84! spectra_mod
85!
86! 1831 2016-04-07 13:15:51Z hoffmann
87! turbulence renamed collision_turbulence,
88! drizzle renamed cloud_water_sedimentation
89!
90! 1826 2016-04-07 12:01:39Z maronga
91! Moved radiation model header output to the respective module.
92! Moved canopy model header output to the respective module.
93!
94! 1822 2016-04-07 07:49:42Z hoffmann
95! Tails removed. icloud_scheme replaced by microphysics_*
96!
97! 1817 2016-04-06 15:44:20Z maronga
98! Moved land_surface_model header output to the respective module.
99!
100! 1808 2016-04-05 19:44:00Z raasch
101! routine local_flush replaced by FORTRAN statement
102!
103! 1797 2016-03-21 16:50:28Z raasch
104! output of nesting datatransfer mode
105!
106! 1791 2016-03-11 10:41:25Z raasch
107! output of nesting informations of all domains
108!
109! 1788 2016-03-10 11:01:04Z maronga
110! Parameter dewfall removed
111!
112! 1786 2016-03-08 05:49:27Z raasch
113! cpp-direktives for spectra removed
114!
115! 1783 2016-03-06 18:36:17Z raasch
116! netcdf module and variable names changed, output of netcdf_deflate
117!
118! 1764 2016-02-28 12:45:19Z raasch
119! output of nesting informations
120!
121! 1697 2015-10-28 17:14:10Z raasch
122! small E- and F-FORMAT changes to avoid informative compiler messages about
123! insufficient field width
124!
125! 1691 2015-10-26 16:17:44Z maronga
126! Renamed prandtl_layer to constant_flux_layer, renames rif_min/rif_max to
127! zeta_min/zeta_max.
128!
129! 1682 2015-10-07 23:56:08Z knoop
130! Code annotations made doxygen readable
131!
132! 1675 2015-10-02 08:28:59Z gronemeier
133! Bugfix: Definition of topography grid levels
134!
135! 1660 2015-09-21 08:15:16Z gronemeier
136! Bugfix: Definition of building/street canyon height if vertical grid stretching
137!         starts below the maximum topography height.
138!
139! 1590 2015-05-08 13:56:27Z maronga
140! Bugfix: Added TRIM statements for character strings for LSM and radiation code
141!
142! 1585 2015-04-30 07:05:52Z maronga
143! Further output for radiation model(s).
144!
145! 1575 2015-03-27 09:56:27Z raasch
146! adjustments for psolver-queries, output of seed_follows_topography
147!
148! 1560 2015-03-06 10:48:54Z keck
149! output for recycling y shift
150!
151! 1557 2015-03-05 16:43:04Z suehring
152! output for monotonic limiter
153!
154! 1551 2015-03-03 14:18:16Z maronga
155! Added informal output for land surface model and radiation model. Removed typo.
156!
157! 1496 2014-12-02 17:25:50Z maronga
158! Renamed: "radiation -> "cloud_top_radiation"
159!
160! 1484 2014-10-21 10:53:05Z kanani
161! Changes due to new module structure of the plant canopy model:
162!   module plant_canopy_model_mod and output for new canopy model parameters
163!   (alpha_lad, beta_lad, lai_beta,...) added,
164!   drag_coefficient, leaf_surface_concentration and scalar_exchange_coefficient
165!   renamed to canopy_drag_coeff, leaf_surface_conc and leaf_scalar_exch_coeff,
166!   learde renamed leaf_area_density.
167! Bugfix: DO-WHILE-loop for lad header information additionally restricted
168! by maximum number of gradient levels (currently 10)
169!
170! 1482 2014-10-18 12:34:45Z raasch
171! information about calculated or predefined virtual processor topology adjusted
172!
173! 1468 2014-09-24 14:06:57Z maronga
174! Adapted for use on up to 6-digit processor cores
175!
176! 1429 2014-07-15 12:53:45Z knoop
177! header exended to provide ensemble_member_nr if specified
178!
179! 1376 2014-04-26 11:21:22Z boeske
180! Correction of typos
181!
182! 1365 2014-04-22 15:03:56Z boeske
183! New section 'Large scale forcing and nudging':
184! output of large scale forcing and nudging information,
185! new section for initial profiles created
186!
187! 1359 2014-04-11 17:15:14Z hoffmann
188! dt_sort_particles removed
189!
190! 1353 2014-04-08 15:21:23Z heinze
191! REAL constants provided with KIND-attribute
192!
193! 1327 2014-03-21 11:00:16Z raasch
194! parts concerning iso2d and avs output removed,
195! -netcdf output queries
196!
197! 1324 2014-03-21 09:13:16Z suehring
198! Bugfix: module spectrum added
199!
200! 1322 2014-03-20 16:38:49Z raasch
201! REAL functions provided with KIND-attribute,
202! some REAL constants defined as wp-kind
203!
204! 1320 2014-03-20 08:40:49Z raasch
205! ONLY-attribute added to USE-statements,
206! kind-parameters added to all INTEGER and REAL declaration statements,
207! kinds are defined in new module kinds,
208! revision history before 2012 removed,
209! comment fields (!:) to be used for variable explanations added to
210! all variable declaration statements
211!
212! 1308 2014-03-13 14:58:42Z fricke
213! output of the fixed number of output time levels
214! output_format adjusted for masked data if netcdf_data_format > 5
215!
216! 1299 2014-03-06 13:15:21Z heinze
217! output for using large_scale subsidence in combination
218! with large_scale_forcing
219! reformatting, more detailed explanations
220!
221! 1241 2013-10-30 11:36:58Z heinze
222! output for nudging + large scale forcing from external file
223!
224! 1216 2013-08-26 09:31:42Z raasch
225! output for transpose_compute_overlap
226!
227! 1212 2013-08-15 08:46:27Z raasch
228! output for poisfft_hybrid removed
229!
230! 1179 2013-06-14 05:57:58Z raasch
231! output of reference_state, use_reference renamed use_single_reference_value
232!
233! 1159 2013-05-21 11:58:22Z fricke
234! +use_cmax
235!
236! 1115 2013-03-26 18:16:16Z hoffmann
237! descriptions for Seifert-Beheng-cloud-physics-scheme added
238!
239! 1111 2013-03-08 23:54:10Z raasch
240! output of accelerator board information
241! ibc_p_b = 2 removed
242!
243! 1108 2013-03-05 07:03:32Z raasch
244! bugfix for r1106
245!
246! 1106 2013-03-04 05:31:38Z raasch
247! some format changes for coupled runs
248!
249! 1092 2013-02-02 11:24:22Z raasch
250! unused variables removed
251!
252! 1036 2012-10-22 13:43:42Z raasch
253! code put under GPL (PALM 3.9)
254!
255! 1031 2012-10-19 14:35:30Z raasch
256! output of netCDF data format modified
257!
258! 1015 2012-09-27 09:23:24Z raasch
259! output of Adjustment of mixing length to the Prandtl mixing length at first
260! grid point above ground removed
261!
262! 1003 2012-09-14 14:35:53Z raasch
263! output of information about equal/unequal subdomain size removed
264!
265! 1001 2012-09-13 14:08:46Z raasch
266! all actions concerning leapfrog- and upstream-spline-scheme removed
267!
268! 978 2012-08-09 08:28:32Z fricke
269! -km_damp_max, outflow_damping_width
270! +pt_damping_factor, pt_damping_width
271! +z0h
272!
273! 964 2012-07-26 09:14:24Z raasch
274! output of profil-related quantities removed
275!
276! 940 2012-07-09 14:31:00Z raasch
277! Output in case of simulations for pure neutral stratification (no pt-equation
278! solved)
279!
280! 927 2012-06-06 19:15:04Z raasch
281! output of masking_method for mg-solver
282!
283! 868 2012-03-28 12:21:07Z raasch
284! translation velocity in Galilean transformation changed to 0.6 * ug
285!
286! 833 2012-02-22 08:55:55Z maronga
287! Adjusted format for leaf area density
288!
289! 828 2012-02-21 12:00:36Z raasch
290! output of dissipation_classes + radius_classes
291!
292! 825 2012-02-19 03:03:44Z raasch
293! Output of cloud physics parameters/quantities complemented and restructured
294!
295! Revision 1.1  1997/08/11 06:17:20  raasch
296! Initial revision
297!
298!
299! Description:
300! ------------
301!> Writing a header with all important information about the current run.
302!> This subroutine is called three times, two times at the beginning
303!> (writing information on files RUN_CONTROL and HEADER) and one time at the
304!> end of the run, then writing additional information about CPU-usage on file
305!> header.
306!-----------------------------------------------------------------------------!
307 SUBROUTINE header
308 
309
310    USE arrays_3d,                                                             &
311        ONLY:  pt_init, q_init, s_init, sa_init, ug, vg, w_subs, zu, zw
312       
313    USE control_parameters
314       
315    USE cloud_parameters,                                                      &
316        ONLY:  cp, l_v, r_d
317
318    USE cpulog,                                                                &
319        ONLY:  log_point_s
320       
321    USE dvrp_variables,                                                        &
322        ONLY:  use_seperate_pe_for_dvrp_output
323       
324    USE flight_mod,                                                            &
325        ONLY:  flight_header
326       
327    USE grid_variables,                                                        &
328        ONLY:  dx, dy
329       
330    USE indices,                                                               &
331        ONLY:  mg_loc_ind, nnx, nny, nnz, nx, ny, nxl_mg, nxr_mg, nyn_mg,      &
332               nys_mg, nzt, nzt_mg
333       
334    USE kinds
335 
336    USE land_surface_model_mod,                                                &
337        ONLY: lsm_header
338
339    USE microphysics_mod,                                                      &
340        ONLY:  cloud_water_sedimentation, collision_turbulence,                &
341               c_sedimentation, limiter_sedimentation, nc_const,               &
342               ventilation_effect
343
344    USE model_1d,                                                              &
345        ONLY:  damp_level_ind_1d, dt_pr_1d, dt_run_control_1d, end_time_1d
346       
347    USE netcdf_interface,                                                      &
348        ONLY:  netcdf_data_format, netcdf_data_format_string, netcdf_deflate
349
350    USE particle_attributes,                                                   &
351        ONLY:  bc_par_b, bc_par_lr, bc_par_ns, bc_par_t, collision_kernel,     &
352               curvature_solution_effects,                                     &
353               density_ratio, dissipation_classes, dt_min_part, dt_prel,       &
354               dt_write_particle_data, end_time_prel,                          &
355               number_of_particle_groups, particle_advection,                  &
356               particle_advection_start,                                       &
357               particles_per_point, pdx, pdy, pdz,  psb, psl, psn, psr, pss,   &
358               pst, radius, radius_classes, random_start_position,             &
359               seed_follows_topography,                                        &
360               total_number_of_particles, use_sgs_for_particles,               &
361               vertical_particle_advection, write_particle_statistics
362       
363    USE pegrid
364
365    USE plant_canopy_model_mod,                                                &
366        ONLY:  pcm_header, plant_canopy
367
368    USE pmc_handle_communicator,                                               &
369        ONLY:  pmc_get_model_info
370
371    USE pmc_interface,                                                         &
372        ONLY:  nested_run, nesting_datatransfer_mode, nesting_mode
373
374    USE radiation_model_mod,                                                   &
375        ONLY:  radiation, radiation_header
376   
377    USE spectra_mod,                                                           &
378        ONLY:  calculate_spectra, spectra_header
379
380    USE surface_mod,                                                           &
381        ONLY:  surf_def_h
382
383    USE synthetic_turbulence_generator_mod,                                    &
384        ONLY:  stg_header
385
386    IMPLICIT NONE
387
388    CHARACTER (LEN=1)  ::  prec                !<
389   
390    CHARACTER (LEN=2)  ::  do2d_mode           !<
391   
392    CHARACTER (LEN=5)  ::  section_chr         !<
393   
394    CHARACTER (LEN=10) ::  coor_chr            !<
395    CHARACTER (LEN=10) ::  host_chr            !<
396   
397    CHARACTER (LEN=16) ::  begin_chr           !<
398   
399    CHARACTER (LEN=26) ::  ver_rev             !<
400
401    CHARACTER (LEN=32) ::  cpl_name            !<
402   
403    CHARACTER (LEN=40) ::  output_format       !<
404   
405    CHARACTER (LEN=70) ::  char1               !<
406    CHARACTER (LEN=70) ::  char2               !<
407    CHARACTER (LEN=70) ::  dopr_chr            !<
408    CHARACTER (LEN=70) ::  do2d_xy             !<
409    CHARACTER (LEN=70) ::  do2d_xz             !<
410    CHARACTER (LEN=70) ::  do2d_yz             !<
411    CHARACTER (LEN=70) ::  do3d_chr            !<
412    CHARACTER (LEN=70) ::  domask_chr          !<
413    CHARACTER (LEN=70) ::  run_classification  !<
414   
415    CHARACTER (LEN=85) ::  r_upper             !<
416    CHARACTER (LEN=85) ::  r_lower             !<
417   
418    CHARACTER (LEN=86) ::  coordinates         !<
419    CHARACTER (LEN=86) ::  gradients           !<
420    CHARACTER (LEN=86) ::  slices              !<
421    CHARACTER (LEN=86) ::  temperatures        !<
422    CHARACTER (LEN=86) ::  ugcomponent         !<
423    CHARACTER (LEN=86) ::  vgcomponent         !<
424
425    CHARACTER (LEN=1), DIMENSION(1:3) ::  dir = (/ 'x', 'y', 'z' /)  !<
426
427    INTEGER(iwp) ::  av             !<
428    INTEGER(iwp) ::  bh             !<
429    INTEGER(iwp) ::  blx            !<
430    INTEGER(iwp) ::  bly            !<
431    INTEGER(iwp) ::  bxl            !<
432    INTEGER(iwp) ::  bxr            !<
433    INTEGER(iwp) ::  byn            !<
434    INTEGER(iwp) ::  bys            !<
435    INTEGER(iwp) ::  ch             !<
436    INTEGER(iwp) ::  count          !<
437    INTEGER(iwp) ::  cpl_parent_id  !<
438    INTEGER(iwp) ::  cwx            !<
439    INTEGER(iwp) ::  cwy            !<
440    INTEGER(iwp) ::  cxl            !<
441    INTEGER(iwp) ::  cxr            !<
442    INTEGER(iwp) ::  cyn            !<
443    INTEGER(iwp) ::  cys            !<
444    INTEGER(iwp) ::  dim            !<
445    INTEGER(iwp) ::  i              !<
446    INTEGER(iwp) ::  io             !<
447    INTEGER(iwp) ::  j              !<
448    INTEGER(iwp) ::  k              !<
449    INTEGER(iwp) ::  l              !<
450    INTEGER(iwp) ::  ll             !<
451    INTEGER(iwp) ::  my_cpl_id      !<
452    INTEGER(iwp) ::  n              !<
453    INTEGER(iwp) ::  ncpl           !<
454    INTEGER(iwp) ::  npe_total      !<
455   
456
457    REAL(wp) ::  cpuseconds_per_simulated_second  !<
458    REAL(wp) ::  lower_left_coord_x               !< x-coordinate of nest domain
459    REAL(wp) ::  lower_left_coord_y               !< y-coordinate of nest domain
460
461!
462!-- Open the output file. At the end of the simulation, output is directed
463!-- to unit 19.
464    IF ( ( runnr == 0 .OR. force_print_header )  .AND. &
465         .NOT. simulated_time_at_begin /= simulated_time )  THEN
466       io = 15   !  header output on file RUN_CONTROL
467    ELSE
468       io = 19   !  header output on file HEADER
469    ENDIF
470    CALL check_open( io )
471
472!
473!-- At the end of the run, output file (HEADER) will be rewritten with
474!-- new information
475    IF ( io == 19 .AND. simulated_time_at_begin /= simulated_time ) REWIND( 19 )
476
477!
478!-- Determine kind of model run
479    IF ( TRIM( initializing_actions ) == 'read_restart_data' )  THEN
480       run_classification = 'restart run'
481    ELSEIF ( TRIM( initializing_actions ) == 'cyclic_fill' )  THEN
482       run_classification = 'run with cyclic fill of 3D - prerun data'
483    ELSEIF ( INDEX( initializing_actions, 'set_constant_profiles' ) /= 0 )  THEN
484       run_classification = 'run without 1D - prerun'
485    ELSEIF ( INDEX( initializing_actions, 'set_1d-model_profiles' ) /= 0 )  THEN
486       run_classification = 'run with 1D - prerun'
487    ELSEIF ( INDEX( initializing_actions, 'by_user' ) /=0 )  THEN
488       run_classification = 'run initialized by user'
489    ELSE
490       message_string = ' unknown action(s): ' // TRIM( initializing_actions )
491       CALL message( 'header', 'PA0191', 0, 0, 0, 6, 0 )
492    ENDIF
493    IF ( nested_run )  run_classification = 'nested ' // run_classification
494    IF ( ocean )  THEN
495       run_classification = 'ocean - ' // run_classification
496    ELSE
497       run_classification = 'atmosphere - ' // run_classification
498    ENDIF
499
500!
501!-- Run-identification, date, time, host
502    host_chr = host(1:10)
503    ver_rev = TRIM( version ) // '  ' // TRIM( revision )
504    WRITE ( io, 100 )  ver_rev, TRIM( run_classification )
505    IF ( TRIM( coupling_mode ) /= 'uncoupled' )  THEN
506       WRITE ( io, 101 )  coupling_mode
507    ENDIF
508#if defined( __parallel )
509    IF ( coupling_start_time /= 0.0_wp )  THEN
510       IF ( coupling_start_time > simulated_time_at_begin )  THEN
511          WRITE ( io, 109 )
512       ELSE
513          WRITE ( io, 114 )
514       ENDIF
515    ENDIF
516#endif
517    IF ( ensemble_member_nr /= 0 )  THEN
518       WRITE ( io, 512 )  run_date, run_identifier, run_time, runnr,           &
519                       ADJUSTR( host_chr ), ensemble_member_nr
520    ELSE
521       WRITE ( io, 102 )  run_date, run_identifier, run_time, runnr,           &
522                       ADJUSTR( host_chr )
523    ENDIF
524#if defined( __parallel )
525    IF ( npex == -1  .AND.  npey == -1 )  THEN
526       char1 = 'calculated'
527    ELSE
528       char1 = 'predefined'
529    ENDIF
530    IF ( threads_per_task == 1 )  THEN
531       WRITE ( io, 103 )  numprocs, pdims(1), pdims(2), TRIM( char1 )
532    ELSE
533       WRITE ( io, 104 )  numprocs*threads_per_task, numprocs, &
534                          threads_per_task, pdims(1), pdims(2), TRIM( char1 )
535    ENDIF
536    IF ( ( host(1:3) == 'ibm'  .OR.  host(1:3) == 'nec'  .OR.    &
537           host(1:2) == 'lc'   .OR.  host(1:3) == 'dec' )  .AND. &
538         npex == -1  .AND.  pdims(2) == 1 )                      &
539    THEN
540       WRITE ( io, 106 )
541    ELSEIF ( pdims(2) == 1 )  THEN
542       WRITE ( io, 107 )  'x'
543    ELSEIF ( pdims(1) == 1 )  THEN
544       WRITE ( io, 107 )  'y'
545    ENDIF
546    IF ( use_seperate_pe_for_dvrp_output )  WRITE ( io, 105 )
547    IF ( numprocs /= maximum_parallel_io_streams )  THEN
548       WRITE ( io, 108 )  maximum_parallel_io_streams
549    ENDIF
550#endif
551
552!
553!-- Nesting informations
554    IF ( nested_run )  THEN
555
556       WRITE ( io, 600 )  TRIM( nesting_mode ),                                &
557                          TRIM( nesting_datatransfer_mode )
558       CALL pmc_get_model_info( ncpl = ncpl, cpl_id = my_cpl_id )
559
560       DO  n = 1, ncpl
561          CALL pmc_get_model_info( request_for_cpl_id = n, cpl_name = cpl_name,&
562                                   cpl_parent_id = cpl_parent_id,              &
563                                   lower_left_x = lower_left_coord_x,          &
564                                   lower_left_y = lower_left_coord_y,          &
565                                   npe_total = npe_total )
566          IF ( n == my_cpl_id )  THEN
567             char1 = '*'
568          ELSE
569             char1 = ' '
570          ENDIF
571          WRITE ( io, 601 )  TRIM( char1 ), n, cpl_parent_id, npe_total,       &
572                             lower_left_coord_x, lower_left_coord_y,           &
573                             TRIM( cpl_name )
574       ENDDO
575    ENDIF
576    WRITE ( io, 99 )
577
578!
579!-- Numerical schemes
580    WRITE ( io, 110 )
581    WRITE ( io, 121 )  TRIM( approximation )
582    IF ( psolver(1:7) == 'poisfft' )  THEN
583       WRITE ( io, 111 )  TRIM( fft_method )
584       IF ( transpose_compute_overlap )  WRITE( io, 115 )
585    ELSEIF ( psolver == 'sor' )  THEN
586       WRITE ( io, 112 )  nsor_ini, nsor, omega_sor
587    ELSEIF ( psolver(1:9) == 'multigrid' )  THEN
588       WRITE ( io, 135 )  TRIM(psolver), cycle_mg, maximum_grid_level, ngsrb
589       IF ( mg_cycles == -1 )  THEN
590          WRITE ( io, 140 )  residual_limit
591       ELSE
592          WRITE ( io, 141 )  mg_cycles
593       ENDIF
594       IF ( mg_switch_to_pe0_level == 0 )  THEN
595          WRITE ( io, 136 )  nxr_mg(1)-nxl_mg(1)+1, nyn_mg(1)-nys_mg(1)+1, &
596                             nzt_mg(1)
597       ELSEIF (  mg_switch_to_pe0_level /= -1 )  THEN
598          WRITE ( io, 137 )  mg_switch_to_pe0_level,            &
599                             mg_loc_ind(2,0)-mg_loc_ind(1,0)+1, &
600                             mg_loc_ind(4,0)-mg_loc_ind(3,0)+1, &
601                             nzt_mg(mg_switch_to_pe0_level),    &
602                             nxr_mg(1)-nxl_mg(1)+1, nyn_mg(1)-nys_mg(1)+1, &
603                             nzt_mg(1)
604       ENDIF
605       IF ( psolver == 'multigrid_noopt' .AND. masking_method )  WRITE ( io, 144 )
606    ENDIF
607    IF ( call_psolver_at_all_substeps  .AND. timestep_scheme(1:5) == 'runge' ) &
608    THEN
609       WRITE ( io, 142 )
610    ENDIF
611
612    IF ( momentum_advec == 'pw-scheme' )  THEN
613       WRITE ( io, 113 )
614    ELSEIF (momentum_advec == 'ws-scheme' )  THEN
615       WRITE ( io, 503 )
616    ENDIF
617    IF ( scalar_advec == 'pw-scheme' )  THEN
618       WRITE ( io, 116 )
619    ELSEIF ( scalar_advec == 'ws-scheme' )  THEN
620       WRITE ( io, 504 )
621    ELSE
622       WRITE ( io, 118 )
623    ENDIF
624
625    WRITE ( io, 139 )  TRIM( loop_optimization )
626
627    IF ( galilei_transformation )  THEN
628       IF ( use_ug_for_galilei_tr )  THEN
629          char1 = '0.6 * geostrophic wind'
630       ELSE
631          char1 = 'mean wind in model domain'
632       ENDIF
633       IF ( simulated_time_at_begin == simulated_time )  THEN
634          char2 = 'at the start of the run'
635       ELSE
636          char2 = 'at the end of the run'
637       ENDIF
638       WRITE ( io, 119 )  TRIM( char1 ), TRIM( char2 ),                        &
639                          advected_distance_x/1000.0_wp,                       &
640                          advected_distance_y/1000.0_wp
641    ENDIF
642    WRITE ( io, 122 )  timestep_scheme
643    IF ( use_upstream_for_tke )  WRITE ( io, 143 )
644    IF ( rayleigh_damping_factor /= 0.0_wp )  THEN
645       IF ( .NOT. ocean )  THEN
646          WRITE ( io, 123 )  'above', rayleigh_damping_height, &
647               rayleigh_damping_factor
648       ELSE
649          WRITE ( io, 123 )  'below', rayleigh_damping_height, &
650               rayleigh_damping_factor
651       ENDIF
652    ENDIF
653    IF ( neutral )  WRITE ( io, 131 )  pt_surface
654    IF ( humidity )  THEN
655       IF ( .NOT. cloud_physics )  THEN
656          WRITE ( io, 129 )
657       ELSE
658          WRITE ( io, 130 )
659       ENDIF
660    ENDIF
661    IF ( passive_scalar )  WRITE ( io, 134 )
662    IF ( conserve_volume_flow )  THEN
663       WRITE ( io, 150 )  conserve_volume_flow_mode
664       IF ( TRIM( conserve_volume_flow_mode ) == 'bulk_velocity' )  THEN
665          WRITE ( io, 151 )  u_bulk, v_bulk
666       ENDIF
667    ELSEIF ( dp_external )  THEN
668       IF ( dp_smooth )  THEN
669          WRITE ( io, 152 )  dpdxy, dp_level_b, ', vertically smoothed.'
670       ELSE
671          WRITE ( io, 152 )  dpdxy, dp_level_b, '.'
672       ENDIF
673    ENDIF
674    WRITE ( io, 99 )
675
676!
677!-- Runtime and timestep information
678    WRITE ( io, 200 )
679    IF ( .NOT. dt_fixed )  THEN
680       WRITE ( io, 201 )  dt_max, cfl_factor
681    ELSE
682       WRITE ( io, 202 )  dt
683    ENDIF
684    WRITE ( io, 203 )  simulated_time_at_begin, end_time
685
686    IF ( time_restart /= 9999999.9_wp  .AND. &
687         simulated_time_at_begin == simulated_time )  THEN
688       IF ( dt_restart == 9999999.9_wp )  THEN
689          WRITE ( io, 204 )  ' Restart at:       ',time_restart
690       ELSE
691          WRITE ( io, 205 )  ' Restart at:       ',time_restart, dt_restart
692       ENDIF
693    ENDIF
694
695    IF ( simulated_time_at_begin /= simulated_time )  THEN
696       i = MAX ( log_point_s(10)%counts, 1 )
697       IF ( ( simulated_time - simulated_time_at_begin ) == 0.0_wp )  THEN
698          cpuseconds_per_simulated_second = 0.0_wp
699       ELSE
700          cpuseconds_per_simulated_second = log_point_s(10)%sum / &
701                                            ( simulated_time -    &
702                                              simulated_time_at_begin )
703       ENDIF
704       WRITE ( io, 206 )  simulated_time, log_point_s(10)%sum,      &
705                          log_point_s(10)%sum / REAL( i, KIND=wp ), &
706                          cpuseconds_per_simulated_second
707       IF ( time_restart /= 9999999.9_wp  .AND.  time_restart < end_time )  THEN
708          IF ( dt_restart == 9999999.9_wp )  THEN
709             WRITE ( io, 204 )  ' Next restart at:     ',time_restart
710          ELSE
711             WRITE ( io, 205 )  ' Next restart at:     ',time_restart, dt_restart
712          ENDIF
713       ENDIF
714    ENDIF
715
716
717!
718!-- Start time for coupled runs, if independent precursor runs for atmosphere
719!-- and ocean are used or have been used. In this case, coupling_start_time
720!-- defines the time when the coupling is switched on.
721    IF ( coupling_start_time /= 0.0_wp )  THEN
722       WRITE ( io, 207 )  coupling_start_time
723    ENDIF
724
725!
726!-- Computational grid
727    IF ( .NOT. ocean )  THEN
728       WRITE ( io, 250 )  dx, dy, dz, (nx+1)*dx, (ny+1)*dy, zu(nzt+1)
729       IF ( dz_stretch_level_index < nzt+1 )  THEN
730          WRITE ( io, 252 )  dz_stretch_level, dz_stretch_level_index, &
731                             dz_stretch_factor, dz_max
732       ENDIF
733    ELSE
734       WRITE ( io, 250 )  dx, dy, dz, (nx+1)*dx, (ny+1)*dy, zu(0)
735       IF ( dz_stretch_level_index > 0 )  THEN
736          WRITE ( io, 252 )  dz_stretch_level, dz_stretch_level_index, &
737                             dz_stretch_factor, dz_max
738       ENDIF
739    ENDIF
740    WRITE ( io, 254 )  nx, ny, nzt+1, MIN( nnx, nx+1 ), MIN( nny, ny+1 ), &
741                       MIN( nnz+2, nzt+2 )
742    IF ( sloping_surface )  WRITE ( io, 260 )  alpha_surface
743
744!
745!-- Large scale forcing and nudging
746    WRITE ( io, 160 )
747    IF ( large_scale_forcing )  THEN
748       WRITE ( io, 162 )
749       WRITE ( io, 163 )
750
751       IF ( large_scale_subsidence )  THEN
752          IF ( .NOT. use_subsidence_tendencies )  THEN
753             WRITE ( io, 164 )
754          ELSE
755             WRITE ( io, 165 )
756          ENDIF
757       ENDIF
758
759       IF ( bc_pt_b == 'dirichlet' )  THEN
760          WRITE ( io, 180 )
761       ELSEIF ( bc_pt_b == 'neumann' )  THEN
762          WRITE ( io, 181 )
763       ENDIF
764
765       IF ( bc_q_b == 'dirichlet' )  THEN
766          WRITE ( io, 182 )
767       ELSEIF ( bc_q_b == 'neumann' )  THEN
768          WRITE ( io, 183 )
769       ENDIF
770
771       WRITE ( io, 167 )
772       IF ( nudging )  THEN
773          WRITE ( io, 170 )
774       ENDIF
775    ELSE
776       WRITE ( io, 161 )
777       WRITE ( io, 171 )
778    ENDIF
779    IF ( large_scale_subsidence )  THEN
780       WRITE ( io, 168 )
781       WRITE ( io, 169 )
782    ENDIF
783
784!
785!-- Profile for the large scale vertial velocity
786!-- Building output strings, starting with surface value
787    IF ( large_scale_subsidence )  THEN
788       temperatures = '   0.0'
789       gradients = '------'
790       slices = '     0'
791       coordinates = '   0.0'
792       i = 1
793       DO  WHILE ( subs_vertical_gradient_level_i(i) /= -9999 )
794
795          WRITE (coor_chr,'(E10.2,7X)')  &
796                                w_subs(subs_vertical_gradient_level_i(i))
797          temperatures = TRIM( temperatures ) // ' ' // TRIM( coor_chr )
798
799          WRITE (coor_chr,'(E10.2,7X)')  subs_vertical_gradient(i)
800          gradients = TRIM( gradients ) // ' ' // TRIM( coor_chr )
801
802          WRITE (coor_chr,'(I10,7X)')  subs_vertical_gradient_level_i(i)
803          slices = TRIM( slices ) // ' ' // TRIM( coor_chr )
804
805          WRITE (coor_chr,'(F10.2,7X)')  subs_vertical_gradient_level(i)
806          coordinates = TRIM( coordinates ) // ' '  // TRIM( coor_chr )
807
808          IF ( i == 10 )  THEN
809             EXIT
810          ELSE
811             i = i + 1
812          ENDIF
813
814       ENDDO
815
816 
817       IF ( .NOT. large_scale_forcing )  THEN
818          WRITE ( io, 426 )  TRIM( coordinates ), TRIM( temperatures ), &
819                             TRIM( gradients ), TRIM( slices )
820       ENDIF
821
822
823    ENDIF
824
825!-- Profile of the geostrophic wind (component ug)
826!-- Building output strings
827    WRITE ( ugcomponent, '(F6.2)' )  ug_surface
828    gradients = '------'
829    slices = '     0'
830    coordinates = '   0.0'
831    i = 1
832    DO  WHILE ( ug_vertical_gradient_level_ind(i) /= -9999 )
833     
834       WRITE (coor_chr,'(F6.2,1X)')  ug(ug_vertical_gradient_level_ind(i))
835       ugcomponent = TRIM( ugcomponent ) // '  ' // TRIM( coor_chr )
836
837       WRITE (coor_chr,'(F6.2,1X)')  ug_vertical_gradient(i)
838       gradients = TRIM( gradients ) // '  ' // TRIM( coor_chr )
839
840       WRITE (coor_chr,'(I6,1X)')  ug_vertical_gradient_level_ind(i)
841       slices = TRIM( slices ) // '  ' // TRIM( coor_chr )
842
843       WRITE (coor_chr,'(F6.1,1X)')  ug_vertical_gradient_level(i)
844       coordinates = TRIM( coordinates ) // '  ' // TRIM( coor_chr )
845
846       IF ( i == 10 )  THEN
847          EXIT
848       ELSE
849          i = i + 1
850       ENDIF
851
852    ENDDO
853
854    IF ( .NOT. large_scale_forcing )  THEN
855       WRITE ( io, 423 )  TRIM( coordinates ), TRIM( ugcomponent ), &
856                          TRIM( gradients ), TRIM( slices )
857    ENDIF
858
859!-- Profile of the geostrophic wind (component vg)
860!-- Building output strings
861    WRITE ( vgcomponent, '(F6.2)' )  vg_surface
862    gradients = '------'
863    slices = '     0'
864    coordinates = '   0.0'
865    i = 1
866    DO  WHILE ( vg_vertical_gradient_level_ind(i) /= -9999 )
867
868       WRITE (coor_chr,'(F6.2,1X)')  vg(vg_vertical_gradient_level_ind(i))
869       vgcomponent = TRIM( vgcomponent ) // '  ' // TRIM( coor_chr )
870
871       WRITE (coor_chr,'(F6.2,1X)')  vg_vertical_gradient(i)
872       gradients = TRIM( gradients ) // '  ' // TRIM( coor_chr )
873
874       WRITE (coor_chr,'(I6,1X)')  vg_vertical_gradient_level_ind(i)
875       slices = TRIM( slices ) // '  ' // TRIM( coor_chr )
876
877       WRITE (coor_chr,'(F6.1,1X)')  vg_vertical_gradient_level(i)
878       coordinates = TRIM( coordinates ) // '  ' // TRIM( coor_chr )
879
880       IF ( i == 10 )  THEN
881          EXIT
882       ELSE
883          i = i + 1
884       ENDIF
885 
886    ENDDO
887
888    IF ( .NOT. large_scale_forcing )  THEN
889       WRITE ( io, 424 )  TRIM( coordinates ), TRIM( vgcomponent ), &
890                          TRIM( gradients ), TRIM( slices )
891    ENDIF
892
893!
894!-- Topography
895    WRITE ( io, 270 )  topography
896    SELECT CASE ( TRIM( topography ) )
897
898       CASE ( 'flat' )
899          ! no actions necessary
900
901       CASE ( 'single_building' )
902          blx = INT( building_length_x / dx )
903          bly = INT( building_length_y / dy )
904          bh  = MINLOC( ABS( zw - building_height ), 1 ) - 1
905          IF ( ABS( zw(bh  ) - building_height ) == &
906               ABS( zw(bh+1) - building_height )    )  bh = bh + 1
907
908          IF ( building_wall_left == 9999999.9_wp )  THEN
909             building_wall_left = ( nx + 1 - blx ) / 2 * dx
910          ENDIF
911          bxl = INT ( building_wall_left / dx + 0.5_wp )
912          bxr = bxl + blx
913
914          IF ( building_wall_south == 9999999.9_wp )  THEN
915             building_wall_south = ( ny + 1 - bly ) / 2 * dy
916          ENDIF
917          bys = INT ( building_wall_south / dy + 0.5_wp )
918          byn = bys + bly
919
920          WRITE ( io, 271 )  building_length_x, building_length_y, &
921                             building_height, bxl, bxr, bys, byn
922
923       CASE ( 'single_street_canyon' )
924          ch  = MINLOC( ABS( zw - canyon_height ), 1 ) - 1
925          IF ( ABS( zw(ch  ) - canyon_height ) == &
926               ABS( zw(ch+1) - canyon_height )    )  ch = ch + 1
927          IF ( canyon_width_x /= 9999999.9_wp )  THEN
928!
929!--          Street canyon in y direction
930             cwx = NINT( canyon_width_x / dx )
931             IF ( canyon_wall_left == 9999999.9_wp )  THEN
932                canyon_wall_left = ( nx + 1 - cwx ) / 2 * dx
933             ENDIF
934             cxl = NINT( canyon_wall_left / dx )
935             cxr = cxl + cwx
936             WRITE ( io, 272 )  'y', canyon_height, ch, 'u', cxl, cxr
937
938          ELSEIF ( canyon_width_y /= 9999999.9_wp )  THEN
939!
940!--          Street canyon in x direction
941             cwy = NINT( canyon_width_y / dy )
942             IF ( canyon_wall_south == 9999999.9_wp )  THEN
943                canyon_wall_south = ( ny + 1 - cwy ) / 2 * dy
944             ENDIF
945             cys = NINT( canyon_wall_south / dy )
946             cyn = cys + cwy
947             WRITE ( io, 272 )  'x', canyon_height, ch, 'v', cys, cyn
948          ENDIF
949
950       CASE ( 'tunnel' )
951          IF ( tunnel_width_x /= 9999999.9_wp )  THEN
952!
953!--          Tunnel axis in y direction
954             IF ( tunnel_length == 9999999.9_wp  .OR.                          &
955                  tunnel_length >= ( nx + 1 ) * dx )  THEN
956                WRITE ( io, 273 )  'y', tunnel_height, tunnel_wall_depth,      &
957                                        tunnel_width_x
958             ELSE
959                WRITE ( io, 274 )  'y', tunnel_height, tunnel_wall_depth,      &
960                                        tunnel_width_x, tunnel_length
961             ENDIF
962
963          ELSEIF ( tunnel_width_y /= 9999999.9_wp )  THEN
964!
965!--          Tunnel axis in x direction
966             IF ( tunnel_length == 9999999.9_wp  .OR.                          &
967                  tunnel_length >= ( ny + 1 ) * dy )  THEN
968                WRITE ( io, 273 )  'x', tunnel_height, tunnel_wall_depth,      &
969                                        tunnel_width_y
970             ELSE
971                WRITE ( io, 274 )  'x', tunnel_height, tunnel_wall_depth,      &
972                                        tunnel_width_y, tunnel_length
973             ENDIF
974          ENDIF
975
976    END SELECT
977
978    IF ( TRIM( topography ) /= 'flat' )  THEN
979       IF ( TRIM( topography_grid_convention ) == ' ' )  THEN
980          IF ( TRIM( topography ) == 'single_building' .OR.  &
981               TRIM( topography ) == 'single_street_canyon' )  THEN
982             WRITE ( io, 278 )
983          ELSEIF ( TRIM( topography ) == 'read_from_file' )  THEN
984             WRITE ( io, 279 )
985          ENDIF
986       ELSEIF ( TRIM( topography_grid_convention ) == 'cell_edge' )  THEN
987          WRITE ( io, 278 )
988       ELSEIF ( TRIM( topography_grid_convention ) == 'cell_center' )  THEN
989          WRITE ( io, 279 )
990       ENDIF
991    ENDIF
992
993    IF ( synthetic_turbulence_generator )  CALL stg_header ( io )
994
995    IF ( plant_canopy )  CALL pcm_header ( io )
996
997    IF ( land_surface )  CALL lsm_header ( io )
998
999    IF ( radiation )  CALL radiation_header ( io )
1000
1001!
1002!-- Boundary conditions
1003    IF ( ibc_p_b == 0 )  THEN
1004       r_lower = 'p(0)     = 0      |'
1005    ELSEIF ( ibc_p_b == 1 )  THEN
1006       r_lower = 'p(0)     = p(1)   |'
1007    ENDIF
1008    IF ( ibc_p_t == 0 )  THEN
1009       r_upper  = 'p(nzt+1) = 0      |'
1010    ELSE
1011       r_upper  = 'p(nzt+1) = p(nzt) |'
1012    ENDIF
1013
1014    IF ( ibc_uv_b == 0 )  THEN
1015       r_lower = TRIM( r_lower ) // ' uv(0)     = -uv(1)                |'
1016    ELSE
1017       r_lower = TRIM( r_lower ) // ' uv(0)     = uv(1)                 |'
1018    ENDIF
1019    IF ( TRIM( bc_uv_t ) == 'dirichlet_0' )  THEN
1020       r_upper  = TRIM( r_upper  ) // ' uv(nzt+1) = 0                     |'
1021    ELSEIF ( ibc_uv_t == 0 )  THEN
1022       r_upper  = TRIM( r_upper  ) // ' uv(nzt+1) = ug(nzt+1), vg(nzt+1)  |'
1023    ELSE
1024       r_upper  = TRIM( r_upper  ) // ' uv(nzt+1) = uv(nzt)               |'
1025    ENDIF
1026
1027    IF ( ibc_pt_b == 0 )  THEN
1028       IF ( land_surface )  THEN
1029          r_lower = TRIM( r_lower ) // ' pt(0)     = from soil model'
1030       ELSE
1031          r_lower = TRIM( r_lower ) // ' pt(0)     = pt_surface'
1032       ENDIF
1033    ELSEIF ( ibc_pt_b == 1 )  THEN
1034       r_lower = TRIM( r_lower ) // ' pt(0)     = pt(1)'
1035    ELSEIF ( ibc_pt_b == 2 )  THEN
1036       r_lower = TRIM( r_lower ) // ' pt(0)     = from coupled model'
1037    ENDIF
1038    IF ( ibc_pt_t == 0 )  THEN
1039       r_upper  = TRIM( r_upper  ) // ' pt(nzt+1) = pt_top'
1040    ELSEIF( ibc_pt_t == 1 )  THEN
1041       r_upper  = TRIM( r_upper  ) // ' pt(nzt+1) = pt(nzt)'
1042    ELSEIF( ibc_pt_t == 2 )  THEN
1043       r_upper  = TRIM( r_upper  ) // ' pt(nzt+1) = pt(nzt) + dpt/dz_ini'
1044
1045    ENDIF
1046
1047    WRITE ( io, 300 )  r_lower, r_upper
1048
1049    IF ( .NOT. constant_diffusion )  THEN
1050       IF ( ibc_e_b == 1 )  THEN
1051          r_lower = 'e(0)     = e(1)'
1052       ELSE
1053          r_lower = 'e(0)     = e(1) = (u*/0.1)**2'
1054       ENDIF
1055       r_upper = 'e(nzt+1) = e(nzt) = e(nzt-1)'
1056
1057       WRITE ( io, 301 )  'e', r_lower, r_upper       
1058
1059    ENDIF
1060
1061    IF ( ocean )  THEN
1062       r_lower = 'sa(0)    = sa(1)'
1063       IF ( ibc_sa_t == 0 )  THEN
1064          r_upper =  'sa(nzt+1) = sa_surface'
1065       ELSE
1066          r_upper =  'sa(nzt+1) = sa(nzt)'
1067       ENDIF
1068       WRITE ( io, 301 ) 'sa', r_lower, r_upper
1069    ENDIF
1070
1071    IF ( humidity )  THEN
1072       IF ( ibc_q_b == 0 )  THEN
1073          IF ( land_surface )  THEN
1074             r_lower = 'q(0)     = from soil model'
1075          ELSE
1076             r_lower = 'q(0)     = q_surface'
1077          ENDIF
1078
1079       ELSE
1080          r_lower = 'q(0)      = q(1)'
1081       ENDIF
1082       IF ( ibc_q_t == 0 )  THEN
1083          r_upper =  'q(nzt+1) = q_top'
1084       ELSE
1085          r_upper =  'q(nzt+1) = q(nzt) + dq/dz'
1086       ENDIF
1087       WRITE ( io, 301 ) 'q', r_lower, r_upper
1088    ENDIF
1089
1090    IF ( passive_scalar )  THEN
1091       IF ( ibc_s_b == 0 )  THEN
1092          r_lower = 's(0)      = s_surface'
1093       ELSE
1094          r_lower = 's(0)      = s(1)'
1095       ENDIF
1096       IF ( ibc_s_t == 0 )  THEN
1097          r_upper =  's(nzt+1) = s_top'
1098       ELSEIF ( ibc_s_t == 1 )  THEN
1099          r_upper =  's(nzt+1) = s(nzt)'
1100       ELSEIF ( ibc_s_t == 2 )  THEN
1101          r_upper =  's(nzt+1) = s(nzt) + ds/dz'
1102       ENDIF
1103       WRITE ( io, 301 ) 's', r_lower, r_upper
1104    ENDIF
1105
1106    IF ( use_surface_fluxes )  THEN
1107       WRITE ( io, 303 )
1108       IF ( constant_heatflux )  THEN
1109          IF ( large_scale_forcing .AND. lsf_surf )  THEN
1110             IF ( surf_def_h(0)%ns >= 1 )  WRITE ( io, 306 )  surf_def_h(0)%shf(1)
1111          ELSE
1112             WRITE ( io, 306 )  surface_heatflux
1113          ENDIF
1114          IF ( random_heatflux )  WRITE ( io, 307 )
1115       ENDIF
1116       IF ( humidity  .AND.  constant_waterflux )  THEN
1117          IF ( large_scale_forcing .AND. lsf_surf )  THEN
1118             WRITE ( io, 311 ) surf_def_h(0)%qsws(1)
1119          ELSE
1120             WRITE ( io, 311 ) surface_waterflux
1121          ENDIF
1122       ENDIF
1123       IF ( passive_scalar  .AND.  constant_scalarflux )  THEN
1124          WRITE ( io, 313 ) surface_scalarflux
1125       ENDIF
1126    ENDIF
1127
1128    IF ( use_top_fluxes )  THEN
1129       WRITE ( io, 304 )
1130       IF ( coupling_mode == 'uncoupled' )  THEN
1131          WRITE ( io, 320 )  top_momentumflux_u, top_momentumflux_v
1132          IF ( constant_top_heatflux )  THEN
1133             WRITE ( io, 306 )  top_heatflux
1134          ENDIF
1135       ELSEIF ( coupling_mode == 'ocean_to_atmosphere' )  THEN
1136          WRITE ( io, 316 )
1137       ENDIF
1138       IF ( ocean  .AND.  constant_top_salinityflux )                          &
1139          WRITE ( io, 309 )  top_salinityflux
1140       IF ( humidity       )  WRITE ( io, 315 )
1141       IF ( passive_scalar .AND.  constant_top_scalarflux )                    &
1142          WRITE ( io, 302 ) top_scalarflux
1143    ENDIF
1144
1145    IF ( constant_flux_layer )  THEN
1146       WRITE ( io, 305 )  (zu(1)-zu(0)), roughness_length,                     &
1147                          z0h_factor*roughness_length, kappa,                  &
1148                          zeta_min, zeta_max
1149       IF ( .NOT. constant_heatflux )  WRITE ( io, 308 )
1150       IF ( humidity  .AND.  .NOT. constant_waterflux )  THEN
1151          WRITE ( io, 312 )
1152       ENDIF
1153       IF ( passive_scalar  .AND.  .NOT. constant_scalarflux )  THEN
1154          WRITE ( io, 314 )
1155       ENDIF
1156    ELSE
1157       IF ( INDEX(initializing_actions, 'set_1d-model_profiles') /= 0 )  THEN
1158          WRITE ( io, 310 )  zeta_min, zeta_max
1159       ENDIF
1160    ENDIF
1161
1162    WRITE ( io, 317 )  bc_lr, bc_ns
1163    IF ( .NOT. bc_lr_cyc  .OR.  .NOT. bc_ns_cyc )  THEN
1164       WRITE ( io, 318 )  use_cmax, pt_damping_width, pt_damping_factor       
1165       IF ( turbulent_inflow )  THEN
1166          IF ( .NOT. recycling_yshift ) THEN
1167             WRITE ( io, 319 )  recycling_width, recycling_plane, &
1168                                inflow_damping_height, inflow_damping_width
1169          ELSE
1170             WRITE ( io, 322 )  recycling_width, recycling_plane, &
1171                                inflow_damping_height, inflow_damping_width
1172          END IF
1173       ENDIF
1174       IF ( turbulent_outflow )  THEN
1175          WRITE ( io, 323 )  outflow_source_plane, INT(outflow_source_plane/dx)
1176       ENDIF
1177    ENDIF
1178
1179!
1180!-- Initial Profiles
1181    WRITE ( io, 321 )
1182!
1183!-- Initial wind profiles
1184    IF ( u_profile(1) /= 9999999.9_wp )  WRITE ( io, 427 )
1185
1186!
1187!-- Initial temperature profile
1188!-- Building output strings, starting with surface temperature
1189    WRITE ( temperatures, '(F6.2)' )  pt_surface
1190    gradients = '------'
1191    slices = '     0'
1192    coordinates = '   0.0'
1193    i = 1
1194    DO  WHILE ( pt_vertical_gradient_level_ind(i) /= -9999 )
1195
1196       WRITE (coor_chr,'(F7.2)')  pt_init(pt_vertical_gradient_level_ind(i))
1197       temperatures = TRIM( temperatures ) // ' ' // TRIM( coor_chr )
1198
1199       WRITE (coor_chr,'(F7.2)')  pt_vertical_gradient(i)
1200       gradients = TRIM( gradients ) // ' ' // TRIM( coor_chr )
1201
1202       WRITE (coor_chr,'(I7)')  pt_vertical_gradient_level_ind(i)
1203       slices = TRIM( slices ) // ' ' // TRIM( coor_chr )
1204
1205       WRITE (coor_chr,'(F7.1)')  pt_vertical_gradient_level(i)
1206       coordinates = TRIM( coordinates ) // ' '  // TRIM( coor_chr )
1207
1208       IF ( i == 10 )  THEN
1209          EXIT
1210       ELSE
1211          i = i + 1
1212       ENDIF
1213
1214    ENDDO
1215
1216    IF ( .NOT. nudging )  THEN
1217       WRITE ( io, 420 )  TRIM( coordinates ), TRIM( temperatures ), &
1218                          TRIM( gradients ), TRIM( slices )
1219    ELSE
1220       WRITE ( io, 428 ) 
1221    ENDIF
1222
1223!
1224!-- Initial humidity profile
1225!-- Building output strings, starting with surface humidity
1226    IF ( humidity )  THEN
1227       WRITE ( temperatures, '(E8.1)' )  q_surface
1228       gradients = '--------'
1229       slices = '       0'
1230       coordinates = '     0.0'
1231       i = 1
1232       DO  WHILE ( q_vertical_gradient_level_ind(i) /= -9999 )
1233         
1234          WRITE (coor_chr,'(E8.1,4X)')  q_init(q_vertical_gradient_level_ind(i))
1235          temperatures = TRIM( temperatures ) // '  ' // TRIM( coor_chr )
1236
1237          WRITE (coor_chr,'(E8.1,4X)')  q_vertical_gradient(i)
1238          gradients = TRIM( gradients ) // '  ' // TRIM( coor_chr )
1239         
1240          WRITE (coor_chr,'(I8,4X)')  q_vertical_gradient_level_ind(i)
1241          slices = TRIM( slices ) // '  ' // TRIM( coor_chr )
1242         
1243          WRITE (coor_chr,'(F8.1,4X)')  q_vertical_gradient_level(i)
1244          coordinates = TRIM( coordinates ) // '  '  // TRIM( coor_chr )
1245
1246          IF ( i == 10 )  THEN
1247             EXIT
1248          ELSE
1249             i = i + 1
1250          ENDIF
1251
1252       ENDDO
1253
1254       IF ( .NOT. nudging )  THEN
1255          WRITE ( io, 421 )  TRIM( coordinates ), TRIM( temperatures ),        &
1256                             TRIM( gradients ), TRIM( slices )
1257       ENDIF
1258    ENDIF
1259!
1260!-- Initial scalar profile
1261!-- Building output strings, starting with surface humidity
1262    IF ( passive_scalar )  THEN
1263       WRITE ( temperatures, '(E8.1)' )  s_surface
1264       gradients = '--------'
1265       slices = '       0'
1266       coordinates = '     0.0'
1267       i = 1
1268       DO  WHILE ( s_vertical_gradient_level_ind(i) /= -9999 )
1269         
1270          WRITE (coor_chr,'(E8.1,4X)')  s_init(s_vertical_gradient_level_ind(i))
1271          temperatures = TRIM( temperatures ) // '  ' // TRIM( coor_chr )
1272
1273          WRITE (coor_chr,'(E8.1,4X)')  s_vertical_gradient(i)
1274          gradients = TRIM( gradients ) // '  ' // TRIM( coor_chr )
1275         
1276          WRITE (coor_chr,'(I8,4X)')  s_vertical_gradient_level_ind(i)
1277          slices = TRIM( slices ) // '  ' // TRIM( coor_chr )
1278         
1279          WRITE (coor_chr,'(F8.1,4X)')  s_vertical_gradient_level(i)
1280          coordinates = TRIM( coordinates ) // '  '  // TRIM( coor_chr )
1281
1282          IF ( i == 10 )  THEN
1283             EXIT
1284          ELSE
1285             i = i + 1
1286          ENDIF
1287
1288       ENDDO
1289
1290       WRITE ( io, 422 )  TRIM( coordinates ), TRIM( temperatures ),           &
1291                          TRIM( gradients ), TRIM( slices )
1292    ENDIF   
1293
1294!
1295!-- Initial salinity profile
1296!-- Building output strings, starting with surface salinity
1297    IF ( ocean )  THEN
1298       WRITE ( temperatures, '(F6.2)' )  sa_surface
1299       gradients = '------'
1300       slices = '     0'
1301       coordinates = '   0.0'
1302       i = 1
1303       DO  WHILE ( sa_vertical_gradient_level_ind(i) /= -9999 )
1304
1305          WRITE (coor_chr,'(F7.2)')  sa_init(sa_vertical_gradient_level_ind(i))
1306          temperatures = TRIM( temperatures ) // ' ' // TRIM( coor_chr )
1307
1308          WRITE (coor_chr,'(F7.2)')  sa_vertical_gradient(i)
1309          gradients = TRIM( gradients ) // ' ' // TRIM( coor_chr )
1310
1311          WRITE (coor_chr,'(I7)')  sa_vertical_gradient_level_ind(i)
1312          slices = TRIM( slices ) // ' ' // TRIM( coor_chr )
1313
1314          WRITE (coor_chr,'(F7.1)')  sa_vertical_gradient_level(i)
1315          coordinates = TRIM( coordinates ) // ' '  // TRIM( coor_chr )
1316
1317          IF ( i == 10 )  THEN
1318             EXIT
1319          ELSE
1320             i = i + 1
1321          ENDIF
1322
1323       ENDDO
1324
1325       WRITE ( io, 425 )  TRIM( coordinates ), TRIM( temperatures ), &
1326                          TRIM( gradients ), TRIM( slices )
1327    ENDIF
1328
1329
1330!
1331!-- Listing of 1D-profiles
1332    WRITE ( io, 325 )  dt_dopr_listing
1333    IF ( averaging_interval_pr /= 0.0_wp )  THEN
1334       WRITE ( io, 326 )  averaging_interval_pr, dt_averaging_input_pr
1335    ENDIF
1336
1337!
1338!-- DATA output
1339    WRITE ( io, 330 )
1340    IF ( averaging_interval_pr /= 0.0_wp )  THEN
1341       WRITE ( io, 326 )  averaging_interval_pr, dt_averaging_input_pr
1342    ENDIF
1343
1344!
1345!-- 1D-profiles
1346    dopr_chr = 'Profile:'
1347    IF ( dopr_n /= 0 )  THEN
1348       WRITE ( io, 331 )
1349
1350       output_format = ''
1351       output_format = netcdf_data_format_string
1352       IF ( netcdf_deflate == 0 )  THEN
1353          WRITE ( io, 344 )  output_format
1354       ELSE
1355          WRITE ( io, 354 )  TRIM( output_format ), netcdf_deflate
1356       ENDIF
1357
1358       DO  i = 1, dopr_n
1359          dopr_chr = TRIM( dopr_chr ) // ' ' // TRIM( data_output_pr(i) ) // ','
1360          IF ( LEN_TRIM( dopr_chr ) >= 60 )  THEN
1361             WRITE ( io, 332 )  dopr_chr
1362             dopr_chr = '       :'
1363          ENDIF
1364       ENDDO
1365
1366       IF ( dopr_chr /= '' )  THEN
1367          WRITE ( io, 332 )  dopr_chr
1368       ENDIF
1369       WRITE ( io, 333 )  dt_dopr, averaging_interval_pr, dt_averaging_input_pr
1370       IF ( skip_time_dopr /= 0.0_wp )  WRITE ( io, 339 )  skip_time_dopr
1371    ENDIF
1372
1373!
1374!-- 2D-arrays
1375    DO  av = 0, 1
1376
1377       i = 1
1378       do2d_xy = ''
1379       do2d_xz = ''
1380       do2d_yz = ''
1381       DO  WHILE ( do2d(av,i) /= ' ' )
1382
1383          l = MAX( 2, LEN_TRIM( do2d(av,i) ) )
1384          do2d_mode = do2d(av,i)(l-1:l)
1385
1386          SELECT CASE ( do2d_mode )
1387             CASE ( 'xy' )
1388                ll = LEN_TRIM( do2d_xy )
1389                do2d_xy = do2d_xy(1:ll) // ' ' // do2d(av,i)(1:l-3) // ','
1390             CASE ( 'xz' )
1391                ll = LEN_TRIM( do2d_xz )
1392                do2d_xz = do2d_xz(1:ll) // ' ' // do2d(av,i)(1:l-3) // ','
1393             CASE ( 'yz' )
1394                ll = LEN_TRIM( do2d_yz )
1395                do2d_yz = do2d_yz(1:ll) // ' ' // do2d(av,i)(1:l-3) // ','
1396          END SELECT
1397
1398          i = i + 1
1399
1400       ENDDO
1401
1402       IF ( ( ( do2d_xy /= ''  .AND.  section(1,1) /= -9999 )  .OR.    &
1403              ( do2d_xz /= ''  .AND.  section(1,2) /= -9999 )  .OR.    &
1404              ( do2d_yz /= ''  .AND.  section(1,3) /= -9999 ) ) )  THEN
1405
1406          IF (  av == 0 )  THEN
1407             WRITE ( io, 334 )  ''
1408          ELSE
1409             WRITE ( io, 334 )  '(time-averaged)'
1410          ENDIF
1411
1412          IF ( do2d_at_begin )  THEN
1413             begin_chr = 'and at the start'
1414          ELSE
1415             begin_chr = ''
1416          ENDIF
1417
1418          output_format = ''
1419          output_format = netcdf_data_format_string
1420          IF ( netcdf_deflate == 0 )  THEN
1421             WRITE ( io, 344 )  output_format
1422          ELSE
1423             WRITE ( io, 354 )  TRIM( output_format ), netcdf_deflate
1424          ENDIF
1425
1426          IF ( do2d_xy /= ''  .AND.  section(1,1) /= -9999 )  THEN
1427             i = 1
1428             slices = '/'
1429             coordinates = '/'
1430!
1431!--          Building strings with index and coordinate information of the
1432!--          slices
1433             DO  WHILE ( section(i,1) /= -9999 )
1434
1435                WRITE (section_chr,'(I5)')  section(i,1)
1436                section_chr = ADJUSTL( section_chr )
1437                slices = TRIM( slices ) // TRIM( section_chr ) // '/'
1438
1439                IF ( section(i,1) == -1 )  THEN
1440                   WRITE (coor_chr,'(F10.1)')  -1.0_wp
1441                ELSE
1442                   WRITE (coor_chr,'(F10.1)')  zu(section(i,1))
1443                ENDIF
1444                coor_chr = ADJUSTL( coor_chr )
1445                coordinates = TRIM( coordinates ) // TRIM( coor_chr ) // '/'
1446
1447                i = i + 1
1448             ENDDO
1449             IF ( av == 0 )  THEN
1450                WRITE ( io, 335 )  'XY', do2d_xy, dt_do2d_xy, &
1451                                   TRIM( begin_chr ), 'k', TRIM( slices ), &
1452                                   TRIM( coordinates )
1453                IF ( skip_time_do2d_xy /= 0.0_wp )  THEN
1454                   WRITE ( io, 339 )  skip_time_do2d_xy
1455                ENDIF
1456             ELSE
1457                WRITE ( io, 342 )  'XY', do2d_xy, dt_data_output_av, &
1458                                   TRIM( begin_chr ), averaging_interval, &
1459                                   dt_averaging_input, 'k', TRIM( slices ), &
1460                                   TRIM( coordinates )
1461                IF ( skip_time_data_output_av /= 0.0_wp )  THEN
1462                   WRITE ( io, 339 )  skip_time_data_output_av
1463                ENDIF
1464             ENDIF
1465             IF ( netcdf_data_format > 4 )  THEN
1466                WRITE ( io, 352 )  ntdim_2d_xy(av)
1467             ELSE
1468                WRITE ( io, 353 )
1469             ENDIF
1470          ENDIF
1471
1472          IF ( do2d_xz /= ''  .AND.  section(1,2) /= -9999 )  THEN
1473             i = 1
1474             slices = '/'
1475             coordinates = '/'
1476!
1477!--          Building strings with index and coordinate information of the
1478!--          slices
1479             DO  WHILE ( section(i,2) /= -9999 )
1480
1481                WRITE (section_chr,'(I5)')  section(i,2)
1482                section_chr = ADJUSTL( section_chr )
1483                slices = TRIM( slices ) // TRIM( section_chr ) // '/'
1484
1485                WRITE (coor_chr,'(F10.1)')  section(i,2) * dy
1486                coor_chr = ADJUSTL( coor_chr )
1487                coordinates = TRIM( coordinates ) // TRIM( coor_chr ) // '/'
1488
1489                i = i + 1
1490             ENDDO
1491             IF ( av == 0 )  THEN
1492                WRITE ( io, 335 )  'XZ', do2d_xz, dt_do2d_xz, &
1493                                   TRIM( begin_chr ), 'j', TRIM( slices ), &
1494                                   TRIM( coordinates )
1495                IF ( skip_time_do2d_xz /= 0.0_wp )  THEN
1496                   WRITE ( io, 339 )  skip_time_do2d_xz
1497                ENDIF
1498             ELSE
1499                WRITE ( io, 342 )  'XZ', do2d_xz, dt_data_output_av, &
1500                                   TRIM( begin_chr ), averaging_interval, &
1501                                   dt_averaging_input, 'j', TRIM( slices ), &
1502                                   TRIM( coordinates )
1503                IF ( skip_time_data_output_av /= 0.0_wp )  THEN
1504                   WRITE ( io, 339 )  skip_time_data_output_av
1505                ENDIF
1506             ENDIF
1507             IF ( netcdf_data_format > 4 )  THEN
1508                WRITE ( io, 352 )  ntdim_2d_xz(av)
1509             ELSE
1510                WRITE ( io, 353 )
1511             ENDIF
1512          ENDIF
1513
1514          IF ( do2d_yz /= ''  .AND.  section(1,3) /= -9999 )  THEN
1515             i = 1
1516             slices = '/'
1517             coordinates = '/'
1518!
1519!--          Building strings with index and coordinate information of the
1520!--          slices
1521             DO  WHILE ( section(i,3) /= -9999 )
1522
1523                WRITE (section_chr,'(I5)')  section(i,3)
1524                section_chr = ADJUSTL( section_chr )
1525                slices = TRIM( slices ) // TRIM( section_chr ) // '/'
1526
1527                WRITE (coor_chr,'(F10.1)')  section(i,3) * dx
1528                coor_chr = ADJUSTL( coor_chr )
1529                coordinates = TRIM( coordinates ) // TRIM( coor_chr ) // '/'
1530
1531                i = i + 1
1532             ENDDO
1533             IF ( av == 0 )  THEN
1534                WRITE ( io, 335 )  'YZ', do2d_yz, dt_do2d_yz, &
1535                                   TRIM( begin_chr ), 'i', TRIM( slices ), &
1536                                   TRIM( coordinates )
1537                IF ( skip_time_do2d_yz /= 0.0_wp )  THEN
1538                   WRITE ( io, 339 )  skip_time_do2d_yz
1539                ENDIF
1540             ELSE
1541                WRITE ( io, 342 )  'YZ', do2d_yz, dt_data_output_av, &
1542                                   TRIM( begin_chr ), averaging_interval, &
1543                                   dt_averaging_input, 'i', TRIM( slices ), &
1544                                   TRIM( coordinates )
1545                IF ( skip_time_data_output_av /= 0.0_wp )  THEN
1546                   WRITE ( io, 339 )  skip_time_data_output_av
1547                ENDIF
1548             ENDIF
1549             IF ( netcdf_data_format > 4 )  THEN
1550                WRITE ( io, 352 )  ntdim_2d_yz(av)
1551             ELSE
1552                WRITE ( io, 353 )
1553             ENDIF
1554          ENDIF
1555
1556       ENDIF
1557
1558    ENDDO
1559
1560!
1561!-- 3d-arrays
1562    DO  av = 0, 1
1563
1564       i = 1
1565       do3d_chr = ''
1566       DO  WHILE ( do3d(av,i) /= ' ' )
1567
1568          do3d_chr = TRIM( do3d_chr ) // ' ' // TRIM( do3d(av,i) ) // ','
1569          i = i + 1
1570
1571       ENDDO
1572
1573       IF ( do3d_chr /= '' )  THEN
1574          IF ( av == 0 )  THEN
1575             WRITE ( io, 336 )  ''
1576          ELSE
1577             WRITE ( io, 336 )  '(time-averaged)'
1578          ENDIF
1579
1580          output_format = netcdf_data_format_string
1581          IF ( netcdf_deflate == 0 )  THEN
1582             WRITE ( io, 344 )  output_format
1583          ELSE
1584             WRITE ( io, 354 )  TRIM( output_format ), netcdf_deflate
1585          ENDIF
1586
1587          IF ( do3d_at_begin )  THEN
1588             begin_chr = 'and at the start'
1589          ELSE
1590             begin_chr = ''
1591          ENDIF
1592          IF ( av == 0 )  THEN
1593             WRITE ( io, 337 )  do3d_chr, dt_do3d, TRIM( begin_chr ), &
1594                                zu(nz_do3d), nz_do3d
1595          ELSE
1596             WRITE ( io, 343 )  do3d_chr, dt_data_output_av,           &
1597                                TRIM( begin_chr ), averaging_interval, &
1598                                dt_averaging_input, zu(nz_do3d), nz_do3d
1599          ENDIF
1600
1601          IF ( netcdf_data_format > 4 )  THEN
1602             WRITE ( io, 352 )  ntdim_3d(av)
1603          ELSE
1604             WRITE ( io, 353 )
1605          ENDIF
1606
1607          IF ( av == 0 )  THEN
1608             IF ( skip_time_do3d /= 0.0_wp )  THEN
1609                WRITE ( io, 339 )  skip_time_do3d
1610             ENDIF
1611          ELSE
1612             IF ( skip_time_data_output_av /= 0.0_wp )  THEN
1613                WRITE ( io, 339 )  skip_time_data_output_av
1614             ENDIF
1615          ENDIF
1616
1617       ENDIF
1618
1619    ENDDO
1620
1621!
1622!-- masked arrays
1623    IF ( masks > 0 )  WRITE ( io, 345 )  &
1624         mask_scale_x, mask_scale_y, mask_scale_z
1625    DO  mid = 1, masks
1626       DO  av = 0, 1
1627
1628          i = 1
1629          domask_chr = ''
1630          DO  WHILE ( domask(mid,av,i) /= ' ' )
1631             domask_chr = TRIM( domask_chr ) // ' ' //  &
1632                          TRIM( domask(mid,av,i) ) // ','
1633             i = i + 1
1634          ENDDO
1635
1636          IF ( domask_chr /= '' )  THEN
1637             IF ( av == 0 )  THEN
1638                WRITE ( io, 346 )  '', mid
1639             ELSE
1640                WRITE ( io, 346 )  ' (time-averaged)', mid
1641             ENDIF
1642
1643             output_format = netcdf_data_format_string
1644!--          Parallel output not implemented for mask data, hence
1645!--          output_format must be adjusted.
1646             IF ( netcdf_data_format == 5 ) output_format = 'netCDF4/HDF5'
1647             IF ( netcdf_data_format == 6 ) output_format = 'netCDF4/HDF5 classic'
1648             IF ( netcdf_deflate == 0 )  THEN
1649                WRITE ( io, 344 )  output_format
1650             ELSE
1651                WRITE ( io, 354 )  TRIM( output_format ), netcdf_deflate
1652             ENDIF
1653
1654             IF ( av == 0 )  THEN
1655                WRITE ( io, 347 )  domask_chr, dt_domask(mid)
1656             ELSE
1657                WRITE ( io, 348 )  domask_chr, dt_data_output_av, &
1658                                   averaging_interval, dt_averaging_input
1659             ENDIF
1660
1661             IF ( av == 0 )  THEN
1662                IF ( skip_time_domask(mid) /= 0.0_wp )  THEN
1663                   WRITE ( io, 339 )  skip_time_domask(mid)
1664                ENDIF
1665             ELSE
1666                IF ( skip_time_data_output_av /= 0.0_wp )  THEN
1667                   WRITE ( io, 339 )  skip_time_data_output_av
1668                ENDIF
1669             ENDIF
1670!
1671!--          output locations
1672             DO  dim = 1, 3
1673                IF ( mask(mid,dim,1) >= 0.0_wp )  THEN
1674                   count = 0
1675                   DO  WHILE ( mask(mid,dim,count+1) >= 0.0_wp )
1676                      count = count + 1
1677                   ENDDO
1678                   WRITE ( io, 349 )  dir(dim), dir(dim), mid, dir(dim), &
1679                                      mask(mid,dim,:count)
1680                ELSEIF ( mask_loop(mid,dim,1) < 0.0_wp .AND.  &
1681                         mask_loop(mid,dim,2) < 0.0_wp .AND.  &
1682                         mask_loop(mid,dim,3) == 0.0_wp )  THEN
1683                   WRITE ( io, 350 )  dir(dim), dir(dim)
1684                ELSEIF ( mask_loop(mid,dim,3) == 0.0_wp )  THEN
1685                   WRITE ( io, 351 )  dir(dim), dir(dim), mid, dir(dim), &
1686                                      mask_loop(mid,dim,1:2)
1687                ELSE
1688                   WRITE ( io, 351 )  dir(dim), dir(dim), mid, dir(dim), &
1689                                      mask_loop(mid,dim,1:3)
1690                ENDIF
1691             ENDDO
1692          ENDIF
1693
1694       ENDDO
1695    ENDDO
1696
1697!
1698!-- Timeseries
1699    IF ( dt_dots /= 9999999.9_wp )  THEN
1700       WRITE ( io, 340 )
1701
1702       output_format = netcdf_data_format_string
1703       IF ( netcdf_deflate == 0 )  THEN
1704          WRITE ( io, 344 )  output_format
1705       ELSE
1706          WRITE ( io, 354 )  TRIM( output_format ), netcdf_deflate
1707       ENDIF
1708       WRITE ( io, 341 )  dt_dots
1709    ENDIF
1710
1711#if defined( __dvrp_graphics )
1712!
1713!-- Dvrp-output
1714    IF ( dt_dvrp /= 9999999.9_wp )  THEN
1715       WRITE ( io, 360 )  dt_dvrp, TRIM( dvrp_output ), TRIM( dvrp_host ), &
1716                          TRIM( dvrp_username ), TRIM( dvrp_directory )
1717       i = 1
1718       l = 0
1719       m = 0
1720       DO WHILE ( mode_dvrp(i) /= ' ' )
1721          IF ( mode_dvrp(i)(1:10) == 'isosurface' )  THEN
1722             READ ( mode_dvrp(i), '(10X,I2)' )  j
1723             l = l + 1
1724             IF ( do3d(0,j) /= ' ' )  THEN
1725                WRITE ( io, 361 )  TRIM( do3d(0,j) ), threshold(l), &
1726                                   isosurface_color(:,l)
1727             ENDIF
1728          ELSEIF ( mode_dvrp(i)(1:6) == 'slicer' )  THEN
1729             READ ( mode_dvrp(i), '(6X,I2)' )  j
1730             m = m + 1
1731             IF ( do2d(0,j) /= ' ' )  THEN
1732                WRITE ( io, 362 )  TRIM( do2d(0,j) ), &
1733                                   slicer_range_limits_dvrp(:,m)
1734             ENDIF
1735          ENDIF
1736          i = i + 1
1737       ENDDO
1738
1739       WRITE ( io, 365 )  groundplate_color, superelevation_x, &
1740                          superelevation_y, superelevation, clip_dvrp_l, &
1741                          clip_dvrp_r, clip_dvrp_s, clip_dvrp_n
1742
1743       IF ( TRIM( topography ) /= 'flat' )  THEN
1744          WRITE ( io, 366 )  topography_color
1745          IF ( cluster_size > 1 )  THEN
1746             WRITE ( io, 367 )  cluster_size
1747          ENDIF
1748       ENDIF
1749
1750    ENDIF
1751#endif
1752!
1753!-- Output of virtual flight information
1754    IF ( virtual_flight )  CALL flight_header( io )
1755
1756!
1757!-- Output of spectra related quantities
1758    IF ( calculate_spectra )  CALL spectra_header( io )
1759
1760    WRITE ( io, 99 )
1761
1762!
1763!-- Physical quantities
1764    WRITE ( io, 400 )
1765
1766!
1767!-- Geostrophic parameters
1768    WRITE ( io, 410 )  phi, omega, f, fs
1769
1770!
1771!-- Other quantities
1772    WRITE ( io, 411 )  g
1773
1774    WRITE ( io, 412 )  TRIM( reference_state )
1775    IF ( use_single_reference_value )  THEN
1776       IF ( ocean )  THEN
1777          WRITE ( io, 413 )  prho_reference
1778       ELSE
1779          WRITE ( io, 414 )  pt_reference
1780       ENDIF
1781    ENDIF
1782
1783!
1784!-- Cloud physics parameters
1785    IF ( cloud_physics )  THEN
1786       WRITE ( io, 415 )
1787       WRITE ( io, 416 ) surface_pressure, r_d, rho_surface, cp, l_v
1788       IF ( microphysics_seifert )  THEN
1789          WRITE ( io, 510 ) 1.0E-6_wp * nc_const
1790          WRITE ( io, 511 ) c_sedimentation
1791       ENDIF
1792    ENDIF
1793
1794!
1795!-- Cloud physcis parameters / quantities / numerical methods
1796    WRITE ( io, 430 )
1797    IF ( humidity .AND. .NOT. cloud_physics .AND. .NOT. cloud_droplets)  THEN
1798       WRITE ( io, 431 )
1799    ELSEIF ( humidity  .AND.  cloud_physics )  THEN
1800       WRITE ( io, 432 )
1801       IF ( cloud_top_radiation )  WRITE ( io, 132 )
1802       IF ( microphysics_kessler )  THEN
1803          WRITE ( io, 133 )
1804       ELSEIF ( microphysics_seifert )  THEN
1805          IF ( cloud_water_sedimentation )  WRITE ( io, 506 )
1806          WRITE ( io, 505 )
1807          IF ( collision_turbulence )  WRITE ( io, 507 )
1808          IF ( ventilation_effect )  WRITE ( io, 508 )
1809          IF ( limiter_sedimentation )  WRITE ( io, 509 )
1810       ENDIF
1811    ELSEIF ( humidity  .AND.  cloud_droplets )  THEN
1812       WRITE ( io, 433 )
1813       IF ( curvature_solution_effects )  WRITE ( io, 434 )
1814       IF ( collision_kernel /= 'none' )  THEN
1815          WRITE ( io, 435 )  TRIM( collision_kernel )
1816          IF ( collision_kernel(6:9) == 'fast' )  THEN
1817             WRITE ( io, 436 )  radius_classes, dissipation_classes
1818          ENDIF
1819       ELSE
1820          WRITE ( io, 437 )
1821       ENDIF
1822    ENDIF
1823
1824!
1825!-- LES / turbulence parameters
1826    WRITE ( io, 450 )
1827
1828!--
1829! ... LES-constants used must still be added here
1830!--
1831    IF ( constant_diffusion )  THEN
1832       WRITE ( io, 451 )  km_constant, km_constant/prandtl_number, &
1833                          prandtl_number
1834    ENDIF
1835    IF ( .NOT. constant_diffusion)  THEN
1836       IF ( e_init > 0.0_wp )  WRITE ( io, 455 )  e_init
1837       IF ( e_min > 0.0_wp )  WRITE ( io, 454 )  e_min
1838       IF ( wall_adjustment )  WRITE ( io, 453 )  wall_adjustment_factor
1839    ENDIF
1840
1841!
1842!-- Special actions during the run
1843    WRITE ( io, 470 )
1844    IF ( create_disturbances )  THEN
1845       WRITE ( io, 471 )  dt_disturb, disturbance_amplitude,                   &
1846                          zu(disturbance_level_ind_b), disturbance_level_ind_b,&
1847                          zu(disturbance_level_ind_t), disturbance_level_ind_t
1848       IF ( .NOT. bc_lr_cyc  .OR.  .NOT. bc_ns_cyc )  THEN
1849          WRITE ( io, 472 )  inflow_disturbance_begin, inflow_disturbance_end
1850       ELSE
1851          WRITE ( io, 473 )  disturbance_energy_limit
1852       ENDIF
1853       WRITE ( io, 474 )  TRIM( random_generator )
1854    ENDIF
1855    IF ( pt_surface_initial_change /= 0.0_wp )  THEN
1856       WRITE ( io, 475 )  pt_surface_initial_change
1857    ENDIF
1858    IF ( humidity  .AND.  q_surface_initial_change /= 0.0_wp )  THEN
1859       WRITE ( io, 476 )  q_surface_initial_change       
1860    ENDIF
1861    IF ( passive_scalar  .AND.  q_surface_initial_change /= 0.0_wp )  THEN
1862       WRITE ( io, 477 )  q_surface_initial_change       
1863    ENDIF
1864
1865    IF ( particle_advection )  THEN
1866!
1867!--    Particle attributes
1868       WRITE ( io, 480 )  particle_advection_start, dt_prel, bc_par_lr, &
1869                          bc_par_ns, bc_par_b, bc_par_t, particle_maximum_age, &
1870                          end_time_prel
1871       IF ( use_sgs_for_particles )  WRITE ( io, 488 )  dt_min_part
1872       IF ( random_start_position )  WRITE ( io, 481 )
1873       IF ( seed_follows_topography )  WRITE ( io, 496 )
1874       IF ( particles_per_point > 1 )  WRITE ( io, 489 )  particles_per_point
1875       WRITE ( io, 495 )  total_number_of_particles
1876       IF ( dt_write_particle_data /= 9999999.9_wp )  THEN
1877          WRITE ( io, 485 )  dt_write_particle_data
1878          IF ( netcdf_data_format > 1 )  THEN
1879             output_format = 'netcdf (64 bit offset) and binary'
1880          ELSE
1881             output_format = 'netcdf and binary'
1882          ENDIF
1883          IF ( netcdf_deflate == 0 )  THEN
1884             WRITE ( io, 344 )  output_format
1885          ELSE
1886             WRITE ( io, 354 )  TRIM( output_format ), netcdf_deflate
1887          ENDIF
1888       ENDIF
1889       IF ( dt_dopts /= 9999999.9_wp )  WRITE ( io, 494 )  dt_dopts
1890       IF ( write_particle_statistics )  WRITE ( io, 486 )
1891
1892       WRITE ( io, 487 )  number_of_particle_groups
1893
1894       DO  i = 1, number_of_particle_groups
1895          IF ( i == 1  .AND.  density_ratio(i) == 9999999.9_wp )  THEN
1896             WRITE ( io, 490 )  i, 0.0_wp
1897             WRITE ( io, 492 )
1898          ELSE
1899             WRITE ( io, 490 )  i, radius(i)
1900             IF ( density_ratio(i) /= 0.0_wp )  THEN
1901                WRITE ( io, 491 )  density_ratio(i)
1902             ELSE
1903                WRITE ( io, 492 )
1904             ENDIF
1905          ENDIF
1906          WRITE ( io, 493 )  psl(i), psr(i), pss(i), psn(i), psb(i), pst(i), &
1907                             pdx(i), pdy(i), pdz(i)
1908          IF ( .NOT. vertical_particle_advection(i) )  WRITE ( io, 482 )
1909       ENDDO
1910
1911    ENDIF
1912
1913
1914!
1915!-- Parameters of 1D-model
1916    IF ( INDEX( initializing_actions, 'set_1d-model_profiles' ) /= 0 )  THEN
1917       WRITE ( io, 500 )  end_time_1d, dt_run_control_1d, dt_pr_1d, &
1918                          mixing_length_1d, dissipation_1d
1919       IF ( damp_level_ind_1d /= nzt+1 )  THEN
1920          WRITE ( io, 502 )  zu(damp_level_ind_1d), damp_level_ind_1d
1921       ENDIF
1922    ENDIF
1923
1924!
1925!-- User-defined information
1926    CALL user_header( io )
1927
1928    WRITE ( io, 99 )
1929
1930!
1931!-- Write buffer contents to disc immediately
1932    FLUSH( io )
1933
1934!
1935!-- Here the FORMATs start
1936
1937 99 FORMAT (1X,78('-'))
1938100 FORMAT (/1X,'******************************',4X,44('-')/        &
1939            1X,'* ',A,' *',4X,A/                               &
1940            1X,'******************************',4X,44('-'))
1941101 FORMAT (35X,'coupled run: ',A/ &
1942            35X,42('-'))
1943102 FORMAT (/' Date:                 ',A8,4X,'Run:       ',A20/      &
1944            ' Time:                 ',A8,4X,'Run-No.:   ',I2.2/     &
1945            ' Run on host:        ',A10)
1946#if defined( __parallel )
1947103 FORMAT (' Number of PEs:',10X,I6,4X,'Processor grid (x,y): (',I4,',',I4, &
1948              ')',1X,A)
1949104 FORMAT (' Number of PEs:',10X,I6,4X,'Tasks:',I4,'   threads per task:',I4/ &
1950              35X,'Processor grid (x,y): (',I4,',',I4,')',1X,A)
1951105 FORMAT (35X,'One additional PE is used to handle'/37X,'the dvrp output!')
1952106 FORMAT (35X,'A 1d-decomposition along x is forced'/ &
1953            35X,'because the job is running on an SMP-cluster')
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.