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

Last change on this file since 1551 was 1551, checked in by maronga, 9 years ago

land surface model released

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