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

Last change on this file since 2292 was 2270, checked in by maronga, 7 years ago

major revisions in land surface model

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