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

Last change on this file since 3289 was 3274, checked in by knoop, 6 years ago

Modularization of all bulk cloud physics code components

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