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

Last change on this file since 97 was 97, checked in by raasch, 17 years ago

New:
---
ocean version including prognostic equation for salinity and equation of state for seawater. Routine buoyancy can be used with both temperature and density.
+ inipar-parameters bc_sa_t, bottom_salinityflux, ocean, sa_surface, sa_vertical_gradient, sa_vertical_gradient_level, top_salinityflux

advec_s_bc, average_3d_data, boundary_conds, buoyancy, check_parameters, data_output_2d, data_output_3d, diffusion_e, flow_statistics, header, init_grid, init_3d_model, modules, netcdf, parin, production_e, prognostic_equations, read_var_list, sum_up_3d_data, swap_timelevel, time_integration, user_interface, write_var_list, write_3d_binary

New:
eqn_state_seawater, init_ocean

Changed:


inipar-parameter use_pt_reference renamed use_reference

hydro_press renamed hyp, routine calc_mean_pt_profile renamed calc_mean_profile

format adjustments for the ocean version (run_control)

advec_particles, buoyancy, calc_liquid_water_content, check_parameters, diffusion_e, diffusivities, header, init_cloud_physics, modules, production_e, prognostic_equations, run_control

Errors:


Bugfix: height above topography instead of height above level k=0 is used for calculating the mixing length (diffusion_e and diffusivities).

Bugfix: error in boundary condition for TKE removed (advec_s_bc)

advec_s_bc, diffusion_e, prognostic_equations

  • Property svn:keywords set to Id
