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

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

last commit documented

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