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

Last change on this file since 1957 was 1957, checked in by suehring, 8 years ago

flight module added

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