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

Last change on this file since 667 was 667, checked in by suehring, 13 years ago

summary:


Gryschka:

  • Coupling with different resolution and different numbers of PEs in ocean and atmosphere is available
  • Exchange of u and v from ocean surface to atmosphere surface
  • Mirror boundary condition for u and v at the bottom are replaced by dirichlet boundary conditions
  • Inflow turbulence is now defined by flucuations around spanwise mean
  • Bugfixes for cyclic_fill and constant_volume_flow

Suehring:

  • New advection added ( Wicker and Skamarock 5th order ), therefore:
    • New module advec_ws.f90
    • Modified exchange of ghost boundaries.
    • Modified evaluation of turbulent fluxes
    • New index bounds nxlg, nxrg, nysg, nyng

advec_ws.f90


Advection scheme for scalars and momentum using the flux formulation of
Wicker and Skamarock 5th order.
Additionally the module contains of a routine using for initialisation and
steering of the statical evaluation. The computation of turbulent fluxes takes
place inside the advection routines.
In case of vector architectures Dirichlet and Radiation boundary conditions are
outstanding and not available. Furthermore simulations within topography are
not possible so far. A further routine local_diss_ij is available and is used
if a control of dissipative fluxes is desired.

check_parameters.f90


Exchange of parameters between ocean and atmosphere via PE0
Check for illegal combination of ws-scheme and timestep scheme.
Check for topography and ws-scheme.
Check for not cyclic boundary conditions in combination with ws-scheme and
loop_optimization = 'vector'.
Check for call_psolver_at_all_substeps and ws-scheme for momentum_advec.

Different processor/grid topology in atmosphere and ocean is now allowed!
Bugfixes in checking for conserve_volume_flow_mode.

exchange_horiz.f90


Dynamic exchange of ghost points with nbgp_local to ensure that no useless
ghost points exchanged in case of multigrid. type_yz(0) and type_xz(0) used for
normal grid, the remaining types used for the several grid levels.
Exchange is done via MPI-Vectors with a dynamic value of ghost points which
depend on the advection scheme. Exchange of left and right PEs is 10% faster
with MPI-Vectors than without.

flow_statistics.f90


When advection is computed with ws-scheme, turbulent fluxes are already
computed in the respective advection routines and buffered in arrays
sums_xxxx_ws_l(). This is due to a consistent treatment of statistics
with the numerics and to avoid unphysical kinks near the surface. So some if-
requests has to be done to dicern between fluxes from ws-scheme other advection
schemes. Furthermore the computation of z_i is only done if the heat flux
exceeds a minimum value. This affects only simulations of a neutral boundary
layer and is due to reasons of computations in the advection scheme.

inflow_turbulence.f90


Using nbgp recycling planes for a better resolution of the turbulent flow near
the inflow.

init_grid.f90


Definition of new array bounds nxlg, nxrg, nysg, nyng on each PE.
Furthermore the allocation of arrays and steering of loops is done with these
parameters. Call of exchange_horiz are modified.
In case of dirichlet bounday condition at the bottom zu(0)=0.0
dzu_mg has to be set explicitly for a equally spaced grid near bottom.
ddzu_pres added to use a equally spaced grid near bottom.

init_pegrid.f90


Moved determination of target_id's from init_coupling
Determination of parameters needed for coupling (coupling_topology, ngp_a, ngp_o)
with different grid/processor-topology in ocean and atmosphere

Adaption of ngp_xy, ngp_y to a dynamic number of ghost points.
The maximum_grid_level changed from 1 to 0. 0 is the normal grid, 1 to
maximum_grid_level the grids for multigrid, in which 0 and 1 are normal grids.
This distinction is due to reasons of data exchange and performance for the
normal grid and grids in poismg.
The definition of MPI-Vectors adapted to a dynamic numer of ghost points.
New MPI-Vectors for data exchange between left and right boundaries added.
This is due to reasons of performance (10% faster).

ATTENTION: nnz_x undefined problem still has to be solved!!!!!!!!
TEST OUTPUT (TO BE REMOVED) logging mpi2 ierr values

parin.f90


Steering parameter dissipation_control added in inipar.

Makefile


Module advec_ws added.

Modules


Removed u_nzb_p1_for_vfc and v_nzb_p1_for_vfc

For coupling with different resolution in ocean and atmophere:
+nx_a, +nx_o, ny_a, +ny_o, ngp_a, ngp_o, +total_2d_o, +total_2d_a,
+coupling_topology

