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

Last change on this file since 1114 was 1112, checked in by raasch, 11 years ago

last commit documented

  • Property svn:keywords set to Id
File size: 77.1 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-2012  Leibniz University Hannover
18!--------------------------------------------------------------------------------!
19!
20! Current revisions:
21! -----------------
22!
23!
24! Former revisions:
25! -----------------
26! $Id: header.f90 1112 2013-03-09 00:34:37Z raasch $
27!
28! 1111 2013-03-08 23:54:10Z raasch
29! output of accelerator board information
30! ibc_p_b = 2 removed
31!
32! 1108 2013-03-05 07:03:32Z raasch
33! bugfix for r1106
34!
35! 1106 2013-03-04 05:31:38Z raasch
36! some format changes for coupled runs
37!
38! 1092 2013-02-02 11:24:22Z raasch
39! unused variables removed
40!
41! 1036 2012-10-22 13:43:42Z raasch
42! code put under GPL (PALM 3.9)
43!
44! 1031 2012-10-19 14:35:30Z raasch
45! output of netCDF data format modified
46!
47! 1015 2012-09-27 09:23:24Z raasch
48! output of Aajustment of mixing length to the Prandtl mixing length at first
49! grid point above ground removed
50!
51! 1003 2012-09-14 14:35:53Z raasch
52! output of information about equal/unequal subdomain size removed
53!
54! 1001 2012-09-13 14:08:46Z raasch
55! all actions concerning leapfrog- and upstream-spline-scheme removed
56!
57! 978 2012-08-09 08:28:32Z fricke
58! -km_damp_max, outflow_damping_width
59! +pt_damping_factor, pt_damping_width
60! +z0h
61!
62! 964 2012-07-26 09:14:24Z raasch
63! output of profil-related quantities removed
64!
65! 940 2012-07-09 14:31:00Z raasch
66! Output in case of simulations for pure neutral stratification (no pt-equation
67! solved)
68!
69! 927 2012-06-06 19:15:04Z raasch
70! output of masking_method for mg-solver
71!
72! 868 2012-03-28 12:21:07Z raasch
73! translation velocity in Galilean transformation changed to 0.6 * ug
74!
75! 833 2012-02-22 08:55:55Z maronga
76! Adjusted format for leaf area density
77!
78! 828 2012-02-21 12:00:36Z raasch
79! output of dissipation_classes + radius_classes
80!
81! 825 2012-02-19 03:03:44Z raasch
82! Output of cloud physics parameters/quantities complemented and restructured
83!
84! 767 2011-10-14 06:39:12Z raasch
85! Output of given initial u,v-profiles
86!
87! 759 2011-09-15 13:58:31Z raasch
88! output of maximum number of parallel io streams
89!
90! 707 2011-03-29 11:39:40Z raasch
91! bc_lr/ns replaced by bc_lr/ns_cyc
92!
93! 667 2010-12-23 12:06:00Z suehring/gryschka
94! Output of advection scheme.
95! Modified output of Prandtl-layer height.
96!
97! 580 2010-10-05 13:59:11Z heinze
98! Renaming of ws_vertical_gradient to subs_vertical_gradient,
99! ws_vertical_gradient_level to subs_vertical_gradient_level and
100! ws_vertical_gradient_level_ind to subs_vertical_gradient_level_i
101!
102! 493 2010-03-01 08:30:24Z raasch
103! NetCDF data output format extendend for NetCDF4/HDF5
104!
105! 449 2010-02-02 11:23:59Z raasch
106! +large scale vertical motion (subsidence/ascent)
107! Bugfix: index problem concerning gradient_level indices removed
108!
109! 410 2009-12-04 17:05:40Z letzel
110! Masked data output: + dt_domask, mask_01~20_x|y|z, mask_01~20_x|y|z_loop,
111! mask_scale|_x|y|z, masks, skip_time_domask
112!
113! 346 2009-07-06 10:13:41Z raasch
114! initializing_actions='read_data_for_recycling' renamed to 'cyclic_fill'
115! Coupling with independent precursor runs.
116! Output of messages replaced by message handling routine.
117! Output of several additional dvr parameters
118! +canyon_height, canyon_width_x, canyon_width_y, canyon_wall_left,
119! canyon_wall_south, conserve_volume_flow_mode, dp_external, dp_level_b,
120! dp_smooth, dpdxy, u_bulk, v_bulk
121! topography_grid_convention moved from user_header
122! small bugfix concerning 3d 64bit netcdf output format
123!
124! 206 2008-10-13 14:59:11Z raasch
125! Bugfix: error in zu index in case of section_xy = -1
126!
127! 198 2008-09-17 08:55:28Z raasch
128! Format adjustments allowing output of larger revision numbers
129!
130! 197 2008-09-16 15:29:03Z raasch
131! allow 100 spectra levels instead of 10 for consistency with
132! define_netcdf_header,
133! bugfix in the output of the characteristic levels of potential temperature,
134! geostrophic wind, scalar concentration, humidity and leaf area density,
135! output of turbulence recycling informations
136!
137! 138 2007-11-28 10:03:58Z letzel
138! Allow new case bc_uv_t = 'dirichlet_0' for channel flow.
139! Allow two instead of one digit to specify isosurface and slicer variables.
140! Output of sorting frequency of particles
141!
142! 108 2007-08-24 15:10:38Z letzel
143! Output of informations for coupled model runs (boundary conditions etc.)
144! + output of momentumfluxes at the top boundary
145! Rayleigh damping for ocean, e_init
146!
147! 97 2007-06-21 08:23:15Z raasch
148! Adjustments for the ocean version.
149! use_pt_reference renamed use_reference
150!
151! 87 2007-05-22 15:46:47Z raasch
152! Bugfix: output of use_upstream_for_tke
153!
154! 82 2007-04-16 15:40:52Z raasch
155! Preprocessor strings for different linux clusters changed to "lc",
156! routine local_flush is used for buffer flushing
157!
158! 76 2007-03-29 00:58:32Z raasch
159! Output of netcdf_64bit_3d, particles-package is now part of the default code,
160! output of the loop optimization method, moisture renamed humidity,
161! output of subversion revision number
162!
163! 19 2007-02-23 04:53:48Z raasch
164! Output of scalar flux applied at top boundary
165!
166! RCS Log replace by Id keyword, revision history cleaned up
167!
168! Revision 1.63  2006/08/22 13:53:13  raasch
169! Output of dz_max
170!
171! Revision 1.1  1997/08/11 06:17:20  raasch
172! Initial revision
173!
174!
175! Description:
176! ------------
177! Writing a header with all important informations about the actual run.
178! This subroutine is called three times, two times at the beginning
179! (writing information on files RUN_CONTROL and HEADER) and one time at the
180! end of the run, then writing additional information about CPU-usage on file
181! header.
182!-----------------------------------------------------------------------------!
183
184    USE arrays_3d
185    USE control_parameters
186    USE cloud_parameters
187    USE cpulog
188    USE dvrp_variables
189    USE grid_variables
190    USE indices
191    USE model_1d
192    USE particle_attributes
193    USE pegrid
194    USE subsidence_mod
195    USE spectrum
196
197    IMPLICIT NONE
198
199    CHARACTER (LEN=1)  ::  prec
200    CHARACTER (LEN=2)  ::  do2d_mode
201    CHARACTER (LEN=5)  ::  section_chr
202    CHARACTER (LEN=10) ::  coor_chr, host_chr
203    CHARACTER (LEN=16) ::  begin_chr
204    CHARACTER (LEN=26) ::  ver_rev
205    CHARACTER (LEN=40) ::  output_format
206    CHARACTER (LEN=70) ::  char1, char2, dopr_chr, &
207                           do2d_xy, do2d_xz, do2d_yz, do3d_chr, &
208                           domask_chr, run_classification
209    CHARACTER (LEN=86) ::  coordinates, gradients, learde, slices,  &
210                           temperatures, ugcomponent, vgcomponent
211    CHARACTER (LEN=85) ::  roben, runten
212
213    CHARACTER (LEN=1), DIMENSION(1:3) ::  dir = (/ 'x', 'y', 'z' /)
214
215    INTEGER ::  av, bh, blx, bly, bxl, bxr, byn, bys, ch, count, cwx, cwy,  &
216                cxl, cxr, cyn, cys, dim, i, io, j, l, ll, mpi_type
217    REAL    ::  cpuseconds_per_simulated_second
218
219!
220!-- Open the output file. At the end of the simulation, output is directed
221!-- to unit 19.
222    IF ( ( runnr == 0 .OR. force_print_header )  .AND. &
223         .NOT. simulated_time_at_begin /= simulated_time )  THEN
224       io = 15   !  header output on file RUN_CONTROL
225    ELSE
226       io = 19   !  header output on file HEADER
227    ENDIF
228    CALL check_open( io )
229
230!
231!-- At the end of the run, output file (HEADER) will be rewritten with
232!-- new informations
233    IF ( io == 19 .AND. simulated_time_at_begin /= simulated_time ) REWIND( 19 )
234
235!
236!-- Determine kind of model run
237    IF ( TRIM( initializing_actions ) == 'read_restart_data' )  THEN
238       run_classification = '3D - restart run'
239    ELSEIF ( TRIM( initializing_actions ) == 'cyclic_fill' )  THEN
240       run_classification = '3D - run with cyclic fill of 3D - prerun data'
241    ELSEIF ( INDEX( initializing_actions, 'set_constant_profiles' ) /= 0 )  THEN
242       run_classification = '3D - run without 1D - prerun'
243    ELSEIF ( INDEX( initializing_actions, 'set_1d-model_profiles' ) /= 0 )  THEN
244       run_classification = '3D - run with 1D - prerun'
245    ELSEIF ( INDEX( initializing_actions, 'by_user' ) /=0 )  THEN
246       run_classification = '3D - run initialized by user'
247    ELSE
248       message_string = ' unknown action(s): ' // TRIM( initializing_actions )
249       CALL message( 'header', 'PA0191', 0, 0, 0, 6, 0 )
250    ENDIF
251    IF ( ocean )  THEN
252       run_classification = 'ocean - ' // run_classification
253    ELSE
254       run_classification = 'atmosphere - ' // run_classification
255    ENDIF
256
257!
258!-- Run-identification, date, time, host
259    host_chr = host(1:10)
260    ver_rev = TRIM( version ) // '  ' // TRIM( revision )
261    WRITE ( io, 100 )  ver_rev, TRIM( run_classification )
262    IF ( TRIM( coupling_mode ) /= 'uncoupled' )  THEN
263#if defined( __mpi2 )
264       mpi_type = 2
265#else
266       mpi_type = 1
267#endif
268       WRITE ( io, 101 )  mpi_type, coupling_mode
269    ENDIF
270#if defined( __parallel )
271    IF ( coupling_start_time /= 0.0 )  THEN
272       IF ( coupling_start_time > simulated_time_at_begin )  THEN
273          WRITE ( io, 109 )
274       ELSE
275          WRITE ( io, 114 )
276       ENDIF
277    ENDIF
278#endif
279    WRITE ( io, 102 )  run_date, run_identifier, run_time, runnr, &
280                       ADJUSTR( host_chr )
281#if defined( __parallel )
282    IF ( npex == -1  .AND.  pdims(2) /= 1 )  THEN
283       char1 = 'calculated'
284    ELSEIF ( ( host(1:3) == 'ibm'  .OR.  host(1:3) == 'nec'  .OR.  &
285               host(1:2) == 'lc' )  .AND.                          &
286             npex == -1  .AND.  pdims(2) == 1 )  THEN
287       char1 = 'forced'
288    ELSE
289       char1 = 'predefined'
290    ENDIF
291    IF ( threads_per_task == 1 )  THEN
292       WRITE ( io, 103 )  numprocs, pdims(1), pdims(2), TRIM( char1 )
293    ELSE
294       WRITE ( io, 104 )  numprocs*threads_per_task, numprocs, &
295                          threads_per_task, pdims(1), pdims(2), TRIM( char1 )
296    ENDIF
297    IF ( num_acc_per_node /= 0 )  WRITE ( io, 117 )  num_acc_per_node   
298    IF ( ( host(1:3) == 'ibm'  .OR.  host(1:3) == 'nec'  .OR.    &
299           host(1:2) == 'lc'   .OR.  host(1:3) == 'dec' )  .AND. &
300         npex == -1  .AND.  pdims(2) == 1 )                      &
301    THEN
302       WRITE ( io, 106 )
303    ELSEIF ( pdims(2) == 1 )  THEN
304       WRITE ( io, 107 )  'x'
305    ELSEIF ( pdims(1) == 1 )  THEN
306       WRITE ( io, 107 )  'y'
307    ENDIF
308    IF ( use_seperate_pe_for_dvrp_output )  WRITE ( io, 105 )
309    IF ( numprocs /= maximum_parallel_io_streams )  THEN
310       WRITE ( io, 108 )  maximum_parallel_io_streams
311    ENDIF
312#else
313    IF ( num_acc_per_node /= 0 )  WRITE ( io, 120 )  num_acc_per_node
314#endif
315    WRITE ( io, 99 )
316
317!
318!-- Numerical schemes
319    WRITE ( io, 110 )
320    IF ( psolver(1:7) == 'poisfft' )  THEN
321       WRITE ( io, 111 )  TRIM( fft_method )
322       IF ( psolver == 'poisfft_hybrid' )  WRITE ( io, 138 )
323    ELSEIF ( psolver == 'sor' )  THEN
324       WRITE ( io, 112 )  nsor_ini, nsor, omega_sor
325    ELSEIF ( psolver == 'multigrid' )  THEN
326       WRITE ( io, 135 )  cycle_mg, maximum_grid_level, ngsrb
327       IF ( mg_cycles == -1 )  THEN
328          WRITE ( io, 140 )  residual_limit
329       ELSE
330          WRITE ( io, 141 )  mg_cycles
331       ENDIF
332       IF ( mg_switch_to_pe0_level == 0 )  THEN
333          WRITE ( io, 136 )  nxr_mg(1)-nxl_mg(1)+1, nyn_mg(1)-nys_mg(1)+1, &
334                             nzt_mg(1)
335       ELSEIF (  mg_switch_to_pe0_level /= -1 )  THEN
336          WRITE ( io, 137 )  mg_switch_to_pe0_level,            &
337                             mg_loc_ind(2,0)-mg_loc_ind(1,0)+1, &
338                             mg_loc_ind(4,0)-mg_loc_ind(3,0)+1, &
339                             nzt_mg(mg_switch_to_pe0_level),    &
340                             nxr_mg(1)-nxl_mg(1)+1, nyn_mg(1)-nys_mg(1)+1, &
341                             nzt_mg(1)
342       ENDIF
343       IF ( masking_method )  WRITE ( io, 144 )
344    ENDIF
345    IF ( call_psolver_at_all_substeps  .AND. timestep_scheme(1:5) == 'runge' ) &
346    THEN
347       WRITE ( io, 142 )
348    ENDIF
349
350    IF ( momentum_advec == 'pw-scheme' )  THEN
351       WRITE ( io, 113 )
352    ELSEIF (momentum_advec == 'ws-scheme' ) THEN
353       WRITE ( io, 503 )
354    ENDIF
355    IF ( scalar_advec == 'pw-scheme' )  THEN
356       WRITE ( io, 116 )
357    ELSEIF ( scalar_advec == 'ws-scheme' )  THEN
358       WRITE ( io, 504 )
359    ELSE
360       WRITE ( io, 118 )
361    ENDIF
362
363    WRITE ( io, 139 )  TRIM( loop_optimization )
364
365    IF ( galilei_transformation )  THEN
366       IF ( use_ug_for_galilei_tr )  THEN
367          char1 = '0.6 * geostrophic wind'
368       ELSE
369          char1 = 'mean wind in model domain'
370       ENDIF
371       IF ( simulated_time_at_begin == simulated_time )  THEN
372          char2 = 'at the start of the run'
373       ELSE
374          char2 = 'at the end of the run'
375       ENDIF
376       WRITE ( io, 119 )  TRIM( char1 ), TRIM( char2 ), &
377                          advected_distance_x/1000.0, advected_distance_y/1000.0
378    ENDIF
379    WRITE ( io, 122 )  timestep_scheme
380    IF ( use_upstream_for_tke )  WRITE ( io, 143 )
381    IF ( rayleigh_damping_factor /= 0.0 )  THEN
382       IF ( .NOT. ocean )  THEN
383          WRITE ( io, 123 )  'above', rayleigh_damping_height, &
384               rayleigh_damping_factor
385       ELSE
386          WRITE ( io, 123 )  'below', rayleigh_damping_height, &
387               rayleigh_damping_factor
388       ENDIF
389    ENDIF
390    IF ( neutral )  WRITE ( io, 131 )  pt_surface
391    IF ( humidity )  THEN
392       IF ( .NOT. cloud_physics )  THEN
393          WRITE ( io, 129 )
394       ELSE
395          WRITE ( io, 130 )
396       ENDIF
397    ENDIF
398    IF ( passive_scalar )  WRITE ( io, 134 )
399    IF ( conserve_volume_flow )  THEN
400       WRITE ( io, 150 )  conserve_volume_flow_mode
401       IF ( TRIM( conserve_volume_flow_mode ) == 'bulk_velocity' )  THEN
402          WRITE ( io, 151 )  u_bulk, v_bulk
403       ENDIF
404    ELSEIF ( dp_external )  THEN
405       IF ( dp_smooth )  THEN
406          WRITE ( io, 152 )  dpdxy, dp_level_b, ', vertically smoothed.'
407       ELSE
408          WRITE ( io, 152 )  dpdxy, dp_level_b, '.'
409       ENDIF
410    ENDIF
411    IF ( large_scale_subsidence )  THEN
412        WRITE ( io, 153 )
413        WRITE ( io, 154 )
414    ENDIF
415    WRITE ( io, 99 )
416
417!
418!-- Runtime and timestep informations
419    WRITE ( io, 200 )
420    IF ( .NOT. dt_fixed )  THEN
421       WRITE ( io, 201 )  dt_max, cfl_factor
422    ELSE
423       WRITE ( io, 202 )  dt
424    ENDIF
425    WRITE ( io, 203 )  simulated_time_at_begin, end_time
426
427    IF ( time_restart /= 9999999.9  .AND. &
428         simulated_time_at_begin == simulated_time )  THEN
429       IF ( dt_restart == 9999999.9 )  THEN
430          WRITE ( io, 204 )  ' Restart at:       ',time_restart
431       ELSE
432          WRITE ( io, 205 )  ' Restart at:       ',time_restart, dt_restart
433       ENDIF
434    ENDIF
435
436    IF ( simulated_time_at_begin /= simulated_time )  THEN
437       i = MAX ( log_point_s(10)%counts, 1 )
438       IF ( ( simulated_time - simulated_time_at_begin ) == 0.0 )  THEN
439          cpuseconds_per_simulated_second = 0.0
440       ELSE
441          cpuseconds_per_simulated_second = log_point_s(10)%sum / &
442                                            ( simulated_time -    &
443                                              simulated_time_at_begin )
444       ENDIF
445       WRITE ( io, 206 )  simulated_time, log_point_s(10)%sum, &
446                          log_point_s(10)%sum / REAL( i ),     &
447                          cpuseconds_per_simulated_second
448       IF ( time_restart /= 9999999.9  .AND.  time_restart < end_time )  THEN
449          IF ( dt_restart == 9999999.9 )  THEN
450             WRITE ( io, 204 )  ' Next restart at:     ',time_restart
451          ELSE
452             WRITE ( io, 205 )  ' Next restart at:     ',time_restart, dt_restart
453          ENDIF
454       ENDIF
455    ENDIF
456
457!
458!-- Start time for coupled runs, if independent precursor runs for atmosphere
459!-- and ocean are used or have been used. In this case, coupling_start_time
460!-- defines the time when the coupling is switched on.
461    IF ( coupling_start_time /= 0.0 )  THEN
462       WRITE ( io, 207 )  coupling_start_time
463    ENDIF
464
465!
466!-- Computational grid
467    IF ( .NOT. ocean )  THEN
468       WRITE ( io, 250 )  dx, dy, dz, (nx+1)*dx, (ny+1)*dy, zu(nzt+1)
469       IF ( dz_stretch_level_index < nzt+1 )  THEN
470          WRITE ( io, 252 )  dz_stretch_level, dz_stretch_level_index, &
471                             dz_stretch_factor, dz_max
472       ENDIF
473    ELSE
474       WRITE ( io, 250 )  dx, dy, dz, (nx+1)*dx, (ny+1)*dy, zu(0)
475       IF ( dz_stretch_level_index > 0 )  THEN
476          WRITE ( io, 252 )  dz_stretch_level, dz_stretch_level_index, &
477                             dz_stretch_factor, dz_max
478       ENDIF
479    ENDIF
480    WRITE ( io, 254 )  nx, ny, nzt+1, MIN( nnx, nx+1 ), MIN( nny, ny+1 ), &
481                       MIN( nnz+2, nzt+2 )
482    IF ( sloping_surface )  WRITE ( io, 260 )  alpha_surface
483
484!
485!-- Topography
486    WRITE ( io, 270 )  topography
487    SELECT CASE ( TRIM( topography ) )
488
489       CASE ( 'flat' )
490          ! no actions necessary
491
492       CASE ( 'single_building' )
493          blx = INT( building_length_x / dx )
494          bly = INT( building_length_y / dy )
495          bh  = INT( building_height / dz )
496
497          IF ( building_wall_left == 9999999.9 )  THEN
498             building_wall_left = ( nx + 1 - blx ) / 2 * dx
499          ENDIF
500          bxl = INT ( building_wall_left / dx + 0.5 )
501          bxr = bxl + blx
502
503          IF ( building_wall_south == 9999999.9 )  THEN
504             building_wall_south = ( ny + 1 - bly ) / 2 * dy
505          ENDIF
506          bys = INT ( building_wall_south / dy + 0.5 )
507          byn = bys + bly
508
509          WRITE ( io, 271 )  building_length_x, building_length_y, &
510                             building_height, bxl, bxr, bys, byn
511
512       CASE ( 'single_street_canyon' )
513          ch  = NINT( canyon_height / dz )
514          IF ( canyon_width_x /= 9999999.9 )  THEN
515!
516!--          Street canyon in y direction
517             cwx = NINT( canyon_width_x / dx )
518             IF ( canyon_wall_left == 9999999.9 )  THEN
519                canyon_wall_left = ( nx + 1 - cwx ) / 2 * dx
520             ENDIF
521             cxl = NINT( canyon_wall_left / dx )
522             cxr = cxl + cwx
523             WRITE ( io, 272 )  'y', canyon_height, ch, 'u', cxl, cxr
524
525          ELSEIF ( canyon_width_y /= 9999999.9 )  THEN
526!
527!--          Street canyon in x direction
528             cwy = NINT( canyon_width_y / dy )
529             IF ( canyon_wall_south == 9999999.9 )  THEN
530                canyon_wall_south = ( ny + 1 - cwy ) / 2 * dy
531             ENDIF
532             cys = NINT( canyon_wall_south / dy )
533             cyn = cys + cwy
534             WRITE ( io, 272 )  'x', canyon_height, ch, 'v', cys, cyn
535          ENDIF
536
537    END SELECT
538
539    IF ( TRIM( topography ) /= 'flat' )  THEN
540       IF ( TRIM( topography_grid_convention ) == ' ' )  THEN
541          IF ( TRIM( topography ) == 'single_building' .OR.  &
542               TRIM( topography ) == 'single_street_canyon' )  THEN
543             WRITE ( io, 278 )
544          ELSEIF ( TRIM( topography ) == 'read_from_file' )  THEN
545             WRITE ( io, 279 )
546          ENDIF
547       ELSEIF ( TRIM( topography_grid_convention ) == 'cell_edge' )  THEN
548          WRITE ( io, 278 )
549       ELSEIF ( TRIM( topography_grid_convention ) == 'cell_center' )  THEN
550          WRITE ( io, 279 )
551       ENDIF
552    ENDIF
553
554    IF ( plant_canopy ) THEN
555
556       WRITE ( io, 280 ) canopy_mode, pch_index, drag_coefficient
557       IF ( passive_scalar ) THEN
558          WRITE ( io, 281 ) scalar_exchange_coefficient,   &
559                            leaf_surface_concentration
560       ENDIF
561
562!
563!--    Heat flux at the top of vegetation
564       WRITE ( io, 282 ) cthf
565
566!
567!--    Leaf area density profile
568!--    Building output strings, starting with surface value
569       WRITE ( learde, '(F6.4)' )  lad_surface
570       gradients = '------'
571       slices = '     0'
572       coordinates = '   0.0'
573       i = 1
574       DO  WHILE ( lad_vertical_gradient_level_ind(i) /= -9999 )
575
576          WRITE (coor_chr,'(F7.2)')  lad(lad_vertical_gradient_level_ind(i))
577          learde = TRIM( learde ) // ' ' // TRIM( coor_chr )
578
579          WRITE (coor_chr,'(F7.2)')  lad_vertical_gradient(i)
580          gradients = TRIM( gradients ) // ' ' // TRIM( coor_chr )
581
582          WRITE (coor_chr,'(I7)')  lad_vertical_gradient_level_ind(i)
583          slices = TRIM( slices ) // ' ' // TRIM( coor_chr )
584
585          WRITE (coor_chr,'(F7.1)')  lad_vertical_gradient_level(i)
586          coordinates = TRIM( coordinates ) // ' '  // TRIM( coor_chr )
587
588          i = i + 1
589       ENDDO
590
591       WRITE ( io, 283 )  TRIM( coordinates ), TRIM( learde ), &
592                          TRIM( gradients ), TRIM( slices )
593
594    ENDIF
595
596!
597!-- Boundary conditions
598    IF ( ibc_p_b == 0 )  THEN
599       runten = 'p(0)     = 0      |'
600    ELSEIF ( ibc_p_b == 1 )  THEN
601       runten = 'p(0)     = p(1)   |'
602    ENDIF
603    IF ( ibc_p_t == 0 )  THEN
604       roben  = 'p(nzt+1) = 0      |'
605    ELSE
606       roben  = 'p(nzt+1) = p(nzt) |'
607    ENDIF
608
609    IF ( ibc_uv_b == 0 )  THEN
610       runten = TRIM( runten ) // ' uv(0)     = -uv(1)                |'
611    ELSE
612       runten = TRIM( runten ) // ' uv(0)     = uv(1)                 |'
613    ENDIF
614    IF ( TRIM( bc_uv_t ) == 'dirichlet_0' )  THEN
615       roben  = TRIM( roben  ) // ' uv(nzt+1) = 0                     |'
616    ELSEIF ( ibc_uv_t == 0 )  THEN
617       roben  = TRIM( roben  ) // ' uv(nzt+1) = ug(nzt+1), vg(nzt+1)  |'
618    ELSE
619       roben  = TRIM( roben  ) // ' uv(nzt+1) = uv(nzt)               |'
620    ENDIF
621
622    IF ( ibc_pt_b == 0 )  THEN
623       runten = TRIM( runten ) // ' pt(0)   = pt_surface'
624    ELSEIF ( ibc_pt_b == 1 )  THEN
625       runten = TRIM( runten ) // ' pt(0)   = pt(1)'
626    ELSEIF ( ibc_pt_b == 2 )  THEN
627       runten = TRIM( runten ) // ' pt(0) = from coupled model'
628    ENDIF
629    IF ( ibc_pt_t == 0 )  THEN
630       roben  = TRIM( roben  ) // ' pt(nzt+1) = pt_top'
631    ELSEIF( ibc_pt_t == 1 )  THEN
632       roben  = TRIM( roben  ) // ' pt(nzt+1) = pt(nzt)'
633    ELSEIF( ibc_pt_t == 2 )  THEN
634       roben  = TRIM( roben  ) // ' pt(nzt+1) = pt(nzt) + dpt/dz_ini'
635
636    ENDIF
637
638    WRITE ( io, 300 )  runten, roben
639
640    IF ( .NOT. constant_diffusion )  THEN
641       IF ( ibc_e_b == 1 )  THEN
642          runten = 'e(0)     = e(1)'
643       ELSE
644          runten = 'e(0)     = e(1) = (u*/0.1)**2'
645       ENDIF
646       roben = 'e(nzt+1) = e(nzt) = e(nzt-1)'
647
648       WRITE ( io, 301 )  'e', runten, roben       
649
650    ENDIF
651
652    IF ( ocean )  THEN
653       runten = 'sa(0)    = sa(1)'
654       IF ( ibc_sa_t == 0 )  THEN
655          roben =  'sa(nzt+1) = sa_surface'
656       ELSE
657          roben =  'sa(nzt+1) = sa(nzt)'
658       ENDIF
659       WRITE ( io, 301 ) 'sa', runten, roben
660    ENDIF
661
662    IF ( humidity )  THEN
663       IF ( ibc_q_b == 0 )  THEN
664          runten = 'q(0)     = q_surface'
665       ELSE
666          runten = 'q(0)     = q(1)'
667       ENDIF
668       IF ( ibc_q_t == 0 )  THEN
669          roben =  'q(nzt)   = q_top'
670       ELSE
671          roben =  'q(nzt)   = q(nzt-1) + dq/dz'
672       ENDIF
673       WRITE ( io, 301 ) 'q', runten, roben
674    ENDIF
675
676    IF ( passive_scalar )  THEN
677       IF ( ibc_q_b == 0 )  THEN
678          runten = 's(0)     = s_surface'
679       ELSE
680          runten = 's(0)     = s(1)'
681       ENDIF
682       IF ( ibc_q_t == 0 )  THEN
683          roben =  's(nzt)   = s_top'
684       ELSE
685          roben =  's(nzt)   = s(nzt-1) + ds/dz'
686       ENDIF
687       WRITE ( io, 301 ) 's', runten, roben
688    ENDIF
689
690    IF ( use_surface_fluxes )  THEN
691       WRITE ( io, 303 )
692       IF ( constant_heatflux )  THEN
693          WRITE ( io, 306 )  surface_heatflux
694          IF ( random_heatflux )  WRITE ( io, 307 )
695       ENDIF
696       IF ( humidity  .AND.  constant_waterflux )  THEN
697          WRITE ( io, 311 ) surface_waterflux
698       ENDIF
699       IF ( passive_scalar  .AND.  constant_waterflux )  THEN
700          WRITE ( io, 313 ) surface_waterflux
701       ENDIF
702    ENDIF
703
704    IF ( use_top_fluxes )  THEN
705       WRITE ( io, 304 )
706       IF ( coupling_mode == 'uncoupled' )  THEN
707          WRITE ( io, 320 )  top_momentumflux_u, top_momentumflux_v
708          IF ( constant_top_heatflux )  THEN
709             WRITE ( io, 306 )  top_heatflux
710          ENDIF
711       ELSEIF ( coupling_mode == 'ocean_to_atmosphere' )  THEN
712          WRITE ( io, 316 )
713       ENDIF
714       IF ( ocean  .AND.  constant_top_salinityflux )  THEN
715          WRITE ( io, 309 )  top_salinityflux
716       ENDIF
717       IF ( humidity  .OR.  passive_scalar )  THEN
718          WRITE ( io, 315 )
719       ENDIF
720    ENDIF
721
722    IF ( prandtl_layer )  THEN
723       WRITE ( io, 305 )  (zu(1)-zu(0)), roughness_length, &
724                          z0h_factor*roughness_length, kappa, &
725                          rif_min, rif_max
726       IF ( .NOT. constant_heatflux )  WRITE ( io, 308 )
727       IF ( humidity  .AND.  .NOT. constant_waterflux )  THEN
728          WRITE ( io, 312 )
729       ENDIF
730       IF ( passive_scalar  .AND.  .NOT. constant_waterflux )  THEN
731          WRITE ( io, 314 )
732       ENDIF
733    ELSE
734       IF ( INDEX(initializing_actions, 'set_1d-model_profiles') /= 0 )  THEN
735          WRITE ( io, 310 )  rif_min, rif_max
736       ENDIF
737    ENDIF
738
739    WRITE ( io, 317 )  bc_lr, bc_ns
740    IF ( .NOT. bc_lr_cyc  .OR.  .NOT. bc_ns_cyc )  THEN
741       WRITE ( io, 318 )  pt_damping_width, pt_damping_factor       
742       IF ( turbulent_inflow )  THEN
743          WRITE ( io, 319 )  recycling_width, recycling_plane, &
744                             inflow_damping_height, inflow_damping_width
745       ENDIF
746    ENDIF
747
748!
749!-- Listing of 1D-profiles
750    WRITE ( io, 325 )  dt_dopr_listing
751    IF ( averaging_interval_pr /= 0.0 )  THEN
752       WRITE ( io, 326 )  averaging_interval_pr, dt_averaging_input_pr
753    ENDIF
754
755!
756!-- DATA output
757    WRITE ( io, 330 )
758    IF ( averaging_interval_pr /= 0.0 )  THEN
759       WRITE ( io, 326 )  averaging_interval_pr, dt_averaging_input_pr
760    ENDIF
761
762!
763!-- 1D-profiles
764    dopr_chr = 'Profile:'
765    IF ( dopr_n /= 0 )  THEN
766       WRITE ( io, 331 )
767
768       output_format = ''
769       IF ( netcdf_output )  THEN
770          output_format = output_format_netcdf
771       ENDIF
772       WRITE ( io, 344 )  output_format
773
774       DO  i = 1, dopr_n
775          dopr_chr = TRIM( dopr_chr ) // ' ' // TRIM( data_output_pr(i) ) // ','
776          IF ( LEN_TRIM( dopr_chr ) >= 60 )  THEN
777             WRITE ( io, 332 )  dopr_chr
778             dopr_chr = '       :'
779          ENDIF
780       ENDDO
781
782       IF ( dopr_chr /= '' )  THEN
783          WRITE ( io, 332 )  dopr_chr
784       ENDIF
785       WRITE ( io, 333 )  dt_dopr, averaging_interval_pr, dt_averaging_input_pr
786       IF ( skip_time_dopr /= 0.0 )  WRITE ( io, 339 )  skip_time_dopr
787    ENDIF
788
789!
790!-- 2D-arrays
791    DO  av = 0, 1
792
793       i = 1
794       do2d_xy = ''
795       do2d_xz = ''
796       do2d_yz = ''
797       DO  WHILE ( do2d(av,i) /= ' ' )
798
799          l = MAX( 2, LEN_TRIM( do2d(av,i) ) )
800          do2d_mode = do2d(av,i)(l-1:l)
801
802          SELECT CASE ( do2d_mode )
803             CASE ( 'xy' )
804                ll = LEN_TRIM( do2d_xy )
805                do2d_xy = do2d_xy(1:ll) // ' ' // do2d(av,i)(1:l-3) // ','
806             CASE ( 'xz' )
807                ll = LEN_TRIM( do2d_xz )
808                do2d_xz = do2d_xz(1:ll) // ' ' // do2d(av,i)(1:l-3) // ','
809             CASE ( 'yz' )
810                ll = LEN_TRIM( do2d_yz )
811                do2d_yz = do2d_yz(1:ll) // ' ' // do2d(av,i)(1:l-3) // ','
812          END SELECT
813
814          i = i + 1
815
816       ENDDO
817
818       IF ( ( ( do2d_xy /= ''  .AND.  section(1,1) /= -9999 )  .OR.    &
819              ( do2d_xz /= ''  .AND.  section(1,2) /= -9999 )  .OR.    &
820              ( do2d_yz /= ''  .AND.  section(1,3) /= -9999 ) )  .AND. &
821            ( netcdf_output  .OR.  iso2d_output ) )  THEN
822
823          IF (  av == 0 )  THEN
824             WRITE ( io, 334 )  ''
825          ELSE
826             WRITE ( io, 334 )  '(time-averaged)'
827          ENDIF
828
829          IF ( do2d_at_begin )  THEN
830             begin_chr = 'and at the start'
831          ELSE
832             begin_chr = ''
833          ENDIF
834
835          output_format = ''
836          IF ( netcdf_output )  THEN
837             output_format = output_format_netcdf
838          ENDIF
839          IF ( iso2d_output )  THEN
840             IF ( netcdf_output )  THEN
841                output_format = TRIM( output_format_netcdf ) // ' and iso2d'
842             ELSE
843                output_format = 'iso2d'
844             ENDIF
845          ENDIF
846          WRITE ( io, 344 )  output_format
847
848          IF ( do2d_xy /= ''  .AND.  section(1,1) /= -9999 )  THEN
849             i = 1
850             slices = '/'
851             coordinates = '/'
852!
853!--          Building strings with index and coordinate informations of the
854!--          slices
855             DO  WHILE ( section(i,1) /= -9999 )
856
857                WRITE (section_chr,'(I5)')  section(i,1)
858                section_chr = ADJUSTL( section_chr )
859                slices = TRIM( slices ) // TRIM( section_chr ) // '/'
860
861                IF ( section(i,1) == -1 )  THEN
862                   WRITE (coor_chr,'(F10.1)')  -1.0
863                ELSE
864                   WRITE (coor_chr,'(F10.1)')  zu(section(i,1))
865                ENDIF
866                coor_chr = ADJUSTL( coor_chr )
867                coordinates = TRIM( coordinates ) // TRIM( coor_chr ) // '/'
868
869                i = i + 1
870             ENDDO
871             IF ( av == 0 )  THEN
872                WRITE ( io, 335 )  'XY', do2d_xy, dt_do2d_xy, &
873                                   TRIM( begin_chr ), 'k', TRIM( slices ), &
874                                   TRIM( coordinates )
875                IF ( skip_time_do2d_xy /= 0.0 )  THEN
876                   WRITE ( io, 339 )  skip_time_do2d_xy
877                ENDIF
878             ELSE
879                WRITE ( io, 342 )  'XY', do2d_xy, dt_data_output_av, &
880                                   TRIM( begin_chr ), averaging_interval, &
881                                   dt_averaging_input, 'k', TRIM( slices ), &
882                                   TRIM( coordinates )
883                IF ( skip_time_data_output_av /= 0.0 )  THEN
884                   WRITE ( io, 339 )  skip_time_data_output_av
885                ENDIF
886             ENDIF
887
888          ENDIF
889
890          IF ( do2d_xz /= ''  .AND.  section(1,2) /= -9999 )  THEN
891             i = 1
892             slices = '/'
893             coordinates = '/'
894!
895!--          Building strings with index and coordinate informations of the
896!--          slices
897             DO  WHILE ( section(i,2) /= -9999 )
898
899                WRITE (section_chr,'(I5)')  section(i,2)
900                section_chr = ADJUSTL( section_chr )
901                slices = TRIM( slices ) // TRIM( section_chr ) // '/'
902
903                WRITE (coor_chr,'(F10.1)')  section(i,2) * dy
904                coor_chr = ADJUSTL( coor_chr )
905                coordinates = TRIM( coordinates ) // TRIM( coor_chr ) // '/'
906
907                i = i + 1
908             ENDDO
909             IF ( av == 0 )  THEN
910                WRITE ( io, 335 )  'XZ', do2d_xz, dt_do2d_xz, &
911                                   TRIM( begin_chr ), 'j', TRIM( slices ), &
912                                   TRIM( coordinates )
913                IF ( skip_time_do2d_xz /= 0.0 )  THEN
914                   WRITE ( io, 339 )  skip_time_do2d_xz
915                ENDIF
916             ELSE
917                WRITE ( io, 342 )  'XZ', do2d_xz, dt_data_output_av, &
918                                   TRIM( begin_chr ), averaging_interval, &
919                                   dt_averaging_input, 'j', TRIM( slices ), &
920                                   TRIM( coordinates )
921                IF ( skip_time_data_output_av /= 0.0 )  THEN
922                   WRITE ( io, 339 )  skip_time_data_output_av
923                ENDIF
924             ENDIF
925          ENDIF
926
927          IF ( do2d_yz /= ''  .AND.  section(1,3) /= -9999 )  THEN
928             i = 1
929             slices = '/'
930             coordinates = '/'
931!
932!--          Building strings with index and coordinate informations of the
933!--          slices
934             DO  WHILE ( section(i,3) /= -9999 )
935
936                WRITE (section_chr,'(I5)')  section(i,3)
937                section_chr = ADJUSTL( section_chr )
938                slices = TRIM( slices ) // TRIM( section_chr ) // '/'
939
940                WRITE (coor_chr,'(F10.1)')  section(i,3) * dx
941                coor_chr = ADJUSTL( coor_chr )
942                coordinates = TRIM( coordinates ) // TRIM( coor_chr ) // '/'
943
944                i = i + 1
945             ENDDO
946             IF ( av == 0 )  THEN
947                WRITE ( io, 335 )  'YZ', do2d_yz, dt_do2d_yz, &
948                                   TRIM( begin_chr ), 'i', TRIM( slices ), &
949                                   TRIM( coordinates )
950                IF ( skip_time_do2d_yz /= 0.0 )  THEN
951                   WRITE ( io, 339 )  skip_time_do2d_yz
952                ENDIF
953             ELSE
954                WRITE ( io, 342 )  'YZ', do2d_yz, dt_data_output_av, &
955                                   TRIM( begin_chr ), averaging_interval, &
956                                   dt_averaging_input, 'i', TRIM( slices ), &
957                                   TRIM( coordinates )
958                IF ( skip_time_data_output_av /= 0.0 )  THEN
959                   WRITE ( io, 339 )  skip_time_data_output_av
960                ENDIF
961             ENDIF
962          ENDIF
963
964       ENDIF
965
966    ENDDO
967
968!
969!-- 3d-arrays
970    DO  av = 0, 1
971
972       i = 1
973       do3d_chr = ''
974       DO  WHILE ( do3d(av,i) /= ' ' )
975
976          do3d_chr = TRIM( do3d_chr ) // ' ' // TRIM( do3d(av,i) ) // ','
977          i = i + 1
978
979       ENDDO
980
981       IF ( do3d_chr /= '' )  THEN
982          IF ( av == 0 )  THEN
983             WRITE ( io, 336 )  ''
984          ELSE
985             WRITE ( io, 336 )  '(time-averaged)'
986          ENDIF
987
988          output_format = ''
989          IF ( netcdf_output )  THEN
990             output_format = output_format_netcdf
991          ENDIF
992          IF ( avs_output )  THEN
993             IF ( netcdf_output )  THEN
994                output_format = TRIM( output_format_netcdf ) // ' and avs'
995             ELSE
996                output_format = 'avs'
997             ENDIF
998          ENDIF
999          WRITE ( io, 344 )  output_format
1000
1001          IF ( do3d_at_begin )  THEN
1002             begin_chr = 'and at the start'
1003          ELSE
1004             begin_chr = ''
1005          ENDIF
1006          IF ( av == 0 )  THEN
1007             WRITE ( io, 337 )  do3d_chr, dt_do3d, TRIM( begin_chr ), &
1008                                zu(nz_do3d), nz_do3d
1009          ELSE
1010             WRITE ( io, 343 )  do3d_chr, dt_data_output_av,           &
1011                                TRIM( begin_chr ), averaging_interval, &
1012                                dt_averaging_input, zu(nz_do3d), nz_do3d
1013          ENDIF
1014
1015          IF ( do3d_compress )  THEN
1016             do3d_chr = ''
1017             i = 1
1018             DO WHILE ( do3d(av,i) /= ' ' )
1019
1020                SELECT CASE ( do3d(av,i) )
1021                   CASE ( 'u' )
1022                      j = 1
1023                   CASE ( 'v' )
1024                      j = 2
1025                   CASE ( 'w' )
1026                      j = 3
1027                   CASE ( 'p' )
1028                      j = 4
1029                   CASE ( 'pt' )
1030                      j = 5
1031                END SELECT
1032                WRITE ( prec, '(I1)' )  plot_3d_precision(j)%precision
1033                do3d_chr = TRIM( do3d_chr ) // ' ' // TRIM( do3d(av,i) ) // &
1034                           ':' // prec // ','
1035                i = i + 1
1036
1037             ENDDO
1038             WRITE ( io, 338 )  do3d_chr
1039
1040          ENDIF
1041
1042          IF ( av == 0 )  THEN
1043             IF ( skip_time_do3d /= 0.0 )  THEN
1044                WRITE ( io, 339 )  skip_time_do3d
1045             ENDIF
1046          ELSE
1047             IF ( skip_time_data_output_av /= 0.0 )  THEN
1048                WRITE ( io, 339 )  skip_time_data_output_av
1049             ENDIF
1050          ENDIF
1051
1052       ENDIF
1053
1054    ENDDO
1055
1056!
1057!-- masked arrays
1058    IF ( masks > 0 )  WRITE ( io, 345 )  &
1059         mask_scale_x, mask_scale_y, mask_scale_z
1060    DO  mid = 1, masks
1061       DO  av = 0, 1
1062
1063          i = 1
1064          domask_chr = ''
1065          DO  WHILE ( domask(mid,av,i) /= ' ' )
1066             domask_chr = TRIM( domask_chr ) // ' ' //  &
1067                          TRIM( domask(mid,av,i) ) // ','
1068             i = i + 1
1069          ENDDO
1070
1071          IF ( domask_chr /= '' )  THEN
1072             IF ( av == 0 )  THEN
1073                WRITE ( io, 346 )  '', mid
1074             ELSE
1075                WRITE ( io, 346 )  ' (time-averaged)', mid
1076             ENDIF
1077
1078             output_format = ' '
1079             IF ( netcdf_output )  THEN
1080                output_format = output_format_netcdf
1081             ENDIF
1082             WRITE ( io, 344 )  output_format
1083
1084             IF ( av == 0 )  THEN
1085                WRITE ( io, 347 )  domask_chr, dt_domask(mid)
1086             ELSE
1087                WRITE ( io, 348 )  domask_chr, dt_data_output_av, &
1088                                   averaging_interval, dt_averaging_input
1089             ENDIF
1090
1091             IF ( av == 0 )  THEN
1092                IF ( skip_time_domask(mid) /= 0.0 )  THEN
1093                   WRITE ( io, 339 )  skip_time_domask(mid)
1094                ENDIF
1095             ELSE
1096                IF ( skip_time_data_output_av /= 0.0 )  THEN
1097                   WRITE ( io, 339 )  skip_time_data_output_av
1098                ENDIF
1099             ENDIF
1100!
1101!--          output locations
1102             DO  dim = 1, 3
1103                IF ( mask(mid,dim,1) >= 0.0 )  THEN
1104                   count = 0
1105                   DO  WHILE ( mask(mid,dim,count+1) >= 0.0 )
1106                      count = count + 1
1107                   ENDDO
1108                   WRITE ( io, 349 )  dir(dim), dir(dim), mid, dir(dim), &
1109                                      mask(mid,dim,:count)
1110                ELSEIF ( mask_loop(mid,dim,1) < 0.0 .AND.  &
1111                         mask_loop(mid,dim,2) < 0.0 .AND.  &
1112                         mask_loop(mid,dim,3) == 0.0 )  THEN
1113                   WRITE ( io, 350 )  dir(dim), dir(dim)
1114                ELSEIF ( mask_loop(mid,dim,3) == 0.0 )  THEN
1115                   WRITE ( io, 351 )  dir(dim), dir(dim), mid, dir(dim), &
1116                                      mask_loop(mid,dim,1:2)
1117                ELSE
1118                   WRITE ( io, 351 )  dir(dim), dir(dim), mid, dir(dim), &
1119                                      mask_loop(mid,dim,1:3)
1120                ENDIF
1121             ENDDO
1122          ENDIF
1123
1124       ENDDO
1125    ENDDO
1126
1127!
1128!-- Timeseries
1129    IF ( dt_dots /= 9999999.9 )  THEN
1130       WRITE ( io, 340 )
1131
1132       output_format = ''
1133       IF ( netcdf_output )  THEN
1134          output_format = output_format_netcdf
1135       ENDIF
1136       WRITE ( io, 344 )  output_format
1137       WRITE ( io, 341 )  dt_dots
1138    ENDIF
1139
1140#if defined( __dvrp_graphics )
1141!
1142!-- Dvrp-output
1143    IF ( dt_dvrp /= 9999999.9 )  THEN
1144       WRITE ( io, 360 )  dt_dvrp, TRIM( dvrp_output ), TRIM( dvrp_host ), &
1145                          TRIM( dvrp_username ), TRIM( dvrp_directory )
1146       i = 1
1147       l = 0
1148       m = 0
1149       DO WHILE ( mode_dvrp(i) /= ' ' )
1150          IF ( mode_dvrp(i)(1:10) == 'isosurface' )  THEN
1151             READ ( mode_dvrp(i), '(10X,I2)' )  j
1152             l = l + 1
1153             IF ( do3d(0,j) /= ' ' )  THEN
1154                WRITE ( io, 361 )  TRIM( do3d(0,j) ), threshold(l), &
1155                                   isosurface_color(:,l)
1156             ENDIF
1157          ELSEIF ( mode_dvrp(i)(1:6) == 'slicer' )  THEN
1158             READ ( mode_dvrp(i), '(6X,I2)' )  j
1159             m = m + 1
1160             IF ( do2d(0,j) /= ' ' )  THEN
1161                WRITE ( io, 362 )  TRIM( do2d(0,j) ), &
1162                                   slicer_range_limits_dvrp(:,m)
1163             ENDIF
1164          ELSEIF ( mode_dvrp(i)(1:9) == 'particles' )  THEN
1165             WRITE ( io, 363 )  dvrp_psize
1166             IF ( particle_dvrpsize /= 'none' )  THEN
1167                WRITE ( io, 364 )  'size', TRIM( particle_dvrpsize ), &
1168                                   dvrpsize_interval
1169             ENDIF
1170             IF ( particle_color /= 'none' )  THEN
1171                WRITE ( io, 364 )  'color', TRIM( particle_color ), &
1172                                   color_interval
1173             ENDIF
1174          ENDIF
1175          i = i + 1
1176       ENDDO
1177
1178       WRITE ( io, 365 )  groundplate_color, superelevation_x, &
1179                          superelevation_y, superelevation, clip_dvrp_l, &
1180                          clip_dvrp_r, clip_dvrp_s, clip_dvrp_n
1181
1182       IF ( TRIM( topography ) /= 'flat' )  THEN
1183          WRITE ( io, 366 )  topography_color
1184          IF ( cluster_size > 1 )  THEN
1185             WRITE ( io, 367 )  cluster_size
1186          ENDIF
1187       ENDIF
1188
1189    ENDIF
1190#endif
1191
1192#if defined( __spectra )
1193!
1194!-- Spectra output
1195    IF ( dt_dosp /= 9999999.9 ) THEN
1196       WRITE ( io, 370 )
1197
1198       output_format = ' '
1199       IF ( netcdf_output )  THEN
1200          output_format = output_format_netcdf
1201       ENDIF
1202       WRITE ( io, 344 )  output_format
1203       WRITE ( io, 371 )  dt_dosp
1204       IF ( skip_time_dosp /= 0.0 )  WRITE ( io, 339 )  skip_time_dosp
1205       WRITE ( io, 372 )  ( data_output_sp(i), i = 1,10 ),     &
1206                          ( spectra_direction(i), i = 1,10 ),  &
1207                          ( comp_spectra_level(i), i = 1,100 ), &
1208                          ( plot_spectra_level(i), i = 1,100 ), &
1209                          averaging_interval_sp, dt_averaging_input_pr
1210    ENDIF
1211#endif
1212
1213    WRITE ( io, 99 )
1214
1215!
1216!-- Physical quantities
1217    WRITE ( io, 400 )
1218
1219!
1220!-- Geostrophic parameters
1221    WRITE ( io, 410 )  omega, phi, f, fs
1222
1223!
1224!-- Other quantities
1225    WRITE ( io, 411 )  g
1226    IF ( use_reference )  THEN
1227       IF ( ocean )  THEN
1228          WRITE ( io, 412 )  prho_reference
1229       ELSE
1230          WRITE ( io, 413 )  pt_reference
1231       ENDIF
1232    ENDIF
1233
1234!
1235!-- Cloud physics parameters
1236    IF ( cloud_physics ) THEN
1237       WRITE ( io, 415 )
1238       WRITE ( io, 416 ) surface_pressure, r_d, rho_surface, cp, l_v
1239    ENDIF
1240
1241!-- Profile of the geostrophic wind (component ug)
1242!-- Building output strings
1243    WRITE ( ugcomponent, '(F6.2)' )  ug_surface
1244    gradients = '------'
1245    slices = '     0'
1246    coordinates = '   0.0'
1247    i = 1
1248    DO  WHILE ( ug_vertical_gradient_level_ind(i) /= -9999 )
1249     
1250       WRITE (coor_chr,'(F6.2,1X)')  ug(ug_vertical_gradient_level_ind(i))
1251       ugcomponent = TRIM( ugcomponent ) // '  ' // TRIM( coor_chr )
1252
1253       WRITE (coor_chr,'(F6.2,1X)')  ug_vertical_gradient(i)
1254       gradients = TRIM( gradients ) // '  ' // TRIM( coor_chr )
1255
1256       WRITE (coor_chr,'(I6,1X)')  ug_vertical_gradient_level_ind(i)
1257       slices = TRIM( slices ) // '  ' // TRIM( coor_chr )
1258
1259       WRITE (coor_chr,'(F6.1,1X)')  ug_vertical_gradient_level(i)
1260       coordinates = TRIM( coordinates ) // '  ' // TRIM( coor_chr )
1261
1262       IF ( i == 10 )  THEN
1263          EXIT
1264       ELSE
1265          i = i + 1
1266       ENDIF
1267
1268    ENDDO
1269
1270    WRITE ( io, 423 )  TRIM( coordinates ), TRIM( ugcomponent ), &
1271                       TRIM( gradients ), TRIM( slices )
1272
1273!-- Profile of the geostrophic wind (component vg)
1274!-- Building output strings
1275    WRITE ( vgcomponent, '(F6.2)' )  vg_surface
1276    gradients = '------'
1277    slices = '     0'
1278    coordinates = '   0.0'
1279    i = 1
1280    DO  WHILE ( vg_vertical_gradient_level_ind(i) /= -9999 )
1281
1282       WRITE (coor_chr,'(F6.2,1X)')  vg(vg_vertical_gradient_level_ind(i))
1283       vgcomponent = TRIM( vgcomponent ) // '  ' // TRIM( coor_chr )
1284
1285       WRITE (coor_chr,'(F6.2,1X)')  vg_vertical_gradient(i)
1286       gradients = TRIM( gradients ) // '  ' // TRIM( coor_chr )
1287
1288       WRITE (coor_chr,'(I6,1X)')  vg_vertical_gradient_level_ind(i)
1289       slices = TRIM( slices ) // '  ' // TRIM( coor_chr )
1290
1291       WRITE (coor_chr,'(F6.1,1X)')  vg_vertical_gradient_level(i)
1292       coordinates = TRIM( coordinates ) // '  ' // TRIM( coor_chr )
1293
1294       IF ( i == 10 )  THEN
1295          EXIT
1296       ELSE
1297          i = i + 1
1298       ENDIF
1299 
1300    ENDDO
1301
1302    WRITE ( io, 424 )  TRIM( coordinates ), TRIM( vgcomponent ), &
1303                       TRIM( gradients ), TRIM( slices )
1304
1305!
1306!-- Initial wind profiles
1307    IF ( u_profile(1) /= 9999999.9 )  WRITE ( io, 427 )
1308
1309!
1310!-- Initial temperature profile
1311!-- Building output strings, starting with surface temperature
1312    WRITE ( temperatures, '(F6.2)' )  pt_surface
1313    gradients = '------'
1314    slices = '     0'
1315    coordinates = '   0.0'
1316    i = 1
1317    DO  WHILE ( pt_vertical_gradient_level_ind(i) /= -9999 )
1318
1319       WRITE (coor_chr,'(F7.2)')  pt_init(pt_vertical_gradient_level_ind(i))
1320       temperatures = TRIM( temperatures ) // ' ' // TRIM( coor_chr )
1321
1322       WRITE (coor_chr,'(F7.2)')  pt_vertical_gradient(i)
1323       gradients = TRIM( gradients ) // ' ' // TRIM( coor_chr )
1324
1325       WRITE (coor_chr,'(I7)')  pt_vertical_gradient_level_ind(i)
1326       slices = TRIM( slices ) // ' ' // TRIM( coor_chr )
1327
1328       WRITE (coor_chr,'(F7.1)')  pt_vertical_gradient_level(i)
1329       coordinates = TRIM( coordinates ) // ' '  // TRIM( coor_chr )
1330
1331       IF ( i == 10 )  THEN
1332          EXIT
1333       ELSE
1334          i = i + 1
1335       ENDIF
1336
1337    ENDDO
1338
1339    WRITE ( io, 420 )  TRIM( coordinates ), TRIM( temperatures ), &
1340                       TRIM( gradients ), TRIM( slices )
1341
1342!
1343!-- Initial humidity profile
1344!-- Building output strings, starting with surface humidity
1345    IF ( humidity  .OR.  passive_scalar )  THEN
1346       WRITE ( temperatures, '(E8.1)' )  q_surface
1347       gradients = '--------'
1348       slices = '       0'
1349       coordinates = '     0.0'
1350       i = 1
1351       DO  WHILE ( q_vertical_gradient_level_ind(i) /= -9999 )
1352         
1353          WRITE (coor_chr,'(E8.1,4X)')  q_init(q_vertical_gradient_level_ind(i))
1354          temperatures = TRIM( temperatures ) // '  ' // TRIM( coor_chr )
1355
1356          WRITE (coor_chr,'(E8.1,4X)')  q_vertical_gradient(i)
1357          gradients = TRIM( gradients ) // '  ' // TRIM( coor_chr )
1358         
1359          WRITE (coor_chr,'(I8,4X)')  q_vertical_gradient_level_ind(i)
1360          slices = TRIM( slices ) // '  ' // TRIM( coor_chr )
1361         
1362          WRITE (coor_chr,'(F8.1,4X)')  q_vertical_gradient_level(i)
1363          coordinates = TRIM( coordinates ) // '  '  // TRIM( coor_chr )
1364
1365          IF ( i == 10 )  THEN
1366             EXIT
1367          ELSE
1368             i = i + 1
1369          ENDIF
1370
1371       ENDDO
1372
1373       IF ( humidity )  THEN
1374          WRITE ( io, 421 )  TRIM( coordinates ), TRIM( temperatures ), &
1375                             TRIM( gradients ), TRIM( slices )
1376       ELSE
1377          WRITE ( io, 422 )  TRIM( coordinates ), TRIM( temperatures ), &
1378                             TRIM( gradients ), TRIM( slices )
1379       ENDIF
1380    ENDIF
1381
1382!
1383!-- Initial salinity profile
1384!-- Building output strings, starting with surface salinity
1385    IF ( ocean )  THEN
1386       WRITE ( temperatures, '(F6.2)' )  sa_surface
1387       gradients = '------'
1388       slices = '     0'
1389       coordinates = '   0.0'
1390       i = 1
1391       DO  WHILE ( sa_vertical_gradient_level_ind(i) /= -9999 )
1392
1393          WRITE (coor_chr,'(F7.2)')  sa_init(sa_vertical_gradient_level_ind(i))
1394          temperatures = TRIM( temperatures ) // ' ' // TRIM( coor_chr )
1395
1396          WRITE (coor_chr,'(F7.2)')  sa_vertical_gradient(i)
1397          gradients = TRIM( gradients ) // ' ' // TRIM( coor_chr )
1398
1399          WRITE (coor_chr,'(I7)')  sa_vertical_gradient_level_ind(i)
1400          slices = TRIM( slices ) // ' ' // TRIM( coor_chr )
1401
1402          WRITE (coor_chr,'(F7.1)')  sa_vertical_gradient_level(i)
1403          coordinates = TRIM( coordinates ) // ' '  // TRIM( coor_chr )
1404
1405          IF ( i == 10 )  THEN
1406             EXIT
1407          ELSE
1408             i = i + 1
1409          ENDIF
1410
1411       ENDDO
1412
1413       WRITE ( io, 425 )  TRIM( coordinates ), TRIM( temperatures ), &
1414                          TRIM( gradients ), TRIM( slices )
1415    ENDIF
1416
1417!
1418!-- Profile for the large scale vertial velocity
1419!-- Building output strings, starting with surface value
1420    IF ( large_scale_subsidence )  THEN
1421       temperatures = '   0.0'
1422       gradients = '------'
1423       slices = '     0'
1424       coordinates = '   0.0'
1425       i = 1
1426       DO  WHILE ( subs_vertical_gradient_level_i(i) /= -9999 )
1427
1428          WRITE (coor_chr,'(E10.2,7X)')  &
1429                                w_subs(subs_vertical_gradient_level_i(i))
1430          temperatures = TRIM( temperatures ) // ' ' // TRIM( coor_chr )
1431
1432          WRITE (coor_chr,'(E10.2,7X)')  subs_vertical_gradient(i)
1433          gradients = TRIM( gradients ) // ' ' // TRIM( coor_chr )
1434
1435          WRITE (coor_chr,'(I10,7X)')  subs_vertical_gradient_level_i(i)
1436          slices = TRIM( slices ) // ' ' // TRIM( coor_chr )
1437
1438          WRITE (coor_chr,'(F10.2,7X)')  subs_vertical_gradient_level(i)
1439          coordinates = TRIM( coordinates ) // ' '  // TRIM( coor_chr )
1440
1441          IF ( i == 10 )  THEN
1442             EXIT
1443          ELSE
1444             i = i + 1
1445          ENDIF
1446
1447       ENDDO
1448
1449       WRITE ( io, 426 )  TRIM( coordinates ), TRIM( temperatures ), &
1450                          TRIM( gradients ), TRIM( slices )
1451    ENDIF
1452
1453!
1454!-- Cloud physcis parameters / quantities / numerical methods
1455    WRITE ( io, 430 )
1456    IF ( humidity .AND. .NOT. cloud_physics .AND. .NOT. cloud_droplets)  THEN
1457       WRITE ( io, 431 )
1458    ELSEIF ( humidity  .AND.  cloud_physics )  THEN
1459       WRITE ( io, 432 )
1460       IF ( radiation )      WRITE ( io, 132 )
1461       IF ( precipitation )  WRITE ( io, 133 )
1462    ELSEIF ( humidity  .AND.  cloud_droplets )  THEN
1463       WRITE ( io, 433 )
1464       IF ( curvature_solution_effects )  WRITE ( io, 434 )
1465       IF ( collision_kernel /= 'none' )  THEN
1466          WRITE ( io, 435 )  TRIM( collision_kernel )
1467          IF ( collision_kernel(6:9) == 'fast' )  THEN
1468             WRITE ( io, 436 )  radius_classes, dissipation_classes
1469          ENDIF
1470       ELSE
1471          WRITE ( io, 437 )
1472       ENDIF
1473    ENDIF
1474
1475!
1476!-- LES / turbulence parameters
1477    WRITE ( io, 450 )
1478
1479!--
1480! ... LES-constants used must still be added here
1481!--
1482    IF ( constant_diffusion )  THEN
1483       WRITE ( io, 451 )  km_constant, km_constant/prandtl_number, &
1484                          prandtl_number
1485    ENDIF
1486    IF ( .NOT. constant_diffusion)  THEN
1487       IF ( e_init > 0.0 )  WRITE ( io, 455 )  e_init
1488       IF ( e_min > 0.0 )  WRITE ( io, 454 )  e_min
1489       IF ( wall_adjustment )  WRITE ( io, 453 )  wall_adjustment_factor
1490    ENDIF
1491
1492!
1493!-- Special actions during the run
1494    WRITE ( io, 470 )
1495    IF ( create_disturbances )  THEN
1496       WRITE ( io, 471 )  dt_disturb, disturbance_amplitude,                   &
1497                          zu(disturbance_level_ind_b), disturbance_level_ind_b,&
1498                          zu(disturbance_level_ind_t), disturbance_level_ind_t
1499       IF ( .NOT. bc_lr_cyc  .OR.  .NOT. bc_ns_cyc )  THEN
1500          WRITE ( io, 472 )  inflow_disturbance_begin, inflow_disturbance_end
1501       ELSE
1502          WRITE ( io, 473 )  disturbance_energy_limit
1503       ENDIF
1504       WRITE ( io, 474 )  TRIM( random_generator )
1505    ENDIF
1506    IF ( pt_surface_initial_change /= 0.0 )  THEN
1507       WRITE ( io, 475 )  pt_surface_initial_change
1508    ENDIF
1509    IF ( humidity  .AND.  q_surface_initial_change /= 0.0 )  THEN
1510       WRITE ( io, 476 )  q_surface_initial_change       
1511    ENDIF
1512    IF ( passive_scalar  .AND.  q_surface_initial_change /= 0.0 )  THEN
1513       WRITE ( io, 477 )  q_surface_initial_change       
1514    ENDIF
1515
1516    IF ( particle_advection )  THEN
1517!
1518!--    Particle attributes
1519       WRITE ( io, 480 )  particle_advection_start, dt_prel, bc_par_lr, &
1520                          bc_par_ns, bc_par_b, bc_par_t, particle_maximum_age, &
1521                          end_time_prel, dt_sort_particles
1522       IF ( use_sgs_for_particles )  WRITE ( io, 488 )  dt_min_part
1523       IF ( random_start_position )  WRITE ( io, 481 )
1524       IF ( particles_per_point > 1 )  WRITE ( io, 489 )  particles_per_point
1525       WRITE ( io, 495 )  total_number_of_particles
1526       IF ( use_particle_tails  .AND.  maximum_number_of_tailpoints /= 0 )  THEN
1527          WRITE ( io, 483 )  maximum_number_of_tailpoints
1528          IF ( minimum_tailpoint_distance /= 0 )  THEN
1529             WRITE ( io, 484 )  total_number_of_tails,      &
1530                                minimum_tailpoint_distance, &
1531                                maximum_tailpoint_age
1532          ENDIF
1533       ENDIF
1534       IF ( dt_write_particle_data /= 9999999.9 )  THEN
1535          WRITE ( io, 485 )  dt_write_particle_data
1536          output_format = ' '
1537          IF ( netcdf_output )  THEN
1538             IF ( netcdf_data_format > 1 )  THEN
1539                output_format = 'netcdf (64 bit offset) and binary'
1540             ELSE
1541                output_format = 'netcdf and binary'
1542             ENDIF
1543          ELSE
1544             output_format = 'binary'
1545          ENDIF
1546          WRITE ( io, 344 )  output_format
1547       ENDIF
1548       IF ( dt_dopts /= 9999999.9 )  WRITE ( io, 494 )  dt_dopts
1549       IF ( write_particle_statistics )  WRITE ( io, 486 )
1550
1551       WRITE ( io, 487 )  number_of_particle_groups
1552
1553       DO  i = 1, number_of_particle_groups
1554          IF ( i == 1  .AND.  density_ratio(i) == 9999999.9 )  THEN
1555             WRITE ( io, 490 )  i, 0.0
1556             WRITE ( io, 492 )
1557          ELSE
1558             WRITE ( io, 490 )  i, radius(i)
1559             IF ( density_ratio(i) /= 0.0 )  THEN
1560                WRITE ( io, 491 )  density_ratio(i)
1561             ELSE
1562                WRITE ( io, 492 )
1563             ENDIF
1564          ENDIF
1565          WRITE ( io, 493 )  psl(i), psr(i), pss(i), psn(i), psb(i), pst(i), &
1566                             pdx(i), pdy(i), pdz(i)
1567          IF ( .NOT. vertical_particle_advection(i) )  WRITE ( io, 482 )
1568       ENDDO
1569
1570    ENDIF
1571
1572
1573!
1574!-- Parameters of 1D-model
1575    IF ( INDEX( initializing_actions, 'set_1d-model_profiles' ) /= 0 )  THEN
1576       WRITE ( io, 500 )  end_time_1d, dt_run_control_1d, dt_pr_1d, &
1577                          mixing_length_1d, dissipation_1d
1578       IF ( damp_level_ind_1d /= nzt+1 )  THEN
1579          WRITE ( io, 502 )  zu(damp_level_ind_1d), damp_level_ind_1d
1580       ENDIF
1581    ENDIF
1582
1583!
1584!-- User-defined informations
1585    CALL user_header( io )
1586
1587    WRITE ( io, 99 )
1588
1589!
1590!-- Write buffer contents to disc immediately
1591    CALL local_flush( io )
1592
1593!
1594!-- Here the FORMATs start
1595
1596 99 FORMAT (1X,78('-'))
1597100 FORMAT (/1X,'******************************',6X,42('-')/        &
1598            1X,'* ',A,' *',6X,A/                               &
1599            1X,'******************************',6X,42('-'))
1600101 FORMAT (37X,'coupled run using MPI-',I1,': ',A/ &
1601            37X,42('-'))
1602102 FORMAT (/' Date:                 ',A8,6X,'Run:       ',A20/      &
1603            ' Time:                 ',A8,6X,'Run-No.:   ',I2.2/     &
1604            ' Run on host:        ',A10)
1605#if defined( __parallel )
1606103 FORMAT (' Number of PEs:',10X,I6,6X,'Processor grid (x,y): (',I3,',',I3, &
1607              ')',1X,A)
1608104 FORMAT (' Number of PEs:',8X,I5,9X,'Tasks:',I4,'   threads per task:',I4/ &
1609              37X,'Processor grid (x,y): (',I3,',',I3,')',1X,A)
1610105 FORMAT (37X,'One additional PE is used to handle'/37X,'the dvrp output!')
1611106 FORMAT (37X,'A 1d-decomposition along x is forced'/ &
1612            37X,'because the job is running on an SMP-cluster')
1613107 FORMAT (37X,'A 1d-decomposition along ',A,' is used')
1614108 FORMAT (37X,'Max. # of parallel I/O streams is ',I5)
1615109 FORMAT (37X,'Precursor run for coupled atmos-ocean run'/ &
1616            37X,42('-'))
1617114 FORMAT (37X,'Coupled atmosphere-ocean run following'/ &
1618            37X,'independent precursor runs'/             &
1619            37X,42('-'))
1620117 FORMAT (' Accelerator boards / node:  ',I2)
1621#endif
1622110 FORMAT (/' Numerical Schemes:'/ &
1623             ' -----------------'/)
1624111 FORMAT (' --> Solve perturbation pressure via FFT using ',A,' routines')
1625112 FORMAT (' --> Solve perturbation pressure via SOR-Red/Black-Schema'/ &
1626            '     Iterations (initial/other): ',I3,'/',I3,'  omega = ',F5.3)
1627113 FORMAT (' --> Momentum advection via Piascek-Williams-Scheme (Form C3)', &
1628                  ' or Upstream')
1629116 FORMAT (' --> Scalar advection via Piascek-Williams-Scheme (Form C3)', &
1630                  ' or Upstream')
1631118 FORMAT (' --> Scalar advection via Bott-Chlond-Scheme')
1632119 FORMAT (' --> Galilei-Transform applied to horizontal advection:'/ &
1633            '     translation velocity = ',A/ &
1634            '     distance advected ',A,':  ',F8.3,' km(x)  ',F8.3,' km(y)')
1635120 FORMAT (' Accelerator boards: ',8X,I2)
1636122 FORMAT (' --> Time differencing scheme: ',A)
1637123 FORMAT (' --> Rayleigh-Damping active, starts ',A,' z = ',F8.2,' m'/ &
1638            '     maximum damping coefficient: ',F5.3, ' 1/s')
1639129 FORMAT (' --> Additional prognostic equation for the specific humidity')
1640130 FORMAT (' --> Additional prognostic equation for the total water content')
1641131 FORMAT (' --> No pt-equation solved. Neutral stratification with pt = ', &
1642                  F6.2, ' K assumed')
1643132 FORMAT ('     Parameterization of long-wave radiation processes via'/ &
1644            '     effective emissivity scheme')
1645133 FORMAT ('     Precipitation parameterization via Kessler-Scheme')
1646134 FORMAT (' --> Additional prognostic equation for a passive scalar')
1647135 FORMAT (' --> Solve perturbation pressure via multigrid method (', &
1648                  A,'-cycle)'/ &
1649            '     number of grid levels:                   ',I2/ &
1650            '     Gauss-Seidel red/black iterations:       ',I2)
1651136 FORMAT ('     gridpoints of coarsest subdomain (x,y,z): (',I3,',',I3,',', &
1652                  I3,')')
1653137 FORMAT ('     level data gathered on PE0 at level:     ',I2/ &
1654            '     gridpoints of coarsest subdomain (x,y,z): (',I3,',',I3,',', &
1655                  I3,')'/ &
1656            '     gridpoints of coarsest domain (x,y,z):    (',I3,',',I3,',', &
1657                  I3,')')
1658138 FORMAT ('     Using hybrid version for 1d-domain-decomposition')
1659139 FORMAT (' --> Loop optimization method: ',A)
1660140 FORMAT ('     maximum residual allowed:                ',E10.3)
1661141 FORMAT ('     fixed number of multigrid cycles:        ',I4)
1662142 FORMAT ('     perturbation pressure is calculated at every Runge-Kutta ', &
1663                  'step')
1664143 FORMAT ('     Euler/upstream scheme is used for the SGS turbulent ', &
1665                  'kinetic energy')
1666144 FORMAT ('     masking method is used')
1667150 FORMAT (' --> Volume flow at the right and north boundary will be ', &
1668                  'conserved'/ &
1669            '     using the ',A,' mode')
1670151 FORMAT ('     with u_bulk = ',F7.3,' m/s and v_bulk = ',F7.3,' m/s')
1671152 FORMAT (' --> External pressure gradient directly prescribed by the user:',&
1672           /'     ',2(1X,E12.5),'Pa/m in x/y direction', &
1673           /'     starting from dp_level_b =', F8.3, 'm', A /)
1674153 FORMAT (' --> Large-scale vertical motion is used in the ', &
1675                  'prognostic equation for')
1676154 FORMAT ('     the potential temperature')
1677200 FORMAT (//' Run time and time step information:'/ &
1678             ' ----------------------------------'/)
1679201 FORMAT ( ' Timestep:             variable     maximum value: ',F6.3,' s', &
1680             '    CFL-factor: ',F4.2)
1681202 FORMAT ( ' Timestep:          dt = ',F6.3,' s'/)
1682203 FORMAT ( ' Start time:          ',F9.3,' s'/ &
1683             ' End time:            ',F9.3,' s')
1684204 FORMAT ( A,F9.3,' s')
1685205 FORMAT ( A,F9.3,' s',5X,'restart every',17X,F9.3,' s')
1686206 FORMAT (/' Time reached:        ',F9.3,' s'/ &
1687             ' CPU-time used:       ',F9.3,' s     per timestep:               ', &
1688               '  ',F9.3,' s'/                                                    &
1689             '                                      per second of simulated tim', &
1690               'e: ',F9.3,' s')
1691207 FORMAT ( ' Coupling start time: ',F9.3,' s')
1692250 FORMAT (//' Computational grid and domain size:'/ &
1693              ' ----------------------------------'// &
1694              ' Grid length:      dx =    ',F7.3,' m    dy =    ',F7.3, &
1695              ' m    dz =    ',F7.3,' m'/ &
1696              ' Domain size:       x = ',F10.3,' m     y = ',F10.3, &
1697              ' m  z(u) = ',F10.3,' m'/)
1698252 FORMAT (' dz constant up to ',F10.3,' m (k=',I4,'), then stretched by', &
1699              ' factor: ',F5.3/ &
1700            ' maximum dz not to be exceeded is dz_max = ',F10.3,' m'/)
1701254 FORMAT (' Number of gridpoints (x,y,z):  (0:',I4,', 0:',I4,', 0:',I4,')'/ &
1702            ' Subdomain size (x,y,z):        (  ',I4,',   ',I4,',   ',I4,')'/)
1703260 FORMAT (/' The model has a slope in x-direction. Inclination angle: ',F6.2,&
1704             ' degrees')
1705270 FORMAT (//' Topography informations:'/ &
1706              ' -----------------------'// &
1707              1X,'Topography: ',A)
1708271 FORMAT (  ' Building size (x/y/z) in m: ',F5.1,' / ',F5.1,' / ',F5.1/ &
1709              ' Horizontal index bounds (l/r/s/n): ',I4,' / ',I4,' / ',I4, &
1710                ' / ',I4)
1711272 FORMAT (  ' Single quasi-2D street canyon of infinite length in ',A, &
1712              ' direction' / &
1713              ' Canyon height: ', F6.2, 'm, ch = ', I4, '.'      / &
1714              ' Canyon position (',A,'-walls): cxl = ', I4,', cxr = ', I4, '.')
1715278 FORMAT (' Topography grid definition convention:'/ &
1716            ' cell edge (staggered grid points'/  &
1717            ' (u in x-direction, v in y-direction))' /)
1718279 FORMAT (' Topography grid definition convention:'/ &
1719            ' cell center (scalar grid points)' /)
1720280 FORMAT (//' Vegetation canopy (drag) model:'/ &
1721              ' ------------------------------'// &
1722              ' Canopy mode: ', A / &
1723              ' Canopy top: ',I4 / &
1724              ' Leaf drag coefficient: ',F6.2 /)
1725281 FORMAT (/ ' Scalar_exchange_coefficient: ',F6.2 / &
1726              ' Scalar concentration at leaf surfaces in kg/m**3: ',F6.2 /)
1727282 FORMAT (' Predefined constant heatflux at the top of the vegetation: ',F6.2,' K m/s')
1728283 FORMAT (/ ' Characteristic levels of the leaf area density:'// &
1729              ' Height:              ',A,'  m'/ &
1730              ' Leaf area density:   ',A,'  m**2/m**3'/ &
1731              ' Gradient:            ',A,'  m**2/m**4'/ &
1732              ' Gridpoint:           ',A)
1733               
1734300 FORMAT (//' Boundary conditions:'/ &
1735             ' -------------------'// &
1736             '                     p                    uv             ', &
1737             '                   pt'// &
1738             ' B. bound.: ',A/ &
1739             ' T. bound.: ',A)
1740301 FORMAT (/'                     ',A// &
1741             ' B. bound.: ',A/ &
1742             ' T. bound.: ',A)
1743303 FORMAT (/' Bottom surface fluxes are used in diffusion terms at k=1')
1744304 FORMAT (/' Top surface fluxes are used in diffusion terms at k=nzt')
1745305 FORMAT (//'    Prandtl-Layer between bottom surface and first ', &
1746               'computational u,v-level:'// &
1747             '       zp = ',F6.2,' m   z0 = ',F6.4,' m   z0h = ',F7.5,&
1748             ' m   kappa = ',F4.2/ &
1749             '       Rif value range:   ',F6.2,' <= rif <=',F6.2)
1750306 FORMAT ('       Predefined constant heatflux:   ',F9.6,' K m/s')
1751307 FORMAT ('       Heatflux has a random normal distribution')
1752308 FORMAT ('       Predefined surface temperature')
1753309 FORMAT ('       Predefined constant salinityflux:   ',F9.6,' psu m/s')
1754310 FORMAT (//'    1D-Model:'// &
1755             '       Rif value range:   ',F6.2,' <= rif <=',F6.2)
1756311 FORMAT ('       Predefined constant humidity flux: ',E10.3,' m/s')
1757312 FORMAT ('       Predefined surface humidity')
1758313 FORMAT ('       Predefined constant scalar flux: ',E10.3,' kg/(m**2 s)')
1759314 FORMAT ('       Predefined scalar value at the surface')
1760315 FORMAT ('       Humidity / scalar flux at top surface is 0.0')
1761316 FORMAT ('       Sensible heatflux and momentum flux from coupled ', &
1762                    'atmosphere model')
1763317 FORMAT (//' Lateral boundaries:'/ &
1764            '       left/right:  ',A/    &
1765            '       north/south: ',A)
1766318 FORMAT (/'       pt damping layer width = ',F7.2,' m, pt ', &
1767                    'damping factor = ',F6.4)
1768319 FORMAT ('       turbulence recycling at inflow switched on'/ &
1769            '       width of recycling domain: ',F7.1,' m   grid index: ',I4/ &
1770            '       inflow damping height: ',F6.1,' m   width: ',F6.1,' m')
1771320 FORMAT ('       Predefined constant momentumflux:  u: ',F9.6,' m**2/s**2'/ &
1772            '                                          v: ',F9.6,' m**2/s**2')
1773325 FORMAT (//' List output:'/ &
1774             ' -----------'//  &
1775            '    1D-Profiles:'/    &
1776            '       Output every             ',F8.2,' s')
1777326 FORMAT ('       Time averaged over       ',F8.2,' s'/ &
1778            '       Averaging input every    ',F8.2,' s')
1779330 FORMAT (//' Data output:'/ &
1780             ' -----------'/)
1781331 FORMAT (/'    1D-Profiles:')
1782332 FORMAT (/'       ',A)
1783333 FORMAT ('       Output every             ',F8.2,' s',/ &
1784            '       Time averaged over       ',F8.2,' s'/ &
1785            '       Averaging input every    ',F8.2,' s')
1786334 FORMAT (/'    2D-Arrays',A,':')
1787335 FORMAT (/'       ',A2,'-cross-section  Arrays: ',A/ &
1788            '       Output every             ',F8.2,' s  ',A/ &
1789            '       Cross sections at ',A1,' = ',A/ &
1790            '       scalar-coordinates:   ',A,' m'/)
1791336 FORMAT (/'    3D-Arrays',A,':')
1792337 FORMAT (/'       Arrays: ',A/ &
1793            '       Output every             ',F8.2,' s  ',A/ &
1794            '       Upper output limit at    ',F8.2,' m  (GP ',I4,')'/)
1795338 FORMAT ('       Compressed data output'/ &
1796            '       Decimal precision: ',A/)
1797339 FORMAT ('       No output during initial ',F8.2,' s')
1798340 FORMAT (/'    Time series:')
1799341 FORMAT ('       Output every             ',F8.2,' s'/)
1800342 FORMAT (/'       ',A2,'-cross-section  Arrays: ',A/ &
1801            '       Output every             ',F8.2,' s  ',A/ &
1802            '       Time averaged over       ',F8.2,' s'/ &
1803            '       Averaging input every    ',F8.2,' s'/ &
1804            '       Cross sections at ',A1,' = ',A/ &
1805            '       scalar-coordinates:   ',A,' m'/)
1806343 FORMAT (/'       Arrays: ',A/ &
1807            '       Output every             ',F8.2,' s  ',A/ &
1808            '       Time averaged over       ',F8.2,' s'/ &
1809            '       Averaging input every    ',F8.2,' s'/ &
1810            '       Upper output limit at    ',F8.2,' m  (GP ',I4,')'/)
1811344 FORMAT ('       Output format: ',A/)
1812345 FORMAT (/'    Scaling lengths for output locations of all subsequent mask IDs:',/ &
1813            '       mask_scale_x (in x-direction): ',F9.3, ' m',/ &
1814            '       mask_scale_y (in y-direction): ',F9.3, ' m',/ &
1815            '       mask_scale_z (in z-direction): ',F9.3, ' m' )
1816346 FORMAT (/'    Masked data output',A,' for mask ID ',I2, ':')
1817347 FORMAT ('       Variables: ',A/ &
1818            '       Output every             ',F8.2,' s')
1819348 FORMAT ('       Variables: ',A/ &
1820            '       Output every             ',F8.2,' s'/ &
1821            '       Time averaged over       ',F8.2,' s'/ &
1822            '       Averaging input every    ',F8.2,' s')
1823349 FORMAT (/'       Output locations in ',A,'-direction in multiples of ', &
1824            'mask_scale_',A,' predefined by array mask_',I2.2,'_',A,':'/ &
1825            13('       ',8(F8.2,',')/) )
1826350 FORMAT (/'       Output locations in ',A,'-direction: ', &
1827            'all gridpoints along ',A,'-direction (default).' )
1828351 FORMAT (/'       Output locations in ',A,'-direction in multiples of ', &
1829            'mask_scale_',A,' constructed from array mask_',I2.2,'_',A,'_loop:'/ &
1830            '          loop begin:',F8.2,', end:',F8.2,', stride:',F8.2 )
1831#if defined( __dvrp_graphics )
1832360 FORMAT ('    Plot-Sequence with dvrp-software:'/ &
1833            '       Output every      ',F7.1,' s'/ &
1834            '       Output mode:      ',A/ &
1835            '       Host / User:      ',A,' / ',A/ &
1836            '       Directory:        ',A// &
1837            '       The sequence contains:')
1838361 FORMAT (/'       Isosurface of "',A,'"    Threshold value: ', E12.3/ &
1839            '          Isosurface color: (',F4.2,',',F4.2,',',F4.2,') (R,G,B)')
1840362 FORMAT (/'       Slicer plane ',A/ &
1841            '       Slicer limits: [',F6.2,',',F6.2,']')
1842363 FORMAT (/'       Particles'/ &
1843            '          particle size:  ',F7.2,' m')
1844364 FORMAT ('          particle ',A,' controlled by "',A,'" with interval [', &
1845                       F6.2,',',F6.2,']')
1846365 FORMAT (/'       Groundplate color: (',F4.2,',',F4.2,',',F4.2,') (R,G,B)'/ &
1847            '       Superelevation along (x,y,z): (',F4.1,',',F4.1,',',F4.1, &
1848                     ')'/ &
1849            '       Clipping limits: from x = ',F9.1,' m to x = ',F9.1,' m'/ &
1850            '                        from y = ',F9.1,' m to y = ',F9.1,' m')
1851366 FORMAT (/'       Topography color: (',F4.2,',',F4.2,',',F4.2,') (R,G,B)')
1852367 FORMAT ('       Polygon reduction for topography: cluster_size = ', I1)
1853#endif
1854#if defined( __spectra )
1855370 FORMAT ('    Spectra:')
1856371 FORMAT ('       Output every ',F7.1,' s'/)
1857372 FORMAT ('       Arrays:     ', 10(A5,',')/                         &
1858            '       Directions: ', 10(A5,',')/                         &
1859            '       height levels  k = ', 20(I3,',')/                  &
1860            '                          ', 20(I3,',')/                  &
1861            '                          ', 20(I3,',')/                  &
1862            '                          ', 20(I3,',')/                  &
1863            '                          ', 19(I3,','),I3,'.'/           &
1864            '       height levels selected for standard plot:'/        &
1865            '                      k = ', 20(I3,',')/                  &
1866            '                          ', 20(I3,',')/                  &
1867            '                          ', 20(I3,',')/                  &
1868            '                          ', 20(I3,',')/                  &
1869            '                          ', 19(I3,','),I3,'.'/           &
1870            '       Time averaged over ', F7.1, ' s,' /                &
1871            '       Profiles for the time averaging are taken every ', &
1872                    F6.1,' s')
1873#endif
1874400 FORMAT (//' Physical quantities:'/ &
1875              ' -------------------'/)
1876410 FORMAT ('    Angular velocity    :   omega = ',E9.3,' rad/s'/  &
1877            '    Geograph. latitude  :   phi   = ',F4.1,' degr'/   &
1878            '    Coriolis parameter  :   f     = ',F9.6,' 1/s'/    &
1879            '                            f*    = ',F9.6,' 1/s')
1880411 FORMAT (/'    Gravity             :   g     = ',F4.1,' m/s**2')
1881412 FORMAT (/'    Reference density in buoyancy terms: ',F8.3,' kg/m**3')
1882413 FORMAT (/'    Reference temperature in buoyancy terms: ',F8.4,' K')
1883415 FORMAT (/'    Cloud physics parameters:'/ &
1884             '    ------------------------'/)
1885416 FORMAT ('        Surface pressure   :   p_0   = ',F7.2,' hPa'/      &
1886            '        Gas constant       :   R     = ',F5.1,' J/(kg K)'/ &
1887            '        Density of air     :   rho_0 = ',F5.3,' kg/m**3'/  &
1888            '        Specific heat cap. :   c_p   = ',F6.1,' J/(kg K)'/ &
1889            '        Vapourization heat :   L_v   = ',E8.2,' J/kg')
1890420 FORMAT (/'    Characteristic levels of the initial temperature profile:'// &
1891            '       Height:        ',A,'  m'/ &
1892            '       Temperature:   ',A,'  K'/ &
1893            '       Gradient:      ',A,'  K/100m'/ &
1894            '       Gridpoint:     ',A)
1895421 FORMAT (/'    Characteristic levels of the initial humidity profile:'// &
1896            '       Height:      ',A,'  m'/ &
1897            '       Humidity:    ',A,'  kg/kg'/ &
1898            '       Gradient:    ',A,'  (kg/kg)/100m'/ &
1899            '       Gridpoint:   ',A)
1900422 FORMAT (/'    Characteristic levels of the initial scalar profile:'// &
1901            '       Height:                  ',A,'  m'/ &
1902            '       Scalar concentration:    ',A,'  kg/m**3'/ &
1903            '       Gradient:                ',A,'  (kg/m**3)/100m'/ &
1904            '       Gridpoint:               ',A)
1905423 FORMAT (/'    Characteristic levels of the geo. wind component ug:'// &
1906            '       Height:      ',A,'  m'/ &
1907            '       ug:          ',A,'  m/s'/ &
1908            '       Gradient:    ',A,'  1/100s'/ &
1909            '       Gridpoint:   ',A)
1910424 FORMAT (/'    Characteristic levels of the geo. wind component vg:'// &
1911            '       Height:      ',A,'  m'/ &
1912            '       vg:          ',A,'  m/s'/ &
1913            '       Gradient:    ',A,'  1/100s'/ &
1914            '       Gridpoint:   ',A)
1915425 FORMAT (/'    Characteristic levels of the initial salinity profile:'// &
1916            '       Height:     ',A,'  m'/ &
1917            '       Salinity:   ',A,'  psu'/ &
1918            '       Gradient:   ',A,'  psu/100m'/ &
1919            '       Gridpoint:  ',A)
1920426 FORMAT (/'    Characteristic levels of the subsidence/ascent profile:'// &
1921            '       Height:      ',A,'  m'/ &
1922            '       w_subs:      ',A,'  m/s'/ &
1923            '       Gradient:    ',A,'  (m/s)/100m'/ &
1924            '       Gridpoint:   ',A)
1925427 FORMAT (/'    Initial wind profiles (u,v) are interpolated from given'// &
1926                  ' profiles')
1927430 FORMAT (//' Cloud physics quantities / methods:'/ &
1928              ' ----------------------------------'/)
1929431 FORMAT ('    Humidity is treated as purely passive scalar (no condensati', &
1930                 'on)')
1931432 FORMAT ('    Bulk scheme with liquid water potential temperature and'/ &
1932            '    total water content is used.'/ &
1933            '    Condensation is parameterized via 0% - or 100% scheme.')
1934433 FORMAT ('    Cloud droplets treated explicitly using the Lagrangian part', &
1935                 'icle model')
1936434 FORMAT ('    Curvature and solution effecs are considered for growth of', &
1937                 ' droplets < 1.0E-6 m')
1938435 FORMAT ('    Droplet collision is handled by ',A,'-kernel')
1939436 FORMAT ('       Fast kernel with fixed radius- and dissipation classes ', &
1940                    'are used'/ &
1941            '          number of radius classes:       ',I3,'    interval ', &
1942                       '[1.0E-6,2.0E-4] m'/ &
1943            '          number of dissipation classes:   ',I2,'    interval ', &
1944                       '[0,1000] cm**2/s**3')
1945437 FORMAT ('    Droplet collision is switched off')
1946450 FORMAT (//' LES / Turbulence quantities:'/ &
1947              ' ---------------------------'/)
1948451 FORMAT ('    Diffusion coefficients are constant:'/ &
1949            '    Km = ',F6.2,' m**2/s   Kh = ',F6.2,' m**2/s   Pr = ',F5.2)
1950453 FORMAT ('    Mixing length is limited to ',F4.2,' * z')
1951454 FORMAT ('    TKE is not allowed to fall below ',E9.2,' (m/s)**2')
1952455 FORMAT ('    initial TKE is prescribed as ',E9.2,' (m/s)**2')
1953470 FORMAT (//' Actions during the simulation:'/ &
1954              ' -----------------------------'/)
1955471 FORMAT ('    Disturbance impulse (u,v) every :   ',F6.2,' s'/            &
1956            '    Disturbance amplitude           :     ',F4.2, ' m/s'/       &
1957            '    Lower disturbance level         : ',F8.2,' m (GP ',I4,')'/  &
1958            '    Upper disturbance level         : ',F8.2,' m (GP ',I4,')')
1959472 FORMAT ('    Disturbances continued during the run from i/j =',I4, &
1960                 ' to i/j =',I4)
1961473 FORMAT ('    Disturbances cease as soon as the disturbance energy exceeds',&
1962                 1X,F5.3, ' m**2/s**2')
1963474 FORMAT ('    Random number generator used    : ',A/)
1964475 FORMAT ('    The surface temperature is increased (or decreased, ', &
1965                 'respectively, if'/ &
1966            '    the value is negative) by ',F5.2,' K at the beginning of the',&
1967                 ' 3D-simulation'/)
1968476 FORMAT ('    The surface humidity is increased (or decreased, ',&
1969                 'respectively, if the'/ &
1970            '    value is negative) by ',E8.1,' kg/kg at the beginning of', &
1971                 ' the 3D-simulation'/)
1972477 FORMAT ('    The scalar value is increased at the surface (or decreased, ',&
1973                 'respectively, if the'/ &
1974            '    value is negative) by ',E8.1,' kg/m**3 at the beginning of', &
1975                 ' the 3D-simulation'/)
1976480 FORMAT ('    Particles:'/ &
1977            '    ---------'// &
1978            '       Particle advection is active (switched on at t = ', F7.1, &
1979                    ' s)'/ &
1980            '       Start of new particle generations every  ',F6.1,' s'/ &
1981            '       Boundary conditions: left/right: ', A, ' north/south: ', A/&
1982            '                            bottom:     ', A, ' top:         ', A/&
1983            '       Maximum particle age:                 ',F9.1,' s'/ &
1984            '       Advection stopped at t = ',F9.1,' s'/ &
1985            '       Particles are sorted every ',F9.1,' s'/)
1986481 FORMAT ('       Particles have random start positions'/)
1987482 FORMAT ('          Particles are advected only horizontally'/)
1988483 FORMAT ('       Particles have tails with a maximum of ',I3,' points')
1989484 FORMAT ('            Number of tails of the total domain: ',I10/ &
1990            '            Minimum distance between tailpoints: ',F8.2,' m'/ &
1991            '            Maximum age of the end of the tail:  ',F8.2,' s')
1992485 FORMAT ('       Particle data are written on file every ', F9.1, ' s')
1993486 FORMAT ('       Particle statistics are written on file'/)
1994487 FORMAT ('       Number of particle groups: ',I2/)
1995488 FORMAT ('       SGS velocity components are used for particle advection'/ &
1996            '          minimum timestep for advection: ', F7.5/)
1997489 FORMAT ('       Number of particles simultaneously released at each ', &
1998                    'point: ', I5/)
1999490 FORMAT ('       Particle group ',I2,':'/ &
2000            '          Particle radius: ',E10.3, 'm')
2001491 FORMAT ('          Particle inertia is activated'/ &
2002            '             density_ratio (rho_fluid/rho_particle) = ',F5.3/)
2003492 FORMAT ('          Particles are advected only passively (no inertia)'/)
2004493 FORMAT ('          Boundaries of particle source: x:',F8.1,' - ',F8.1,' m'/&
2005            '                                         y:',F8.1,' - ',F8.1,' m'/&
2006            '                                         z:',F8.1,' - ',F8.1,' m'/&
2007            '          Particle distances:  dx = ',F8.1,' m  dy = ',F8.1, &
2008                       ' m  dz = ',F8.1,' m'/)
2009494 FORMAT ('       Output of particle time series in NetCDF format every ', &
2010                    F8.2,' s'/)
2011495 FORMAT ('       Number of particles in total domain: ',I10/)
2012500 FORMAT (//' 1D-Model parameters:'/                           &
2013              ' -------------------'//                           &
2014            '    Simulation time:                   ',F8.1,' s'/ &
2015            '    Run-controll output every:         ',F8.1,' s'/ &
2016            '    Vertical profile output every:     ',F8.1,' s'/ &
2017            '    Mixing length calculation:         ',A/         &
2018            '    Dissipation calculation:           ',A/)
2019502 FORMAT ('    Damping layer starts from ',F7.1,' m (GP ',I4,')'/)
2020503 FORMAT (' --> Momentum advection via Wicker-Skamarock-Scheme 5th order')
2021504 FORMAT (' --> Scalar advection via Wicker-Skamarock-Scheme 5th order')
2022
2023
2024 END SUBROUTINE header
Note: See TracBrowser for help on using the repository browser.