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

Last change on this file since 4067 was 4023, checked in by maronga, 5 years ago

consistent output of time stamps in header and run control for runs with spinup. Commented previous revisions in palm_csd

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