Buffer arrays for the left sided advective fluxes added in arrays_3d.
+flux_s_u, +flux_s_v, +flux_s_w, +diss_s_u, +diss_s_v, +diss_s_w,
+flux_s_pt, +diss_s_pt, +flux_s_e, +diss_s_e, +flux_s_q, +diss_s_q,
+flux_s_sa, +diss_s_sa
3d arrays for dissipation control added. (only necessary for vector arch.)
+var_x, +var_y, +var_z, +gamma_x, +gamma_y, +gamma_z
Default of momentum_advec and scalar_advec changed to 'ws-scheme' .
+exchange_mg added in control_parameters to steer the data exchange.
Parameters +nbgp, +nxlg, +nxrg, +nysg, +nyng added in indices.
flag array +boundary_flags added in indices to steer the degradation of order
of the advective fluxes when non-cyclic boundaries are used.
MPI-datatypes +type_y, +type_y_int and +type_yz for data_exchange added in
pegrid.
+sums_wsus_ws_l, +sums_wsvs_ws_l, +sums_us2_ws_l, +sums_vs2_ws_l,
+sums_ws2_ws_l, +sums_wspts_ws_l, +sums_wssas_ws_l, +sums_wsqs_ws_l
and +weight_substep added in statistics to steer the statistical evaluation
of turbulent fluxes in the advection routines.
LOGICALS +ws_scheme_sca and +ws_scheme_mom added to get a better performance
in prognostic_equations.
LOGICAL +dissipation_control control added to steer numerical dissipation
in ws-scheme.

Changed length of string run_description_header

pres.f90


New allocation of tend when ws-scheme and multigrid is used. This is due to
reasons of perforance of the data_exchange. The same is done with p after
poismg is called.
nxl-1, nxr+1, nys-1, nyn+1 replaced by nxlg, nxrg, nysg, nyng when no
multigrid is used. Calls of exchange_horiz are modified.

bugfix: After pressure correction no volume flow correction in case of
non-cyclic boundary conditions
(has to be done only before pressure correction)

Call of SOR routine is referenced with ddzu_pres.

prognostic_equations.f90


Calls of the advection routines with WS5 added.
Calls of ws_statistics added to set the statistical arrays to zero after each
time step.

advec_particles.f90


Declaration of de_dx, de_dy, de_dz adapted to additional ghost points.
Furthermore the calls of exchange_horiz were modified.

asselin_filter.f90


nxl-1, nxr+1, nys-1, nyn+1 replaced by nxlg, nxrg, nysg, nyng

average_3d_data.f90


nxl-1, nxr+1, nys-1, nyn+1 replaced by nxlg, nxrg, nysg, nyng

boundary_conds.f90


nxl-1, nxr+1, nys-1, nyn+1 replaced by nxlg, nxrg, nysg, nyng
Removed mirror boundary conditions for u and v at the bottom in case of
ibc_uv_b == 0. Instead, dirichelt boundary conditions (u=v=0) are set
in init_3d_model

calc_liquid_water_content.f90


nxl-1, nxr+1, nys-1, nyn+1 replaced by nxlg, nxrg, nysg, nyng

calc_spectra.f90


nxl-1, nxr+1, nys-1, nyn+1 replaced by nxlg, nxrg, nysg, nyng for
allocation of tend.

check_open.f90


Output of total array size was adapted to nbgp.

data_output_2d.f90


nxl-1, nxr+1, nys-1, nyn+1 replaced by nxlg, nxrg, nysg, nyng in loops and
allocation of arrays local_2d and total_2d.
Calls of exchange_horiz are modified.

data_output_2d.f90


nxl-1, nxr+1, nys-1, nyn+1 replaced by nxlg, nxrg, nysg, nyng in loops and
allocation of arrays. Calls of exchange_horiz are modified.
Skip-value skip_do_avs changed to a dynamic adaption of ghost points.

data_output_mask.f90


Calls of exchange_horiz are modified.

diffusion_e.f90


nxl-1, nxr+1, nys-1, nyn+1 replaced by nxlg, nxrg, nysg, nyng

diffusion_s.f90


nxl-1, nxr+1, nys-1, nyn+1 replaced by nxlg, nxrg, nysg, nyng

diffusion_u.f90


nxl-1, nxr+1, nys-1, nyn+1 replaced by nxlg, nxrg, nysg, nyng

diffusion_v.f90


