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

Last change on this file since 2232 was 2232, checked in by suehring, 7 years ago

Adjustments according new topography and surface-modelling concept implemented

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