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

Last change on this file since 1561 was 1561, checked in by keck, 9 years ago

last commit documented

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