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

Last change on this file since 3349 was 3347, checked in by suehring, 6 years ago

Offline nesting revised and separated from large_scale_forcing_mod; Time-dependent synthetic turbulence generator; bugfixes in USM/LSM radiation model and init_pegrid

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