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

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

changes for Neumann p conditions both at bottom and top

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