nxl-1, nxr+1, nys-1, nyn+1 replaced by nxlg, nxrg, nysg, nyng

diffusion_w.f90


nxl-1, nxr+1, nys-1, nyn+1 replaced by nxlg, nxrg, nysg, nyng

diffusivities.f90


nxl-1, nxr+1, nys-1, nyn+1 replaced by nxlg, nxrg, nysg, nyng

diffusivities.f90


nxl-1, nxr+1, nys-1, nyn+1 replaced by nxlg, nxrg, nysg, nyng.
Calls of exchange_horiz are modified.

exchange_horiz_2d.f90


Dynamic exchange of ghost points with nbgp, which depends on the advection
scheme. Exchange between left and right PEs is now done with MPI-vectors.

global_min_max.f90


Adapting of the index arrays, because MINLOC assumes lowerbound
at 1 and not at nbgp.

init_3d_model.f90


nxl-1, nxr+1, nys-1, nyn+1 replaced by nxlg, nxrg, nysg, nyng in loops and
allocation of arrays. Calls of exchange_horiz are modified.
Call ws_init to initialize arrays needed for statistical evaluation and
optimization when ws-scheme is used.
Initial volume flow is now calculated by using the variable hom_sum.
Therefore the correction of initial volume flow for non-flat topography
removed (removed u_nzb_p1_for_vfc and v_nzb_p1_for_vfc)
Changed surface boundary conditions for u and v in case of ibc_uv_b == 0 from
mirror bc to dirichlet boundary conditions (u=v=0), so that k=nzb is
representative for the height z0

Bugfix: type conversion of '1' to 64bit for the MAX function (ngp_3d_inner)

init_coupling.f90


determination of target_id's moved to init_pegrid

init_pt_anomaly.f90


Call of exchange_horiz are modified.

init_rankine.f90


nxl-1, nxr+1, nys-1, nyn+1 replaced by nxlg, nxrg, nysg, nyng.
Calls of exchange_horiz are modified.

init_slope.f90


nxl-1, nxr+1, nys-1, nyn+1 replaced by nxlg, nxrg, nysg, nyng.

header.f90


Output of advection scheme.

poismg.f90


Calls of exchange_horiz are modified.

prandtl_fluxes.f90


Changed surface boundary conditions for u and v from mirror bc to dirichelt bc,
therefore u(uzb,:,:) and v(nzb,:,:) is now representative for the height z0
nxl-1, nxr+1, nys-1, nyn+1 replaced by nxlg, nxrg, nysg, nyng

production_e.f90


nxl-1, nxr+1, nys-1, nyn+1 replaced by nxlg, nxrg, nysg, nyng

read_3d_binary.f90


+/- 1 replaced with +/- nbgp when swapping and allocating variables.

sor.f90


nxl-1, nxr+1, nys-1, nyn+1 replaced by nxlg, nxrg, nysg, nyng.
Call of exchange_horiz are modified.
bug removed in declaration of ddzw(), nz replaced by nzt+1

subsidence.f90


nxl-1, nxr+1, nys-1, nyn+1 replaced by nxlg, nxrg, nysg, nyng.

sum_up_3d_data.f90


nxl-1, nxr+1, nys-1, nyn+1 replaced by nxlg, nxrg, nysg, nyng.

surface_coupler.f90


nxl-1, nxr+1, nys-1, nyn+1 replaced by nxlg, nxrg, nysg, nyng in
MPI_SEND() and MPI_RECV.
additional case for nonequivalent processor and grid topopolgy in ocean and
atmosphere added (coupling_topology = 1)

Added exchange of u and v from Ocean to Atmosphere

time_integration.f90


Calls of exchange_horiz are modified.
Adaption to slooping surface.

timestep.f90


nxl-1, nxr+1, nys-1, nyn+1 replaced by nxlg, nxrg, nysg, nyng.

user_3d_data_averaging.f90, user_data_output_2d.f90, user_data_output_3d.f90,
user_actions.f90, user_init.f90, user_init_plant_canopy.f90


nxl-1, nxr+1, nys-1, nyn+1 replaced by nxlg, nxrg, nysg, nyng.

user_read_restart_data.f90


Allocation with nbgp.

wall_fluxes.f90


nxl-1, nxr+1, nys-1, nyn+1 replaced by nxlg, nxrg, nysg, nyng.

write_compressed.f90


Array bounds and nx, ny adapted with nbgp.

sor.f90


bug removed in declaration of ddzw(), nz replaced by nzt+1

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