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

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

Bugfixes in radiation_model; monotonic limiter in 5th order advection scheme removed

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