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

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

unused variables remove from several routines

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