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

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

Separate balance equations for humidity and passive_scalar

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