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

Last change on this file since 2338 was 2338, checked in by gronemeier, 7 years ago

modularized 1d model

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