File size: 57.5 KB
Line 
1 SUBROUTINE header
2
3!------------------------------------------------------------------------------!
4! Actual revisions:
5! -----------------
6! Adjustments for the ocean version.
7! use_pt_reference renamed use_reference
8!
9! Former revisions:
10! -----------------
11! $Id: header.f90 97 2007-06-21 08:23:15Z raasch $
12!
13! 87 2007-05-22 15:46:47Z raasch
14! Bugfix: output of use_upstream_for_tke
15!
16! 82 2007-04-16 15:40:52Z raasch
17! Preprocessor strings for different linux clusters changed to "lc",
18! routine local_flush is used for buffer flushing
19!
20! 76 2007-03-29 00:58:32Z raasch
21! Output of netcdf_64bit_3d, particles-package is now part of the default code,
22! output of the loop optimization method, moisture renamed humidity,
23! output of subversion revision number
24!
25! 19 2007-02-23 04:53:48Z raasch
26! Output of scalar flux applied at top boundary
27!
28! RCS Log replace by Id keyword, revision history cleaned up
29!
30! Revision 1.63  2006/08/22 13:53:13  raasch
31! Output of dz_max
32!
33! Revision 1.1  1997/08/11 06:17:20  raasch
34! Initial revision
35!
36!
37! Description:
38! ------------
39! Writing a header with all important informations about the actual run.
40! This subroutine is called three times, two times at the beginning
41! (writing information on files RUN_CONTROL and HEADER) and one time at the
42! end of the run, then writing additional information about CPU-usage on file
43! header.
44!------------------------------------------------------------------------------!
45
46    USE arrays_3d
47    USE control_parameters
48    USE cloud_parameters
49    USE cpulog
50    USE dvrp_variables
51    USE grid_variables
52    USE indices
53    USE model_1d
54    USE particle_attributes
55    USE pegrid
56    USE spectrum
57
58    IMPLICIT NONE
59
60    CHARACTER (LEN=1)  ::  prec
61    CHARACTER (LEN=2)  ::  do2d_mode
62    CHARACTER (LEN=5)  ::  section_chr
63    CHARACTER (LEN=9)  ::  time_to_string
64    CHARACTER (LEN=10) ::  coor_chr, host_chr
65    CHARACTER (LEN=16) ::  begin_chr
66    CHARACTER (LEN=21) ::  ver_rev
67    CHARACTER (LEN=40) ::  output_format
68    CHARACTER (LEN=70) ::  char1, char2, coordinates, gradients, dopr_chr, &
69                           do2d_xy, do2d_xz, do2d_yz, do3d_chr, &
70                           run_classification, slices, temperatures, &
71                           ugcomponent, vgcomponent
72    CHARACTER (LEN=85) ::  roben, runten
73
74    INTEGER ::  av, bh, blx, bly, bxl, bxr, byn, bys, i, ihost, io, j, l, ll
75    REAL    ::  cpuseconds_per_simulated_second
76
77!
78!-- Open the output file. At the end of the simulation, output is directed
79!-- to unit 19.
80    IF ( ( runnr == 0 .OR. force_print_header )  .AND. &
81         .NOT. simulated_time_at_begin /= simulated_time )  THEN
82       io = 15   !  header output on file RUN_CONTROL
83    ELSE
84       io = 19   !  header output on file HEADER
85    ENDIF
86    CALL check_open( io )
87
88!
89!-- At the end of the run, output file (HEADER) will be rewritten with
90!-- new informations
91    IF ( io == 19 .AND. simulated_time_at_begin /= simulated_time ) REWIND( 19 )
92
93!
94!-- Determine kind of model run
95    IF ( TRIM( initializing_actions ) == 'read_restart_data' )  THEN
96       run_classification = '3D - restart run'
97    ELSE
98       IF ( INDEX( initializing_actions, 'set_constant_profiles' ) /= 0 )  THEN
99          run_classification = '3D - run without 1D - prerun'
100       ELSEIF ( INDEX(initializing_actions, 'set_1d-model_profiles') /= 0 ) THEN
101          run_classification = '3D - run with 1D - prerun'
102       ELSE
103          PRINT*,'+++ header:  unknown action(s): ',initializing_actions
104       ENDIF
105    ENDIF
106    IF ( ocean )  THEN
107       run_classification = 'ocean - ' // run_classification
108    ELSE
109       run_classification = 'atmosphere - ' // run_classification
110    ENDIF
111
112!
113!-- Run-identification, date, time, host
114    host_chr = host(1:10)
115    ver_rev = TRIM( version ) // '  ' // TRIM( revision )
116    WRITE ( io, 100 )  ver_rev, TRIM( run_classification ), run_date, &
117                       run_identifier, run_time, runnr, ADJUSTR( host_chr )
118#if defined( __parallel )
119    IF ( npex == -1  .AND.  pdims(2) /= 1 )  THEN
120       char1 = 'calculated'
121    ELSEIF ( ( host(1:3) == 'ibm'  .OR.  host(1:3) == 'nec'  .OR.  &
122               host(1:2) == 'lc' )  .AND.                          &
123             npex == -1  .AND.  pdims(2) == 1 )  THEN
124       char1 = 'forced'
125    ELSE
126       char1 = 'predefined'
127    ENDIF
128    IF ( threads_per_task == 1 )  THEN
129       WRITE ( io, 101 )  numprocs, pdims(1), pdims(2), TRIM( char1 )
130    ELSE
131       WRITE ( io, 102 )  numprocs*threads_per_task, numprocs, &
132                          threads_per_task, pdims(1), pdims(2), TRIM( char1 )
133    ENDIF
134    IF ( ( host(1:3) == 'ibm'  .OR.  host(1:3) == 'nec'  .OR.    &
135           host(1:2) == 'lc'   .OR.  host(1:3) == 'dec' )  .AND. &
136         npex == -1  .AND.  pdims(2) == 1 )                      &
137    THEN
138       WRITE ( io, 104 )
139    ELSEIF ( pdims(2) == 1 )  THEN
140       WRITE ( io, 105 )  'x'
141    ELSEIF ( pdims(1) == 1 )  THEN
142       WRITE ( io, 105 )  'y'
143    ENDIF
144    IF ( use_seperate_pe_for_dvrp_output )  WRITE ( io, 103 )
145#endif
146    WRITE ( io, 99 )
147
148!
149!-- Numerical schemes
150    WRITE ( io, 110 )
151    IF ( psolver(1:7) == 'poisfft' )  THEN
152       WRITE ( io, 111 )  TRIM( fft_method )
153       IF ( psolver == 'poisfft_hybrid' )  WRITE ( io, 138 )
154    ELSEIF ( psolver == 'sor' )  THEN
155       WRITE ( io, 112 )  nsor_ini, nsor, omega_sor
156    ELSEIF ( psolver == 'multigrid' )  THEN
157       WRITE ( io, 135 )  cycle_mg, maximum_grid_level, ngsrb
158       IF ( mg_cycles == -1 )  THEN
159          WRITE ( io, 140 )  residual_limit
160       ELSE
161          WRITE ( io, 141 )  mg_cycles
162       ENDIF
163       IF ( mg_switch_to_pe0_level == 0 )  THEN
164          WRITE ( io, 136 )  nxr_mg(1)-nxl_mg(1)+1, nyn_mg(1)-nys_mg(1)+1, &
165                             nzt_mg(1)
166       ELSE
167          WRITE ( io, 137 )  mg_switch_to_pe0_level,            &
168                             mg_loc_ind(2,0)-mg_loc_ind(1,0)+1, &
169                             mg_loc_ind(4,0)-mg_loc_ind(3,0)+1, &
170                             nzt_mg(mg_switch_to_pe0_level),    &
171                             nxr_mg(1)-nxl_mg(1)+1, nyn_mg(1)-nys_mg(1)+1, &
172                             nzt_mg(1)
173       ENDIF
174    ENDIF
175    IF ( call_psolver_at_all_substeps  .AND. timestep_scheme(1:5) == 'runge' ) &
176    THEN
177       WRITE ( io, 142 )
178    ENDIF
179
180    IF ( momentum_advec == 'pw-scheme' )  THEN
181       WRITE ( io, 113 )
182    ELSE
183       WRITE ( io, 114 )
184       IF ( cut_spline_overshoot )  WRITE ( io, 124 )
185       IF ( overshoot_limit_u /= 0.0  .OR.  overshoot_limit_v /= 0.0  .OR. &
186            overshoot_limit_w /= 0.0 )  THEN
187          WRITE ( io, 127 )  overshoot_limit_u, overshoot_limit_v, &
188                             overshoot_limit_w
189       ENDIF
190       IF ( ups_limit_u /= 0.0  .OR.  ups_limit_v /= 0.0  .OR. &
191            ups_limit_w /= 0.0 )                               &
192       THEN
193          WRITE ( io, 125 )  ups_limit_u, ups_limit_v, ups_limit_w
194       ENDIF
195       IF ( long_filter_factor /= 0.0 )  WRITE ( io, 115 )  long_filter_factor
196    ENDIF
197    IF ( scalar_advec == 'pw-scheme' )  THEN
198       WRITE ( io, 116 )
199    ELSEIF ( scalar_advec == 'ups-scheme' )  THEN
200       WRITE ( io, 117 )
201       IF ( cut_spline_overshoot )  WRITE ( io, 124 )
202       IF ( overshoot_limit_e /= 0.0  .OR.  overshoot_limit_pt /= 0.0 )  THEN
203          WRITE ( io, 128 )  overshoot_limit_e, overshoot_limit_pt
204       ENDIF
205       IF ( ups_limit_e /= 0.0  .OR.  ups_limit_pt /= 0.0 )  THEN
206          WRITE ( io, 126 )  ups_limit_e, ups_limit_pt
207       ENDIF
208    ELSE
209       WRITE ( io, 118 )
210    ENDIF
211
212    WRITE ( io, 139 )  TRIM( loop_optimization )
213
214    IF ( galilei_transformation )  THEN
215       IF ( use_ug_for_galilei_tr )  THEN
216          char1 = 'geostrophic wind'
217       ELSE
218          char1 = 'mean wind in model domain'
219       ENDIF
220       IF ( simulated_time_at_begin == simulated_time )  THEN
221          char2 = 'at the start of the run'
222       ELSE
223          char2 = 'at the end of the run'
224       ENDIF
225       WRITE ( io, 119 )  TRIM( char1 ), TRIM( char2 ), &
226                          advected_distance_x/1000.0, advected_distance_y/1000.0
227    ENDIF
228    IF ( timestep_scheme == 'leapfrog' )  THEN
229       WRITE ( io, 120 )
230    ELSEIF ( timestep_scheme == 'leapfrog+euler' )  THEN
231       WRITE ( io, 121 )
232    ELSE
233       WRITE ( io, 122 )  timestep_scheme
234    ENDIF
235    IF ( use_upstream_for_tke )  WRITE ( io, 143 )
236    IF ( rayleigh_damping_factor /= 0.0 )  THEN
237       WRITE ( io, 123 )  rayleigh_damping_height, rayleigh_damping_factor
238    ENDIF
239    IF ( humidity )  THEN
240       IF ( .NOT. cloud_physics )  THEN
241          WRITE ( io, 129 )
242       ELSE
243          WRITE ( io, 130 )
244          WRITE ( io, 131 )
245          IF ( radiation )      WRITE ( io, 132 )
246          IF ( precipitation )  WRITE ( io, 133 )
247       ENDIF
248    ENDIF
249    IF ( passive_scalar )  WRITE ( io, 134 )
250    IF ( conserve_volume_flow )  WRITE ( io, 150 )
251    WRITE ( io, 99 )
252
253!
254!-- Runtime and timestep informations
255    WRITE ( io, 200 )
256    IF ( .NOT. dt_fixed )  THEN
257       WRITE ( io, 201 )  dt_max, cfl_factor
258    ELSE
259       WRITE ( io, 202 )  dt
260    ENDIF
261    WRITE ( io, 203 )  simulated_time_at_begin, end_time
262
263    IF ( time_restart /= 9999999.9  .AND. &
264         simulated_time_at_begin == simulated_time )  THEN
265       IF ( dt_restart == 9999999.9 )  THEN
266          WRITE ( io, 204 )  ' Restart at:       ',time_restart
267       ELSE
268          WRITE ( io, 205 )  ' Restart at:       ',time_restart, dt_restart
269       ENDIF
270    ENDIF
271
272    IF ( simulated_time_at_begin /= simulated_time )  THEN
273       i = MAX ( log_point_s(10)%counts, 1 )
274       IF ( ( simulated_time - simulated_time_at_begin ) == 0.0 )  THEN
275          cpuseconds_per_simulated_second = 0.0
276       ELSE
277          cpuseconds_per_simulated_second = log_point_s(10)%sum / &
278                                            ( simulated_time -    &
279                                              simulated_time_at_begin )
280       ENDIF
281       WRITE ( io, 206 )  simulated_time, log_point_s(10)%sum, &
282                          log_point_s(10)%sum / REAL( i ),     &
283                          cpuseconds_per_simulated_second
284       IF ( time_restart /= 9999999.9  .AND.  time_restart < end_time )  THEN
285          IF ( dt_restart == 9999999.9 )  THEN
286             WRITE ( io, 204 )  ' Next restart at:  ',time_restart
287          ELSE
288             WRITE ( io, 205 )  ' Next restart at:  ',time_restart, dt_restart
289          ENDIF
290       ENDIF
291    ENDIF
292
293!
294!-- Computational grid
295    IF ( .NOT. ocean )  THEN
296       WRITE ( io, 250 )  dx, dy, dz, (nx+1)*dx, (ny+1)*dy, zu(nzt+1)
297       IF ( dz_stretch_level_index < nzt+1 )  THEN
298          WRITE ( io, 252 )  dz_stretch_level, dz_stretch_level_index, &
299                             dz_stretch_factor, dz_max
300       ENDIF
301    ELSE
302       WRITE ( io, 250 )  dx, dy, dz, (nx+1)*dx, (ny+1)*dy, zu(0)
303       IF ( dz_stretch_level_index > 0 )  THEN
304          WRITE ( io, 252 )  dz_stretch_level, dz_stretch_level_index, &
305                             dz_stretch_factor, dz_max
306       ENDIF
307    ENDIF
308    WRITE ( io, 254 )  nx, ny, nzt+1, MIN( nnx, nx+1 ), MIN( nny, ny+1 ), &
309                       MIN( nnz+2, nzt+2 )
310    IF ( numprocs > 1 )  THEN
311       IF ( nxa == nx  .AND.  nya == ny  .AND.  nza == nz )  THEN
312          WRITE ( io, 255 )
313       ELSE
314          WRITE ( io, 256 )  nnx-(nxa-nx), nny-(nya-ny), nzt+2
315       ENDIF
316    ENDIF
317    IF ( sloping_surface )  WRITE ( io, 260 )  alpha_surface
318
319!
320!-- Topography
321    WRITE ( io, 270 )  topography
322    SELECT CASE ( TRIM( topography ) )
323
324       CASE ( 'flat' )
325          ! no actions necessary
326
327       CASE ( 'single_building' )
328          blx = INT( building_length_x / dx )
329          bly = INT( building_length_y / dy )
330          bh  = INT( building_height / dz )
331
332          IF ( building_wall_left == 9999999.9 )  THEN
333             building_wall_left = ( nx + 1 - blx ) / 2 * dx
334          ENDIF
335          bxl = INT ( building_wall_left / dx + 0.5 )
336          bxr = bxl + blx
337
338          IF ( building_wall_south == 9999999.9 )  THEN
339             building_wall_south = ( ny + 1 - bly ) / 2 * dy
340          ENDIF
341          bys = INT ( building_wall_south / dy + 0.5 )
342          byn = bys + bly
343
344          WRITE ( io, 271 )  building_length_x, building_length_y, &
345                             building_height, bxl, bxr, bys, byn
346
347    END SELECT
348
349!
350!-- Boundary conditions
351    IF ( ibc_p_b == 0 )  THEN
352       runten = 'p(0)     = 0      |'
353    ELSEIF ( ibc_p_b == 1 )  THEN
354       runten = 'p(0)     = p(1)   |'
355    ELSE
356       runten = 'p(0)     = p(1) +R|'
357    ENDIF
358    IF ( ibc_p_t == 0 )  THEN
359       roben  = 'p(nzt+1) = 0      |'
360    ELSE
361       roben  = 'p(nzt+1) = p(nzt) |'
362    ENDIF
363
364    IF ( ibc_uv_b == 0 )  THEN
365       runten = TRIM( runten ) // ' uv(0)     = -uv(1)                |'
366    ELSE
367       runten = TRIM( runten ) // ' uv(0)     = uv(1)                 |'
368    ENDIF
369    IF ( ibc_uv_t == 0 )  THEN
370       roben  = TRIM( roben  ) // ' uv(nzt+1) = ug(nzt+1), vg(nzt+1)  |'
371    ELSE
372       roben  = TRIM( roben  ) // ' uv(nzt+1) = uv(nzt)               |'
373    ENDIF
374
375    IF ( ibc_pt_b == 0 )  THEN
376       runten = TRIM( runten ) // ' pt(0)   = pt_surface'
377    ELSE
378       runten = TRIM( runten ) // ' pt(0)   = pt(1)'
379    ENDIF
380    IF ( ibc_pt_t == 0 )  THEN
381       roben  = TRIM( roben  ) // ' pt(nzt+1) = pt_top'
382    ELSEIF( ibc_pt_t == 1 )  THEN
383       roben  = TRIM( roben  ) // ' pt(nzt+1) = pt(nzt)'
384    ELSEIF( ibc_pt_t == 2 )  THEN
385       roben  = TRIM( roben  ) // ' pt(nzt+1) = pt(nzt) + dpt/dz_ini'
386    ENDIF
387
388    WRITE ( io, 300 )  runten, roben
389
390    IF ( .NOT. constant_diffusion )  THEN
391       IF ( ibc_e_b == 1 )  THEN
392          runten = 'e(0)     = e(1)'
393       ELSE
394          runten = 'e(0)     = e(1) = (u*/0.1)**2'
395       ENDIF
396       roben = 'e(nzt+1) = e(nzt) = e(nzt-1)'
397
398       WRITE ( io, 301 )  'e', runten, roben       
399
400    ENDIF
401
402    IF ( ocean )  THEN
403       runten = 'sa(0)    = sa(1)'
404       IF ( ibc_sa_t == 0 )  THEN
405          roben =  'sa(nzt+1) = sa_surface'
406       ELSE
407          roben =  'sa(nzt+1) = sa(nzt)'
408       ENDIF
409       WRITE ( io, 301 ) 'sa', runten, roben
410    ENDIF
411
412    IF ( humidity )  THEN
413       IF ( ibc_q_b == 0 )  THEN
414          runten = 'q(0)     = q_surface'
415       ELSE
416          runten = 'q(0)     = q(1)'
417       ENDIF
418       IF ( ibc_q_t == 0 )  THEN
419          roben =  'q(nzt)   = q_top'
420       ELSE
421          roben =  'q(nzt)   = q(nzt-1) + dq/dz'
422       ENDIF
423       WRITE ( io, 301 ) 'q', runten, roben
424    ENDIF
425
426    IF ( passive_scalar )  THEN
427       IF ( ibc_q_b == 0 )  THEN
428          runten = 's(0)     = s_surface'
429       ELSE
430          runten = 's(0)     = s(1)'
431       ENDIF
432       IF ( ibc_q_t == 0 )  THEN
433          roben =  's(nzt)   = s_top'
434       ELSE
435          roben =  's(nzt)   = s(nzt-1) + ds/dz'
436       ENDIF
437       WRITE ( io, 301 ) 's', runten, roben
438    ENDIF
439
440    IF ( use_surface_fluxes )  THEN
441       WRITE ( io, 303 )
442       IF ( constant_heatflux )  THEN
443          WRITE ( io, 306 )  surface_heatflux
444          IF ( random_heatflux )  WRITE ( io, 307 )
445       ENDIF
446       IF ( humidity  .AND.  constant_waterflux )  THEN
447          WRITE ( io, 311 ) surface_waterflux
448       ENDIF
449       IF ( passive_scalar  .AND.  constant_waterflux )  THEN
450          WRITE ( io, 313 ) surface_waterflux
451       ENDIF
452    ENDIF
453
454    IF ( use_top_fluxes )  THEN
455       WRITE ( io, 304 )
456       IF ( constant_top_heatflux )  THEN
457          WRITE ( io, 306 )  top_heatflux
458       ENDIF
459       IF ( ocean  .AND.  constant_top_salinityflux )  THEN
460          WRITE ( io, 309 )  top_salinityflux
461       ENDIF
462       IF ( humidity  .OR.  passive_scalar )  THEN
463          WRITE ( io, 315 )
464       ENDIF
465    ENDIF
466
467    IF ( prandtl_layer )  THEN
468       WRITE ( io, 305 )  0.5 * (zu(1)-zu(0)), roughness_length, kappa, &
469                          rif_min, rif_max
470       IF ( .NOT. constant_heatflux )  WRITE ( io, 308 )
471       IF ( humidity  .AND.  .NOT. constant_waterflux )  THEN
472          WRITE ( io, 312 )
473       ENDIF
474       IF ( passive_scalar  .AND.  .NOT. constant_waterflux )  THEN
475          WRITE ( io, 314 )
476       ENDIF
477    ELSE
478       IF ( INDEX(initializing_actions, 'set_1d-model_profiles') /= 0 )  THEN
479          WRITE ( io, 310 )  rif_min, rif_max
480       ENDIF
481    ENDIF
482
483    WRITE ( io, 317 )  bc_lr, bc_ns
484    IF ( bc_lr /= 'cyclic'  .OR.  bc_ns /= 'cyclic' )  THEN
485       WRITE ( io, 318 )  outflow_damping_width, km_damp_max
486    ENDIF
487
488!
489!-- Listing of 1D-profiles
490    WRITE ( io, 320 )  dt_dopr_listing
491    IF ( averaging_interval_pr /= 0.0 )  THEN
492       WRITE ( io, 321 )  averaging_interval_pr, dt_averaging_input_pr
493    ENDIF
494
495!
496!-- DATA output
497    WRITE ( io, 330 )
498    IF ( averaging_interval_pr /= 0.0 )  THEN
499       WRITE ( io, 321 )  averaging_interval_pr, dt_averaging_input_pr
500    ENDIF
501
502!
503!-- 1D-profiles
504    dopr_chr = 'Profile:'
505    IF ( dopr_n /= 0 )  THEN
506       WRITE ( io, 331 )
507
508       output_format = ''
509       IF ( netcdf_output )  THEN
510          IF ( netcdf_64bit )  THEN
511             output_format = 'netcdf (64 bit offset)'
512          ELSE
513             output_format = 'netcdf'
514          ENDIF
515       ENDIF
516       IF ( profil_output )  THEN
517          IF ( netcdf_output )  THEN
518             output_format = TRIM( output_format ) // ' and profil'
519          ELSE
520             output_format = 'profil'
521          ENDIF
522       ENDIF
523       WRITE ( io, 345 )  output_format
524
525       DO  i = 1, dopr_n
526          dopr_chr = TRIM( dopr_chr ) // ' ' // TRIM( data_output_pr(i) ) // ','
527          IF ( LEN_TRIM( dopr_chr ) >= 60 )  THEN
528             WRITE ( io, 332 )  dopr_chr
529             dopr_chr = '       :'
530          ENDIF
531       ENDDO
532
533       IF ( dopr_chr /= '' )  THEN
534          WRITE ( io, 332 )  dopr_chr
535       ENDIF
536       WRITE ( io, 333 )  dt_dopr, averaging_interval_pr, dt_averaging_input_pr
537       IF ( skip_time_dopr /= 0.0 )  WRITE ( io, 339 )  skip_time_dopr
538    ENDIF
539
540!
541!-- 2D-arrays
542    DO  av = 0, 1
543
544       i = 1
545       do2d_xy = ''
546       do2d_xz = ''
547       do2d_yz = ''
548       DO  WHILE ( do2d(av,i) /= ' ' )
549
550          l = MAX( 2, LEN_TRIM( do2d(av,i) ) )
551          do2d_mode = do2d(av,i)(l-1:l)
552
553          SELECT CASE ( do2d_mode )
554             CASE ( 'xy' )
555                ll = LEN_TRIM( do2d_xy )
556                do2d_xy = do2d_xy(1:ll) // ' ' // do2d(av,i)(1:l-3) // ','
557             CASE ( 'xz' )
558                ll = LEN_TRIM( do2d_xz )
559                do2d_xz = do2d_xz(1:ll) // ' ' // do2d(av,i)(1:l-3) // ','
560             CASE ( 'yz' )
561                ll = LEN_TRIM( do2d_yz )
562                do2d_yz = do2d_yz(1:ll) // ' ' // do2d(av,i)(1:l-3) // ','
563          END SELECT
564
565          i = i + 1
566
567       ENDDO
568
569       IF ( ( ( do2d_xy /= ''  .AND.  section(1,1) /= -9999 )  .OR.    &
570              ( do2d_xz /= ''  .AND.  section(1,2) /= -9999 )  .OR.    &
571              ( do2d_yz /= ''  .AND.  section(1,3) /= -9999 ) )  .AND. &
572            ( netcdf_output  .OR.  iso2d_output ) )  THEN
573
574          IF (  av == 0 )  THEN
575             WRITE ( io, 334 )  ''
576          ELSE
577             WRITE ( io, 334 )  '(time-averaged)'
578          ENDIF
579
580          IF ( do2d_at_begin )  THEN
581             begin_chr = 'and at the start'
582          ELSE
583             begin_chr = ''
584          ENDIF
585
586          output_format = ''
587          IF ( netcdf_output )  THEN
588             IF ( netcdf_64bit )  THEN
589                output_format = 'netcdf (64 bit offset)'
590             ELSE
591                output_format = 'netcdf'
592             ENDIF
593          ENDIF
594          IF ( iso2d_output )  THEN
595             IF ( netcdf_output )  THEN
596                output_format = TRIM( output_format ) // ' and iso2d'
597             ELSE
598                output_format = 'iso2d'
599             ENDIF
600          ENDIF
601          WRITE ( io, 345 )  output_format
602
603          IF ( do2d_xy /= ''  .AND.  section(1,1) /= -9999 )  THEN
604             i = 1
605             slices = '/'
606             coordinates = '/'
607!
608!--          Building strings with index and coordinate informations of the
609!--          slices
610             DO  WHILE ( section(i,1) /= -9999 )
611
612                WRITE (section_chr,'(I5)')  section(i,1)
613                section_chr = ADJUSTL( section_chr )
614                slices = TRIM( slices ) // TRIM( section_chr ) // '/'
615
616                WRITE (coor_chr,'(F10.1)')  zu(section(i,1))
617                coor_chr = ADJUSTL( coor_chr )
618                coordinates = TRIM( coordinates ) // TRIM( coor_chr ) // '/'
619
620                i = i + 1
621             ENDDO
622             IF ( av == 0 )  THEN
623                WRITE ( io, 335 )  'XY', do2d_xy, dt_do2d_xy, &
624                                   TRIM( begin_chr ), 'k', TRIM( slices ), &
625                                   TRIM( coordinates )
626                IF ( skip_time_do2d_xy /= 0.0 )  THEN
627                   WRITE ( io, 339 )  skip_time_do2d_xy
628                ENDIF
629             ELSE
630                WRITE ( io, 342 )  'XY', do2d_xy, dt_data_output_av, &
631                                   TRIM( begin_chr ), averaging_interval, &
632                                   dt_averaging_input, 'k', TRIM( slices ), &
633                                   TRIM( coordinates )
634                IF ( skip_time_data_output_av /= 0.0 )  THEN
635                   WRITE ( io, 339 )  skip_time_data_output_av
636                ENDIF
637             ENDIF
638
639          ENDIF
640
641          IF ( do2d_xz /= ''  .AND.  section(1,2) /= -9999 )  THEN
642             i = 1
643             slices = '/'
644             coordinates = '/'
645!
646!--          Building strings with index and coordinate informations of the
647!--          slices
648             DO  WHILE ( section(i,2) /= -9999 )
649
650                WRITE (section_chr,'(I5)')  section(i,2)
651                section_chr = ADJUSTL( section_chr )
652                slices = TRIM( slices ) // TRIM( section_chr ) // '/'
653
654                WRITE (coor_chr,'(F10.1)')  section(i,2) * dy
655                coor_chr = ADJUSTL( coor_chr )
656                coordinates = TRIM( coordinates ) // TRIM( coor_chr ) // '/'
657
658                i = i + 1
659             ENDDO
660             IF ( av == 0 )  THEN
661                WRITE ( io, 335 )  'XZ', do2d_xz, dt_do2d_xz, &
662                                   TRIM( begin_chr ), 'j', TRIM( slices ), &
663                                   TRIM( coordinates )
664                IF ( skip_time_do2d_xz /= 0.0 )  THEN
665                   WRITE ( io, 339 )  skip_time_do2d_xz
666                ENDIF
667             ELSE
668                WRITE ( io, 342 )  'XZ', do2d_xz, dt_data_output_av, &
669                                   TRIM( begin_chr ), averaging_interval, &
670                                   dt_averaging_input, 'j', TRIM( slices ), &
671                                   TRIM( coordinates )
672                IF ( skip_time_data_output_av /= 0.0 )  THEN
673                   WRITE ( io, 339 )  skip_time_data_output_av
674                ENDIF
675             ENDIF
676          ENDIF
677
678          IF ( do2d_yz /= ''  .AND.  section(1,3) /= -9999 )  THEN
679             i = 1
680             slices = '/'
681             coordinates = '/'
682!
683!--          Building strings with index and coordinate informations of the
684!--          slices
685             DO  WHILE ( section(i,3) /= -9999 )
686
687                WRITE (section_chr,'(I5)')  section(i,3)
688                section_chr = ADJUSTL( section_chr )
689                slices = TRIM( slices ) // TRIM( section_chr ) // '/'
690
691                WRITE (coor_chr,'(F10.1)')  section(i,3) * dx
692                coor_chr = ADJUSTL( coor_chr )
693                coordinates = TRIM( coordinates ) // TRIM( coor_chr ) // '/'
694
695                i = i + 1
696             ENDDO
697             IF ( av == 0 )  THEN
698                WRITE ( io, 335 )  'YZ', do2d_yz, dt_do2d_yz, &
699                                   TRIM( begin_chr ), 'i', TRIM( slices ), &
700                                   TRIM( coordinates )
701                IF ( skip_time_do2d_yz /= 0.0 )  THEN
702                   WRITE ( io, 339 )  skip_time_do2d_yz
703                ENDIF
704             ELSE
705                WRITE ( io, 342 )  'YZ', do2d_yz, dt_data_output_av, &
706                                   TRIM( begin_chr ), averaging_interval, &
707                                   dt_averaging_input, 'i', TRIM( slices ), &
708                                   TRIM( coordinates )
709                IF ( skip_time_data_output_av /= 0.0 )  THEN
710                   WRITE ( io, 339 )  skip_time_data_output_av
711                ENDIF
712             ENDIF
713          ENDIF
714
715       ENDIF
716
717    ENDDO
718
719!
720!-- 3d-arrays
721    DO  av = 0, 1
722
723       i = 1
724       do3d_chr = ''
725       DO  WHILE ( do3d(av,i) /= ' ' )
726
727          do3d_chr = TRIM( do3d_chr ) // ' ' // TRIM( do3d(av,i) ) // ','
728          i = i + 1
729
730       ENDDO
731
732       IF ( do3d_chr /= '' )  THEN
733          IF ( av == 0 )  THEN
734             WRITE ( io, 336 )  ''
735          ELSE
736             WRITE ( io, 336 )  '(time-averaged)'
737          ENDIF
738
739          output_format = ''
740          IF ( netcdf_output )  THEN
741             IF ( netcdf_64bit .AND. netcdf_64bit_3d )  THEN
742                output_format = 'netcdf (64 bit offset)'
743             ELSE
744                output_format = 'netcdf'
745             ENDIF
746          ENDIF
747          IF ( avs_output )  THEN
748             IF ( netcdf_output )  THEN
749                output_format = TRIM( output_format ) // ' and avs'
750             ELSE
751                output_format = 'avs'
752             ENDIF
753          ENDIF
754          WRITE ( io, 345 )  output_format
755
756          IF ( do3d_at_begin )  THEN
757             begin_chr = 'and at the start'
758          ELSE
759             begin_chr = ''
760          ENDIF
761          IF ( av == 0 )  THEN
762             WRITE ( io, 337 )  do3d_chr, dt_do3d, TRIM( begin_chr ), &
763                                zu(nz_do3d), nz_do3d
764          ELSE
765             WRITE ( io, 343 )  do3d_chr, dt_data_output_av,           &
766                                TRIM( begin_chr ), averaging_interval, &
767                                dt_averaging_input, zu(nz_do3d), nz_do3d
768          ENDIF
769
770          IF ( do3d_compress )  THEN
771             do3d_chr = ''
772             i = 1
773             DO WHILE ( do3d(av,i) /= ' ' )
774
775                SELECT CASE ( do3d(av,i) )
776                   CASE ( 'u' )
777                      j = 1
778                   CASE ( 'v' )
779                      j = 2
780                   CASE ( 'w' )
781                      j = 3
782                   CASE ( 'p' )
783                      j = 4
784                   CASE ( 'pt' )
785                      j = 5
786                END SELECT
787                WRITE ( prec, '(I1)' )  plot_3d_precision(j)%precision
788                do3d_chr = TRIM( do3d_chr ) // ' ' // TRIM( do3d(av,i) ) // &
789                           ':' // prec // ','
790                i = i + 1
791
792             ENDDO
793             WRITE ( io, 338 )  do3d_chr
794
795          ENDIF
796
797          IF ( av == 0 )  THEN
798             IF ( skip_time_do3d /= 0.0 )  THEN
799                WRITE ( io, 339 )  skip_time_do3d
800             ENDIF
801          ELSE
802             IF ( skip_time_data_output_av /= 0.0 )  THEN
803                WRITE ( io, 339 )  skip_time_data_output_av
804             ENDIF
805          ENDIF
806
807       ENDIF
808
809    ENDDO
810
811!
812!-- Timeseries
813    IF ( dt_dots /= 9999999.9 )  THEN
814       WRITE ( io, 340 )
815
816       output_format = ''
817       IF ( netcdf_output )  THEN
818          IF ( netcdf_64bit )  THEN
819             output_format = 'netcdf (64 bit offset)'
820          ELSE
821             output_format = 'netcdf'
822          ENDIF
823       ENDIF
824       IF ( profil_output )  THEN
825          IF ( netcdf_output )  THEN
826             output_format = TRIM( output_format ) // ' and profil'
827          ELSE
828             output_format = 'profil'
829          ENDIF
830       ENDIF
831       WRITE ( io, 345 )  output_format
832       WRITE ( io, 341 )  dt_dots
833    ENDIF
834
835#if defined( __dvrp_graphics )
836!
837!-- Dvrp-output
838    IF ( dt_dvrp /= 9999999.9 )  THEN
839       WRITE ( io, 360 )  dt_dvrp, TRIM( dvrp_output ), TRIM( dvrp_host ), &
840                          TRIM( dvrp_username ), TRIM( dvrp_directory )
841       i = 1
842       l = 0
843       DO WHILE ( mode_dvrp(i) /= ' ' )
844          IF ( mode_dvrp(i)(1:10) == 'isosurface' )  THEN
845             READ ( mode_dvrp(i), '(10X,I1)' )  j
846             l = l + 1
847             IF ( do3d(0,j) /= ' ' )  THEN
848                WRITE ( io, 361 )  TRIM( do3d(0,j) ), threshold(l)
849             ENDIF
850          ELSEIF ( mode_dvrp(i)(1:6) == 'slicer' )  THEN
851             READ ( mode_dvrp(i), '(6X,I1)' )  j
852             IF ( do2d(0,j) /= ' ' )  WRITE ( io, 362 )  TRIM( do2d(0,j) )
853          ELSEIF ( mode_dvrp(i)(1:9) == 'particles' )  THEN
854             WRITE ( io, 363 )
855          ENDIF
856          i = i + 1
857       ENDDO
858    ENDIF
859#endif
860
861#if defined( __spectra )
862!
863!-- Spectra output
864    IF ( dt_dosp /= 9999999.9 ) THEN
865       WRITE ( io, 370 )
866
867       output_format = ''
868       IF ( netcdf_output )  THEN
869          IF ( netcdf_64bit )  THEN
870             output_format = 'netcdf (64 bit offset)'
871          ELSE
872             output_format = 'netcdf'
873          ENDIF
874       ENDIF
875       IF ( profil_output )  THEN
876          IF ( netcdf_output )  THEN
877             output_format = TRIM( output_format ) // ' and profil'
878          ELSE
879             output_format = 'profil'
880          ENDIF
881       ENDIF
882       WRITE ( io, 345 )  output_format
883       WRITE ( io, 371 )  dt_dosp
884       IF ( skip_time_dosp /= 0.0 )  WRITE ( io, 339 )  skip_time_dosp
885       WRITE ( io, 372 )  ( data_output_sp(i), i = 1,10 ),     &
886                          ( spectra_direction(i), i = 1,10 ),  &
887                          ( comp_spectra_level(i), i = 1,10 ), &
888                          ( plot_spectra_level(i), i = 1,10 ), &
889                          averaging_interval_sp, dt_averaging_input_pr
890    ENDIF
891#endif
892
893    WRITE ( io, 99 )
894
895!
896!-- Physical quantities
897    WRITE ( io, 400 )
898
899!
900!-- Geostrophic parameters
901    WRITE ( io, 410 )  omega, phi, f, fs
902
903!
904!-- Other quantities
905    WRITE ( io, 411 )  g
906    IF ( use_reference )  THEN
907       IF ( ocean )  THEN
908          WRITE ( io, 412 )  prho_reference
909       ELSE
910          WRITE ( io, 413 )  pt_reference
911       ENDIF
912    ENDIF
913
914!
915!-- Cloud physics parameters
916    IF ( cloud_physics ) THEN
917       WRITE ( io, 415 )
918       WRITE ( io, 416 ) surface_pressure, r_d, rho_surface, cp, l_v
919    ENDIF
920
921!-- Profile of the geostrophic wind (component ug)
922!-- Building output strings
923    WRITE ( ugcomponent, '(F6.2)' )  ug_surface
924    gradients = '------'
925    slices = '     0'
926    coordinates = '   0.0'
927    i = 1
928    DO  WHILE ( ug_vertical_gradient_level_ind(i) /= -9999 )
929     
930       WRITE (coor_chr,'(F6.2,4X)')  ug(ug_vertical_gradient_level_ind(i))
931       ugcomponent = TRIM( ugcomponent ) // '  ' // TRIM( coor_chr )
932
933       WRITE (coor_chr,'(F6.2,4X)')  ug_vertical_gradient(i)
934       gradients = TRIM( gradients ) // '  ' // TRIM( coor_chr )
935
936       WRITE (coor_chr,'(I6,4X)')  ug_vertical_gradient_level_ind(i)
937       slices = TRIM( slices ) // '  ' // TRIM( coor_chr )
938
939       WRITE (coor_chr,'(F6.1,4X)')  ug_vertical_gradient_level(i)
940       coordinates = TRIM( coordinates ) // '  ' // TRIM( coor_chr )
941
942       i = i + 1
943    ENDDO
944
945    WRITE ( io, 423 )  TRIM( coordinates ), TRIM( ugcomponent ), &
946                       TRIM( gradients ), TRIM( slices )
947
948!-- Profile of the geostrophic wind (component vg)
949!-- Building output strings
950    WRITE ( vgcomponent, '(F6.2)' )  vg_surface
951    gradients = '------'
952    slices = '     0'
953    coordinates = '   0.0'
954    i = 1
955    DO  WHILE ( vg_vertical_gradient_level_ind(i) /= -9999 )
956
957       WRITE (coor_chr,'(F6.2,4X)')  vg(vg_vertical_gradient_level_ind(i))
958       vgcomponent = TRIM( vgcomponent ) // '  ' // TRIM( coor_chr )
959
960       WRITE (coor_chr,'(F6.2,4X)')  vg_vertical_gradient(i)
961       gradients = TRIM( gradients ) // '  ' // TRIM( coor_chr )
962
963       WRITE (coor_chr,'(I6,4X)')  vg_vertical_gradient_level_ind(i)
964       slices = TRIM( slices ) // '  ' // TRIM( coor_chr )
965
966       WRITE (coor_chr,'(F6.1,4X)')  vg_vertical_gradient_level(i)
967       coordinates = TRIM( coordinates ) // '  ' // TRIM( coor_chr )
968
969       i = i + 1 
970    ENDDO
971
972    WRITE ( io, 424 )  TRIM( coordinates ), TRIM( vgcomponent ), &
973                       TRIM( gradients ), TRIM( slices )
974
975!
976!-- Initial temperature profile
977!-- Building output strings, starting with surface temperature
978    WRITE ( temperatures, '(F6.2)' )  pt_surface
979    gradients = '------'
980    slices = '     0'
981    coordinates = '   0.0'
982    i = 1
983    DO  WHILE ( pt_vertical_gradient_level_ind(i) /= -9999 )
984
985       WRITE (coor_chr,'(F7.2)')  pt_init(pt_vertical_gradient_level_ind(i))
986       temperatures = TRIM( temperatures ) // ' ' // TRIM( coor_chr )
987
988       WRITE (coor_chr,'(F7.2)')  pt_vertical_gradient(i)
989       gradients = TRIM( gradients ) // ' ' // TRIM( coor_chr )
990
991       WRITE (coor_chr,'(I7)')  pt_vertical_gradient_level_ind(i)
992       slices = TRIM( slices ) // ' ' // TRIM( coor_chr )
993
994       WRITE (coor_chr,'(F7.1)')  pt_vertical_gradient_level(i)
995       coordinates = TRIM( coordinates ) // ' '  // TRIM( coor_chr )
996
997       i = i + 1
998    ENDDO
999
1000    WRITE ( io, 420 )  TRIM( coordinates ), TRIM( temperatures ), &
1001                       TRIM( gradients ), TRIM( slices )
1002
1003!
1004!-- Initial humidity profile
1005!-- Building output strings, starting with surface humidity
1006    IF ( humidity  .OR.  passive_scalar )  THEN
1007       WRITE ( temperatures, '(E8.1)' )  q_surface
1008       gradients = '--------'
1009       slices = '       0'
1010       coordinates = '     0.0'
1011       i = 1
1012       DO  WHILE ( q_vertical_gradient_level_ind(i) /= -9999 )
1013         
1014          WRITE (coor_chr,'(E8.1,4X)')  q_init(q_vertical_gradient_level_ind(i))
1015          temperatures = TRIM( temperatures ) // '  ' // TRIM( coor_chr )
1016
1017          WRITE (coor_chr,'(E8.1,4X)')  q_vertical_gradient(i)
1018          gradients = TRIM( gradients ) // '  ' // TRIM( coor_chr )
1019         
1020          WRITE (coor_chr,'(I8,4X)')  q_vertical_gradient_level_ind(i)
1021          slices = TRIM( slices ) // '  ' // TRIM( coor_chr )
1022         
1023          WRITE (coor_chr,'(F8.1,4X)')  q_vertical_gradient_level(i)
1024          coordinates = TRIM( coordinates ) // '  '  // TRIM( coor_chr )
1025
1026          i = i + 1
1027       ENDDO
1028
1029       IF ( humidity )  THEN
1030          WRITE ( io, 421 )  TRIM( coordinates ), TRIM( temperatures ), &
1031                             TRIM( gradients ), TRIM( slices )
1032       ELSE
1033          WRITE ( io, 422 )  TRIM( coordinates ), TRIM( temperatures ), &
1034                             TRIM( gradients ), TRIM( slices )
1035       ENDIF
1036    ENDIF
1037
1038!
1039!-- Initial salinity profile
1040!-- Building output strings, starting with surface salinity
1041    IF ( ocean )  THEN
1042       WRITE ( temperatures, '(F6.2)' )  sa_surface
1043       gradients = '------'
1044       slices = '     0'
1045       coordinates = '   0.0'
1046       i = 1
1047       DO  WHILE ( sa_vertical_gradient_level_ind(i) /= -9999 )
1048
1049          WRITE (coor_chr,'(F7.2)')  sa_init(sa_vertical_gradient_level_ind(i))
1050          temperatures = TRIM( temperatures ) // ' ' // TRIM( coor_chr )
1051
1052          WRITE (coor_chr,'(F7.2)')  sa_vertical_gradient(i)
1053          gradients = TRIM( gradients ) // ' ' // TRIM( coor_chr )
1054
1055          WRITE (coor_chr,'(I7)')  sa_vertical_gradient_level_ind(i)
1056          slices = TRIM( slices ) // ' ' // TRIM( coor_chr )
1057
1058          WRITE (coor_chr,'(F7.1)')  sa_vertical_gradient_level(i)
1059          coordinates = TRIM( coordinates ) // ' '  // TRIM( coor_chr )
1060
1061          i = i + 1
1062       ENDDO
1063
1064       WRITE ( io, 425 )  TRIM( coordinates ), TRIM( temperatures ), &
1065                          TRIM( gradients ), TRIM( slices )
1066    ENDIF
1067
1068!
1069!-- LES / turbulence parameters
1070    WRITE ( io, 450 )
1071
1072!--
1073! ... LES-constants used must still be added here
1074!--
1075    IF ( constant_diffusion )  THEN
1076       WRITE ( io, 451 )  km_constant, km_constant/prandtl_number, &
1077                          prandtl_number
1078    ENDIF
1079    IF ( .NOT. constant_diffusion)  THEN
1080       IF ( e_min > 0.0 )  WRITE ( io, 454 )  e_min
1081       IF ( wall_adjustment )  WRITE ( io, 453 )  wall_adjustment_factor
1082       IF ( adjust_mixing_length  .AND.  prandtl_layer )  WRITE ( io, 452 )
1083    ENDIF
1084
1085!
1086!-- Special actions during the run
1087    WRITE ( io, 470 )
1088    IF ( create_disturbances )  THEN
1089       WRITE ( io, 471 )  dt_disturb, disturbance_amplitude,                   &
1090                          zu(disturbance_level_ind_b), disturbance_level_ind_b,&
1091                          zu(disturbance_level_ind_t), disturbance_level_ind_t
1092       IF ( bc_lr /= 'cyclic'  .OR.  bc_ns /= 'cyclic' )  THEN
1093          WRITE ( io, 472 )  inflow_disturbance_begin, inflow_disturbance_end
1094       ELSE
1095          WRITE ( io, 473 )  disturbance_energy_limit
1096       ENDIF
1097       WRITE ( io, 474 )  TRIM( random_generator )
1098    ENDIF
1099    IF ( pt_surface_initial_change /= 0.0 )  THEN
1100       WRITE ( io, 475 )  pt_surface_initial_change
1101    ENDIF
1102    IF ( humidity  .AND.  q_surface_initial_change /= 0.0 )  THEN
1103       WRITE ( io, 476 )  q_surface_initial_change       
1104    ENDIF
1105    IF ( passive_scalar  .AND.  q_surface_initial_change /= 0.0 )  THEN
1106       WRITE ( io, 477 )  q_surface_initial_change       
1107    ENDIF
1108
1109    IF ( particle_advection )  THEN
1110!
1111!--    Particle attributes
1112       WRITE ( io, 480 )  particle_advection_start, dt_prel, bc_par_lr, &
1113                          bc_par_ns, bc_par_b, bc_par_t, particle_maximum_age, &
1114                          end_time_prel
1115       IF ( use_sgs_for_particles )  WRITE ( io, 488 )  dt_min_part
1116       IF ( random_start_position )  WRITE ( io, 481 )
1117       IF ( particles_per_point > 1 )  WRITE ( io, 489 )  particles_per_point
1118       WRITE ( io, 495 )  total_number_of_particles
1119       IF ( .NOT. vertical_particle_advection )  WRITE ( io, 482 )
1120       IF ( maximum_number_of_tailpoints /= 0 )  THEN
1121          WRITE ( io, 483 )  maximum_number_of_tailpoints
1122          IF ( minimum_tailpoint_distance /= 0 )  THEN
1123             WRITE ( io, 484 )  total_number_of_tails,      &
1124                                minimum_tailpoint_distance, &
1125                                maximum_tailpoint_age
1126          ENDIF
1127       ENDIF
1128       IF ( dt_write_particle_data /= 9999999.9 )  THEN
1129          WRITE ( io, 485 )  dt_write_particle_data
1130          output_format = ''
1131          IF ( netcdf_output )  THEN
1132             IF ( netcdf_64bit )  THEN
1133                output_format = 'netcdf (64 bit offset) and binary'
1134             ELSE
1135                output_format = 'netcdf and binary'
1136             ENDIF
1137          ELSE
1138             output_format = 'binary'
1139          ENDIF
1140          WRITE ( io, 345 )  output_format
1141       ENDIF
1142       IF ( dt_dopts /= 9999999.9 )  WRITE ( io, 494 )  dt_dopts
1143       IF ( write_particle_statistics )  WRITE ( io, 486 )
1144
1145       WRITE ( io, 487 )  number_of_particle_groups
1146
1147       DO  i = 1, number_of_particle_groups
1148          IF ( i == 1  .AND.  density_ratio(i) == 9999999.9 )  THEN
1149             WRITE ( io, 490 )  i, 0.0
1150             WRITE ( io, 492 )
1151          ELSE
1152             WRITE ( io, 490 )  i, radius(i)
1153             IF ( density_ratio(i) /= 0.0 )  THEN
1154                WRITE ( io, 491 )  density_ratio(i)
1155             ELSE
1156                WRITE ( io, 492 )
1157             ENDIF
1158          ENDIF
1159          WRITE ( io, 493 )  psl(i), psr(i), pss(i), psn(i), psb(i), pst(i), &
1160                             pdx(i), pdy(i), pdz(i)
1161       ENDDO
1162
1163    ENDIF
1164
1165
1166!
1167!-- Parameters of 1D-model
1168    IF ( INDEX( initializing_actions, 'set_1d-model_profiles' ) /= 0 )  THEN
1169       WRITE ( io, 500 )  end_time_1d, dt_run_control_1d, dt_pr_1d, &
1170                          mixing_length_1d, dissipation_1d
1171       IF ( damp_level_ind_1d /= nzt+1 )  THEN
1172          WRITE ( io, 502 )  zu(damp_level_ind_1d), damp_level_ind_1d
1173       ENDIF
1174    ENDIF
1175
1176!
1177!-- User-defined informations
1178    CALL user_header( io )
1179
1180    WRITE ( io, 99 )
1181
1182!
1183!-- Write buffer contents to disc immediately
1184    CALL local_flush( io )
1185
1186!
1187!-- Here the FORMATs start
1188
1189 99 FORMAT (1X,78('-'))
1190100 FORMAT (/1X,'*************************',11X,42('-')/        &
1191            1X,'* ',A,' *',11X,A/                               &
1192            1X,'*************************',11X,42('-')//        &
1193            ' Date:            ',A8,11X,'Run:       ',A20/      &
1194            ' Time:            ',A8,11X,'Run-No.:   ',I2.2/     &
1195            ' Run on host:   ',A10)
1196#if defined( __parallel )
1197101 FORMAT (' Number of PEs:',7X,I4,11X,'Processor grid (x,y): (',I3,',',I3, &
1198              ')',1X,A)
1199102 FORMAT (' Number of PEs:',7X,I4,11X,'Tasks:',I4,'   threads per task:',I4/ &
1200              37X,'Processor grid (x,y): (',I3,',',I3,')',1X,A)
1201103 FORMAT (37X,'One additional PE is used to handle'/37X,'the dvrp output!')
1202104 FORMAT (37X,'A 1d-decomposition along x is forced'/ &
1203            37X,'because the job is running on an SMP-cluster')
1204105 FORMAT (37X,'A 1d-decomposition along ',A,' is used')
1205#endif
1206110 FORMAT (/' Numerical Schemes:'/ &
1207             ' -----------------'/)
1208111 FORMAT (' --> Solve perturbation pressure via FFT using ',A,' routines')
1209112 FORMAT (' --> Solve perturbation pressure via SOR-Red/Black-Schema'/ &
1210            '     Iterations (initial/other): ',I3,'/',I3,'  omega = ',F5.3)
1211113 FORMAT (' --> Momentum advection via Piascek-Williams-Scheme (Form C3)', &
1212                  ' or Upstream')
1213114 FORMAT (' --> Momentum advection via Upstream-Spline-Scheme')
1214115 FORMAT ('     Tendencies are smoothed via Long-Filter with factor ',F5.3) 
1215116 FORMAT (' --> Scalar advection via Piascek-Williams-Scheme (Form C3)', &
1216                  ' or Upstream')
1217117 FORMAT (' --> Scalar advection via Upstream-Spline-Scheme')
1218118 FORMAT (' --> Scalar advection via Bott-Chlond-Scheme')
1219119 FORMAT (' --> Galilei-Transform applied to horizontal advection', &
1220            '     Translation velocity = ',A/ &
1221            '     distance advected ',A,':  ',F8.3,' km(x)  ',F8.3,' km(y)')
1222120 FORMAT (' --> Time differencing scheme: leapfrog only (no euler in case', &
1223                  ' of timestep changes)')
1224121 FORMAT (' --> Time differencing scheme: leapfrog + euler in case of', &
1225                  ' timestep changes')
1226122 FORMAT (' --> Time differencing scheme: ',A)
1227123 FORMAT (' --> Rayleigh-Damping active, starts above z = ',F8.2,' m'/ &
1228            '     maximum damping coefficient: ',F5.3, ' 1/s')
1229124 FORMAT ('     Spline-overshoots are being suppressed')
1230125 FORMAT ('     Upstream-Scheme is used if Upstream-differences fall short', &
1231                  ' of'/                                                       &
1232            '     delta_u = ',F6.4,4X,'delta_v = ',F6.4,4X,'delta_w = ',F6.4)
1233126 FORMAT ('     Upstream-Scheme is used if Upstream-differences fall short', &
1234                  ' of'/                                                       &
1235            '     delta_e = ',F6.4,4X,'delta_pt = ',F6.4)
1236127 FORMAT ('     The following absolute overshoot differences are tolerated:'/&
1237            '     delta_u = ',F6.4,4X,'delta_v = ',F6.4,4X,'delta_w = ',F6.4)
1238128 FORMAT ('     The following absolute overshoot differences are tolerated:'/&
1239            '     delta_e = ',F6.4,4X,'delta_pt = ',F6.4)
1240129 FORMAT (' --> Additional prognostic equation for the specific humidity')
1241130 FORMAT (' --> Additional prognostic equation for the total water content')
1242131 FORMAT (' --> Parameterization of condensation processes via (0%-or100%)')
1243132 FORMAT (' --> Parameterization of long-wave radiation processes via'/ &
1244            '     effective emissivity scheme')
1245133 FORMAT (' --> Precipitation parameterization via Kessler-Scheme')
1246134 FORMAT (' --> Additional prognostic equation for a passive scalar')
1247135 FORMAT (' --> Solve perturbation pressure via multigrid method (', &
1248                  A,'-cycle)'/ &
1249            '     number of grid levels:                   ',I2/ &
1250            '     Gauss-Seidel red/black iterations:       ',I2)
1251136 FORMAT ('     gridpoints of coarsest subdomain (x,y,z): (',I3,',',I3,',', &
1252                  I3,')')
1253137 FORMAT ('     level data gathered on PE0 at level:     ',I2/ &
1254            '     gridpoints of coarsest subdomain (x,y,z): (',I3,',',I3,',', &
1255                  I3,')'/ &
1256            '     gridpoints of coarsest domain (x,y,z):    (',I3,',',I3,',', &
1257                  I3,')')
1258138 FORMAT ('     Using hybrid version for 1d-domain-decomposition')
1259139 FORMAT (' --> Loop optimization method: ',A)
1260140 FORMAT ('     maximum residual allowed:                ',E10.3)
1261141 FORMAT ('     fixed number of multigrid cycles:        ',I4)
1262142 FORMAT ('     perturbation pressure is calculated at every Runge-Kutta ', &
1263                  'step')
1264143 FORMAT ('     Euler/upstream scheme is used for the SGS turbulent ', &
1265                  'kinetic energy')
1266150 FORMAT (' --> Volume flow at the right and north boundary will be ', &
1267                  'conserved')
1268200 FORMAT (//' Run time and time step information:'/ &
1269             ' ----------------------------------'/)
1270201 FORMAT ( ' Timestep:          variable     maximum value: ',F6.3,' s', &
1271             '    CFL-factor: ',F4.2)
1272202 FORMAT ( ' Timestep:       dt = ',F6.3,' s'/)
1273203 FORMAT ( ' Start time:       ',F9.3,' s'/ &
1274             ' End time:         ',F9.3,' s')
1275204 FORMAT ( A,F9.3,' s')
1276205 FORMAT ( A,F9.3,' s',5X,'restart every',17X,F9.3,' s')
1277206 FORMAT (/' Time reached:     ',F9.3,' s'/ &
1278             ' CPU-time used:    ',F9.3,' s     per timestep:               ', &
1279               '  ',F9.3,' s'/                                                 &
1280             '                                   per second of simulated tim', &
1281               'e: ',F9.3,' s')
1282250 FORMAT (//' Computational grid and domain size:'/ &
1283              ' ----------------------------------'// &
1284              ' Grid length:      dx =    ',F7.3,' m    dy =    ',F7.3, &
1285              ' m    dz =    ',F7.3,' m'/ &
1286              ' Domain size:       x = ',F10.3,' m     y = ',F10.3, &
1287              ' m  z(u) = ',F10.3,' m'/)
1288252 FORMAT (' dz constant up to ',F10.3,' m (k=',I4,'), then stretched by', &
1289              ' factor: ',F5.3/ &
1290            ' maximum dz not to be exceeded is dz_max = ',F10.3,' m'/)
1291254 FORMAT (' Number of gridpoints (x,y,z):  (0:',I4,', 0:',I4,', 0:',I4,')'/ &
1292            ' Subdomain size (x,y,z):        (  ',I4,',   ',I4,',   ',I4,')'/)
1293255 FORMAT (' Subdomains have equal size')
1294256 FORMAT (' Subdomains at the upper edges of the virtual processor grid ', &
1295              'have smaller sizes'/                                          &
1296            ' Size of smallest subdomain:    (  ',I4,',   ',I4,',   ',I4,')')
1297260 FORMAT (/' The model has a slope in x-direction. Inclination angle: ',F6.2,&
1298             ' degrees')
1299270 FORMAT (//' Topography informations:'/ &
1300              ' -----------------------'// &
1301              1X,'Topography: ',A)
1302271 FORMAT (  ' Building size (x/y/z) in m: ',F5.1,' / ',F5.1,' / ',F5.1/ &
1303              ' Horizontal index bounds (l/r/s/n): ',I4,' / ',I4,' / ',I4, &
1304                ' / ',I4)
1305300 FORMAT (//' Boundary conditions:'/ &
1306             ' -------------------'// &
1307             '                     p                    uv             ', &
1308             '                   pt'// &
1309             ' B. bound.: ',A/ &
1310             ' T. bound.: ',A)
1311301 FORMAT (/'                     ',A// &
1312             ' B. bound.: ',A/ &
1313             ' T. bound.: ',A)
1314303 FORMAT (/' Bottom surface fluxes are used in diffusion terms at k=1')
1315304 FORMAT (/' Top surface fluxes are used in diffusion terms at k=nzt')
1316305 FORMAT (//'    Prandtl-Layer between bottom surface and first ', &
1317               'computational u,v-level:'// &
1318             '       zp = ',F6.2,' m   z0 = ',F6.4,' m   kappa = ',F4.2/ &
1319             '       Rif value range:   ',F6.2,' <= rif <=',F6.2)
1320306 FORMAT ('       Predefined constant heatflux:   ',F9.6,' K m/s')
1321307 FORMAT ('       Heatflux has a random normal distribution')
1322308 FORMAT ('       Predefined surface temperature')
1323309 FORMAT ('       Predefined constant salinityflux:   ',F9.6,' psu m/s')
1324310 FORMAT (//'    1D-Model:'// &
1325             '       Rif value range:   ',F6.2,' <= rif <=',F6.2)
1326311 FORMAT ('       Predefined constant humidity flux: ',E10.3,' m/s')
1327312 FORMAT ('       Predefined surface humidity')
1328313 FORMAT ('       Predefined constant scalar flux: ',E10.3,' kg/(m**2 s)')
1329314 FORMAT ('       Predefined scalar value at the surface')
1330315 FORMAT ('       Humidity / scalar flux at top surface is 0.0')
1331317 FORMAT (//' Lateral boundaries:'/ &
1332            '       left/right:  ',A/    &
1333            '       north/south: ',A)
1334318 FORMAT (/'       outflow damping layer width: ',I3,' gridpoints with km_', &
1335                    'max =',F5.1,' m**2/s')
1336320 FORMAT (//' List output:'/ &
1337             ' -----------'//  &
1338            '    1D-Profiles:'/    &
1339            '       Output every             ',F8.2,' s')
1340321 FORMAT ('       Time averaged over       ',F8.2,' s'/ &
1341            '       Averaging input every    ',F8.2,' s')
1342330 FORMAT (//' Data output:'/ &
1343             ' -----------'/)
1344331 FORMAT (/'    1D-Profiles:')
1345332 FORMAT (/'       ',A)
1346333 FORMAT ('       Output every             ',F8.2,' s',/ &
1347            '       Time averaged over       ',F8.2,' s'/ &
1348            '       Averaging input every    ',F8.2,' s')
1349334 FORMAT (/'    2D-Arrays',A,':')
1350335 FORMAT (/'       ',A2,'-cross-section  Arrays: ',A/ &
1351            '       Output every             ',F8.2,' s  ',A/ &
1352            '       Cross sections at ',A1,' = ',A/ &
1353            '       scalar-coordinates:   ',A,' m'/)
1354336 FORMAT (/'    3D-Arrays',A,':')
1355337 FORMAT (/'       Arrays: ',A/ &
1356            '       Output every             ',F8.2,' s  ',A/ &
1357            '       Upper output limit at    ',F8.2,' m  (GP ',I4,')'/)
1358338 FORMAT ('       Compressed data output'/ &
1359            '       Decimal precision: ',A/)
1360339 FORMAT ('       No output during initial ',F8.2,' s')
1361340 FORMAT (/'    Time series:')
1362341 FORMAT ('       Output every             ',F8.2,' s'/)
1363342 FORMAT (/'       ',A2,'-cross-section  Arrays: ',A/ &
1364            '       Output every             ',F8.2,' s  ',A/ &
1365            '       Time averaged over       ',F8.2,' s'/ &
1366            '       Averaging input every    ',F8.2,' s'/ &
1367            '       Cross sections at ',A1,' = ',A/ &
1368            '       scalar-coordinates:   ',A,' m'/)
1369343 FORMAT (/'       Arrays: ',A/ &
1370            '       Output every             ',F8.2,' s  ',A/ &
1371            '       Time averaged over       ',F8.2,' s'/ &
1372            '       Averaging input every    ',F8.2,' s'/ &
1373            '       Upper output limit at    ',F8.2,' m  (GP ',I4,')'/)
1374345 FORMAT ('       Output format: ',A/)
1375#if defined( __dvrp_graphics )
1376360 FORMAT ('    Plot-Sequence with dvrp-software:'/ &
1377            '       Output every      ',F7.1,' s'/ &
1378            '       Output mode:      ',A/ &
1379            '       Host / User:      ',A,' / ',A/ &
1380            '       Directory:        ',A// &
1381            '       The sequence contains:')
1382361 FORMAT ('       Isosurface of ',A,'  Threshold value: ', E12.3)
1383362 FORMAT ('       Sectional plane ',A)
1384363 FORMAT ('       Particles')
1385#endif
1386#if defined( __spectra )
1387370 FORMAT ('    Spectra:')
1388371 FORMAT ('       Output every ',F7.1,' s'/)
1389372 FORMAT ('       Arrays:     ', 10(A5,',')/                         &
1390            '       Directions: ', 10(A5,',')/                         &
1391            '       height levels  k = ', 9(I3,','),I3,'.'/            &
1392            '       height levels selected for standard plot:'/        &
1393            '                      k = ', 9(I3,','),I3,'.'/            &
1394            '       Time averaged over ', F7.1, ' s,' /                &
1395            '       Profiles for the time averaging are taken every ', &
1396                    F6.1,' s')
1397#endif
1398400 FORMAT (//' Physical quantities:'/ &
1399              ' -------------------'/)
1400410 FORMAT ('    Angular velocity    :   omega = ',E9.3,' rad/s'/  &
1401            '    Geograph. latitude  :   phi   = ',F4.1,' degr'/   &
1402            '    Coriolis parameter  :   f     = ',F9.6,' 1/s'/    &
1403            '                            f*    = ',F9.6,' 1/s')
1404411 FORMAT (/'    Gravity             :   g     = ',F4.1,' m/s**2')
1405412 FORMAT (/'    Reference density in buoyancy terms: ',F8.3,' kg/m**3')
1406413 FORMAT (/'    Reference temperature in buoyancy terms: ',F8.4,' K')
1407415 FORMAT (/'    Cloud physics parameters:'/ &
1408             '    ------------------------'/)
1409416 FORMAT ('        Surface pressure   :   p_0   = ',F7.2,' hPa'/      &
1410            '        Gas constant       :   R     = ',F5.1,' J/(kg K)'/ &
1411            '        Density of air     :   rho_0 = ',F5.3,' kg/m**3'/  &
1412            '        Specific heat cap. :   c_p   = ',F6.1,' J/(kg K)'/ &
1413            '        Vapourization heat :   L_v   = ',E8.2,' J/kg')
1414420 FORMAT (/'    Characteristic levels of the initial temperature profile:'// &
1415            '       Height:        ',A,'  m'/ &
1416            '       Temperature:   ',A,'  K'/ &
1417            '       Gradient:      ',A,'  K/100m'/ &
1418            '       Gridpoint:     ',A)
1419421 FORMAT (/'    Characteristic levels of the initial humidity profile:'// &
1420            '       Height:      ',A,'  m'/ &
1421            '       Humidity:    ',A,'  kg/kg'/ &
1422            '       Gradient:    ',A,'  (kg/kg)/100m'/ &
1423            '       Gridpoint:   ',A)
1424422 FORMAT (/'    Characteristic levels of the initial scalar profile:'// &
1425            '       Height:                  ',A,'  m'/ &
1426            '       Scalar concentration:    ',A,'  kg/m**3'/ &
1427            '       Gradient:                ',A,'  (kg/m**3)/100m'/ &
1428            '       Gridpoint:               ',A)
1429423 FORMAT (/'    Characteristic levels of the geo. wind component ug:'// &
1430            '       Height:      ',A,'  m'/ &
1431            '       ug:          ',A,'  m/s'/ &
1432            '       Gradient:    ',A,'  1/100s'/ &
1433            '       Gridpoint:   ',A)
1434424 FORMAT (/'    Characteristic levels of the geo. wind component vg:'// &
1435            '       Height:      ',A,'  m'/ &
1436            '       vg:          ',A,'  m/s'/ &
1437            '       Gradient:    ',A,'  1/100s'/ &
1438            '       Gridpoint:   ',A)
1439425 FORMAT (/'    Characteristic levels of the initial salinity profile:'// &
1440            '       Height:     ',A,'  m'/ &
1441            '       Salinity:   ',A,'  psu'/ &
1442            '       Gradient:   ',A,'  psu/100m'/ &
1443            '       Gridpoint:  ',A)
1444450 FORMAT (//' LES / Turbulence quantities:'/ &
1445              ' ---------------------------'/)
1446451 FORMAT ('   Diffusion coefficients are constant:'/ &
1447            '   Km = ',F6.2,' m**2/s   Kh = ',F6.2,' m**2/s   Pr = ',F5.2)
1448452 FORMAT ('   Mixing length is limited to the Prandtl mixing lenth.')
1449453 FORMAT ('   Mixing length is limited to ',F4.2,' * z')
1450454 FORMAT ('   TKE is not allowed to fall below ',E9.2,' (m/s)**2')
1451470 FORMAT (//' Actions during the simulation:'/ &
1452              ' -----------------------------'/)
1453471 FORMAT ('    Disturbance impulse (u,v) every :   ',F6.2,' s'/            &
1454            '    Disturbance amplitude           :     ',F4.2, ' m/s'/       &
1455            '    Lower disturbance level         : ',F8.2,' m (GP ',I4,')'/  &
1456            '    Upper disturbance level         : ',F8.2,' m (GP ',I4,')')
1457472 FORMAT ('    Disturbances continued during the run from i/j =',I4, &
1458                 ' to i/j =',I4)
1459473 FORMAT ('    Disturbances cease as soon as the disturbance energy exceeds',&
1460                 1X,F5.3, ' m**2/s**2')
1461474 FORMAT ('    Random number generator used    : ',A/)
1462475 FORMAT ('    The surface temperature is increased (or decreased, ', &
1463                 'respectively, if'/ &
1464            '    the value is negative) by ',F5.2,' K at the beginning of the',&
1465                 ' 3D-simulation'/)
1466476 FORMAT ('    The surface humidity is increased (or decreased, ',&
1467                 'respectively, if the'/ &
1468            '    value is negative) by ',E8.1,' kg/kg at the beginning of', &
1469                 ' the 3D-simulation'/)
1470477 FORMAT ('    The scalar value is increased at the surface (or decreased, ',&
1471                 'respectively, if the'/ &
1472            '    value is negative) by ',E8.1,' kg/m**3 at the beginning of', &
1473                 ' the 3D-simulation'/)
1474480 FORMAT ('    Particles:'/ &
1475            '    ---------'// &
1476            '       Particle advection is active (switched on at t = ', F7.1, &
1477                    ' s)'/ &
1478            '       Start of new particle generations every  ',F6.1,' s'/ &
1479            '       Boundary conditions: left/right: ', A, ' north/south: ', A/&
1480            '                            bottom:     ', A, ' top:         ', A/&
1481            '       Maximum particle age:                 ',F9.1,' s'/ &
1482            '       Advection stopped at t = ',F9.1,' s'/)
1483481 FORMAT ('       Particles have random start positions'/)
1484482 FORMAT ('       Particles are advected only horizontally'/)
1485483 FORMAT ('       Particles have tails with a maximum of ',I3,' points')
1486484 FORMAT ('            Number of tails of the total domain: ',I10/ &
1487            '            Minimum distance between tailpoints: ',F8.2,' m'/ &
1488            '            Maximum age of the end of the tail:  ',F8.2,' s')
1489485 FORMAT ('       Particle data are written on file every ', F9.1, ' s')
1490486 FORMAT ('       Particle statistics are written on file'/)
1491487 FORMAT ('       Number of particle groups: ',I2/)
1492488 FORMAT ('       SGS velocity components are used for particle advection'/ &
1493            '          minimum timestep for advection: ', F7.5/)
1494489 FORMAT ('       Number of particles simultaneously released at each ', &
1495                    'point: ', I5/)
1496490 FORMAT ('       Particle group ',I2,':'/ &
1497            '          Particle radius: ',E10.3, 'm')
1498491 FORMAT ('          Particle inertia is activated'/ &
1499            '             density_ratio (rho_fluid/rho_particle) = ',F5.3/)
1500492 FORMAT ('          Particles are advected only passively (no inertia)'/)
1501493 FORMAT ('          Boundaries of particle source: x:',F8.1,' - ',F8.1,' m'/&
1502            '                                         y:',F8.1,' - ',F8.1,' m'/&
1503            '                                         z:',F8.1,' - ',F8.1,' m'/&
1504            '          Particle distances:  dx = ',F8.1,' m  dy = ',F8.1, &
1505                       ' m  dz = ',F8.1,' m'/)
1506494 FORMAT ('       Output of particle time series in NetCDF format every ', &
1507                    F8.2,' s'/)
1508495 FORMAT ('       Number of particles in total domain: ',I10/)
1509500 FORMAT (//' 1D-Model parameters:'/                           &
1510              ' -------------------'//                           &
1511            '    Simulation time:                   ',F8.1,' s'/ &
1512            '    Run-controll output every:         ',F8.1,' s'/ &
1513            '    Vertical profile output every:     ',F8.1,' s'/ &
1514            '    Mixing length calculation:         ',A/         &
1515            '    Dissipation calculation:           ',A/)
1516502 FORMAT ('    Damping layer starts from ',F7.1,' m (GP ',I4,')'/)
1517
1518
1519 END SUBROUTINE header
Note: See TracBrowser for help on using the repository browser.