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

Last change on this file since 707 was 707, checked in by raasch, 13 years ago

New:
---

In case of multigrid method, on coarse grid levels, gathered data are
identically processed on all PEs (before, on PE0 only), so that the subsequent
scattering of data is not neccessary any more. (modules, init_pegrid, poismg)

Changed:


Calculation of weighted average of p is now handled in the same way
regardless of the number of ghost layers (advection scheme). (pres)

multigrid and sor method are using p_loc for iterative
advancements of pressure. p_sub removed. (init_3d_model, modules, poismg, pres, sor)

bc_lr and bc_ns replaced by bc_lr_dirrad, bc_lr_raddir, bc_ns_dirrad, bc_ns_raddir
for speed optimization. (calc_spectra, check_parameters, exchange_horiz,
exchange_horiz_2d, header, init_3d_model, init_grid, init_pegrid, modules,
poismg, pres, sor, time_integration, timestep)

grid_level directly used as index for MPI data type arrays. (exchange_horiz,
poismg)

initial assignments of zero to array p for iterative solvers only (init_3d_model)

Errors:


localsum calculation modified for proper OpenMP reduction. (pres)

Bugfix: bottom (nzb) and top (nzt+1) boundary conditions set in routines
resid and restrict. They were missed before, which may have led to
unpredictable results. (poismg)

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