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

Last change on this file since 2000 was 2000, checked in by knoop, 8 years ago

Forced header and separation lines into 80 columns

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