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

Last change on this file since 1995 was 1993, checked in by suehring, 8 years ago

last commit documented

  • Property svn:keywords set to Id
File size: 87.9 KB
Line 
1!> @file header.f90
2!--------------------------------------------------------------------------------!
3! This file is part of PALM.
4!
5! PALM is free software: you can redistribute it and/or modify it under the terms
6! of the GNU General Public License as published by the Free Software Foundation,
7! either version 3 of the License, or (at your option) any later version.
8!
9! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
10! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
11! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
12!
13! You should have received a copy of the GNU General Public License along with
14! PALM. If not, see <http://www.gnu.org/licenses/>.
15!
16! Copyright 1997-2016 Leibniz Universitaet Hannover
17!--------------------------------------------------------------------------------!
18!
19! Current revisions:
20! -----------------
21!
22!
23! Former revisions:
24! -----------------
25! $Id: header.f90 1993 2016-08-12 15:16:41Z suehring $
26!
27! 1992 2016-08-12 15:14:59Z suehring
28! Adapted for top_scalarflux
29!
30! 1960 2016-07-12 16:34:24Z suehring
31! Treat humidity and passive scalar separately.
32! Modify misleading information concerning humidity.
33! Bugfix, change unit for humidity flux.
34!
35! 1957 2016-07-07 10:43:48Z suehring
36! flight module added
37!
38! 1931 2016-06-10 12:06:59Z suehring
39! Rename multigrid into multigrid_noopt
40!
41! 1902 2016-05-09 11:18:56Z suehring
42! Write information about masking_method only for multigrid solver
43!
44! 1849 2016-04-08 11:33:18Z hoffmann
45! Adapted for modularization of microphysics
46!
47! 1833 2016-04-07 14:23:03Z raasch
48! spectrum renamed spectra_mod, output of spectra related quantities moved to
49! spectra_mod
50!
51! 1831 2016-04-07 13:15:51Z hoffmann
52! turbulence renamed collision_turbulence,
53! drizzle renamed cloud_water_sedimentation
54!
55! 1826 2016-04-07 12:01:39Z maronga
56! Moved radiation model header output to the respective module.
57! Moved canopy model header output to the respective module.
58!
59! 1822 2016-04-07 07:49:42Z hoffmann
60! Tails removed. icloud_scheme replaced by microphysics_*
61!
62! 1817 2016-04-06 15:44:20Z maronga
63! Moved land_surface_model header output to the respective module.
64!
65! 1808 2016-04-05 19:44:00Z raasch
66! routine local_flush replaced by FORTRAN statement
67!
68! 1797 2016-03-21 16:50:28Z raasch
69! output of nesting datatransfer mode
70!
71! 1791 2016-03-11 10:41:25Z raasch
72! output of nesting informations of all domains
73!
74! 1788 2016-03-10 11:01:04Z maronga
75! Parameter dewfall removed
76!
77! 1786 2016-03-08 05:49:27Z raasch
78! cpp-direktives for spectra removed
79!
80! 1783 2016-03-06 18:36:17Z raasch
81! netcdf module and variable names changed, output of netcdf_deflate
82!
83! 1764 2016-02-28 12:45:19Z raasch
84! output of nesting informations
85!
86! 1697 2015-10-28 17:14:10Z raasch
87! small E- and F-FORMAT changes to avoid informative compiler messages about
88! insufficient field width
89!
90! 1691 2015-10-26 16:17:44Z maronga
91! Renamed prandtl_layer to constant_flux_layer, renames rif_min/rif_max to
92! zeta_min/zeta_max.
93!
94! 1682 2015-10-07 23:56:08Z knoop
95! Code annotations made doxygen readable
96!
97! 1675 2015-10-02 08:28:59Z gronemeier
98! Bugfix: Definition of topography grid levels
99!
100! 1660 2015-09-21 08:15:16Z gronemeier
101! Bugfix: Definition of building/street canyon height if vertical grid stretching
102!         starts below the maximum topography height.
103!
104! 1590 2015-05-08 13:56:27Z maronga
105! Bugfix: Added TRIM statements for character strings for LSM and radiation code
106!
107! 1585 2015-04-30 07:05:52Z maronga
108! Further output for radiation model(s).
109!
110! 1575 2015-03-27 09:56:27Z raasch
111! adjustments for psolver-queries, output of seed_follows_topography
112!
113! 1560 2015-03-06 10:48:54Z keck
114! output for recycling y shift
115!
116! 1557 2015-03-05 16:43:04Z suehring
117! output for monotonic limiter
118!
119! 1551 2015-03-03 14:18:16Z maronga
120! Added informal output for land surface model and radiation model. Removed typo.
121!
122! 1496 2014-12-02 17:25:50Z maronga
123! Renamed: "radiation -> "cloud_top_radiation"
124!
125! 1484 2014-10-21 10:53:05Z kanani
126! Changes due to new module structure of the plant canopy model:
127!   module plant_canopy_model_mod and output for new canopy model parameters
128!   (alpha_lad, beta_lad, lai_beta,...) added,
129!   drag_coefficient, leaf_surface_concentration and scalar_exchange_coefficient
130!   renamed to canopy_drag_coeff, leaf_surface_conc and leaf_scalar_exch_coeff,
131!   learde renamed leaf_area_density.
132! Bugfix: DO-WHILE-loop for lad header information additionally restricted
133! by maximum number of gradient levels (currently 10)
134!
135! 1482 2014-10-18 12:34:45Z raasch
136! information about calculated or predefined virtual processor topology adjusted
137!
138! 1468 2014-09-24 14:06:57Z maronga
139! Adapted for use on up to 6-digit processor cores
140!
141! 1429 2014-07-15 12:53:45Z knoop
142! header exended to provide ensemble_member_nr if specified
143!
144! 1376 2014-04-26 11:21:22Z boeske
145! Correction of typos
146!
147! 1365 2014-04-22 15:03:56Z boeske
148! New section 'Large scale forcing and nudging':
149! output of large scale forcing and nudging information,
150! new section for initial profiles created
151!
152! 1359 2014-04-11 17:15:14Z hoffmann
153! dt_sort_particles removed
154!
155! 1353 2014-04-08 15:21:23Z heinze
156! REAL constants provided with KIND-attribute
157!
158! 1327 2014-03-21 11:00:16Z raasch
159! parts concerning iso2d and avs output removed,
160! -netcdf output queries
161!
162! 1324 2014-03-21 09:13:16Z suehring
163! Bugfix: module spectrum added
164!
165! 1322 2014-03-20 16:38:49Z raasch
166! REAL functions provided with KIND-attribute,
167! some REAL constants defined as wp-kind
168!
169! 1320 2014-03-20 08:40:49Z raasch
170! ONLY-attribute added to USE-statements,
171! kind-parameters added to all INTEGER and REAL declaration statements,
172! kinds are defined in new module kinds,
173! revision history before 2012 removed,
174! comment fields (!:) to be used for variable explanations added to
175! all variable declaration statements
176!
177! 1308 2014-03-13 14:58:42Z fricke
178! output of the fixed number of output time levels
179! output_format adjusted for masked data if netcdf_data_format > 5
180!
181! 1299 2014-03-06 13:15:21Z heinze
182! output for using large_scale subsidence in combination
183! with large_scale_forcing
184! reformatting, more detailed explanations
185!
186! 1241 2013-10-30 11:36:58Z heinze
187! output for nudging + large scale forcing from external file
188!
189! 1216 2013-08-26 09:31:42Z raasch
190! output for transpose_compute_overlap
191!
192! 1212 2013-08-15 08:46:27Z raasch
193! output for poisfft_hybrid removed
194!
195! 1179 2013-06-14 05:57:58Z raasch
196! output of reference_state, use_reference renamed use_single_reference_value
197!
198! 1159 2013-05-21 11:58:22Z fricke
199! +use_cmax
200!
201! 1115 2013-03-26 18:16:16Z hoffmann
202! descriptions for Seifert-Beheng-cloud-physics-scheme added
203!
204! 1111 2013-03-08 23:54:10Z raasch
205! output of accelerator board information
206! ibc_p_b = 2 removed
207!
208! 1108 2013-03-05 07:03:32Z raasch
209! bugfix for r1106
210!
211! 1106 2013-03-04 05:31:38Z raasch
212! some format changes for coupled runs
213!
214! 1092 2013-02-02 11:24:22Z raasch
215! unused variables removed
216!
217! 1036 2012-10-22 13:43:42Z raasch
218! code put under GPL (PALM 3.9)
219!
220! 1031 2012-10-19 14:35:30Z raasch
221! output of netCDF data format modified
222!
223! 1015 2012-09-27 09:23:24Z raasch
224! output of Adjustment of mixing length to the Prandtl mixing length at first
225! grid point above ground removed
226!
227! 1003 2012-09-14 14:35:53Z raasch
228! output of information about equal/unequal subdomain size removed
229!
230! 1001 2012-09-13 14:08:46Z raasch
231! all actions concerning leapfrog- and upstream-spline-scheme removed
232!
233! 978 2012-08-09 08:28:32Z fricke
234! -km_damp_max, outflow_damping_width
235! +pt_damping_factor, pt_damping_width
236! +z0h
237!
238! 964 2012-07-26 09:14:24Z raasch
239! output of profil-related quantities removed
240!
241! 940 2012-07-09 14:31:00Z raasch
242! Output in case of simulations for pure neutral stratification (no pt-equation
243! solved)
244!
245! 927 2012-06-06 19:15:04Z raasch
246! output of masking_method for mg-solver
247!
248! 868 2012-03-28 12:21:07Z raasch
249! translation velocity in Galilean transformation changed to 0.6 * ug
250!
251! 833 2012-02-22 08:55:55Z maronga
252! Adjusted format for leaf area density
253!
254! 828 2012-02-21 12:00:36Z raasch
255! output of dissipation_classes + radius_classes
256!
257! 825 2012-02-19 03:03:44Z raasch
258! Output of cloud physics parameters/quantities complemented and restructured
259!
260! Revision 1.1  1997/08/11 06:17:20  raasch
261! Initial revision
262!
263!
264! Description:
265! ------------
266!> Writing a header with all important information about the current run.
267!> This subroutine is called three times, two times at the beginning
268!> (writing information on files RUN_CONTROL and HEADER) and one time at the
269!> end of the run, then writing additional information about CPU-usage on file
270!> header.
271!-----------------------------------------------------------------------------!
272 SUBROUTINE header
273 
274
275    USE arrays_3d,                                                             &
276        ONLY:  pt_init, qsws, q_init, s_init, sa_init, shf, ug, vg, w_subs, zu,&
277               zw
278       
279    USE control_parameters
280       
281    USE cloud_parameters,                                                      &
282        ONLY:  cp, l_v, r_d
283
284    USE cpulog,                                                                &
285        ONLY:  log_point_s
286       
287    USE dvrp_variables,                                                        &
288        ONLY:  use_seperate_pe_for_dvrp_output
289       
290    USE flight_mod,                                                            &
291        ONLY:  flight_header
292       
293    USE grid_variables,                                                        &
294        ONLY:  dx, dy
295       
296    USE indices,                                                               &
297        ONLY:  mg_loc_ind, nnx, nny, nnz, nx, ny, nxl_mg, nxr_mg, nyn_mg,      &
298               nys_mg, nzt, nzt_mg
299       
300    USE kinds
301 
302    USE land_surface_model_mod,                                                &
303        ONLY: land_surface, lsm_header
304
305    USE microphysics_mod,                                                      &
306        ONLY:  cloud_water_sedimentation, collision_turbulence,                &
307               c_sedimentation, limiter_sedimentation, nc_const,               &
308               ventilation_effect
309
310    USE model_1d,                                                              &
311        ONLY:  damp_level_ind_1d, dt_pr_1d, dt_run_control_1d, end_time_1d
312       
313    USE netcdf_interface,                                                      &
314        ONLY:  netcdf_data_format, netcdf_data_format_string, netcdf_deflate
315
316    USE particle_attributes,                                                   &
317        ONLY:  bc_par_b, bc_par_lr, bc_par_ns, bc_par_t, collision_kernel,     &
318               curvature_solution_effects,                                     &
319               density_ratio, dissipation_classes, dt_min_part, dt_prel,       &
320               dt_write_particle_data, end_time_prel,                          &
321               number_of_particle_groups, particle_advection,                  &
322               particle_advection_start,                                       &
323               particles_per_point, pdx, pdy, pdz,  psb, psl, psn, psr, pss,   &
324               pst, radius, radius_classes, random_start_position,             &
325               seed_follows_topography,                                        &
326               total_number_of_particles, use_sgs_for_particles,               &
327               vertical_particle_advection, write_particle_statistics
328       
329    USE pegrid
330
331    USE plant_canopy_model_mod,                                                &
332        ONLY:  pcm_header, plant_canopy
333
334    USE pmc_handle_communicator,                                               &
335        ONLY:  pmc_get_model_info
336
337    USE pmc_interface,                                                         &
338        ONLY:  nested_run, nesting_datatransfer_mode, nesting_mode
339
340    USE radiation_model_mod,                                                   &
341        ONLY:  radiation, radiation_header
342   
343    USE spectra_mod,                                                           &
344        ONLY:  calculate_spectra, spectra_header
345
346    IMPLICIT NONE
347
348    CHARACTER (LEN=1)  ::  prec                !<
349   
350    CHARACTER (LEN=2)  ::  do2d_mode           !<
351   
352    CHARACTER (LEN=5)  ::  section_chr         !<
353   
354    CHARACTER (LEN=10) ::  coor_chr            !<
355    CHARACTER (LEN=10) ::  host_chr            !<
356   
357    CHARACTER (LEN=16) ::  begin_chr           !<
358   
359    CHARACTER (LEN=26) ::  ver_rev             !<
360
361    CHARACTER (LEN=32) ::  cpl_name            !<
362   
363    CHARACTER (LEN=40) ::  output_format       !<
364   
365    CHARACTER (LEN=70) ::  char1               !<
366    CHARACTER (LEN=70) ::  char2               !<
367    CHARACTER (LEN=70) ::  dopr_chr            !<
368    CHARACTER (LEN=70) ::  do2d_xy             !<
369    CHARACTER (LEN=70) ::  do2d_xz             !<
370    CHARACTER (LEN=70) ::  do2d_yz             !<
371    CHARACTER (LEN=70) ::  do3d_chr            !<
372    CHARACTER (LEN=70) ::  domask_chr          !<
373    CHARACTER (LEN=70) ::  run_classification  !<
374   
375    CHARACTER (LEN=85) ::  r_upper             !<
376    CHARACTER (LEN=85) ::  r_lower             !<
377   
378    CHARACTER (LEN=86) ::  coordinates         !<
379    CHARACTER (LEN=86) ::  gradients           !<
380    CHARACTER (LEN=86) ::  slices              !<
381    CHARACTER (LEN=86) ::  temperatures        !<
382    CHARACTER (LEN=86) ::  ugcomponent         !<
383    CHARACTER (LEN=86) ::  vgcomponent         !<
384
385    CHARACTER (LEN=1), DIMENSION(1:3) ::  dir = (/ 'x', 'y', 'z' /)  !<
386
387    INTEGER(iwp) ::  av             !<
388    INTEGER(iwp) ::  bh             !<
389    INTEGER(iwp) ::  blx            !<
390    INTEGER(iwp) ::  bly            !<
391    INTEGER(iwp) ::  bxl            !<
392    INTEGER(iwp) ::  bxr            !<
393    INTEGER(iwp) ::  byn            !<
394    INTEGER(iwp) ::  bys            !<
395    INTEGER(iwp) ::  ch             !<
396    INTEGER(iwp) ::  count          !<
397    INTEGER(iwp) ::  cpl_parent_id  !<
398    INTEGER(iwp) ::  cwx            !<
399    INTEGER(iwp) ::  cwy            !<
400    INTEGER(iwp) ::  cxl            !<
401    INTEGER(iwp) ::  cxr            !<
402    INTEGER(iwp) ::  cyn            !<
403    INTEGER(iwp) ::  cys            !<
404    INTEGER(iwp) ::  dim            !<
405    INTEGER(iwp) ::  i              !<
406    INTEGER(iwp) ::  io             !<
407    INTEGER(iwp) ::  j              !<
408    INTEGER(iwp) ::  k              !<
409    INTEGER(iwp) ::  l              !<
410    INTEGER(iwp) ::  ll             !<
411    INTEGER(iwp) ::  mpi_type       !<
412    INTEGER(iwp) ::  my_cpl_id      !<
413    INTEGER(iwp) ::  n              !<
414    INTEGER(iwp) ::  ncpl           !<
415    INTEGER(iwp) ::  npe_total      !<
416   
417
418    REAL(wp) ::  cpuseconds_per_simulated_second  !<
419    REAL(wp) ::  lower_left_coord_x               !< x-coordinate of nest domain
420    REAL(wp) ::  lower_left_coord_y               !< y-coordinate of nest domain
421
422!
423!-- Open the output file. At the end of the simulation, output is directed
424!-- to unit 19.
425    IF ( ( runnr == 0 .OR. force_print_header )  .AND. &
426         .NOT. simulated_time_at_begin /= simulated_time )  THEN
427       io = 15   !  header output on file RUN_CONTROL
428    ELSE
429       io = 19   !  header output on file HEADER
430    ENDIF
431    CALL check_open( io )
432
433!
434!-- At the end of the run, output file (HEADER) will be rewritten with
435!-- new information
436    IF ( io == 19 .AND. simulated_time_at_begin /= simulated_time ) REWIND( 19 )
437
438!
439!-- Determine kind of model run
440    IF ( TRIM( initializing_actions ) == 'read_restart_data' )  THEN
441       run_classification = 'restart run'
442    ELSEIF ( TRIM( initializing_actions ) == 'cyclic_fill' )  THEN
443       run_classification = 'run with cyclic fill of 3D - prerun data'
444    ELSEIF ( INDEX( initializing_actions, 'set_constant_profiles' ) /= 0 )  THEN
445       run_classification = 'run without 1D - prerun'
446    ELSEIF ( INDEX( initializing_actions, 'set_1d-model_profiles' ) /= 0 )  THEN
447       run_classification = 'run with 1D - prerun'
448    ELSEIF ( INDEX( initializing_actions, 'by_user' ) /=0 )  THEN
449       run_classification = 'run initialized by user'
450    ELSE
451       message_string = ' unknown action(s): ' // TRIM( initializing_actions )
452       CALL message( 'header', 'PA0191', 0, 0, 0, 6, 0 )
453    ENDIF
454    IF ( nested_run )  run_classification = 'nested ' // run_classification
455    IF ( ocean )  THEN
456       run_classification = 'ocean - ' // run_classification
457    ELSE
458       run_classification = 'atmosphere - ' // run_classification
459    ENDIF
460
461!
462!-- Run-identification, date, time, host
463    host_chr = host(1:10)
464    ver_rev = TRIM( version ) // '  ' // TRIM( revision )
465    WRITE ( io, 100 )  ver_rev, TRIM( run_classification )
466    IF ( TRIM( coupling_mode ) /= 'uncoupled' )  THEN
467#if defined( __mpi2 )
468       mpi_type = 2
469#else
470       mpi_type = 1
471#endif
472       WRITE ( io, 101 )  mpi_type, coupling_mode
473    ENDIF
474#if defined( __parallel )
475    IF ( coupling_start_time /= 0.0_wp )  THEN
476       IF ( coupling_start_time > simulated_time_at_begin )  THEN
477          WRITE ( io, 109 )
478       ELSE
479          WRITE ( io, 114 )
480       ENDIF
481    ENDIF
482#endif
483    IF ( ensemble_member_nr /= 0 )  THEN
484       WRITE ( io, 512 )  run_date, run_identifier, run_time, runnr,           &
485                       ADJUSTR( host_chr ), ensemble_member_nr
486    ELSE
487       WRITE ( io, 102 )  run_date, run_identifier, run_time, runnr,           &
488                       ADJUSTR( host_chr )
489    ENDIF
490#if defined( __parallel )
491    IF ( npex == -1  .AND.  npey == -1 )  THEN
492       char1 = 'calculated'
493    ELSE
494       char1 = 'predefined'
495    ENDIF
496    IF ( threads_per_task == 1 )  THEN
497       WRITE ( io, 103 )  numprocs, pdims(1), pdims(2), TRIM( char1 )
498    ELSE
499       WRITE ( io, 104 )  numprocs*threads_per_task, numprocs, &
500                          threads_per_task, pdims(1), pdims(2), TRIM( char1 )
501    ENDIF
502    IF ( num_acc_per_node /= 0 )  WRITE ( io, 117 )  num_acc_per_node   
503    IF ( ( host(1:3) == 'ibm'  .OR.  host(1:3) == 'nec'  .OR.    &
504           host(1:2) == 'lc'   .OR.  host(1:3) == 'dec' )  .AND. &
505         npex == -1  .AND.  pdims(2) == 1 )                      &
506    THEN
507       WRITE ( io, 106 )
508    ELSEIF ( pdims(2) == 1 )  THEN
509       WRITE ( io, 107 )  'x'
510    ELSEIF ( pdims(1) == 1 )  THEN
511       WRITE ( io, 107 )  'y'
512    ENDIF
513    IF ( use_seperate_pe_for_dvrp_output )  WRITE ( io, 105 )
514    IF ( numprocs /= maximum_parallel_io_streams )  THEN
515       WRITE ( io, 108 )  maximum_parallel_io_streams
516    ENDIF
517#else
518    IF ( num_acc_per_node /= 0 )  WRITE ( io, 120 )  num_acc_per_node
519#endif
520
521!
522!-- Nesting informations
523    IF ( nested_run )  THEN
524
525       WRITE ( io, 600 )  TRIM( nesting_mode ),                                &
526                          TRIM( nesting_datatransfer_mode )
527       CALL pmc_get_model_info( ncpl = ncpl, cpl_id = my_cpl_id )
528
529       DO  n = 1, ncpl
530          CALL pmc_get_model_info( request_for_cpl_id = n, cpl_name = cpl_name,&
531                                   cpl_parent_id = cpl_parent_id,              &
532                                   lower_left_x = lower_left_coord_x,          &
533                                   lower_left_y = lower_left_coord_y,          &
534                                   npe_total = npe_total )
535          IF ( n == my_cpl_id )  THEN
536             char1 = '*'
537          ELSE
538             char1 = ' '
539          ENDIF
540          WRITE ( io, 601 )  TRIM( char1 ), n, cpl_parent_id, npe_total,       &
541                             lower_left_coord_x, lower_left_coord_y,           &
542                             TRIM( cpl_name )
543       ENDDO
544    ENDIF
545    WRITE ( io, 99 )
546
547!
548!-- Numerical schemes
549    WRITE ( io, 110 )
550    IF ( psolver(1:7) == 'poisfft' )  THEN
551       WRITE ( io, 111 )  TRIM( fft_method )
552       IF ( transpose_compute_overlap )  WRITE( io, 115 )
553    ELSEIF ( psolver == 'sor' )  THEN
554       WRITE ( io, 112 )  nsor_ini, nsor, omega_sor
555    ELSEIF ( psolver(1:9) == 'multigrid' )  THEN
556       WRITE ( io, 135 )  TRIM(psolver), cycle_mg, maximum_grid_level, ngsrb
557       IF ( mg_cycles == -1 )  THEN
558          WRITE ( io, 140 )  residual_limit
559       ELSE
560          WRITE ( io, 141 )  mg_cycles
561       ENDIF
562       IF ( mg_switch_to_pe0_level == 0 )  THEN
563          WRITE ( io, 136 )  nxr_mg(1)-nxl_mg(1)+1, nyn_mg(1)-nys_mg(1)+1, &
564                             nzt_mg(1)
565       ELSEIF (  mg_switch_to_pe0_level /= -1 )  THEN
566          WRITE ( io, 137 )  mg_switch_to_pe0_level,            &
567                             mg_loc_ind(2,0)-mg_loc_ind(1,0)+1, &
568                             mg_loc_ind(4,0)-mg_loc_ind(3,0)+1, &
569                             nzt_mg(mg_switch_to_pe0_level),    &
570                             nxr_mg(1)-nxl_mg(1)+1, nyn_mg(1)-nys_mg(1)+1, &
571                             nzt_mg(1)
572       ENDIF
573       IF ( psolver == 'multigrid_noopt' .AND. masking_method )  WRITE ( io, 144 )
574    ENDIF
575    IF ( call_psolver_at_all_substeps  .AND. timestep_scheme(1:5) == 'runge' ) &
576    THEN
577       WRITE ( io, 142 )
578    ENDIF
579
580    IF ( momentum_advec == 'pw-scheme' )  THEN
581       WRITE ( io, 113 )
582    ELSEIF (momentum_advec == 'ws-scheme' )  THEN
583       WRITE ( io, 503 )
584    ENDIF
585    IF ( scalar_advec == 'pw-scheme' )  THEN
586       WRITE ( io, 116 )
587    ELSEIF ( scalar_advec == 'ws-scheme' )  THEN
588       WRITE ( io, 504 )
589    ELSEIF ( scalar_advec == 'ws-scheme-mono' )  THEN
590       WRITE ( io, 513 )
591    ELSE
592       WRITE ( io, 118 )
593    ENDIF
594
595    WRITE ( io, 139 )  TRIM( loop_optimization )
596
597    IF ( galilei_transformation )  THEN
598       IF ( use_ug_for_galilei_tr )  THEN
599          char1 = '0.6 * geostrophic wind'
600       ELSE
601          char1 = 'mean wind in model domain'
602       ENDIF
603       IF ( simulated_time_at_begin == simulated_time )  THEN
604          char2 = 'at the start of the run'
605       ELSE
606          char2 = 'at the end of the run'
607       ENDIF
608       WRITE ( io, 119 )  TRIM( char1 ), TRIM( char2 ),                        &
609                          advected_distance_x/1000.0_wp,                       &
610                          advected_distance_y/1000.0_wp
611    ENDIF
612    WRITE ( io, 122 )  timestep_scheme
613    IF ( use_upstream_for_tke )  WRITE ( io, 143 )
614    IF ( rayleigh_damping_factor /= 0.0_wp )  THEN
615       IF ( .NOT. ocean )  THEN
616          WRITE ( io, 123 )  'above', rayleigh_damping_height, &
617               rayleigh_damping_factor
618       ELSE
619          WRITE ( io, 123 )  'below', rayleigh_damping_height, &
620               rayleigh_damping_factor
621       ENDIF
622    ENDIF
623    IF ( neutral )  WRITE ( io, 131 )  pt_surface
624    IF ( humidity )  THEN
625       IF ( .NOT. cloud_physics )  THEN
626          WRITE ( io, 129 )
627       ELSE
628          WRITE ( io, 130 )
629       ENDIF
630    ENDIF
631    IF ( passive_scalar )  WRITE ( io, 134 )
632    IF ( conserve_volume_flow )  THEN
633       WRITE ( io, 150 )  conserve_volume_flow_mode
634       IF ( TRIM( conserve_volume_flow_mode ) == 'bulk_velocity' )  THEN
635          WRITE ( io, 151 )  u_bulk, v_bulk
636       ENDIF
637    ELSEIF ( dp_external )  THEN
638       IF ( dp_smooth )  THEN
639          WRITE ( io, 152 )  dpdxy, dp_level_b, ', vertically smoothed.'
640       ELSE
641          WRITE ( io, 152 )  dpdxy, dp_level_b, '.'
642       ENDIF
643    ENDIF
644    WRITE ( io, 99 )
645
646!
647!-- Runtime and timestep information
648    WRITE ( io, 200 )
649    IF ( .NOT. dt_fixed )  THEN
650       WRITE ( io, 201 )  dt_max, cfl_factor
651    ELSE
652       WRITE ( io, 202 )  dt
653    ENDIF
654    WRITE ( io, 203 )  simulated_time_at_begin, end_time
655
656    IF ( time_restart /= 9999999.9_wp  .AND. &
657         simulated_time_at_begin == simulated_time )  THEN
658       IF ( dt_restart == 9999999.9_wp )  THEN
659          WRITE ( io, 204 )  ' Restart at:       ',time_restart
660       ELSE
661          WRITE ( io, 205 )  ' Restart at:       ',time_restart, dt_restart
662       ENDIF
663    ENDIF
664
665    IF ( simulated_time_at_begin /= simulated_time )  THEN
666       i = MAX ( log_point_s(10)%counts, 1 )
667       IF ( ( simulated_time - simulated_time_at_begin ) == 0.0_wp )  THEN
668          cpuseconds_per_simulated_second = 0.0_wp
669       ELSE
670          cpuseconds_per_simulated_second = log_point_s(10)%sum / &
671                                            ( simulated_time -    &
672                                              simulated_time_at_begin )
673       ENDIF
674       WRITE ( io, 206 )  simulated_time, log_point_s(10)%sum,      &
675                          log_point_s(10)%sum / REAL( i, KIND=wp ), &
676                          cpuseconds_per_simulated_second
677       IF ( time_restart /= 9999999.9_wp  .AND.  time_restart < end_time )  THEN
678          IF ( dt_restart == 9999999.9_wp )  THEN
679             WRITE ( io, 204 )  ' Next restart at:     ',time_restart
680          ELSE
681             WRITE ( io, 205 )  ' Next restart at:     ',time_restart, dt_restart
682          ENDIF
683       ENDIF
684    ENDIF
685
686
687!
688!-- Start time for coupled runs, if independent precursor runs for atmosphere
689!-- and ocean are used or have been used. In this case, coupling_start_time
690!-- defines the time when the coupling is switched on.
691    IF ( coupling_start_time /= 0.0_wp )  THEN
692       WRITE ( io, 207 )  coupling_start_time
693    ENDIF
694
695!
696!-- Computational grid
697    IF ( .NOT. ocean )  THEN
698       WRITE ( io, 250 )  dx, dy, dz, (nx+1)*dx, (ny+1)*dy, zu(nzt+1)
699       IF ( dz_stretch_level_index < nzt+1 )  THEN
700          WRITE ( io, 252 )  dz_stretch_level, dz_stretch_level_index, &
701                             dz_stretch_factor, dz_max
702       ENDIF
703    ELSE
704       WRITE ( io, 250 )  dx, dy, dz, (nx+1)*dx, (ny+1)*dy, zu(0)
705       IF ( dz_stretch_level_index > 0 )  THEN
706          WRITE ( io, 252 )  dz_stretch_level, dz_stretch_level_index, &
707                             dz_stretch_factor, dz_max
708       ENDIF
709    ENDIF
710    WRITE ( io, 254 )  nx, ny, nzt+1, MIN( nnx, nx+1 ), MIN( nny, ny+1 ), &
711                       MIN( nnz+2, nzt+2 )
712    IF ( sloping_surface )  WRITE ( io, 260 )  alpha_surface
713
714!
715!-- Large scale forcing and nudging
716    WRITE ( io, 160 )
717    IF ( large_scale_forcing )  THEN
718       WRITE ( io, 162 )
719       WRITE ( io, 163 )
720
721       IF ( large_scale_subsidence )  THEN
722          IF ( .NOT. use_subsidence_tendencies )  THEN
723             WRITE ( io, 164 )
724          ELSE
725             WRITE ( io, 165 )
726          ENDIF
727       ENDIF
728
729       IF ( bc_pt_b == 'dirichlet' )  THEN
730          WRITE ( io, 180 )
731       ELSEIF ( bc_pt_b == 'neumann' )  THEN
732          WRITE ( io, 181 )
733       ENDIF
734
735       IF ( bc_q_b == 'dirichlet' )  THEN
736          WRITE ( io, 182 )
737       ELSEIF ( bc_q_b == 'neumann' )  THEN
738          WRITE ( io, 183 )
739       ENDIF
740
741       WRITE ( io, 167 )
742       IF ( nudging )  THEN
743          WRITE ( io, 170 )
744       ENDIF
745    ELSE
746       WRITE ( io, 161 )
747       WRITE ( io, 171 )
748    ENDIF
749    IF ( large_scale_subsidence )  THEN
750       WRITE ( io, 168 )
751       WRITE ( io, 169 )
752    ENDIF
753
754!
755!-- Profile for the large scale vertial velocity
756!-- Building output strings, starting with surface value
757    IF ( large_scale_subsidence )  THEN
758       temperatures = '   0.0'
759       gradients = '------'
760       slices = '     0'
761       coordinates = '   0.0'
762       i = 1
763       DO  WHILE ( subs_vertical_gradient_level_i(i) /= -9999 )
764
765          WRITE (coor_chr,'(E10.2,7X)')  &
766                                w_subs(subs_vertical_gradient_level_i(i))
767          temperatures = TRIM( temperatures ) // ' ' // TRIM( coor_chr )
768
769          WRITE (coor_chr,'(E10.2,7X)')  subs_vertical_gradient(i)
770          gradients = TRIM( gradients ) // ' ' // TRIM( coor_chr )
771
772          WRITE (coor_chr,'(I10,7X)')  subs_vertical_gradient_level_i(i)
773          slices = TRIM( slices ) // ' ' // TRIM( coor_chr )
774
775          WRITE (coor_chr,'(F10.2,7X)')  subs_vertical_gradient_level(i)
776          coordinates = TRIM( coordinates ) // ' '  // TRIM( coor_chr )
777
778          IF ( i == 10 )  THEN
779             EXIT
780          ELSE
781             i = i + 1
782          ENDIF
783
784       ENDDO
785
786 
787       IF ( .NOT. large_scale_forcing )  THEN
788          WRITE ( io, 426 )  TRIM( coordinates ), TRIM( temperatures ), &
789                             TRIM( gradients ), TRIM( slices )
790       ENDIF
791
792
793    ENDIF
794
795!-- Profile of the geostrophic wind (component ug)
796!-- Building output strings
797    WRITE ( ugcomponent, '(F6.2)' )  ug_surface
798    gradients = '------'
799    slices = '     0'
800    coordinates = '   0.0'
801    i = 1
802    DO  WHILE ( ug_vertical_gradient_level_ind(i) /= -9999 )
803     
804       WRITE (coor_chr,'(F6.2,1X)')  ug(ug_vertical_gradient_level_ind(i))
805       ugcomponent = TRIM( ugcomponent ) // '  ' // TRIM( coor_chr )
806
807       WRITE (coor_chr,'(F6.2,1X)')  ug_vertical_gradient(i)
808       gradients = TRIM( gradients ) // '  ' // TRIM( coor_chr )
809
810       WRITE (coor_chr,'(I6,1X)')  ug_vertical_gradient_level_ind(i)
811       slices = TRIM( slices ) // '  ' // TRIM( coor_chr )
812
813       WRITE (coor_chr,'(F6.1,1X)')  ug_vertical_gradient_level(i)
814       coordinates = TRIM( coordinates ) // '  ' // TRIM( coor_chr )
815
816       IF ( i == 10 )  THEN
817          EXIT
818       ELSE
819          i = i + 1
820       ENDIF
821
822    ENDDO
823
824    IF ( .NOT. large_scale_forcing )  THEN
825       WRITE ( io, 423 )  TRIM( coordinates ), TRIM( ugcomponent ), &
826                          TRIM( gradients ), TRIM( slices )
827    ENDIF
828
829!-- Profile of the geostrophic wind (component vg)
830!-- Building output strings
831    WRITE ( vgcomponent, '(F6.2)' )  vg_surface
832    gradients = '------'
833    slices = '     0'
834    coordinates = '   0.0'
835    i = 1
836    DO  WHILE ( vg_vertical_gradient_level_ind(i) /= -9999 )
837
838       WRITE (coor_chr,'(F6.2,1X)')  vg(vg_vertical_gradient_level_ind(i))
839       vgcomponent = TRIM( vgcomponent ) // '  ' // TRIM( coor_chr )
840
841       WRITE (coor_chr,'(F6.2,1X)')  vg_vertical_gradient(i)
842       gradients = TRIM( gradients ) // '  ' // TRIM( coor_chr )
843
844       WRITE (coor_chr,'(I6,1X)')  vg_vertical_gradient_level_ind(i)
845       slices = TRIM( slices ) // '  ' // TRIM( coor_chr )
846
847       WRITE (coor_chr,'(F6.1,1X)')  vg_vertical_gradient_level(i)
848       coordinates = TRIM( coordinates ) // '  ' // TRIM( coor_chr )
849
850       IF ( i == 10 )  THEN
851          EXIT
852       ELSE
853          i = i + 1
854       ENDIF
855 
856    ENDDO
857
858    IF ( .NOT. large_scale_forcing )  THEN
859       WRITE ( io, 424 )  TRIM( coordinates ), TRIM( vgcomponent ), &
860                          TRIM( gradients ), TRIM( slices )
861    ENDIF
862
863!
864!-- Topography
865    WRITE ( io, 270 )  topography
866    SELECT CASE ( TRIM( topography ) )
867
868       CASE ( 'flat' )
869          ! no actions necessary
870
871       CASE ( 'single_building' )
872          blx = INT( building_length_x / dx )
873          bly = INT( building_length_y / dy )
874          bh  = MINLOC( ABS( zw - building_height ), 1 ) - 1
875          IF ( ABS( zw(bh  ) - building_height ) == &
876               ABS( zw(bh+1) - building_height )    )  bh = bh + 1
877
878          IF ( building_wall_left == 9999999.9_wp )  THEN
879             building_wall_left = ( nx + 1 - blx ) / 2 * dx
880          ENDIF
881          bxl = INT ( building_wall_left / dx + 0.5_wp )
882          bxr = bxl + blx
883
884          IF ( building_wall_south == 9999999.9_wp )  THEN
885             building_wall_south = ( ny + 1 - bly ) / 2 * dy
886          ENDIF
887          bys = INT ( building_wall_south / dy + 0.5_wp )
888          byn = bys + bly
889
890          WRITE ( io, 271 )  building_length_x, building_length_y, &
891                             building_height, bxl, bxr, bys, byn
892
893       CASE ( 'single_street_canyon' )
894          ch  = MINLOC( ABS( zw - canyon_height ), 1 ) - 1
895          IF ( ABS( zw(ch  ) - canyon_height ) == &
896               ABS( zw(ch+1) - canyon_height )    )  ch = ch + 1
897          IF ( canyon_width_x /= 9999999.9_wp )  THEN
898!
899!--          Street canyon in y direction
900             cwx = NINT( canyon_width_x / dx )
901             IF ( canyon_wall_left == 9999999.9_wp )  THEN
902                canyon_wall_left = ( nx + 1 - cwx ) / 2 * dx
903             ENDIF
904             cxl = NINT( canyon_wall_left / dx )
905             cxr = cxl + cwx
906             WRITE ( io, 272 )  'y', canyon_height, ch, 'u', cxl, cxr
907
908          ELSEIF ( canyon_width_y /= 9999999.9_wp )  THEN
909!
910!--          Street canyon in x direction
911             cwy = NINT( canyon_width_y / dy )
912             IF ( canyon_wall_south == 9999999.9_wp )  THEN
913                canyon_wall_south = ( ny + 1 - cwy ) / 2 * dy
914             ENDIF
915             cys = NINT( canyon_wall_south / dy )
916             cyn = cys + cwy
917             WRITE ( io, 272 )  'x', canyon_height, ch, 'v', cys, cyn
918          ENDIF
919
920    END SELECT
921
922    IF ( TRIM( topography ) /= 'flat' )  THEN
923       IF ( TRIM( topography_grid_convention ) == ' ' )  THEN
924          IF ( TRIM( topography ) == 'single_building' .OR.  &
925               TRIM( topography ) == 'single_street_canyon' )  THEN
926             WRITE ( io, 278 )
927          ELSEIF ( TRIM( topography ) == 'read_from_file' )  THEN
928             WRITE ( io, 279 )
929          ENDIF
930       ELSEIF ( TRIM( topography_grid_convention ) == 'cell_edge' )  THEN
931          WRITE ( io, 278 )
932       ELSEIF ( TRIM( topography_grid_convention ) == 'cell_center' )  THEN
933          WRITE ( io, 279 )
934       ENDIF
935    ENDIF
936
937    IF ( plant_canopy )  CALL pcm_header ( io )
938
939    IF ( land_surface )  CALL lsm_header ( io )
940
941    IF ( radiation )  CALL radiation_header ( io )
942
943!
944!-- Boundary conditions
945    IF ( ibc_p_b == 0 )  THEN
946       r_lower = 'p(0)     = 0      |'
947    ELSEIF ( ibc_p_b == 1 )  THEN
948       r_lower = 'p(0)     = p(1)   |'
949    ENDIF
950    IF ( ibc_p_t == 0 )  THEN
951       r_upper  = 'p(nzt+1) = 0      |'
952    ELSE
953       r_upper  = 'p(nzt+1) = p(nzt) |'
954    ENDIF
955
956    IF ( ibc_uv_b == 0 )  THEN
957       r_lower = TRIM( r_lower ) // ' uv(0)     = -uv(1)                |'
958    ELSE
959       r_lower = TRIM( r_lower ) // ' uv(0)     = uv(1)                 |'
960    ENDIF
961    IF ( TRIM( bc_uv_t ) == 'dirichlet_0' )  THEN
962       r_upper  = TRIM( r_upper  ) // ' uv(nzt+1) = 0                     |'
963    ELSEIF ( ibc_uv_t == 0 )  THEN
964       r_upper  = TRIM( r_upper  ) // ' uv(nzt+1) = ug(nzt+1), vg(nzt+1)  |'
965    ELSE
966       r_upper  = TRIM( r_upper  ) // ' uv(nzt+1) = uv(nzt)               |'
967    ENDIF
968
969    IF ( ibc_pt_b == 0 )  THEN
970       IF ( land_surface )  THEN
971          r_lower = TRIM( r_lower ) // ' pt(0)     = from soil model'
972       ELSE
973          r_lower = TRIM( r_lower ) // ' pt(0)     = pt_surface'
974       ENDIF
975    ELSEIF ( ibc_pt_b == 1 )  THEN
976       r_lower = TRIM( r_lower ) // ' pt(0)     = pt(1)'
977    ELSEIF ( ibc_pt_b == 2 )  THEN
978       r_lower = TRIM( r_lower ) // ' pt(0)     = from coupled model'
979    ENDIF
980    IF ( ibc_pt_t == 0 )  THEN
981       r_upper  = TRIM( r_upper  ) // ' pt(nzt+1) = pt_top'
982    ELSEIF( ibc_pt_t == 1 )  THEN
983       r_upper  = TRIM( r_upper  ) // ' pt(nzt+1) = pt(nzt)'
984    ELSEIF( ibc_pt_t == 2 )  THEN
985       r_upper  = TRIM( r_upper  ) // ' pt(nzt+1) = pt(nzt) + dpt/dz_ini'
986
987    ENDIF
988
989    WRITE ( io, 300 )  r_lower, r_upper
990
991    IF ( .NOT. constant_diffusion )  THEN
992       IF ( ibc_e_b == 1 )  THEN
993          r_lower = 'e(0)     = e(1)'
994       ELSE
995          r_lower = 'e(0)     = e(1) = (u*/0.1)**2'
996       ENDIF
997       r_upper = 'e(nzt+1) = e(nzt) = e(nzt-1)'
998
999       WRITE ( io, 301 )  'e', r_lower, r_upper       
1000
1001    ENDIF
1002
1003    IF ( ocean )  THEN
1004       r_lower = 'sa(0)    = sa(1)'
1005       IF ( ibc_sa_t == 0 )  THEN
1006          r_upper =  'sa(nzt+1) = sa_surface'
1007       ELSE
1008          r_upper =  'sa(nzt+1) = sa(nzt)'
1009       ENDIF
1010       WRITE ( io, 301 ) 'sa', r_lower, r_upper
1011    ENDIF
1012
1013    IF ( humidity )  THEN
1014       IF ( ibc_q_b == 0 )  THEN
1015          IF ( land_surface )  THEN
1016             r_lower = 'q(0)     = from soil model'
1017          ELSE
1018             r_lower = 'q(0)     = q_surface'
1019          ENDIF
1020
1021       ELSE
1022          r_lower = 'q(0)      = q(1)'
1023       ENDIF
1024       IF ( ibc_q_t == 0 )  THEN
1025          r_upper =  'q(nzt+1) = q_top'
1026       ELSE
1027          r_upper =  'q(nzt+1) = q(nzt) + dq/dz'
1028       ENDIF
1029       WRITE ( io, 301 ) 'q', r_lower, r_upper
1030    ENDIF
1031
1032    IF ( passive_scalar )  THEN
1033       IF ( ibc_s_b == 0 )  THEN
1034          r_lower = 's(0)      = s_surface'
1035       ELSE
1036          r_lower = 's(0)      = s(1)'
1037       ENDIF
1038       IF ( ibc_s_t == 0 )  THEN
1039          r_upper =  's(nzt+1) = s_top'
1040       ELSEIF ( ibc_s_t == 1 )  THEN
1041          r_upper =  's(nzt+1) = s(nzt)'
1042       ELSEIF ( ibc_s_t == 2 )  THEN
1043          r_upper =  's(nzt+1) = s(nzt) + ds/dz'
1044       ENDIF
1045       WRITE ( io, 301 ) 's', r_lower, r_upper
1046    ENDIF
1047
1048    IF ( use_surface_fluxes )  THEN
1049       WRITE ( io, 303 )
1050       IF ( constant_heatflux )  THEN
1051          IF ( large_scale_forcing .AND. lsf_surf )  THEN
1052             WRITE ( io, 306 )  shf(0,0)
1053          ELSE
1054             WRITE ( io, 306 )  surface_heatflux
1055          ENDIF
1056          IF ( random_heatflux )  WRITE ( io, 307 )
1057       ENDIF
1058       IF ( humidity  .AND.  constant_waterflux )  THEN
1059          IF ( large_scale_forcing .AND. lsf_surf )  THEN
1060             WRITE ( io, 311 ) qsws(0,0)
1061          ELSE
1062             WRITE ( io, 311 ) surface_waterflux
1063          ENDIF
1064       ENDIF
1065       IF ( passive_scalar  .AND.  constant_scalarflux )  THEN
1066          WRITE ( io, 313 ) surface_scalarflux
1067       ENDIF
1068    ENDIF
1069
1070    IF ( use_top_fluxes )  THEN
1071       WRITE ( io, 304 )
1072       IF ( coupling_mode == 'uncoupled' )  THEN
1073          WRITE ( io, 320 )  top_momentumflux_u, top_momentumflux_v
1074          IF ( constant_top_heatflux )  THEN
1075             WRITE ( io, 306 )  top_heatflux
1076          ENDIF
1077       ELSEIF ( coupling_mode == 'ocean_to_atmosphere' )  THEN
1078          WRITE ( io, 316 )
1079       ENDIF
1080       IF ( ocean  .AND.  constant_top_salinityflux )                          &
1081          WRITE ( io, 309 )  top_salinityflux
1082       IF ( humidity       )  WRITE ( io, 315 )
1083       IF ( passive_scalar .AND.  constant_top_scalarflux )                    &
1084          WRITE ( io, 302 ) top_scalarflux
1085    ENDIF
1086
1087    IF ( constant_flux_layer )  THEN
1088       WRITE ( io, 305 )  (zu(1)-zu(0)), roughness_length,                     &
1089                          z0h_factor*roughness_length, kappa,                  &
1090                          zeta_min, zeta_max
1091       IF ( .NOT. constant_heatflux )  WRITE ( io, 308 )
1092       IF ( humidity  .AND.  .NOT. constant_waterflux )  THEN
1093          WRITE ( io, 312 )
1094       ENDIF
1095       IF ( passive_scalar  .AND.  .NOT. constant_scalarflux )  THEN
1096          WRITE ( io, 314 )
1097       ENDIF
1098    ELSE
1099       IF ( INDEX(initializing_actions, 'set_1d-model_profiles') /= 0 )  THEN
1100          WRITE ( io, 310 )  zeta_min, zeta_max
1101       ENDIF
1102    ENDIF
1103
1104    WRITE ( io, 317 )  bc_lr, bc_ns
1105    IF ( .NOT. bc_lr_cyc  .OR.  .NOT. bc_ns_cyc )  THEN
1106       WRITE ( io, 318 )  use_cmax, pt_damping_width, pt_damping_factor       
1107       IF ( turbulent_inflow )  THEN
1108          IF ( .NOT. recycling_yshift ) THEN
1109             WRITE ( io, 319 )  recycling_width, recycling_plane, &
1110                                inflow_damping_height, inflow_damping_width
1111          ELSE
1112             WRITE ( io, 322 )  recycling_width, recycling_plane, &
1113                                inflow_damping_height, inflow_damping_width
1114          END IF
1115       ENDIF
1116    ENDIF
1117
1118!
1119!-- Initial Profiles
1120    WRITE ( io, 321 )
1121!
1122!-- Initial wind profiles
1123    IF ( u_profile(1) /= 9999999.9_wp )  WRITE ( io, 427 )
1124
1125!
1126!-- Initial temperature profile
1127!-- Building output strings, starting with surface temperature
1128    WRITE ( temperatures, '(F6.2)' )  pt_surface
1129    gradients = '------'
1130    slices = '     0'
1131    coordinates = '   0.0'
1132    i = 1
1133    DO  WHILE ( pt_vertical_gradient_level_ind(i) /= -9999 )
1134
1135       WRITE (coor_chr,'(F7.2)')  pt_init(pt_vertical_gradient_level_ind(i))
1136       temperatures = TRIM( temperatures ) // ' ' // TRIM( coor_chr )
1137
1138       WRITE (coor_chr,'(F7.2)')  pt_vertical_gradient(i)
1139       gradients = TRIM( gradients ) // ' ' // TRIM( coor_chr )
1140
1141       WRITE (coor_chr,'(I7)')  pt_vertical_gradient_level_ind(i)
1142       slices = TRIM( slices ) // ' ' // TRIM( coor_chr )
1143
1144       WRITE (coor_chr,'(F7.1)')  pt_vertical_gradient_level(i)
1145       coordinates = TRIM( coordinates ) // ' '  // TRIM( coor_chr )
1146
1147       IF ( i == 10 )  THEN
1148          EXIT
1149       ELSE
1150          i = i + 1
1151       ENDIF
1152
1153    ENDDO
1154
1155    IF ( .NOT. nudging )  THEN
1156       WRITE ( io, 420 )  TRIM( coordinates ), TRIM( temperatures ), &
1157                          TRIM( gradients ), TRIM( slices )
1158    ELSE
1159       WRITE ( io, 428 ) 
1160    ENDIF
1161
1162!
1163!-- Initial humidity profile
1164!-- Building output strings, starting with surface humidity
1165    IF ( humidity )  THEN
1166       WRITE ( temperatures, '(E8.1)' )  q_surface
1167       gradients = '--------'
1168       slices = '       0'
1169       coordinates = '     0.0'
1170       i = 1
1171       DO  WHILE ( q_vertical_gradient_level_ind(i) /= -9999 )
1172         
1173          WRITE (coor_chr,'(E8.1,4X)')  q_init(q_vertical_gradient_level_ind(i))
1174          temperatures = TRIM( temperatures ) // '  ' // TRIM( coor_chr )
1175
1176          WRITE (coor_chr,'(E8.1,4X)')  q_vertical_gradient(i)
1177          gradients = TRIM( gradients ) // '  ' // TRIM( coor_chr )
1178         
1179          WRITE (coor_chr,'(I8,4X)')  q_vertical_gradient_level_ind(i)
1180          slices = TRIM( slices ) // '  ' // TRIM( coor_chr )
1181         
1182          WRITE (coor_chr,'(F8.1,4X)')  q_vertical_gradient_level(i)
1183          coordinates = TRIM( coordinates ) // '  '  // TRIM( coor_chr )
1184
1185          IF ( i == 10 )  THEN
1186             EXIT
1187          ELSE
1188             i = i + 1
1189          ENDIF
1190
1191       ENDDO
1192
1193       IF ( .NOT. nudging )  THEN
1194          WRITE ( io, 421 )  TRIM( coordinates ), TRIM( temperatures ),        &
1195                             TRIM( gradients ), TRIM( slices )
1196       ENDIF
1197    ENDIF
1198!
1199!-- Initial scalar profile
1200!-- Building output strings, starting with surface humidity
1201    IF ( passive_scalar )  THEN
1202       WRITE ( temperatures, '(E8.1)' )  s_surface
1203       gradients = '--------'
1204       slices = '       0'
1205       coordinates = '     0.0'
1206       i = 1
1207       DO  WHILE ( s_vertical_gradient_level_ind(i) /= -9999 )
1208         
1209          WRITE (coor_chr,'(E8.1,4X)')  s_init(q_vertical_gradient_level_ind(i))
1210          temperatures = TRIM( temperatures ) // '  ' // TRIM( coor_chr )
1211
1212          WRITE (coor_chr,'(E8.1,4X)')  s_vertical_gradient(i)
1213          gradients = TRIM( gradients ) // '  ' // TRIM( coor_chr )
1214         
1215          WRITE (coor_chr,'(I8,4X)')  s_vertical_gradient_level_ind(i)
1216          slices = TRIM( slices ) // '  ' // TRIM( coor_chr )
1217         
1218          WRITE (coor_chr,'(F8.1,4X)')  s_vertical_gradient_level(i)
1219          coordinates = TRIM( coordinates ) // '  '  // TRIM( coor_chr )
1220
1221          IF ( i == 10 )  THEN
1222             EXIT
1223          ELSE
1224             i = i + 1
1225          ENDIF
1226
1227       ENDDO
1228
1229       WRITE ( io, 422 )  TRIM( coordinates ), TRIM( temperatures ),           &
1230                          TRIM( gradients ), TRIM( slices )
1231    ENDIF   
1232
1233!
1234!-- Initial salinity profile
1235!-- Building output strings, starting with surface salinity
1236    IF ( ocean )  THEN
1237       WRITE ( temperatures, '(F6.2)' )  sa_surface
1238       gradients = '------'
1239       slices = '     0'
1240       coordinates = '   0.0'
1241       i = 1
1242       DO  WHILE ( sa_vertical_gradient_level_ind(i) /= -9999 )
1243
1244          WRITE (coor_chr,'(F7.2)')  sa_init(sa_vertical_gradient_level_ind(i))
1245          temperatures = TRIM( temperatures ) // ' ' // TRIM( coor_chr )
1246
1247          WRITE (coor_chr,'(F7.2)')  sa_vertical_gradient(i)
1248          gradients = TRIM( gradients ) // ' ' // TRIM( coor_chr )
1249
1250          WRITE (coor_chr,'(I7)')  sa_vertical_gradient_level_ind(i)
1251          slices = TRIM( slices ) // ' ' // TRIM( coor_chr )
1252
1253          WRITE (coor_chr,'(F7.1)')  sa_vertical_gradient_level(i)
1254          coordinates = TRIM( coordinates ) // ' '  // TRIM( coor_chr )
1255
1256          IF ( i == 10 )  THEN
1257             EXIT
1258          ELSE
1259             i = i + 1
1260          ENDIF
1261
1262       ENDDO
1263
1264       WRITE ( io, 425 )  TRIM( coordinates ), TRIM( temperatures ), &
1265                          TRIM( gradients ), TRIM( slices )
1266    ENDIF
1267
1268
1269!
1270!-- Listing of 1D-profiles
1271    WRITE ( io, 325 )  dt_dopr_listing
1272    IF ( averaging_interval_pr /= 0.0_wp )  THEN
1273       WRITE ( io, 326 )  averaging_interval_pr, dt_averaging_input_pr
1274    ENDIF
1275
1276!
1277!-- DATA output
1278    WRITE ( io, 330 )
1279    IF ( averaging_interval_pr /= 0.0_wp )  THEN
1280       WRITE ( io, 326 )  averaging_interval_pr, dt_averaging_input_pr
1281    ENDIF
1282
1283!
1284!-- 1D-profiles
1285    dopr_chr = 'Profile:'
1286    IF ( dopr_n /= 0 )  THEN
1287       WRITE ( io, 331 )
1288
1289       output_format = ''
1290       output_format = netcdf_data_format_string
1291       IF ( netcdf_deflate == 0 )  THEN
1292          WRITE ( io, 344 )  output_format
1293       ELSE
1294          WRITE ( io, 354 )  TRIM( output_format ), netcdf_deflate
1295       ENDIF
1296
1297       DO  i = 1, dopr_n
1298          dopr_chr = TRIM( dopr_chr ) // ' ' // TRIM( data_output_pr(i) ) // ','
1299          IF ( LEN_TRIM( dopr_chr ) >= 60 )  THEN
1300             WRITE ( io, 332 )  dopr_chr
1301             dopr_chr = '       :'
1302          ENDIF
1303       ENDDO
1304
1305       IF ( dopr_chr /= '' )  THEN
1306          WRITE ( io, 332 )  dopr_chr
1307       ENDIF
1308       WRITE ( io, 333 )  dt_dopr, averaging_interval_pr, dt_averaging_input_pr
1309       IF ( skip_time_dopr /= 0.0_wp )  WRITE ( io, 339 )  skip_time_dopr
1310    ENDIF
1311
1312!
1313!-- 2D-arrays
1314    DO  av = 0, 1
1315
1316       i = 1
1317       do2d_xy = ''
1318       do2d_xz = ''
1319       do2d_yz = ''
1320       DO  WHILE ( do2d(av,i) /= ' ' )
1321
1322          l = MAX( 2, LEN_TRIM( do2d(av,i) ) )
1323          do2d_mode = do2d(av,i)(l-1:l)
1324
1325          SELECT CASE ( do2d_mode )
1326             CASE ( 'xy' )
1327                ll = LEN_TRIM( do2d_xy )
1328                do2d_xy = do2d_xy(1:ll) // ' ' // do2d(av,i)(1:l-3) // ','
1329             CASE ( 'xz' )
1330                ll = LEN_TRIM( do2d_xz )
1331                do2d_xz = do2d_xz(1:ll) // ' ' // do2d(av,i)(1:l-3) // ','
1332             CASE ( 'yz' )
1333                ll = LEN_TRIM( do2d_yz )
1334                do2d_yz = do2d_yz(1:ll) // ' ' // do2d(av,i)(1:l-3) // ','
1335          END SELECT
1336
1337          i = i + 1
1338
1339       ENDDO
1340
1341       IF ( ( ( do2d_xy /= ''  .AND.  section(1,1) /= -9999 )  .OR.    &
1342              ( do2d_xz /= ''  .AND.  section(1,2) /= -9999 )  .OR.    &
1343              ( do2d_yz /= ''  .AND.  section(1,3) /= -9999 ) ) )  THEN
1344
1345          IF (  av == 0 )  THEN
1346             WRITE ( io, 334 )  ''
1347          ELSE
1348             WRITE ( io, 334 )  '(time-averaged)'
1349          ENDIF
1350
1351          IF ( do2d_at_begin )  THEN
1352             begin_chr = 'and at the start'
1353          ELSE
1354             begin_chr = ''
1355          ENDIF
1356
1357          output_format = ''
1358          output_format = netcdf_data_format_string
1359          IF ( netcdf_deflate == 0 )  THEN
1360             WRITE ( io, 344 )  output_format
1361          ELSE
1362             WRITE ( io, 354 )  TRIM( output_format ), netcdf_deflate
1363          ENDIF
1364
1365          IF ( do2d_xy /= ''  .AND.  section(1,1) /= -9999 )  THEN
1366             i = 1
1367             slices = '/'
1368             coordinates = '/'
1369!
1370!--          Building strings with index and coordinate information of the
1371!--          slices
1372             DO  WHILE ( section(i,1) /= -9999 )
1373
1374                WRITE (section_chr,'(I5)')  section(i,1)
1375                section_chr = ADJUSTL( section_chr )
1376                slices = TRIM( slices ) // TRIM( section_chr ) // '/'
1377
1378                IF ( section(i,1) == -1 )  THEN
1379                   WRITE (coor_chr,'(F10.1)')  -1.0_wp
1380                ELSE
1381                   WRITE (coor_chr,'(F10.1)')  zu(section(i,1))
1382                ENDIF
1383                coor_chr = ADJUSTL( coor_chr )
1384                coordinates = TRIM( coordinates ) // TRIM( coor_chr ) // '/'
1385
1386                i = i + 1
1387             ENDDO
1388             IF ( av == 0 )  THEN
1389                WRITE ( io, 335 )  'XY', do2d_xy, dt_do2d_xy, &
1390                                   TRIM( begin_chr ), 'k', TRIM( slices ), &
1391                                   TRIM( coordinates )
1392                IF ( skip_time_do2d_xy /= 0.0_wp )  THEN
1393                   WRITE ( io, 339 )  skip_time_do2d_xy
1394                ENDIF
1395             ELSE
1396                WRITE ( io, 342 )  'XY', do2d_xy, dt_data_output_av, &
1397                                   TRIM( begin_chr ), averaging_interval, &
1398                                   dt_averaging_input, 'k', TRIM( slices ), &
1399                                   TRIM( coordinates )
1400                IF ( skip_time_data_output_av /= 0.0_wp )  THEN
1401                   WRITE ( io, 339 )  skip_time_data_output_av
1402                ENDIF
1403             ENDIF
1404             IF ( netcdf_data_format > 4 )  THEN
1405                WRITE ( io, 352 )  ntdim_2d_xy(av)
1406             ELSE
1407                WRITE ( io, 353 )
1408             ENDIF
1409          ENDIF
1410
1411          IF ( do2d_xz /= ''  .AND.  section(1,2) /= -9999 )  THEN
1412             i = 1
1413             slices = '/'
1414             coordinates = '/'
1415!
1416!--          Building strings with index and coordinate information of the
1417!--          slices
1418             DO  WHILE ( section(i,2) /= -9999 )
1419
1420                WRITE (section_chr,'(I5)')  section(i,2)
1421                section_chr = ADJUSTL( section_chr )
1422                slices = TRIM( slices ) // TRIM( section_chr ) // '/'
1423
1424                WRITE (coor_chr,'(F10.1)')  section(i,2) * dy
1425                coor_chr = ADJUSTL( coor_chr )
1426                coordinates = TRIM( coordinates ) // TRIM( coor_chr ) // '/'
1427
1428                i = i + 1
1429             ENDDO
1430             IF ( av == 0 )  THEN
1431                WRITE ( io, 335 )  'XZ', do2d_xz, dt_do2d_xz, &
1432                                   TRIM( begin_chr ), 'j', TRIM( slices ), &
1433                                   TRIM( coordinates )
1434                IF ( skip_time_do2d_xz /= 0.0_wp )  THEN
1435                   WRITE ( io, 339 )  skip_time_do2d_xz
1436                ENDIF
1437             ELSE
1438                WRITE ( io, 342 )  'XZ', do2d_xz, dt_data_output_av, &
1439                                   TRIM( begin_chr ), averaging_interval, &
1440                                   dt_averaging_input, 'j', TRIM( slices ), &
1441                                   TRIM( coordinates )
1442                IF ( skip_time_data_output_av /= 0.0_wp )  THEN
1443                   WRITE ( io, 339 )  skip_time_data_output_av
1444                ENDIF
1445             ENDIF
1446             IF ( netcdf_data_format > 4 )  THEN
1447                WRITE ( io, 352 )  ntdim_2d_xz(av)
1448             ELSE
1449                WRITE ( io, 353 )
1450             ENDIF
1451          ENDIF
1452
1453          IF ( do2d_yz /= ''  .AND.  section(1,3) /= -9999 )  THEN
1454             i = 1
1455             slices = '/'
1456             coordinates = '/'
1457!
1458!--          Building strings with index and coordinate information of the
1459!--          slices
1460             DO  WHILE ( section(i,3) /= -9999 )
1461
1462                WRITE (section_chr,'(I5)')  section(i,3)
1463                section_chr = ADJUSTL( section_chr )
1464                slices = TRIM( slices ) // TRIM( section_chr ) // '/'
1465
1466                WRITE (coor_chr,'(F10.1)')  section(i,3) * dx
1467                coor_chr = ADJUSTL( coor_chr )
1468                coordinates = TRIM( coordinates ) // TRIM( coor_chr ) // '/'
1469
1470                i = i + 1
1471             ENDDO
1472             IF ( av == 0 )  THEN
1473                WRITE ( io, 335 )  'YZ', do2d_yz, dt_do2d_yz, &
1474                                   TRIM( begin_chr ), 'i', TRIM( slices ), &
1475                                   TRIM( coordinates )
1476                IF ( skip_time_do2d_yz /= 0.0_wp )  THEN
1477                   WRITE ( io, 339 )  skip_time_do2d_yz
1478                ENDIF
1479             ELSE
1480                WRITE ( io, 342 )  'YZ', do2d_yz, dt_data_output_av, &
1481                                   TRIM( begin_chr ), averaging_interval, &
1482                                   dt_averaging_input, 'i', TRIM( slices ), &
1483                                   TRIM( coordinates )
1484                IF ( skip_time_data_output_av /= 0.0_wp )  THEN
1485                   WRITE ( io, 339 )  skip_time_data_output_av
1486                ENDIF
1487             ENDIF
1488             IF ( netcdf_data_format > 4 )  THEN
1489                WRITE ( io, 352 )  ntdim_2d_yz(av)
1490             ELSE
1491                WRITE ( io, 353 )
1492             ENDIF
1493          ENDIF
1494
1495       ENDIF
1496
1497    ENDDO
1498
1499!
1500!-- 3d-arrays
1501    DO  av = 0, 1
1502
1503       i = 1
1504       do3d_chr = ''
1505       DO  WHILE ( do3d(av,i) /= ' ' )
1506
1507          do3d_chr = TRIM( do3d_chr ) // ' ' // TRIM( do3d(av,i) ) // ','
1508          i = i + 1
1509
1510       ENDDO
1511
1512       IF ( do3d_chr /= '' )  THEN
1513          IF ( av == 0 )  THEN
1514             WRITE ( io, 336 )  ''
1515          ELSE
1516             WRITE ( io, 336 )  '(time-averaged)'
1517          ENDIF
1518
1519          output_format = netcdf_data_format_string
1520          IF ( netcdf_deflate == 0 )  THEN
1521             WRITE ( io, 344 )  output_format
1522          ELSE
1523             WRITE ( io, 354 )  TRIM( output_format ), netcdf_deflate
1524          ENDIF
1525
1526          IF ( do3d_at_begin )  THEN
1527             begin_chr = 'and at the start'
1528          ELSE
1529             begin_chr = ''
1530          ENDIF
1531          IF ( av == 0 )  THEN
1532             WRITE ( io, 337 )  do3d_chr, dt_do3d, TRIM( begin_chr ), &
1533                                zu(nz_do3d), nz_do3d
1534          ELSE
1535             WRITE ( io, 343 )  do3d_chr, dt_data_output_av,           &
1536                                TRIM( begin_chr ), averaging_interval, &
1537                                dt_averaging_input, zu(nz_do3d), nz_do3d
1538          ENDIF
1539
1540          IF ( netcdf_data_format > 4 )  THEN
1541             WRITE ( io, 352 )  ntdim_3d(av)
1542          ELSE
1543             WRITE ( io, 353 )
1544          ENDIF
1545
1546          IF ( av == 0 )  THEN
1547             IF ( skip_time_do3d /= 0.0_wp )  THEN
1548                WRITE ( io, 339 )  skip_time_do3d
1549             ENDIF
1550          ELSE
1551             IF ( skip_time_data_output_av /= 0.0_wp )  THEN
1552                WRITE ( io, 339 )  skip_time_data_output_av
1553             ENDIF
1554          ENDIF
1555
1556       ENDIF
1557
1558    ENDDO
1559
1560!
1561!-- masked arrays
1562    IF ( masks > 0 )  WRITE ( io, 345 )  &
1563         mask_scale_x, mask_scale_y, mask_scale_z
1564    DO  mid = 1, masks
1565       DO  av = 0, 1
1566
1567          i = 1
1568          domask_chr = ''
1569          DO  WHILE ( domask(mid,av,i) /= ' ' )
1570             domask_chr = TRIM( domask_chr ) // ' ' //  &
1571                          TRIM( domask(mid,av,i) ) // ','
1572             i = i + 1
1573          ENDDO
1574
1575          IF ( domask_chr /= '' )  THEN
1576             IF ( av == 0 )  THEN
1577                WRITE ( io, 346 )  '', mid
1578             ELSE
1579                WRITE ( io, 346 )  ' (time-averaged)', mid
1580             ENDIF
1581
1582             output_format = netcdf_data_format_string
1583!--          Parallel output not implemented for mask data, hence
1584!--          output_format must be adjusted.
1585             IF ( netcdf_data_format == 5 ) output_format = 'netCDF4/HDF5'
1586             IF ( netcdf_data_format == 6 ) output_format = 'netCDF4/HDF5 classic'
1587             IF ( netcdf_deflate == 0 )  THEN
1588                WRITE ( io, 344 )  output_format
1589             ELSE
1590                WRITE ( io, 354 )  TRIM( output_format ), netcdf_deflate
1591             ENDIF
1592
1593             IF ( av == 0 )  THEN
1594                WRITE ( io, 347 )  domask_chr, dt_domask(mid)
1595             ELSE
1596                WRITE ( io, 348 )  domask_chr, dt_data_output_av, &
1597                                   averaging_interval, dt_averaging_input
1598             ENDIF
1599
1600             IF ( av == 0 )  THEN
1601                IF ( skip_time_domask(mid) /= 0.0_wp )  THEN
1602                   WRITE ( io, 339 )  skip_time_domask(mid)
1603                ENDIF
1604             ELSE
1605                IF ( skip_time_data_output_av /= 0.0_wp )  THEN
1606                   WRITE ( io, 339 )  skip_time_data_output_av
1607                ENDIF
1608             ENDIF
1609!
1610!--          output locations
1611             DO  dim = 1, 3
1612                IF ( mask(mid,dim,1) >= 0.0_wp )  THEN
1613                   count = 0
1614                   DO  WHILE ( mask(mid,dim,count+1) >= 0.0_wp )
1615                      count = count + 1
1616                   ENDDO
1617                   WRITE ( io, 349 )  dir(dim), dir(dim), mid, dir(dim), &
1618                                      mask(mid,dim,:count)
1619                ELSEIF ( mask_loop(mid,dim,1) < 0.0_wp .AND.  &
1620                         mask_loop(mid,dim,2) < 0.0_wp .AND.  &
1621                         mask_loop(mid,dim,3) == 0.0_wp )  THEN
1622                   WRITE ( io, 350 )  dir(dim), dir(dim)
1623                ELSEIF ( mask_loop(mid,dim,3) == 0.0_wp )  THEN
1624                   WRITE ( io, 351 )  dir(dim), dir(dim), mid, dir(dim), &
1625                                      mask_loop(mid,dim,1:2)
1626                ELSE
1627                   WRITE ( io, 351 )  dir(dim), dir(dim), mid, dir(dim), &
1628                                      mask_loop(mid,dim,1:3)
1629                ENDIF
1630             ENDDO
1631          ENDIF
1632
1633       ENDDO
1634    ENDDO
1635
1636!
1637!-- Timeseries
1638    IF ( dt_dots /= 9999999.9_wp )  THEN
1639       WRITE ( io, 340 )
1640
1641       output_format = netcdf_data_format_string
1642       IF ( netcdf_deflate == 0 )  THEN
1643          WRITE ( io, 344 )  output_format
1644       ELSE
1645          WRITE ( io, 354 )  TRIM( output_format ), netcdf_deflate
1646       ENDIF
1647       WRITE ( io, 341 )  dt_dots
1648    ENDIF
1649
1650#if defined( __dvrp_graphics )
1651!
1652!-- Dvrp-output
1653    IF ( dt_dvrp /= 9999999.9_wp )  THEN
1654       WRITE ( io, 360 )  dt_dvrp, TRIM( dvrp_output ), TRIM( dvrp_host ), &
1655                          TRIM( dvrp_username ), TRIM( dvrp_directory )
1656       i = 1
1657       l = 0
1658       m = 0
1659       DO WHILE ( mode_dvrp(i) /= ' ' )
1660          IF ( mode_dvrp(i)(1:10) == 'isosurface' )  THEN
1661             READ ( mode_dvrp(i), '(10X,I2)' )  j
1662             l = l + 1
1663             IF ( do3d(0,j) /= ' ' )  THEN
1664                WRITE ( io, 361 )  TRIM( do3d(0,j) ), threshold(l), &
1665                                   isosurface_color(:,l)
1666             ENDIF
1667          ELSEIF ( mode_dvrp(i)(1:6) == 'slicer' )  THEN
1668             READ ( mode_dvrp(i), '(6X,I2)' )  j
1669             m = m + 1
1670             IF ( do2d(0,j) /= ' ' )  THEN
1671                WRITE ( io, 362 )  TRIM( do2d(0,j) ), &
1672                                   slicer_range_limits_dvrp(:,m)
1673             ENDIF
1674          ENDIF
1675          i = i + 1
1676       ENDDO
1677
1678       WRITE ( io, 365 )  groundplate_color, superelevation_x, &
1679                          superelevation_y, superelevation, clip_dvrp_l, &
1680                          clip_dvrp_r, clip_dvrp_s, clip_dvrp_n
1681
1682       IF ( TRIM( topography ) /= 'flat' )  THEN
1683          WRITE ( io, 366 )  topography_color
1684          IF ( cluster_size > 1 )  THEN
1685             WRITE ( io, 367 )  cluster_size
1686          ENDIF
1687       ENDIF
1688
1689    ENDIF
1690#endif
1691!
1692!-- Output of virtual flight information
1693    IF ( virtual_flight )  CALL flight_header( io )
1694
1695!
1696!-- Output of spectra related quantities
1697    IF ( calculate_spectra )  CALL spectra_header( io )
1698
1699    WRITE ( io, 99 )
1700
1701!
1702!-- Physical quantities
1703    WRITE ( io, 400 )
1704
1705!
1706!-- Geostrophic parameters
1707    WRITE ( io, 410 )  phi, omega, f, fs
1708
1709!
1710!-- Other quantities
1711    WRITE ( io, 411 )  g
1712
1713    WRITE ( io, 412 )  TRIM( reference_state )
1714    IF ( use_single_reference_value )  THEN
1715       IF ( ocean )  THEN
1716          WRITE ( io, 413 )  prho_reference
1717       ELSE
1718          WRITE ( io, 414 )  pt_reference
1719       ENDIF
1720    ENDIF
1721
1722!
1723!-- Cloud physics parameters
1724    IF ( cloud_physics )  THEN
1725       WRITE ( io, 415 )
1726       WRITE ( io, 416 ) surface_pressure, r_d, rho_surface, cp, l_v
1727       IF ( microphysics_seifert )  THEN
1728          WRITE ( io, 510 ) 1.0E-6_wp * nc_const
1729          WRITE ( io, 511 ) c_sedimentation
1730       ENDIF
1731    ENDIF
1732
1733!
1734!-- Cloud physcis parameters / quantities / numerical methods
1735    WRITE ( io, 430 )
1736    IF ( humidity .AND. .NOT. cloud_physics .AND. .NOT. cloud_droplets)  THEN
1737       WRITE ( io, 431 )
1738    ELSEIF ( humidity  .AND.  cloud_physics )  THEN
1739       WRITE ( io, 432 )
1740       IF ( cloud_top_radiation )  WRITE ( io, 132 )
1741       IF ( microphysics_kessler )  THEN
1742          WRITE ( io, 133 )
1743       ELSEIF ( microphysics_seifert )  THEN
1744          IF ( cloud_water_sedimentation )  WRITE ( io, 506 )
1745          WRITE ( io, 505 )
1746          IF ( collision_turbulence )  WRITE ( io, 507 )
1747          IF ( ventilation_effect )  WRITE ( io, 508 )
1748          IF ( limiter_sedimentation )  WRITE ( io, 509 )
1749       ENDIF
1750    ELSEIF ( humidity  .AND.  cloud_droplets )  THEN
1751       WRITE ( io, 433 )
1752       IF ( curvature_solution_effects )  WRITE ( io, 434 )
1753       IF ( collision_kernel /= 'none' )  THEN
1754          WRITE ( io, 435 )  TRIM( collision_kernel )
1755          IF ( collision_kernel(6:9) == 'fast' )  THEN
1756             WRITE ( io, 436 )  radius_classes, dissipation_classes
1757          ENDIF
1758       ELSE
1759          WRITE ( io, 437 )
1760       ENDIF
1761    ENDIF
1762
1763!
1764!-- LES / turbulence parameters
1765    WRITE ( io, 450 )
1766
1767!--
1768! ... LES-constants used must still be added here
1769!--
1770    IF ( constant_diffusion )  THEN
1771       WRITE ( io, 451 )  km_constant, km_constant/prandtl_number, &
1772                          prandtl_number
1773    ENDIF
1774    IF ( .NOT. constant_diffusion)  THEN
1775       IF ( e_init > 0.0_wp )  WRITE ( io, 455 )  e_init
1776       IF ( e_min > 0.0_wp )  WRITE ( io, 454 )  e_min
1777       IF ( wall_adjustment )  WRITE ( io, 453 )  wall_adjustment_factor
1778    ENDIF
1779
1780!
1781!-- Special actions during the run
1782    WRITE ( io, 470 )
1783    IF ( create_disturbances )  THEN
1784       WRITE ( io, 471 )  dt_disturb, disturbance_amplitude,                   &
1785                          zu(disturbance_level_ind_b), disturbance_level_ind_b,&
1786                          zu(disturbance_level_ind_t), disturbance_level_ind_t
1787       IF ( .NOT. bc_lr_cyc  .OR.  .NOT. bc_ns_cyc )  THEN
1788          WRITE ( io, 472 )  inflow_disturbance_begin, inflow_disturbance_end
1789       ELSE
1790          WRITE ( io, 473 )  disturbance_energy_limit
1791       ENDIF
1792       WRITE ( io, 474 )  TRIM( random_generator )
1793    ENDIF
1794    IF ( pt_surface_initial_change /= 0.0_wp )  THEN
1795       WRITE ( io, 475 )  pt_surface_initial_change
1796    ENDIF
1797    IF ( humidity  .AND.  q_surface_initial_change /= 0.0_wp )  THEN
1798       WRITE ( io, 476 )  q_surface_initial_change       
1799    ENDIF
1800    IF ( passive_scalar  .AND.  q_surface_initial_change /= 0.0_wp )  THEN
1801       WRITE ( io, 477 )  q_surface_initial_change       
1802    ENDIF
1803
1804    IF ( particle_advection )  THEN
1805!
1806!--    Particle attributes
1807       WRITE ( io, 480 )  particle_advection_start, dt_prel, bc_par_lr, &
1808                          bc_par_ns, bc_par_b, bc_par_t, particle_maximum_age, &
1809                          end_time_prel
1810       IF ( use_sgs_for_particles )  WRITE ( io, 488 )  dt_min_part
1811       IF ( random_start_position )  WRITE ( io, 481 )
1812       IF ( seed_follows_topography )  WRITE ( io, 496 )
1813       IF ( particles_per_point > 1 )  WRITE ( io, 489 )  particles_per_point
1814       WRITE ( io, 495 )  total_number_of_particles
1815       IF ( dt_write_particle_data /= 9999999.9_wp )  THEN
1816          WRITE ( io, 485 )  dt_write_particle_data
1817          IF ( netcdf_data_format > 1 )  THEN
1818             output_format = 'netcdf (64 bit offset) and binary'
1819          ELSE
1820             output_format = 'netcdf and binary'
1821          ENDIF
1822          IF ( netcdf_deflate == 0 )  THEN
1823             WRITE ( io, 344 )  output_format
1824          ELSE
1825             WRITE ( io, 354 )  TRIM( output_format ), netcdf_deflate
1826          ENDIF
1827       ENDIF
1828       IF ( dt_dopts /= 9999999.9_wp )  WRITE ( io, 494 )  dt_dopts
1829       IF ( write_particle_statistics )  WRITE ( io, 486 )
1830
1831       WRITE ( io, 487 )  number_of_particle_groups
1832
1833       DO  i = 1, number_of_particle_groups
1834          IF ( i == 1  .AND.  density_ratio(i) == 9999999.9_wp )  THEN
1835             WRITE ( io, 490 )  i, 0.0_wp
1836             WRITE ( io, 492 )
1837          ELSE
1838             WRITE ( io, 490 )  i, radius(i)
1839             IF ( density_ratio(i) /= 0.0_wp )  THEN
1840                WRITE ( io, 491 )  density_ratio(i)
1841             ELSE
1842                WRITE ( io, 492 )
1843             ENDIF
1844          ENDIF
1845          WRITE ( io, 493 )  psl(i), psr(i), pss(i), psn(i), psb(i), pst(i), &
1846                             pdx(i), pdy(i), pdz(i)
1847          IF ( .NOT. vertical_particle_advection(i) )  WRITE ( io, 482 )
1848       ENDDO
1849
1850    ENDIF
1851
1852
1853!
1854!-- Parameters of 1D-model
1855    IF ( INDEX( initializing_actions, 'set_1d-model_profiles' ) /= 0 )  THEN
1856       WRITE ( io, 500 )  end_time_1d, dt_run_control_1d, dt_pr_1d, &
1857                          mixing_length_1d, dissipation_1d
1858       IF ( damp_level_ind_1d /= nzt+1 )  THEN
1859          WRITE ( io, 502 )  zu(damp_level_ind_1d), damp_level_ind_1d
1860       ENDIF
1861    ENDIF
1862
1863!
1864!-- User-defined information
1865    CALL user_header( io )
1866
1867    WRITE ( io, 99 )
1868
1869!
1870!-- Write buffer contents to disc immediately
1871    FLUSH( io )
1872
1873!
1874!-- Here the FORMATs start
1875
1876 99 FORMAT (1X,78('-'))
1877100 FORMAT (/1X,'******************************',4X,44('-')/        &
1878            1X,'* ',A,' *',4X,A/                               &
1879            1X,'******************************',4X,44('-'))
1880101 FORMAT (35X,'coupled run using MPI-',I1,': ',A/ &
1881            35X,42('-'))
1882102 FORMAT (/' Date:                 ',A8,4X,'Run:       ',A20/      &
1883            ' Time:                 ',A8,4X,'Run-No.:   ',I2.2/     &
1884            ' Run on host:        ',A10)
1885#if defined( __parallel )
1886103 FORMAT (' Number of PEs:',10X,I6,4X,'Processor grid (x,y): (',I4,',',I4, &
1887              ')',1X,A)
1888104 FORMAT (' Number of PEs:',10X,I6,4X,'Tasks:',I4,'   threads per task:',I4/ &
1889              35X,'Processor grid (x,y): (',I4,',',I4,')',1X,A)
1890105 FORMAT (35X,'One additional PE is used to handle'/37X,'the dvrp output!')
1891106 FORMAT (35X,'A 1d-decomposition along x is forced'/ &
1892            35X,'because the job is running on an SMP-cluster')
1893107 FORMAT (35X,'A 1d-decomposition along ',A,' is used')
1894108 FORMAT (35X,'Max. # of parallel I/O streams is ',I5)
1895109 FORMAT (35X,'Precursor run for coupled atmos-ocean run'/ &
1896            35X,42('-'))
1897114 FORMAT (35X,'Coupled atmosphere-ocean run following'/ &
1898            35X,'independent precursor runs'/             &
1899            35X,42('-'))
1900117 FORMAT (' Accelerator boards / node:  ',I2)
1901#endif
1902110 FORMAT (/' Numerical Schemes:'/ &
1903             ' -----------------'/)
1904111 FORMAT (' --> Solve perturbation pressure via FFT using ',A,' routines')
1905112 FORMAT (' --> Solve perturbation pressure via SOR-Red/Black-Schema'/ &
1906            '     Iterations (initial/other): ',I3,'/',I3,'  omega =',F6.3)
1907113 FORMAT (' --> Momentum advection via Piascek-Williams-Scheme (Form C3)', &
1908                  ' or Upstream')
1909115 FORMAT ('     FFT and transpositions are overlapping')
1910116 FORMAT (' --> Scalar advection via Piascek-Williams-Scheme (Form C3)', &
1911                  ' or Upstream')
1912118 FORMAT (' --> Scalar advection via Bott-Chlond-Scheme')
1913119 FORMAT (' --> Galilei-Transform applied to horizontal advection:'/ &
1914            '     translation velocity = ',A/ &
1915            '     distance advected ',A,':  ',F8.3,' km(x)  ',F8.3,' km(y)')
1916120 FORMAT (' Accelerator boards: ',8X,I2)
1917122 FORMAT (' --> Time differencing scheme: ',A)
1918123 FORMAT (' --> Rayleigh-Damping active, starts ',A,' z = ',F8.2,' m'/ &
1919            '     maximum damping coefficient:',F6.3, ' 1/s')
1920129 FORMAT (' --> Additional prognostic equation for the specific humidity')
1921130 FORMAT (' --> Additional prognostic equation for the total water content')
1922131 FORMAT (' --> No pt-equation solved. Neutral stratification with pt = ', &
1923                  F6.2, ' K assumed')
1924132 FORMAT ('     Parameterization of long-wave radiation processes via'/ &
1925            '     effective emissivity scheme')
1926133 FORMAT ('     Precipitation parameterization via Kessler-Scheme')
1927134 FORMAT (' --> Additional prognostic equation for a passive scalar')
1928135 FORMAT (' --> Solve perturbation pressure via ',A,' method (', &
1929                  A,'-cycle)'/ &
1930            '     number of grid levels:                   ',I2/ &
1931            '     Gauss-Seidel red/black iterations:       ',I2)
1932136 FORMAT ('     gridpoints of coarsest subdomain (x,y,z): (',I3,',',I3,',', &
1933                  I3,')')
1934137 FORMAT ('     level data gathered on PE0 at level:     ',I2/ &
1935            '     gridpoints of coarsest subdomain (x,y,z): (',I3,',',I3,',', &
1936                  I3,')'/ &
1937            '     gridpoints of coarsest domain (x,y,z):    (',I3,',',I3,',', &
1938                  I3,')')
1939139 FORMAT (' --> Loop optimization method: ',A)
1940140 FORMAT ('     maximum residual allowed:                ',E10.3)
1941141 FORMAT ('     fixed number of multigrid cycles:        ',I4)
1942142 FORMAT ('     perturbation pressure is calculated at every Runge-Kutta ', &
1943                  'step')
1944143 FORMAT ('     Euler/upstream scheme is used for the SGS turbulent ', &
1945                  'kinetic energy')
1946144 FORMAT ('     masking method is used')
1947150 FORMAT (' --> Volume flow at the right and north boundary will be ', &
1948                  'conserved'/ &
1949            '     using the ',A,' mode')
1950151 FORMAT ('     with u_bulk = ',F7.3,' m/s and v_bulk = ',F7.3,' m/s')
1951152 FORMAT (' --> External pressure gradient directly prescribed by the user:',&
1952           /'     ',2(1X,E12.5),'Pa/m in x/y direction', &
1953           /'     starting from dp_level_b =', F8.3, 'm', A /)
1954160 FORMAT (//' Large scale forcing and nudging:'/ &
1955              ' -------------------------------'/)
1956161 FORMAT (' --> No large scale forcing from external is used (default) ')
1957162 FORMAT (' --> Large scale forcing from external file LSF_DATA is used: ')
1958163 FORMAT ('     - large scale advection tendencies ')
1959164 FORMAT ('     - large scale subsidence velocity w_subs ')
1960165 FORMAT ('     - large scale subsidence tendencies ')
1961167 FORMAT ('     - and geostrophic wind components ug and vg')
1962168 FORMAT (' --> Large-scale vertical motion is used in the ', &
1963                  'prognostic equation(s) for')
1964169 FORMAT ('     the scalar(s) only')
1965170 FORMAT (' --> Nudging is used')
1966171 FORMAT (' --> No nudging is used (default) ')
1967180 FORMAT ('     - prescribed surface values for temperature')
1968181 FORMAT ('     - prescribed surface fluxes for temperature')
1969182 FORMAT ('     - prescribed surface values for humidity')
1970183 FORMAT ('     - prescribed surface fluxes for humidity')
1971200 FORMAT (//' Run time and time step information:'/ &
1972             ' ----------------------------------'/)
1973201 FORMAT ( ' Timestep:             variable     maximum value: ',F6.3,' s', &
1974             '    CFL-factor:',F5.2)
1975202 FORMAT ( ' Timestep:          dt = ',F6.3,' s'/)
1976203 FORMAT ( ' Start time:          ',F9.3,' s'/ &
1977             ' End time:            ',F9.3,' s')
1978204 FORMAT ( A,F9.3,' s')
1979205 FORMAT ( A,F9.3,' s',5X,'restart every',17X,F9.3,' s')
1980206 FORMAT (/' Time reached:        ',F9.3,' s'/ &
1981             ' CPU-time used:       ',F9.3,' s     per timestep:               ', &
1982               '  ',F9.3,' s'/                                                    &
1983             '                                      per second of simulated tim', &
1984               'e: ',F9.3,' s')
1985207 FORMAT ( ' Coupling start time: ',F9.3,' s')
1986250 FORMAT (//' Computational grid and domain size:'/ &
1987              ' ----------------------------------'// &
1988              ' Grid length:      dx =    ',F7.3,' m    dy =    ',F7.3, &
1989              ' m    dz =    ',F7.3,' m'/ &
1990              ' Domain size:       x = ',F10.3,' m     y = ',F10.3, &
1991              ' m  z(u) = ',F10.3,' m'/)
1992252 FORMAT (' dz constant up to ',F10.3,' m (k=',I4,'), then stretched by', &
1993              ' factor:',F6.3/ &
1994            ' maximum dz not to be exceeded is dz_max = ',F10.3,' m'/)
1995254 FORMAT (' Number of gridpoints (x,y,z):  (0:',I4,', 0:',I4,', 0:',I4,')'/ &
1996            ' Subdomain size (x,y,z):        (  ',I4,',   ',I4,',   ',I4,')'/)
1997260 FORMAT (/' The model has a slope in x-direction. Inclination angle: ',F6.2,&
1998             ' degrees')
1999270 FORMAT (//' Topography information:'/ &
2000              ' ----------------------'// &
2001              1X,'Topography: ',A)
2002271 FORMAT (  ' Building size (x/y/z) in m: ',F5.1,' / ',F5.1,' / ',F5.1/ &
2003              ' Horizontal index bounds (l/r/s/n): ',I4,' / ',I4,' / ',I4, &
2004                ' / ',I4)
2005272 FORMAT (  ' Single quasi-2D street canyon of infinite length in ',A, &
2006              ' direction' / &
2007              ' Canyon height: ', F6.2, 'm, ch = ', I4, '.'      / &
2008              ' Canyon position (',A,'-walls): cxl = ', I4,', cxr = ', I4, '.')
2009278 FORMAT (' Topography grid definition convention:'/ &
2010            ' cell edge (staggered grid points'/  &
2011            ' (u in x-direction, v in y-direction))' /)
2012279 FORMAT (' Topography grid definition convention:'/ &
2013            ' cell center (scalar grid points)' /)
2014300 FORMAT (//' Boundary conditions:'/ &
2015             ' -------------------'// &
2016             '                     p                    uv             ', &
2017             '                     pt'// &
2018             ' B. bound.: ',A/ &
2019             ' T. bound.: ',A)
2020301 FORMAT (/'                     ',A// &
2021             ' B. bound.: ',A/ &
2022             ' T. bound.: ',A)
2023303 FORMAT (/' Bottom surface fluxes are used in diffusion terms at k=1')
2024304 FORMAT (/' Top surface fluxes are used in diffusion terms at k=nzt')
2025305 FORMAT (//'    Prandtl-Layer between bottom surface and first ', &
2026               'computational u,v-level:'// &
2027             '       zp = ',F6.2,' m   z0 =',F7.4,' m   z0h =',F8.5,&
2028             ' m   kappa =',F5.2/ &
2029             '       Rif value range:   ',F8.2,' <= rif <=',F6.2)
2030306 FORMAT ('       Predefined constant heatflux:   ',F9.6,' K m/s')
2031307 FORMAT ('       Heatflux has a random normal distribution')
2032308 FORMAT ('       Predefined surface temperature')
2033309 FORMAT ('       Predefined constant salinityflux:   ',F9.6,' psu m/s')
2034310 FORMAT (//'    1D-Model:'// &
2035             '       Rif value range:   ',F6.2,' <= rif <=',F6.2)
2036311 FORMAT ('       Predefined constant humidity flux: ',E10.3,' kg/kg m/s')
2037312 FORMAT ('       Predefined surface humidity')
2038313 FORMAT ('       Predefined constant scalar flux: ',E10.3,' kg/(m**2 s)')
2039314 FORMAT ('       Predefined scalar value at the surface')
2040302 FORMAT ('       Predefined constant scalarflux:   ',F9.6,' kg/(m**2 s)')
2041315 FORMAT ('       Humidity flux at top surface is 0.0')
2042316 FORMAT ('       Sensible heatflux and momentum flux from coupled ', &
2043                    'atmosphere model')
2044317 FORMAT (//' Lateral boundaries:'/ &
2045            '       left/right:  ',A/    &
2046            '       north/south: ',A)
2047318 FORMAT (/'       use_cmax: ',L1 / &
2048            '       pt damping layer width = ',F8.2,' m, pt ', &
2049                    'damping factor =',F7.4)
2050319 FORMAT ('       turbulence recycling at inflow switched on'/ &
2051            '       width of recycling domain: ',F7.1,' m   grid index: ',I4/ &
2052            '       inflow damping height: ',F6.1,' m   width: ',F6.1,' m')
2053320 FORMAT ('       Predefined constant momentumflux:  u: ',F9.6,' m**2/s**2'/ &
2054            '                                          v: ',F9.6,' m**2/s**2')
2055321 FORMAT (//' Initial profiles:'/ &
2056              ' ----------------')
2057322 FORMAT ('       turbulence recycling at inflow switched on'/ &
2058            '       y shift of the recycled inflow turbulence switched on'/ &
2059            '       width of recycling domain: ',F7.1,' m   grid index: ',I4/ &
2060            '       inflow damping height: ',F6.1,' m   width: ',F6.1,' m'/)
2061325 FORMAT (//' List output:'/ &
2062             ' -----------'//  &
2063            '    1D-Profiles:'/    &
2064            '       Output every             ',F8.2,' s')
2065326 FORMAT ('       Time averaged over       ',F8.2,' s'/ &
2066            '       Averaging input every    ',F8.2,' s')
2067330 FORMAT (//' Data output:'/ &
2068             ' -----------'/)
2069331 FORMAT (/'    1D-Profiles:')
2070332 FORMAT (/'       ',A)
2071333 FORMAT ('       Output every             ',F8.2,' s',/ &
2072            '       Time averaged over       ',F8.2,' s'/ &
2073            '       Averaging input every    ',F8.2,' s')
2074334 FORMAT (/'    2D-Arrays',A,':')
2075335 FORMAT (/'       ',A2,'-cross-section  Arrays: ',A/ &
2076            '       Output every             ',F8.2,' s  ',A/ &
2077            '       Cross sections at ',A1,' = ',A/ &
2078            '       scalar-coordinates:   ',A,' m'/)
2079336 FORMAT (/'    3D-Arrays',A,':')
2080337 FORMAT (/'       Arrays: ',A/ &
2081            '       Output every             ',F8.2,' s  ',A/ &
2082            '       Upper output limit at    ',F8.2,' m  (GP ',I4,')'/)
2083339 FORMAT ('       No output during initial ',F8.2,' s')
2084340 FORMAT (/'    Time series:')
2085341 FORMAT ('       Output every             ',F8.2,' s'/)
2086342 FORMAT (/'       ',A2,'-cross-section  Arrays: ',A/ &
2087            '       Output every             ',F8.2,' s  ',A/ &
2088            '       Time averaged over       ',F8.2,' s'/ &
2089            '       Averaging input every    ',F8.2,' s'/ &
2090            '       Cross sections at ',A1,' = ',A/ &
2091            '       scalar-coordinates:   ',A,' m'/)
2092343 FORMAT (/'       Arrays: ',A/ &
2093            '       Output every             ',F8.2,' s  ',A/ &
2094            '       Time averaged over       ',F8.2,' s'/ &
2095            '       Averaging input every    ',F8.2,' s'/ &
2096            '       Upper output limit at    ',F8.2,' m  (GP ',I4,')'/)
2097344 FORMAT ('       Output format: ',A/)
2098345 FORMAT (/'    Scaling lengths for output locations of all subsequent mask IDs:',/ &
2099            '       mask_scale_x (in x-direction): ',F9.3, ' m',/ &
2100            '       mask_scale_y (in y-direction): ',F9.3, ' m',/ &
2101            '       mask_scale_z (in z-direction): ',F9.3, ' m' )
2102346 FORMAT (/'    Masked data output',A,' for mask ID ',I2, ':')
2103347 FORMAT ('       Variables: ',A/ &
2104            '       Output every             ',F8.2,' s')
2105348 FORMAT ('       Variables: ',A/ &
2106            '       Output every             ',F8.2,' s'/ &
2107            '       Time averaged over       ',F8.2,' s'/ &
2108            '       Averaging input every    ',F8.2,' s')
2109349 FORMAT (/'       Output locations in ',A,'-direction in multiples of ', &
2110            'mask_scale_',A,' predefined by array mask_',I2.2,'_',A,':'/ &
2111            13('       ',8(F8.2,',')/) )
2112350 FORMAT (/'       Output locations in ',A,'-direction: ', &
2113            'all gridpoints along ',A,'-direction (default).' )
2114351 FORMAT (/'       Output locations in ',A,'-direction in multiples of ', &
2115            'mask_scale_',A,' constructed from array mask_',I2.2,'_',A,'_loop:'/ &
2116            '          loop begin:',F8.2,', end:',F8.2,', stride:',F8.2 )
2117352 FORMAT  (/'       Number of output time levels allowed: ',I3 /)
2118353 FORMAT  (/'       Number of output time levels allowed: unlimited' /)
2119354 FORMAT ('       Output format: ',A, '   compressed with level: ',I1/)
2120#if defined( __dvrp_graphics )
2121360 FORMAT ('    Plot-Sequence with dvrp-software:'/ &
2122            '       Output every      ',F7.1,' s'/ &
2123            '       Output mode:      ',A/ &
2124            '       Host / User:      ',A,' / ',A/ &
2125            '       Directory:        ',A// &
2126            '       The sequence contains:')
2127361 FORMAT (/'       Isosurface of "',A,'"    Threshold value: ', E12.3/ &
2128            '          Isosurface color: (',F4.2,',',F4.2,',',F4.2,') (R,G,B)')
2129362 FORMAT (/'       Slicer plane ',A/ &
2130            '       Slicer limits: [',F6.2,',',F6.2,']')
2131365 FORMAT (/'       Groundplate color: (',F4.2,',',F4.2,',',F4.2,') (R,G,B)'/ &
2132            '       Superelevation along (x,y,z): (',F4.1,',',F4.1,',',F4.1, &
2133                     ')'/ &
2134            '       Clipping limits: from x = ',F9.1,' m to x = ',F9.1,' m'/ &
2135            '                        from y = ',F9.1,' m to y = ',F9.1,' m')
2136366 FORMAT (/'       Topography color: (',F4.2,',',F4.2,',',F4.2,') (R,G,B)')
2137367 FORMAT ('       Polygon reduction for topography: cluster_size = ', I1)
2138#endif
2139400 FORMAT (//' Physical quantities:'/ &
2140              ' -------------------'/)
2141410 FORMAT ('    Geograph. latitude  :   phi    = ',F4.1,' degr'/   &
2142            '    Angular velocity    :   omega  =',E10.3,' rad/s'/  &
2143            '    Coriolis parameter  :   f      = ',F9.6,' 1/s'/    &
2144            '                            f*     = ',F9.6,' 1/s')
2145411 FORMAT (/'    Gravity             :   g      = ',F4.1,' m/s**2')
2146412 FORMAT (/'    Reference state used in buoyancy terms: ',A)
2147413 FORMAT ('       Reference density in buoyancy terms: ',F8.3,' kg/m**3')
2148414 FORMAT ('       Reference temperature in buoyancy terms: ',F8.4,' K')
2149415 FORMAT (/' Cloud physics parameters:'/ &
2150             ' ------------------------'/)
2151416 FORMAT ('    Surface pressure   :   p_0   = ',F7.2,' hPa'/      &
2152            '    Gas constant       :   R     = ',F5.1,' J/(kg K)'/ &
2153            '    Density of air     :   rho_0 =',F6.3,' kg/m**3'/  &
2154            '    Specific heat cap. :   c_p   = ',F6.1,' J/(kg K)'/ &
2155            '    Vapourization heat :   L_v   =',E9.2,' J/kg')
2156417 FORMAT ('    Geograph. longitude :   lambda = ',F4.1,' degr')
2157418 FORMAT (/'    Day of the year at model start :   day_init      =     ',I3 &
2158            /'    UTC time at model start        :   time_utc_init = ',F7.1' s')
2159420 FORMAT (/'    Characteristic levels of the initial temperature profile:'// &
2160            '       Height:        ',A,'  m'/ &
2161            '       Temperature:   ',A,'  K'/ &
2162            '       Gradient:      ',A,'  K/100m'/ &
2163            '       Gridpoint:     ',A)
2164421 FORMAT (/'    Characteristic levels of the initial humidity profile:'// &
2165            '       Height:      ',A,'  m'/ &
2166            '       Humidity:    ',A,'  kg/kg'/ &
2167            '       Gradient:    ',A,'  (kg/kg)/100m'/ &
2168            '       Gridpoint:   ',A)
2169422 FORMAT (/'    Characteristic levels of the initial scalar profile:'// &
2170            '       Height:                  ',A,'  m'/ &
2171            '       Scalar concentration:    ',A,'  kg/m**3'/ &
2172            '       Gradient:                ',A,'  (kg/m**3)/100m'/ &
2173            '       Gridpoint:               ',A)
2174423 FORMAT (/'    Characteristic levels of the geo. wind component ug:'// &
2175            '       Height:      ',A,'  m'/ &
2176            '       ug:          ',A,'  m/s'/ &
2177            '       Gradient:    ',A,'  1/100s'/ &
2178            '       Gridpoint:   ',A)
2179424 FORMAT (/'    Characteristic levels of the geo. wind component vg:'// &
2180            '       Height:      ',A,'  m'/ &
2181            '       vg:          ',A,'  m/s'/ &
2182            '       Gradient:    ',A,'  1/100s'/ &
2183            '       Gridpoint:   ',A)
2184425 FORMAT (/'    Characteristic levels of the initial salinity profile:'// &
2185            '       Height:     ',A,'  m'/ &
2186            '       Salinity:   ',A,'  psu'/ &
2187            '       Gradient:   ',A,'  psu/100m'/ &
2188            '       Gridpoint:  ',A)
2189426 FORMAT (/'    Characteristic levels of the subsidence/ascent profile:'// &
2190            '       Height:      ',A,'  m'/ &
2191            '       w_subs:      ',A,'  m/s'/ &
2192            '       Gradient:    ',A,'  (m/s)/100m'/ &
2193            '       Gridpoint:   ',A)
2194427 FORMAT (/'    Initial wind profiles (u,v) are interpolated from given'// &
2195                  ' profiles')
2196428 FORMAT (/'    Initial profiles (u, v, pt, q) are taken from file '/ &
2197             '    NUDGING_DATA')
2198430 FORMAT (//' Cloud physics quantities / methods:'/ &
2199              ' ----------------------------------'/)
2200431 FORMAT ('    Humidity is considered, bu no condensation')
2201432 FORMAT ('    Bulk scheme with liquid water potential temperature and'/ &
2202            '    total water content is used.'/ &
2203            '    Condensation is parameterized via 0% - or 100% scheme.')
2204433 FORMAT ('    Cloud droplets treated explicitly using the Lagrangian part', &
2205                 'icle model')
2206434 FORMAT ('    Curvature and solution effecs are considered for growth of', &
2207                 ' droplets < 1.0E-6 m')
2208435 FORMAT ('    Droplet collision is handled by ',A,'-kernel')
2209436 FORMAT ('       Fast kernel with fixed radius- and dissipation classes ', &
2210                    'are used'/ &
2211            '          number of radius classes:       ',I3,'    interval ', &
2212                       '[1.0E-6,2.0E-4] m'/ &
2213            '          number of dissipation classes:   ',I2,'    interval ', &
2214                       '[0,1000] cm**2/s**3')
2215437 FORMAT ('    Droplet collision is switched off')
2216450 FORMAT (//' LES / Turbulence quantities:'/ &
2217              ' ---------------------------'/)
2218451 FORMAT ('    Diffusion coefficients are constant:'/ &
2219            '    Km = ',F6.2,' m**2/s   Kh = ',F6.2,' m**2/s   Pr = ',F5.2)
2220453 FORMAT ('    Mixing length is limited to',F5.2,' * z')
2221454 FORMAT ('    TKE is not allowed to fall below ',E9.2,' (m/s)**2')
2222455 FORMAT ('    initial TKE is prescribed as ',E9.2,' (m/s)**2')
2223470 FORMAT (//' Actions during the simulation:'/ &
2224              ' -----------------------------'/)
2225471 FORMAT ('    Disturbance impulse (u,v) every :   ',F6.2,' s'/            &
2226            '    Disturbance amplitude           :    ',F5.2, ' m/s'/       &
2227            '    Lower disturbance level         : ',F8.2,' m (GP ',I4,')'/  &
2228            '    Upper disturbance level         : ',F8.2,' m (GP ',I4,')')
2229472 FORMAT ('    Disturbances continued during the run from i/j =',I4, &
2230                 ' to i/j =',I4)
2231473 FORMAT ('    Disturbances cease as soon as the disturbance energy exceeds',&
2232                 F6.3, ' m**2/s**2')
2233474 FORMAT ('    Random number generator used    : ',A/)
2234475 FORMAT ('    The surface temperature is increased (or decreased, ', &
2235                 'respectively, if'/ &
2236            '    the value is negative) by ',F5.2,' K at the beginning of the',&
2237                 ' 3D-simulation'/)
2238476 FORMAT ('    The surface humidity is increased (or decreased, ',&
2239                 'respectively, if the'/ &
2240            '    value is negative) by ',E8.1,' kg/kg at the beginning of', &
2241                 ' the 3D-simulation'/)
2242477 FORMAT ('    The scalar value is increased at the surface (or decreased, ',&
2243                 'respectively, if the'/ &
2244            '    value is negative) by ',E8.1,' kg/m**3 at the beginning of', &
2245                 ' the 3D-simulation'/)
2246480 FORMAT ('    Particles:'/ &
2247            '    ---------'// &
2248            '       Particle advection is active (switched on at t = ', F7.1, &
2249                    ' s)'/ &
2250            '       Start of new particle generations every  ',F6.1,' s'/ &
2251            '       Boundary conditions: left/right: ', A, ' north/south: ', A/&
2252            '                            bottom:     ', A, ' top:         ', A/&
2253            '       Maximum particle age:                 ',F9.1,' s'/ &
2254            '       Advection stopped at t = ',F9.1,' s'/)
2255481 FORMAT ('       Particles have random start positions'/)
2256482 FORMAT ('          Particles are advected only horizontally'/)
2257485 FORMAT ('       Particle data are written on file every ', F9.1, ' s')
2258486 FORMAT ('       Particle statistics are written on file'/)
2259487 FORMAT ('       Number of particle groups: ',I2/)
2260488 FORMAT ('       SGS velocity components are used for particle advection'/ &
2261            '          minimum timestep for advection:', F8.5/)
2262489 FORMAT ('       Number of particles simultaneously released at each ', &
2263                    'point: ', I5/)
2264490 FORMAT ('       Particle group ',I2,':'/ &
2265            '          Particle radius: ',E10.3, 'm')
2266491 FORMAT ('          Particle inertia is activated'/ &
2267            '             density_ratio (rho_fluid/rho_particle) =',F6.3/)
2268492 FORMAT ('          Particles are advected only passively (no inertia)'/)
2269493 FORMAT ('          Boundaries of particle source: x:',F8.1,' - ',F8.1,' m'/&
2270            '                                         y:',F8.1,' - ',F8.1,' m'/&
2271            '                                         z:',F8.1,' - ',F8.1,' m'/&
2272            '          Particle distances:  dx = ',F8.1,' m  dy = ',F8.1, &
2273                       ' m  dz = ',F8.1,' m'/)
2274494 FORMAT ('       Output of particle time series in NetCDF format every ', &
2275                    F8.2,' s'/)
2276495 FORMAT ('       Number of particles in total domain: ',I10/)
2277496 FORMAT ('       Initial vertical particle positions are interpreted ', &
2278                    'as relative to the given topography')
2279500 FORMAT (//' 1D-Model parameters:'/                           &
2280              ' -------------------'//                           &
2281            '    Simulation time:                   ',F8.1,' s'/ &
2282            '    Run-controll output every:         ',F8.1,' s'/ &
2283            '    Vertical profile output every:     ',F8.1,' s'/ &
2284            '    Mixing length calculation:         ',A/         &
2285            '    Dissipation calculation:           ',A/)
2286502 FORMAT ('    Damping layer starts from ',F7.1,' m (GP ',I4,')'/)
2287503 FORMAT (' --> Momentum advection via Wicker-Skamarock-Scheme 5th order')
2288504 FORMAT (' --> Scalar advection via Wicker-Skamarock-Scheme 5th order')
2289505 FORMAT ('    Precipitation parameterization via Seifert-Beheng-Scheme')
2290506 FORMAT ('    Cloud water sedimentation parameterization via Stokes law')
2291507 FORMAT ('    Turbulence effects on precipitation process')
2292508 FORMAT ('    Ventilation effects on evaporation of rain drops')
2293509 FORMAT ('    Slope limiter used for sedimentation process')
2294510 FORMAT ('    Droplet density    :   N_c   = ',F6.1,' 1/cm**3')
2295511 FORMAT ('    Sedimentation Courant number:                  '/&
2296            '                               C_s   =',F4.1,'        ')
2297512 FORMAT (/' Date:                 ',A8,6X,'Run:       ',A20/      &
2298            ' Time:                 ',A8,6X,'Run-No.:   ',I2.2/     &
2299            ' Run on host:        ',A10,6X,'En-No.:    ',I2.2)
2300513 FORMAT (' --> Scalar advection via Wicker-Skamarock-Scheme 5th order ' // & 
2301            '+ monotonic adjustment')
2302600 FORMAT (/' Nesting informations:'/ &
2303            ' --------------------'/ &
2304            ' Nesting mode:                     ',A/ &
2305            ' Nesting-datatransfer mode:        ',A// &
2306            ' Nest id  parent  number   lower left coordinates   name'/ &
2307            ' (*=me)     id    of PEs      x (m)     y (m)' )
2308601 FORMAT (2X,A1,1X,I2.2,6X,I2.2,5X,I5,5X,F8.2,2X,F8.2,5X,A)
2309
2310 END SUBROUTINE header
Note: See TracBrowser for help on using the repository browser.