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

Last change on this file since 3262 was 3241, checked in by raasch, 6 years ago

various changes to avoid compiler warnings (mainly removal of unused variables)

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