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

Last change on this file since 1823 was 1823, checked in by hoffmann, 8 years ago

last commit documented

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