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

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

last commit documented

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