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

Last change on this file since 4149 was 4069, checked in by Giersch, 5 years ago

Bugfix for masked output, compiler warning removed, test case for wind turbine model revised

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