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

Last change on this file since 4017 was 4017, checked in by schwenkel, 5 years ago

Modularization of all lagrangian particle model code components

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