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

Last change on this file since 2201 was 2201, checked in by suehring, 7 years ago

last commit documented

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