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

Last change on this file since 2038 was 2038, checked in by knoop, 8 years ago

last commit documented

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