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

Last change on this file since 1797 was 1797, checked in by raasch, 8 years ago

Introduction of different data transfer modes; restart mechanism adjusted for nested runs; parameter consistency checks for nested runs; further formatting cleanup

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