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

Last change on this file since 3570 was 3553, checked in by suehring, 5 years ago

last commit documented

  • Property svn:keywords set to Id
File size: 97.3 KB
RevLine 
[1682]1!> @file header.f90
[2000]2!------------------------------------------------------------------------------!
[2696]3! This file is part of the PALM model system.
[1036]4!
[2000]5! PALM is free software: you can redistribute it and/or modify it under the
6! terms of the GNU General Public License as published by the Free Software
7! Foundation, either version 3 of the License, or (at your option) any later
8! version.
[1036]9!
10! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
11! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
12! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
13!
14! You should have received a copy of the GNU General Public License along with
15! PALM. If not, see <http://www.gnu.org/licenses/>.
16!
[2718]17! Copyright 1997-2018 Leibniz Universitaet Hannover
[2000]18!------------------------------------------------------------------------------!
[1036]19!
[254]20! Current revisions:
[1]21! -----------------
[1932]22!
[3553]23!
[1485]24! Former revisions:
25! -----------------
26! $Id: header.f90 3553 2018-11-22 10:30:48Z kanani $
[3553]27! variables documented
28!
29! 3552 2018-11-22 10:28:35Z suehring
[3529]30! change date format into YYYY-MM-DD
31!
32! 3525 2018-11-14 16:06:14Z kanani
[3525]33! Changes related to clean-up of biometeorology (dom_dwd_user)
34!
35! 3524 2018-11-14 13:36:44Z raasch
[3524]36! unused variables removed
37!
38! 3467 2018-10-30 19:05:21Z suehring
[3467]39! Implementation of a new aerosol module salsa.
40!
41! 3448 2018-10-29 18:14:31Z kanani
[3448]42! Add biometeorology
43!
44! 3355 2018-10-16 14:03:34Z knoop
[3347]45! Header output concerning offline nesting
46!
47! 3343 2018-10-15 10:38:52Z suehring
[3302]48! call of ocean_header
49!
50! 3298 2018-10-02 12:21:11Z kanani
[3298]51! Minor formatting (kanani)
52! Add chemistry header (basit)
53!
54! 3294 2018-10-01 02:37:10Z raasch
[3294]55! changes concerning modularization of ocean option
56!
57! 3274 2018-09-24 15:42:55Z knoop
[3274]58! Modularization of all bulk cloud physics code components
59!
60! 3241 2018-09-12 15:02:00Z raasch
[3241]61! unused variables removed
62!
63! 3232 2018-09-07 12:21:44Z raasch
[3225]64! Increase printed length of run identifier
65!
[3232]66! 3225 2018-08-30 16:33:14Z kanani
67! Increase printed length of run identifier
68!
[3225]69! 3083 2018-06-19 14:03:12Z gronemeier
[3083]70! Print RANS-mode constants
71!
72! 3065 2018-06-12 07:03:02Z Giersch
[3065]73! Header output concerning stretching revised
74!
75! 3045 2018-05-28 07:55:41Z Giersch
[3045]76! Error messages revised
77!
78! 2967 2018-04-13 11:22:08Z raasch
[2967]79! bugfix: missing parallel cpp-directives added
80!
81! 2883 2018-03-14 08:29:10Z Giersch
[2883]82! Format of the output of dt_dopr_listing (325) has been changed
83!
84! 2817 2018-02-19 16:32:21Z knoop
[2817]85! Preliminary gust module interface implemented
86!
87! 2776 2018-01-31 10:44:42Z Giersch
[2776]88! Variable synthetic_turbulence_generator has been abbreviated
89!
90! 2746 2018-01-15 12:06:04Z suehring
[2746]91! Move flag plant canopy to modules
92!
93! 2718 2018-01-02 08:49:38Z maronga
[2716]94! Corrected "Former revisions" section
95!
96! 2701 2017-12-15 15:40:50Z suehring
97! Changes from last commit documented
98!
99! 2698 2017-12-14 18:46:24Z suehring
[2701]100! Bugfix in get_topography_top_index
101!
[2716]102! 2696 2017-12-14 17:12:51Z kanani
103! Change in file header (GPL part)
[2696]104! Print information about turbulence closure (TG)
105! Print information about inifor initialization (MS)
106!
107! 2575 2017-10-24 09:57:58Z maronga
[2550]108! Added output for complex terrain simulations
109!
110! 2544 2017-10-13 18:09:32Z maronga
[2544]111! Moved initial day of year and time to inipar.
112!
113! 2339 2017-08-07 13:55:26Z gronemeier
[2339]114! corrected timestamp in header
115!
116! 2338 2017-08-07 12:15:38Z gronemeier
[2338]117! Modularize 1D model
118!
[2339]119! 2320 2017-07-21 12:47:43Z suehring
[2320]120! Modularize large-scale forcing and nudging
121!
122! 2300 2017-06-29 13:31:14Z raasch
[2300]123! host-specific code removed
124!
125! 2299 2017-06-29 10:14:38Z maronga
[2299]126! Modified output for spinups
127!
128! 2298 2017-06-29 09:28:18Z raasch
[2298]129! MPI2 related parts removed
130!
131! 2270 2017-06-09 12:18:47Z maronga
[2270]132! Renamed Prandtl layer to constant flux layer
133!
134! 2259 2017-06-08 09:09:11Z gronemeier
[2259]135! Implemented synthetic turbulence generator
136!
137! 2258 2017-06-08 07:55:13Z suehring
[2258]138! Bugfix, add pre-preprocessor directives to enable non-parrallel mode
139!
140! 2233 2017-05-30 18:08:54Z suehring
[1485]141!
[2233]142! 2232 2017-05-30 17:47:52Z suehring
143! Adjustments to new topography and surface concept
144! Generic tunnel setup added
145!
[2201]146! 2200 2017-04-11 11:37:51Z suehring
147! monotonic_adjustment removed
148!
[2119]149! 2118 2017-01-17 16:38:49Z raasch
150! OpenACC relatec code removed
151!
[2074]152! 2073 2016-11-30 14:34:05Z raasch
153! small bugfix concerning output of scalar profiles
154!
[2051]155! 2050 2016-11-08 15:00:55Z gronemeier
156! Implement turbulent outflow condition
157!
[2038]158! 2037 2016-10-26 11:15:40Z knoop
159! Anelastic approximation implemented
160!
[2001]161! 2000 2016-08-20 18:09:15Z knoop
162! Forced header and separation lines into 80 columns
163!
[1993]164! 1992 2016-08-12 15:14:59Z suehring
165! Adapted for top_scalarflux
166!
[1961]167! 1960 2016-07-12 16:34:24Z suehring
168! Treat humidity and passive scalar separately.
169! Modify misleading information concerning humidity.
170! Bugfix, change unit for humidity flux.
171!
[1958]172! 1957 2016-07-07 10:43:48Z suehring
173! flight module added
174!
[1932]175! 1931 2016-06-10 12:06:59Z suehring
176! Rename multigrid into multigrid_noopt
177!
[1903]178! 1902 2016-05-09 11:18:56Z suehring
179! Write information about masking_method only for multigrid solver
180!
[1851]181! 1849 2016-04-08 11:33:18Z hoffmann
182! Adapted for modularization of microphysics
183!
[1834]184! 1833 2016-04-07 14:23:03Z raasch
185! spectrum renamed spectra_mod, output of spectra related quantities moved to
186! spectra_mod
187!
[1832]188! 1831 2016-04-07 13:15:51Z hoffmann
189! turbulence renamed collision_turbulence,
190! drizzle renamed cloud_water_sedimentation
191!
[1827]192! 1826 2016-04-07 12:01:39Z maronga
193! Moved radiation model header output to the respective module.
194! Moved canopy model header output to the respective module.
195!
[1823]196! 1822 2016-04-07 07:49:42Z hoffmann
197! Tails removed. icloud_scheme replaced by microphysics_*
198!
[1818]199! 1817 2016-04-06 15:44:20Z maronga
200! Moved land_surface_model header output to the respective module.
201!
[1809]202! 1808 2016-04-05 19:44:00Z raasch
203! routine local_flush replaced by FORTRAN statement
204!
[1798]205! 1797 2016-03-21 16:50:28Z raasch
206! output of nesting datatransfer mode
207!
[1792]208! 1791 2016-03-11 10:41:25Z raasch
209! output of nesting informations of all domains
210!
[1789]211! 1788 2016-03-10 11:01:04Z maronga
212! Parameter dewfall removed
213!
[1787]214! 1786 2016-03-08 05:49:27Z raasch
215! cpp-direktives for spectra removed
216!
[1784]217! 1783 2016-03-06 18:36:17Z raasch
218! netcdf module and variable names changed, output of netcdf_deflate
219!
[1765]220! 1764 2016-02-28 12:45:19Z raasch
221! output of nesting informations
222!
[1698]223! 1697 2015-10-28 17:14:10Z raasch
224! small E- and F-FORMAT changes to avoid informative compiler messages about
225! insufficient field width
226!
[1692]227! 1691 2015-10-26 16:17:44Z maronga
228! Renamed prandtl_layer to constant_flux_layer, renames rif_min/rif_max to
229! zeta_min/zeta_max.
230!
[1683]231! 1682 2015-10-07 23:56:08Z knoop
232! Code annotations made doxygen readable
233!
[1676]234! 1675 2015-10-02 08:28:59Z gronemeier
235! Bugfix: Definition of topography grid levels
236!
[1662]237! 1660 2015-09-21 08:15:16Z gronemeier
238! Bugfix: Definition of building/street canyon height if vertical grid stretching
239!         starts below the maximum topography height.
240!
[1591]241! 1590 2015-05-08 13:56:27Z maronga
242! Bugfix: Added TRIM statements for character strings for LSM and radiation code
243!
[1586]244! 1585 2015-04-30 07:05:52Z maronga
245! Further output for radiation model(s).
246!
[1576]247! 1575 2015-03-27 09:56:27Z raasch
248! adjustments for psolver-queries, output of seed_follows_topography
249!
[1561]250! 1560 2015-03-06 10:48:54Z keck
251! output for recycling y shift
252!
[1558]253! 1557 2015-03-05 16:43:04Z suehring
254! output for monotonic limiter
255!
[1552]256! 1551 2015-03-03 14:18:16Z maronga
257! Added informal output for land surface model and radiation model. Removed typo.
258!
[3448]259! 1496 2014-12-02 17:25:50Z maronga
260! Renamed: "radiation -> "cloud_top_radiation"
261!
[1485]262! 1484 2014-10-21 10:53:05Z kanani
[1484]263! Changes due to new module structure of the plant canopy model:
264!   module plant_canopy_model_mod and output for new canopy model parameters
265!   (alpha_lad, beta_lad, lai_beta,...) added,
266!   drag_coefficient, leaf_surface_concentration and scalar_exchange_coefficient
267!   renamed to canopy_drag_coeff, leaf_surface_conc and leaf_scalar_exch_coeff,
268!   learde renamed leaf_area_density.
269! Bugfix: DO-WHILE-loop for lad header information additionally restricted
270! by maximum number of gradient levels (currently 10)
[1483]271!
272! 1482 2014-10-18 12:34:45Z raasch
273! information about calculated or predefined virtual processor topology adjusted
274!
[1469]275! 1468 2014-09-24 14:06:57Z maronga
276! Adapted for use on up to 6-digit processor cores
277!
[1430]278! 1429 2014-07-15 12:53:45Z knoop
279! header exended to provide ensemble_member_nr if specified
280!
[1377]281! 1376 2014-04-26 11:21:22Z boeske
282! Correction of typos
283!
[1366]284! 1365 2014-04-22 15:03:56Z boeske
285! New section 'Large scale forcing and nudging':
286! output of large scale forcing and nudging information,
287! new section for initial profiles created
288!
[1360]289! 1359 2014-04-11 17:15:14Z hoffmann
290! dt_sort_particles removed
291!
[1354]292! 1353 2014-04-08 15:21:23Z heinze
293! REAL constants provided with KIND-attribute
294!
[1329]295! 1327 2014-03-21 11:00:16Z raasch
296! parts concerning iso2d and avs output removed,
297! -netcdf output queries
298!
[1325]299! 1324 2014-03-21 09:13:16Z suehring
300! Bugfix: module spectrum added
301!
[1323]302! 1322 2014-03-20 16:38:49Z raasch
303! REAL functions provided with KIND-attribute,
304! some REAL constants defined as wp-kind
305!
[1321]306! 1320 2014-03-20 08:40:49Z raasch
[1320]307! ONLY-attribute added to USE-statements,
308! kind-parameters added to all INTEGER and REAL declaration statements,
309! kinds are defined in new module kinds,
310! revision history before 2012 removed,
311! comment fields (!:) to be used for variable explanations added to
312! all variable declaration statements
[1321]313!
[1309]314! 1308 2014-03-13 14:58:42Z fricke
315! output of the fixed number of output time levels
316! output_format adjusted for masked data if netcdf_data_format > 5
317!
[1300]318! 1299 2014-03-06 13:15:21Z heinze
319! output for using large_scale subsidence in combination
320! with large_scale_forcing
321! reformatting, more detailed explanations
322!
[1242]323! 1241 2013-10-30 11:36:58Z heinze
324! output for nudging + large scale forcing from external file
325!
[1217]326! 1216 2013-08-26 09:31:42Z raasch
327! output for transpose_compute_overlap
328!
[1213]329! 1212 2013-08-15 08:46:27Z raasch
330! output for poisfft_hybrid removed
331!
[1182]332! 1179 2013-06-14 05:57:58Z raasch
333! output of reference_state, use_reference renamed use_single_reference_value
334!
[1160]335! 1159 2013-05-21 11:58:22Z fricke
336! +use_cmax
337!
[1116]338! 1115 2013-03-26 18:16:16Z hoffmann
339! descriptions for Seifert-Beheng-cloud-physics-scheme added
340!
[1112]341! 1111 2013-03-08 23:54:10Z raasch
342! output of accelerator board information
343! ibc_p_b = 2 removed
344!
[1109]345! 1108 2013-03-05 07:03:32Z raasch
346! bugfix for r1106
347!
[1107]348! 1106 2013-03-04 05:31:38Z raasch
349! some format changes for coupled runs
350!
[1093]351! 1092 2013-02-02 11:24:22Z raasch
352! unused variables removed
353!
[1037]354! 1036 2012-10-22 13:43:42Z raasch
355! code put under GPL (PALM 3.9)
356!
[1035]357! 1031 2012-10-19 14:35:30Z raasch
358! output of netCDF data format modified
359!
[1017]360! 1015 2012-09-27 09:23:24Z raasch
[1365]361! output of Adjustment of mixing length to the Prandtl mixing length at first
[1017]362! grid point above ground removed
363!
[1004]364! 1003 2012-09-14 14:35:53Z raasch
365! output of information about equal/unequal subdomain size removed
366!
[1002]367! 1001 2012-09-13 14:08:46Z raasch
368! all actions concerning leapfrog- and upstream-spline-scheme removed
369!
[979]370! 978 2012-08-09 08:28:32Z fricke
371! -km_damp_max, outflow_damping_width
372! +pt_damping_factor, pt_damping_width
373! +z0h
374!
[965]375! 964 2012-07-26 09:14:24Z raasch
376! output of profil-related quantities removed
377!
[941]378! 940 2012-07-09 14:31:00Z raasch
379! Output in case of simulations for pure neutral stratification (no pt-equation
380! solved)
381!
[928]382! 927 2012-06-06 19:15:04Z raasch
383! output of masking_method for mg-solver
384!
[869]385! 868 2012-03-28 12:21:07Z raasch
386! translation velocity in Galilean transformation changed to 0.6 * ug
387!
[834]388! 833 2012-02-22 08:55:55Z maronga
389! Adjusted format for leaf area density
390!
[829]391! 828 2012-02-21 12:00:36Z raasch
392! output of dissipation_classes + radius_classes
393!
[826]394! 825 2012-02-19 03:03:44Z raasch
395! Output of cloud physics parameters/quantities complemented and restructured
396!
[1]397! Revision 1.1  1997/08/11 06:17:20  raasch
398! Initial revision
399!
400!
401! Description:
402! ------------
[1764]403!> Writing a header with all important information about the current run.
[1682]404!> This subroutine is called three times, two times at the beginning
405!> (writing information on files RUN_CONTROL and HEADER) and one time at the
406!> end of the run, then writing additional information about CPU-usage on file
407!> header.
[411]408!-----------------------------------------------------------------------------!
[1682]409 SUBROUTINE header
410 
[1]411
[1320]412    USE arrays_3d,                                                             &
[2232]413        ONLY:  pt_init, q_init, s_init, sa_init, ug, vg, w_subs, zu, zw
[3274]414
415    USE basic_constants_and_equations_mod,                                     &
[3524]416        ONLY:  g, kappa, l_v
[3274]417
[3448]418    USE biometeorology_mod,                                                    &
[3525]419        ONLY:  bio_header
[3448]420
[3274]421    USE bulk_cloud_model_mod,                                                  &
422        ONLY:  bulk_cloud_model, bcm_header
423
[3298]424    USE chemistry_model_mod,                                                   &
425        ONLY:  chem_header
426
[1]427    USE control_parameters
[1849]428
[1320]429    USE cpulog,                                                                &
430        ONLY:  log_point_s
[3298]431
[2544]432    USE date_and_time_mod,                                                     &
433        ONLY:  day_of_year_init, time_utc_init
434
[1320]435    USE dvrp_variables,                                                        &
436        ONLY:  use_seperate_pe_for_dvrp_output
437       
[1957]438    USE flight_mod,                                                            &
439        ONLY:  flight_header
440       
[1320]441    USE grid_variables,                                                        &
442        ONLY:  dx, dy
[2817]443
444    USE gust_mod,                                                              &
445        ONLY: gust_header, gust_module_enabled
[3448]446
[1320]447    USE indices,                                                               &
448        ONLY:  mg_loc_ind, nnx, nny, nnz, nx, ny, nxl_mg, nxr_mg, nyn_mg,      &
449               nys_mg, nzt, nzt_mg
450       
451    USE kinds
[1817]452 
[1551]453    USE land_surface_model_mod,                                                &
[2232]454        ONLY: lsm_header
[1849]455
[2320]456    USE lsf_nudging_mod,                                                       &
457        ONLY:  lsf_nudging_header
458
[2338]459    USE model_1d_mod,                                                          &
[1320]460        ONLY:  damp_level_ind_1d, dt_pr_1d, dt_run_control_1d, end_time_1d
[2338]461
[1783]462    USE netcdf_interface,                                                      &
463        ONLY:  netcdf_data_format, netcdf_data_format_string, netcdf_deflate
[3448]464
[3347]465    USE nesting_offl_mod,                                                      &
466        ONLY:  nesting_offl_header
[1783]467
[3294]468    USE ocean_mod,                                                             &
[3302]469        ONLY:  ibc_sa_t, ocean_header, prho_reference, sa_surface,             &
470               sa_vertical_gradient, sa_vertical_gradient_level,               &
471               sa_vertical_gradient_level_ind
[3294]472
[1320]473    USE particle_attributes,                                                   &
474        ONLY:  bc_par_b, bc_par_lr, bc_par_ns, bc_par_t, collision_kernel,     &
[1831]475               curvature_solution_effects,                                     &
[1320]476               density_ratio, dissipation_classes, dt_min_part, dt_prel,       &
[1359]477               dt_write_particle_data, end_time_prel,                          &
[1822]478               number_of_particle_groups, particle_advection,                  &
479               particle_advection_start,                                       &
[1320]480               particles_per_point, pdx, pdy, pdz,  psb, psl, psn, psr, pss,   &
481               pst, radius, radius_classes, random_start_position,             &
[1575]482               seed_follows_topography,                                        &
[1822]483               total_number_of_particles, use_sgs_for_particles,               &
[1320]484               vertical_particle_advection, write_particle_statistics
485       
[1]486    USE pegrid
[1484]487
488    USE plant_canopy_model_mod,                                                &
[2746]489        ONLY:  pcm_header
[2259]490
[2967]491#if defined( __parallel )
[1791]492    USE pmc_handle_communicator,                                               &
493        ONLY:  pmc_get_model_info
[2967]494#endif
[1791]495
[1764]496    USE pmc_interface,                                                         &
[1797]497        ONLY:  nested_run, nesting_datatransfer_mode, nesting_mode
[1764]498
[1551]499    USE radiation_model_mod,                                                   &
[1826]500        ONLY:  radiation, radiation_header
[3467]501               
502    USE salsa_mod,                                                             &
503        ONLY:  salsa, salsa_header       
[1324]504   
[1833]505    USE spectra_mod,                                                           &
506        ONLY:  calculate_spectra, spectra_header
[1]507
[2232]508    USE surface_mod,                                                           &
[2698]509        ONLY:  surf_def_h, get_topography_top_index_ji
[2232]510
[2259]511    USE synthetic_turbulence_generator_mod,                                    &
512        ONLY:  stg_header
513
[3083]514    USE turbulence_closure_mod,                                                &
515        ONLY:  rans_const_c, rans_const_sigma
516
[1]517    IMPLICIT NONE
518
[1320]519   
[3552]520    CHARACTER (LEN=2)  ::  do2d_mode           !< mode of 2D data output (xy, xz, yz)
[1320]521   
[3552]522    CHARACTER (LEN=5)  ::  section_chr         !< string indicating grid information where to output 2D slices
[1320]523   
[3552]524    CHARACTER (LEN=10) ::  coor_chr            !< string for subsidence velocities in large-scale forcing
525    CHARACTER (LEN=10) ::  host_chr            !< string for hostname
[1320]526   
[3552]527    CHARACTER (LEN=16) ::  begin_chr           !< string indication start time for the data output
[1320]528   
[3552]529    CHARACTER (LEN=26) ::  ver_rev             !< string for run identification
[1791]530
[3552]531    CHARACTER (LEN=32) ::  cpl_name            !< name of child domain (nesting mode only)
[1320]532   
[3552]533    CHARACTER (LEN=40) ::  output_format       !< netcdf format
[1320]534   
[3552]535    CHARACTER (LEN=70) ::  char1               !< dummy varialbe used for various strings
536    CHARACTER (LEN=70) ::  char2               !< string containing informating about the advected distance in case of Galilei transformation
537    CHARACTER (LEN=70) ::  dopr_chr            !< string indicating profile output variables
538    CHARACTER (LEN=70) ::  do2d_xy             !< string indicating 2D-xy output variables
539    CHARACTER (LEN=70) ::  do2d_xz             !< string indicating 2D-xz output variables
540    CHARACTER (LEN=70) ::  do2d_yz             !< string indicating 2D-yz output variables
541    CHARACTER (LEN=70) ::  do3d_chr            !< string indicating 3D output variables
542    CHARACTER (LEN=70) ::  domask_chr          !< string indicating masked output variables
543    CHARACTER (LEN=70) ::  run_classification  !< string classifying type of run, e.g. nested, coupled, etc.
[1320]544   
[3552]545    CHARACTER (LEN=85) ::  r_upper             !< string indicating model top boundary condition for various quantities
546    CHARACTER (LEN=85) ::  r_lower             !< string indicating bottom boundary condition for various quantities
[1320]547   
[3552]548    CHARACTER (LEN=86) ::  coordinates         !< string indicating height coordinates for profile-prescribed variables
549    CHARACTER (LEN=86) ::  gradients           !< string indicating gradients of profile-prescribed variables between the prescribed height coordinates
550    CHARACTER (LEN=86) ::  slices              !< string indicating grid coordinates of profile-prescribed subsidence velocity
551    CHARACTER (LEN=86) ::  temperatures        !< string indicating profile-prescribed subsidence velocities
552    CHARACTER (LEN=86) ::  ugcomponent         !< string indicating profile-prescribed geostrophic u-component
553    CHARACTER (LEN=86) ::  vgcomponent         !< string indicating profile-prescribed geostrophic v-component
[1]554
[3552]555    CHARACTER (LEN=1), DIMENSION(1:3) ::  dir = (/ 'x', 'y', 'z' /)  !< string indicating masking steps along certain direction
[410]556
[3552]557    INTEGER(iwp) ::  av             !< index indicating average output quantities
558    INTEGER(iwp) ::  bh             !< building height in generic single-building setup
559    INTEGER(iwp) ::  blx            !< building width in grid points along x in generic single-building setup
560    INTEGER(iwp) ::  bly            !< building width in grid points along y in generic single-building setup
561    INTEGER(iwp) ::  bxl            !< index for left building wall in generic single-building setup
562    INTEGER(iwp) ::  bxr            !< index for right building wall in generic single-building setup
563    INTEGER(iwp) ::  byn            !< index for north building wall in generic single-building setup
564    INTEGER(iwp) ::  bys            !< index for south building wall in generic single-building setup
565    INTEGER(iwp) ::  ch             !< canyon depth in generic street-canyon setup
566    INTEGER(iwp) ::  count          !< number of masked output locations
567    INTEGER(iwp) ::  cpl_parent_id  !< parent ID for the respective child model
568    INTEGER(iwp) ::  cwx            !< canyon width along x in generic street-canyon setup
569    INTEGER(iwp) ::  cwy            !< canyon width along y in generic street-canyon setup
570    INTEGER(iwp) ::  cxl            !< index for left canyon wall in generic street-canyon setup
571    INTEGER(iwp) ::  cxr            !< index for right canyon wall in generic street-canyon setup
572    INTEGER(iwp) ::  cyn            !< index for north canyon wall in generic street-canyon setup
573    INTEGER(iwp) ::  cys            !< index for south canyon wall in generic street-canyon setup
574    INTEGER(iwp) ::  dim            !< running index for masking output locations
575    INTEGER(iwp) ::  i              !< running index for various loops
576    INTEGER(iwp) ::  io             !< file unit of HEADER file
577    INTEGER(iwp) ::  l              !< substring length
578    INTEGER(iwp) ::  ll             !< substring length
579    INTEGER(iwp) ::  my_cpl_id      !< run id in a nested model setup
580    INTEGER(iwp) ::  n              !< running index over number of couplers in a nested model setup
581    INTEGER(iwp) ::  ncpl           !< number of coupler in a nested model setup
582    INTEGER(iwp) ::  npe_total      !< number of total PEs in a coupler (parent + child)
[1320]583   
[1826]584
[3552]585    REAL(wp) ::  cpuseconds_per_simulated_second  !< CPU time (in s) per simulated second
[1791]586    REAL(wp) ::  lower_left_coord_x               !< x-coordinate of nest domain
587    REAL(wp) ::  lower_left_coord_y               !< y-coordinate of nest domain
[1]588
589!
590!-- Open the output file. At the end of the simulation, output is directed
591!-- to unit 19.
592    IF ( ( runnr == 0 .OR. force_print_header )  .AND. &
593         .NOT. simulated_time_at_begin /= simulated_time )  THEN
594       io = 15   !  header output on file RUN_CONTROL
595    ELSE
596       io = 19   !  header output on file HEADER
597    ENDIF
598    CALL check_open( io )
599
600!
601!-- At the end of the run, output file (HEADER) will be rewritten with
[1551]602!-- new information
[1]603    IF ( io == 19 .AND. simulated_time_at_begin /= simulated_time ) REWIND( 19 )
604
605!
606!-- Determine kind of model run
607    IF ( TRIM( initializing_actions ) == 'read_restart_data' )  THEN
[1764]608       run_classification = 'restart run'
[328]609    ELSEIF ( TRIM( initializing_actions ) == 'cyclic_fill' )  THEN
[1764]610       run_classification = 'run with cyclic fill of 3D - prerun data'
[147]611    ELSEIF ( INDEX( initializing_actions, 'set_constant_profiles' ) /= 0 )  THEN
[1764]612       run_classification = 'run without 1D - prerun'
[197]613    ELSEIF ( INDEX( initializing_actions, 'set_1d-model_profiles' ) /= 0 )  THEN
[1764]614       run_classification = 'run with 1D - prerun'
[2696]615    ELSEIF ( INDEX( initializing_actions, 'inifor' ) /= 0 )  THEN
616       run_classification = 'run initialized with COSMO data'
[197]617    ELSEIF ( INDEX( initializing_actions, 'by_user' ) /=0 )  THEN
[1764]618       run_classification = 'run initialized by user'
[3045]619    ELSEIF ( INDEX( initializing_actions, 'initialize_vortex' ) /=0 )  THEN
620       run_classification = 'run additionally initialized by a Rankine-vortex'
621    ELSEIF ( INDEX( initializing_actions, 'initialize_ptanom' ) /=0 )  THEN
622       run_classification = 'run additionally initialized by temperature anomaly'
[1]623    ELSE
[254]624       message_string = ' unknown action(s): ' // TRIM( initializing_actions )
625       CALL message( 'header', 'PA0191', 0, 0, 0, 6, 0 )
[1]626    ENDIF
[3241]627    IF ( nested_run )  run_classification = 'nested ' // run_classification(1:63)
[3294]628    IF ( ocean_mode )  THEN
[3241]629       run_classification = 'ocean - ' // run_classification(1:61)
[97]630    ELSE
[3241]631       run_classification = 'atmosphere - ' // run_classification(1:57)
[97]632    ENDIF
[1]633
634!
635!-- Run-identification, date, time, host
636    host_chr = host(1:10)
[75]637    ver_rev = TRIM( version ) // '  ' // TRIM( revision )
[102]638    WRITE ( io, 100 )  ver_rev, TRIM( run_classification )
[291]639    IF ( TRIM( coupling_mode ) /= 'uncoupled' )  THEN
[2298]640       WRITE ( io, 101 )  coupling_mode
[291]641    ENDIF
[1108]642#if defined( __parallel )
[2299]643    IF ( coupling_start_time /= 0.0_wp  .AND. .NOT. spinup )  THEN
[1106]644       IF ( coupling_start_time > simulated_time_at_begin )  THEN
645          WRITE ( io, 109 )
646       ELSE
647          WRITE ( io, 114 )
648       ENDIF
649    ENDIF
[1108]650#endif
[1429]651    IF ( ensemble_member_nr /= 0 )  THEN
652       WRITE ( io, 512 )  run_date, run_identifier, run_time, runnr,           &
653                       ADJUSTR( host_chr ), ensemble_member_nr
654    ELSE
655       WRITE ( io, 102 )  run_date, run_identifier, run_time, runnr,           &
[102]656                       ADJUSTR( host_chr )
[1429]657    ENDIF
[1]658#if defined( __parallel )
[1482]659    IF ( npex == -1  .AND.  npey == -1 )  THEN
[1]660       char1 = 'calculated'
661    ELSE
662       char1 = 'predefined'
663    ENDIF
664    IF ( threads_per_task == 1 )  THEN
[102]665       WRITE ( io, 103 )  numprocs, pdims(1), pdims(2), TRIM( char1 )
[1]666    ELSE
[102]667       WRITE ( io, 104 )  numprocs*threads_per_task, numprocs, &
[1]668                          threads_per_task, pdims(1), pdims(2), TRIM( char1 )
669    ENDIF
[2300]670
671    IF ( pdims(2) == 1 )  THEN
[102]672       WRITE ( io, 107 )  'x'
[1]673    ELSEIF ( pdims(1) == 1 )  THEN
[102]674       WRITE ( io, 107 )  'y'
[1]675    ENDIF
[102]676    IF ( use_seperate_pe_for_dvrp_output )  WRITE ( io, 105 )
[759]677    IF ( numprocs /= maximum_parallel_io_streams )  THEN
678       WRITE ( io, 108 )  maximum_parallel_io_streams
679    ENDIF
[1]680#endif
[1764]681
682!
683!-- Nesting informations
684    IF ( nested_run )  THEN
[1791]685
[2967]686#if defined( __parallel )
[1797]687       WRITE ( io, 600 )  TRIM( nesting_mode ),                                &
688                          TRIM( nesting_datatransfer_mode )
[1791]689       CALL pmc_get_model_info( ncpl = ncpl, cpl_id = my_cpl_id )
690
691       DO  n = 1, ncpl
692          CALL pmc_get_model_info( request_for_cpl_id = n, cpl_name = cpl_name,&
693                                   cpl_parent_id = cpl_parent_id,              &
694                                   lower_left_x = lower_left_coord_x,          &
695                                   lower_left_y = lower_left_coord_y,          &
696                                   npe_total = npe_total )
697          IF ( n == my_cpl_id )  THEN
698             char1 = '*'
699          ELSE
700             char1 = ' '
701          ENDIF
702          WRITE ( io, 601 )  TRIM( char1 ), n, cpl_parent_id, npe_total,       &
703                             lower_left_coord_x, lower_left_coord_y,           &
704                             TRIM( cpl_name )
705       ENDDO
[2967]706#endif
707
[1764]708    ENDIF
[1]709    WRITE ( io, 99 )
710
711!
712!-- Numerical schemes
713    WRITE ( io, 110 )
[2696]714    IF ( rans_mode )  THEN
715       WRITE ( io, 124 )  TRIM( turbulence_closure ), 'RANS'
716    ELSE
717       WRITE ( io, 124 )  TRIM( turbulence_closure ), 'LES'
718    ENDIF
[2037]719    WRITE ( io, 121 )  TRIM( approximation )
[1]720    IF ( psolver(1:7) == 'poisfft' )  THEN
721       WRITE ( io, 111 )  TRIM( fft_method )
[1216]722       IF ( transpose_compute_overlap )  WRITE( io, 115 )
[1]723    ELSEIF ( psolver == 'sor' )  THEN
724       WRITE ( io, 112 )  nsor_ini, nsor, omega_sor
[1575]725    ELSEIF ( psolver(1:9) == 'multigrid' )  THEN
726       WRITE ( io, 135 )  TRIM(psolver), cycle_mg, maximum_grid_level, ngsrb
[1]727       IF ( mg_cycles == -1 )  THEN
728          WRITE ( io, 140 )  residual_limit
729       ELSE
730          WRITE ( io, 141 )  mg_cycles
731       ENDIF
732       IF ( mg_switch_to_pe0_level == 0 )  THEN
733          WRITE ( io, 136 )  nxr_mg(1)-nxl_mg(1)+1, nyn_mg(1)-nys_mg(1)+1, &
734                             nzt_mg(1)
[197]735       ELSEIF (  mg_switch_to_pe0_level /= -1 )  THEN
[1]736          WRITE ( io, 137 )  mg_switch_to_pe0_level,            &
737                             mg_loc_ind(2,0)-mg_loc_ind(1,0)+1, &
738                             mg_loc_ind(4,0)-mg_loc_ind(3,0)+1, &
739                             nzt_mg(mg_switch_to_pe0_level),    &
740                             nxr_mg(1)-nxl_mg(1)+1, nyn_mg(1)-nys_mg(1)+1, &
741                             nzt_mg(1)
742       ENDIF
[1931]743       IF ( psolver == 'multigrid_noopt' .AND. masking_method )  WRITE ( io, 144 )
[1]744    ENDIF
745    IF ( call_psolver_at_all_substeps  .AND. timestep_scheme(1:5) == 'runge' ) &
746    THEN
747       WRITE ( io, 142 )
748    ENDIF
749
750    IF ( momentum_advec == 'pw-scheme' )  THEN
751       WRITE ( io, 113 )
[1299]752    ELSEIF (momentum_advec == 'ws-scheme' )  THEN
[667]753       WRITE ( io, 503 )
[1]754    ENDIF
755    IF ( scalar_advec == 'pw-scheme' )  THEN
756       WRITE ( io, 116 )
[667]757    ELSEIF ( scalar_advec == 'ws-scheme' )  THEN
758       WRITE ( io, 504 )
[1]759    ELSE
760       WRITE ( io, 118 )
761    ENDIF
[63]762
763    WRITE ( io, 139 )  TRIM( loop_optimization )
764
[1]765    IF ( galilei_transformation )  THEN
766       IF ( use_ug_for_galilei_tr )  THEN
[868]767          char1 = '0.6 * geostrophic wind'
[1]768       ELSE
769          char1 = 'mean wind in model domain'
770       ENDIF
771       IF ( simulated_time_at_begin == simulated_time )  THEN
772          char2 = 'at the start of the run'
773       ELSE
774          char2 = 'at the end of the run'
775       ENDIF
[1353]776       WRITE ( io, 119 )  TRIM( char1 ), TRIM( char2 ),                        &
777                          advected_distance_x/1000.0_wp,                       &
778                          advected_distance_y/1000.0_wp
[1]779    ENDIF
[1001]780    WRITE ( io, 122 )  timestep_scheme
[87]781    IF ( use_upstream_for_tke )  WRITE ( io, 143 )
[1353]782    IF ( rayleigh_damping_factor /= 0.0_wp )  THEN
[3294]783       IF ( .NOT. ocean_mode )  THEN
[108]784          WRITE ( io, 123 )  'above', rayleigh_damping_height, &
785               rayleigh_damping_factor
786       ELSE
787          WRITE ( io, 123 )  'below', rayleigh_damping_height, &
788               rayleigh_damping_factor
789       ENDIF
[1]790    ENDIF
[940]791    IF ( neutral )  WRITE ( io, 131 )  pt_surface
[75]792    IF ( humidity )  THEN
[3274]793       IF ( .NOT. bulk_cloud_model )  THEN
[1]794          WRITE ( io, 129 )
795       ELSE
796          WRITE ( io, 130 )
797       ENDIF
798    ENDIF
799    IF ( passive_scalar )  WRITE ( io, 134 )
[240]800    IF ( conserve_volume_flow )  THEN
[241]801       WRITE ( io, 150 )  conserve_volume_flow_mode
802       IF ( TRIM( conserve_volume_flow_mode ) == 'bulk_velocity' )  THEN
803          WRITE ( io, 151 )  u_bulk, v_bulk
804       ENDIF
[240]805    ELSEIF ( dp_external )  THEN
806       IF ( dp_smooth )  THEN
[241]807          WRITE ( io, 152 )  dpdxy, dp_level_b, ', vertically smoothed.'
[240]808       ELSE
[241]809          WRITE ( io, 152 )  dpdxy, dp_level_b, '.'
[240]810       ENDIF
811    ENDIF
[1]812    WRITE ( io, 99 )
813
814!
[1551]815!-- Runtime and timestep information
[1]816    WRITE ( io, 200 )
817    IF ( .NOT. dt_fixed )  THEN
818       WRITE ( io, 201 )  dt_max, cfl_factor
819    ELSE
820       WRITE ( io, 202 )  dt
821    ENDIF
822    WRITE ( io, 203 )  simulated_time_at_begin, end_time
823
[1322]824    IF ( time_restart /= 9999999.9_wp  .AND. &
[1]825         simulated_time_at_begin == simulated_time )  THEN
[1322]826       IF ( dt_restart == 9999999.9_wp )  THEN
[1]827          WRITE ( io, 204 )  ' Restart at:       ',time_restart
828       ELSE
829          WRITE ( io, 205 )  ' Restart at:       ',time_restart, dt_restart
830       ENDIF
831    ENDIF
832
833    IF ( simulated_time_at_begin /= simulated_time )  THEN
834       i = MAX ( log_point_s(10)%counts, 1 )
[1353]835       IF ( ( simulated_time - simulated_time_at_begin ) == 0.0_wp )  THEN
836          cpuseconds_per_simulated_second = 0.0_wp
[1]837       ELSE
838          cpuseconds_per_simulated_second = log_point_s(10)%sum / &
839                                            ( simulated_time -    &
840                                              simulated_time_at_begin )
841       ENDIF
[1322]842       WRITE ( io, 206 )  simulated_time, log_point_s(10)%sum,      &
843                          log_point_s(10)%sum / REAL( i, KIND=wp ), &
[1]844                          cpuseconds_per_simulated_second
[1322]845       IF ( time_restart /= 9999999.9_wp  .AND.  time_restart < end_time )  THEN
846          IF ( dt_restart == 9999999.9_wp )  THEN
[1106]847             WRITE ( io, 204 )  ' Next restart at:     ',time_restart
[1]848          ELSE
[1106]849             WRITE ( io, 205 )  ' Next restart at:     ',time_restart, dt_restart
[1]850          ENDIF
851       ENDIF
852    ENDIF
853
[1324]854
[1]855!
[291]856!-- Start time for coupled runs, if independent precursor runs for atmosphere
[1106]857!-- and ocean are used or have been used. In this case, coupling_start_time
858!-- defines the time when the coupling is switched on.
[1353]859    IF ( coupling_start_time /= 0.0_wp )  THEN
[1106]860       WRITE ( io, 207 )  coupling_start_time
[291]861    ENDIF
862
863!
[1]864!-- Computational grid
[3294]865    IF ( .NOT. ocean_mode )  THEN
[3065]866       WRITE ( io, 250 )  dx, dy
867       
868       DO i = 1, number_stretch_level_start+1
869          WRITE ( io, 253 )  i, dz(i)
870       ENDDO
871       
872       WRITE( io, 251 ) (nx+1)*dx, (ny+1)*dy, zu(nzt+1)
873       
874       IF ( ANY( dz_stretch_level_start_index < nzt+1 ) )  THEN
875          WRITE( io, '(A)', advance='no') ' Vertical stretching starts at height:'
876          DO i = 1, number_stretch_level_start
877             WRITE ( io, '(F10.1,A3)', advance='no' )  dz_stretch_level_start(i), ' m,'
878          ENDDO
879          WRITE( io, '(/,A)', advance='no') ' Vertical stretching starts at index: '
880          DO i = 1, number_stretch_level_start
881             WRITE ( io, '(I12,A1)', advance='no' )  dz_stretch_level_start_index(i), ','
882          ENDDO
883          WRITE( io, '(/,A)', advance='no') ' Vertical stretching ends at height:  '
884          DO i = 1, number_stretch_level_start
885             WRITE ( io, '(F10.1,A3)', advance='no' )  dz_stretch_level_end(i), ' m,'
886          ENDDO
887          WRITE( io, '(/,A)', advance='no') ' Vertical stretching ends at index:   '
888          DO i = 1, number_stretch_level_start
889             WRITE ( io, '(I12,A1)', advance='no' )  dz_stretch_level_end_index(i), ','
890          ENDDO
891          WRITE( io, '(/,A)', advance='no') ' Factor used for stretching:          '
892          DO i = 1, number_stretch_level_start
893             WRITE ( io, '(F12.3,A1)', advance='no' )  dz_stretch_factor_array(i), ','
894          ENDDO
[94]895       ENDIF
[3065]896       
[94]897    ELSE
[3065]898       WRITE ( io, 250 )  dx, dy
899       DO i = 1, number_stretch_level_start+1
900          WRITE ( io, 253 )  i, dz(i)
901       ENDDO
902       
903       WRITE ( io, 251 ) (nx+1)*dx, (ny+1)*dy, zu(0)
904       
905       IF ( ANY( dz_stretch_level_start_index > 0 ) )  THEN
906          WRITE( io, '(A)', advance='no') ' Vertical stretching starts at height:'
907          DO i = 1, number_stretch_level_start
908             WRITE ( io, '(F10.1,A3)', advance='no' )  dz_stretch_level_start(i), ' m,'
909          ENDDO
910          WRITE( io, '(/,A)', advance='no') ' Vertical stretching starts at index: '
911          DO i = 1, number_stretch_level_start
912             WRITE ( io, '(I12,A1)', advance='no' )  dz_stretch_level_start_index(i), ','
913          ENDDO
914          WRITE( io, '(/,A)', advance='no') ' Vertical stretching ends at height:  '
915          DO i = 1, number_stretch_level_start
916             WRITE ( io, '(F10.1,A3)', advance='no' )  dz_stretch_level_end(i), ' m,'
917          ENDDO
918          WRITE( io, '(/,A)', advance='no') ' Vertical stretching ends at index:   '
919          DO i = 1, number_stretch_level_start
920             WRITE ( io, '(I12,A1)', advance='no' )  dz_stretch_level_end_index(i), ','
921          ENDDO
922          WRITE( io, '(/,A)', advance='no') ' Factor used for stretching:          '
923          DO i = 1, number_stretch_level_start
924             WRITE ( io, '(F12.3,A1)', advance='no' )  dz_stretch_factor_array(i), ','
925          ENDDO
[94]926       ENDIF
[1]927    ENDIF
[3065]928    WRITE ( io, 254 )  nx, ny, nzt+1, MIN( nnx, nx+1 ), MIN( nny, ny+1 ),      &
[1]929                       MIN( nnz+2, nzt+2 )
930    IF ( sloping_surface )  WRITE ( io, 260 )  alpha_surface
931
932!
[1365]933!-- Large scale forcing and nudging
[2320]934    IF ( large_scale_forcing )  CALL lsf_nudging_header( io )
[3448]935
[3347]936!
937!-- Offline nesting
938    IF ( nesting_offline )  CALL nesting_offl_header( io )
[1365]939
940!
941!-- Profile for the large scale vertial velocity
942!-- Building output strings, starting with surface value
943    IF ( large_scale_subsidence )  THEN
944       temperatures = '   0.0'
945       gradients = '------'
946       slices = '     0'
947       coordinates = '   0.0'
948       i = 1
949       DO  WHILE ( subs_vertical_gradient_level_i(i) /= -9999 )
950
951          WRITE (coor_chr,'(E10.2,7X)')  &
952                                w_subs(subs_vertical_gradient_level_i(i))
953          temperatures = TRIM( temperatures ) // ' ' // TRIM( coor_chr )
954
955          WRITE (coor_chr,'(E10.2,7X)')  subs_vertical_gradient(i)
956          gradients = TRIM( gradients ) // ' ' // TRIM( coor_chr )
957
958          WRITE (coor_chr,'(I10,7X)')  subs_vertical_gradient_level_i(i)
959          slices = TRIM( slices ) // ' ' // TRIM( coor_chr )
960
961          WRITE (coor_chr,'(F10.2,7X)')  subs_vertical_gradient_level(i)
962          coordinates = TRIM( coordinates ) // ' '  // TRIM( coor_chr )
963
964          IF ( i == 10 )  THEN
965             EXIT
966          ELSE
967             i = i + 1
968          ENDIF
969
970       ENDDO
971
972 
973       IF ( .NOT. large_scale_forcing )  THEN
974          WRITE ( io, 426 )  TRIM( coordinates ), TRIM( temperatures ), &
975                             TRIM( gradients ), TRIM( slices )
976       ENDIF
977
978
979    ENDIF
980
981!-- Profile of the geostrophic wind (component ug)
982!-- Building output strings
983    WRITE ( ugcomponent, '(F6.2)' )  ug_surface
984    gradients = '------'
985    slices = '     0'
986    coordinates = '   0.0'
987    i = 1
988    DO  WHILE ( ug_vertical_gradient_level_ind(i) /= -9999 )
989     
990       WRITE (coor_chr,'(F6.2,1X)')  ug(ug_vertical_gradient_level_ind(i))
991       ugcomponent = TRIM( ugcomponent ) // '  ' // TRIM( coor_chr )
992
993       WRITE (coor_chr,'(F6.2,1X)')  ug_vertical_gradient(i)
994       gradients = TRIM( gradients ) // '  ' // TRIM( coor_chr )
995
996       WRITE (coor_chr,'(I6,1X)')  ug_vertical_gradient_level_ind(i)
997       slices = TRIM( slices ) // '  ' // TRIM( coor_chr )
998
999       WRITE (coor_chr,'(F6.1,1X)')  ug_vertical_gradient_level(i)
1000       coordinates = TRIM( coordinates ) // '  ' // TRIM( coor_chr )
1001
1002       IF ( i == 10 )  THEN
1003          EXIT
1004       ELSE
1005          i = i + 1
1006       ENDIF
1007
1008    ENDDO
1009
1010    IF ( .NOT. large_scale_forcing )  THEN
1011       WRITE ( io, 423 )  TRIM( coordinates ), TRIM( ugcomponent ), &
1012                          TRIM( gradients ), TRIM( slices )
1013    ENDIF
1014
1015!-- Profile of the geostrophic wind (component vg)
1016!-- Building output strings
1017    WRITE ( vgcomponent, '(F6.2)' )  vg_surface
1018    gradients = '------'
1019    slices = '     0'
1020    coordinates = '   0.0'
1021    i = 1
1022    DO  WHILE ( vg_vertical_gradient_level_ind(i) /= -9999 )
1023
1024       WRITE (coor_chr,'(F6.2,1X)')  vg(vg_vertical_gradient_level_ind(i))
1025       vgcomponent = TRIM( vgcomponent ) // '  ' // TRIM( coor_chr )
1026
1027       WRITE (coor_chr,'(F6.2,1X)')  vg_vertical_gradient(i)
1028       gradients = TRIM( gradients ) // '  ' // TRIM( coor_chr )
1029
1030       WRITE (coor_chr,'(I6,1X)')  vg_vertical_gradient_level_ind(i)
1031       slices = TRIM( slices ) // '  ' // TRIM( coor_chr )
1032
1033       WRITE (coor_chr,'(F6.1,1X)')  vg_vertical_gradient_level(i)
1034       coordinates = TRIM( coordinates ) // '  ' // TRIM( coor_chr )
1035
1036       IF ( i == 10 )  THEN
1037          EXIT
1038       ELSE
1039          i = i + 1
1040       ENDIF
1041 
1042    ENDDO
1043
1044    IF ( .NOT. large_scale_forcing )  THEN
1045       WRITE ( io, 424 )  TRIM( coordinates ), TRIM( vgcomponent ), &
1046                          TRIM( gradients ), TRIM( slices )
1047    ENDIF
1048
1049!
[1]1050!-- Topography
1051    WRITE ( io, 270 )  topography
1052    SELECT CASE ( TRIM( topography ) )
1053
1054       CASE ( 'flat' )
1055          ! no actions necessary
1056
1057       CASE ( 'single_building' )
1058          blx = INT( building_length_x / dx )
1059          bly = INT( building_length_y / dy )
[1675]1060          bh  = MINLOC( ABS( zw - building_height ), 1 ) - 1
1061          IF ( ABS( zw(bh  ) - building_height ) == &
1062               ABS( zw(bh+1) - building_height )    )  bh = bh + 1
[1]1063
[1322]1064          IF ( building_wall_left == 9999999.9_wp )  THEN
[1]1065             building_wall_left = ( nx + 1 - blx ) / 2 * dx
1066          ENDIF
[1353]1067          bxl = INT ( building_wall_left / dx + 0.5_wp )
[1]1068          bxr = bxl + blx
1069
[1322]1070          IF ( building_wall_south == 9999999.9_wp )  THEN
[1]1071             building_wall_south = ( ny + 1 - bly ) / 2 * dy
1072          ENDIF
[1353]1073          bys = INT ( building_wall_south / dy + 0.5_wp )
[1]1074          byn = bys + bly
1075
1076          WRITE ( io, 271 )  building_length_x, building_length_y, &
1077                             building_height, bxl, bxr, bys, byn
1078
[240]1079       CASE ( 'single_street_canyon' )
[1675]1080          ch  = MINLOC( ABS( zw - canyon_height ), 1 ) - 1
1081          IF ( ABS( zw(ch  ) - canyon_height ) == &
1082               ABS( zw(ch+1) - canyon_height )    )  ch = ch + 1
[1322]1083          IF ( canyon_width_x /= 9999999.9_wp )  THEN
[240]1084!
1085!--          Street canyon in y direction
1086             cwx = NINT( canyon_width_x / dx )
[1322]1087             IF ( canyon_wall_left == 9999999.9_wp )  THEN
[240]1088                canyon_wall_left = ( nx + 1 - cwx ) / 2 * dx
1089             ENDIF
1090             cxl = NINT( canyon_wall_left / dx )
1091             cxr = cxl + cwx
1092             WRITE ( io, 272 )  'y', canyon_height, ch, 'u', cxl, cxr
1093
[1322]1094          ELSEIF ( canyon_width_y /= 9999999.9_wp )  THEN
[240]1095!
1096!--          Street canyon in x direction
1097             cwy = NINT( canyon_width_y / dy )
[1322]1098             IF ( canyon_wall_south == 9999999.9_wp )  THEN
[240]1099                canyon_wall_south = ( ny + 1 - cwy ) / 2 * dy
1100             ENDIF
1101             cys = NINT( canyon_wall_south / dy )
1102             cyn = cys + cwy
1103             WRITE ( io, 272 )  'x', canyon_height, ch, 'v', cys, cyn
1104          ENDIF
1105
[2232]1106       CASE ( 'tunnel' )
1107          IF ( tunnel_width_x /= 9999999.9_wp )  THEN
1108!
1109!--          Tunnel axis in y direction
1110             IF ( tunnel_length == 9999999.9_wp  .OR.                          &
1111                  tunnel_length >= ( nx + 1 ) * dx )  THEN
1112                WRITE ( io, 273 )  'y', tunnel_height, tunnel_wall_depth,      &
1113                                        tunnel_width_x
1114             ELSE
1115                WRITE ( io, 274 )  'y', tunnel_height, tunnel_wall_depth,      &
1116                                        tunnel_width_x, tunnel_length
1117             ENDIF
1118
1119          ELSEIF ( tunnel_width_y /= 9999999.9_wp )  THEN
1120!
1121!--          Tunnel axis in x direction
1122             IF ( tunnel_length == 9999999.9_wp  .OR.                          &
1123                  tunnel_length >= ( ny + 1 ) * dy )  THEN
1124                WRITE ( io, 273 )  'x', tunnel_height, tunnel_wall_depth,      &
1125                                        tunnel_width_y
1126             ELSE
1127                WRITE ( io, 274 )  'x', tunnel_height, tunnel_wall_depth,      &
1128                                        tunnel_width_y, tunnel_length
1129             ENDIF
1130          ENDIF
1131
[1]1132    END SELECT
1133
[256]1134    IF ( TRIM( topography ) /= 'flat' )  THEN
1135       IF ( TRIM( topography_grid_convention ) == ' ' )  THEN
1136          IF ( TRIM( topography ) == 'single_building' .OR.  &
1137               TRIM( topography ) == 'single_street_canyon' )  THEN
1138             WRITE ( io, 278 )
1139          ELSEIF ( TRIM( topography ) == 'read_from_file' )  THEN
1140             WRITE ( io, 279 )
1141          ENDIF
1142       ELSEIF ( TRIM( topography_grid_convention ) == 'cell_edge' )  THEN
1143          WRITE ( io, 278 )
1144       ELSEIF ( TRIM( topography_grid_convention ) == 'cell_center' )  THEN
1145          WRITE ( io, 279 )
1146       ENDIF
1147    ENDIF
1148
[2550]1149!-- Complex terrain
1150    IF ( complex_terrain )  THEN
1151       WRITE( io, 280 ) 
1152       IF ( turbulent_inflow )  THEN
[2698]1153          WRITE( io, 281 )  zu( get_topography_top_index_ji( 0, 0, 's' ) )
[2550]1154       ENDIF
1155       IF ( TRIM( initializing_actions ) == 'cyclic_fill' )  THEN
1156          WRITE( io, 282 )
1157       ENDIF
1158    ENDIF
1159
[3302]1160!
1161!-- Header information from other modules
[3525]1162    IF ( biometeorology      )  CALL bio_header ( io )
[3302]1163    IF ( gust_module_enabled )  CALL gust_header( io )
1164    IF ( land_surface        )  CALL lsm_header( io )
1165    IF ( ocean_mode          )  CALL ocean_header( io )
1166    IF ( plant_canopy        )  CALL pcm_header( io )
1167    IF ( radiation           )  CALL radiation_header( io )
1168    IF ( syn_turb_gen        )  CALL stg_header( io )
[2259]1169
[3298]1170    IF ( air_chemistry )  CALL chem_header ( io )
[1551]1171!
[1]1172!-- Boundary conditions
1173    IF ( ibc_p_b == 0 )  THEN
[1826]1174       r_lower = 'p(0)     = 0      |'
[1]1175    ELSEIF ( ibc_p_b == 1 )  THEN
[1826]1176       r_lower = 'p(0)     = p(1)   |'
[1]1177    ENDIF
1178    IF ( ibc_p_t == 0 )  THEN
[1826]1179       r_upper  = 'p(nzt+1) = 0      |'
[1]1180    ELSE
[1826]1181       r_upper  = 'p(nzt+1) = p(nzt) |'
[1]1182    ENDIF
1183
1184    IF ( ibc_uv_b == 0 )  THEN
[1826]1185       r_lower = TRIM( r_lower ) // ' uv(0)     = -uv(1)                |'
[1]1186    ELSE
[1826]1187       r_lower = TRIM( r_lower ) // ' uv(0)     = uv(1)                 |'
[1]1188    ENDIF
[132]1189    IF ( TRIM( bc_uv_t ) == 'dirichlet_0' )  THEN
[1826]1190       r_upper  = TRIM( r_upper  ) // ' uv(nzt+1) = 0                     |'
[132]1191    ELSEIF ( ibc_uv_t == 0 )  THEN
[1826]1192       r_upper  = TRIM( r_upper  ) // ' uv(nzt+1) = ug(nzt+1), vg(nzt+1)  |'
[1]1193    ELSE
[1826]1194       r_upper  = TRIM( r_upper  ) // ' uv(nzt+1) = uv(nzt)               |'
[1]1195    ENDIF
1196
1197    IF ( ibc_pt_b == 0 )  THEN
[1551]1198       IF ( land_surface )  THEN
[1826]1199          r_lower = TRIM( r_lower ) // ' pt(0)     = from soil model'
[1551]1200       ELSE
[1826]1201          r_lower = TRIM( r_lower ) // ' pt(0)     = pt_surface'
[1551]1202       ENDIF
[102]1203    ELSEIF ( ibc_pt_b == 1 )  THEN
[1826]1204       r_lower = TRIM( r_lower ) // ' pt(0)     = pt(1)'
[102]1205    ELSEIF ( ibc_pt_b == 2 )  THEN
[1826]1206       r_lower = TRIM( r_lower ) // ' pt(0)     = from coupled model'
[1]1207    ENDIF
1208    IF ( ibc_pt_t == 0 )  THEN
[1826]1209       r_upper  = TRIM( r_upper  ) // ' pt(nzt+1) = pt_top'
[19]1210    ELSEIF( ibc_pt_t == 1 )  THEN
[1826]1211       r_upper  = TRIM( r_upper  ) // ' pt(nzt+1) = pt(nzt)'
[19]1212    ELSEIF( ibc_pt_t == 2 )  THEN
[1826]1213       r_upper  = TRIM( r_upper  ) // ' pt(nzt+1) = pt(nzt) + dpt/dz_ini'
[667]1214
[1]1215    ENDIF
1216
[1826]1217    WRITE ( io, 300 )  r_lower, r_upper
[1]1218
1219    IF ( .NOT. constant_diffusion )  THEN
1220       IF ( ibc_e_b == 1 )  THEN
[1826]1221          r_lower = 'e(0)     = e(1)'
[1]1222       ELSE
[1826]1223          r_lower = 'e(0)     = e(1) = (u*/0.1)**2'
[1]1224       ENDIF
[1826]1225       r_upper = 'e(nzt+1) = e(nzt) = e(nzt-1)'
[1]1226
[1826]1227       WRITE ( io, 301 )  'e', r_lower, r_upper       
[1]1228
1229    ENDIF
1230
[3294]1231    IF ( ocean_mode )  THEN
[1826]1232       r_lower = 'sa(0)    = sa(1)'
[97]1233       IF ( ibc_sa_t == 0 )  THEN
[1826]1234          r_upper =  'sa(nzt+1) = sa_surface'
[1]1235       ELSE
[1826]1236          r_upper =  'sa(nzt+1) = sa(nzt)'
[1]1237       ENDIF
[1826]1238       WRITE ( io, 301 ) 'sa', r_lower, r_upper
[97]1239    ENDIF
[1]1240
[97]1241    IF ( humidity )  THEN
1242       IF ( ibc_q_b == 0 )  THEN
[1551]1243          IF ( land_surface )  THEN
[1826]1244             r_lower = 'q(0)     = from soil model'
[1551]1245          ELSE
[1826]1246             r_lower = 'q(0)     = q_surface'
[1551]1247          ENDIF
1248
[97]1249       ELSE
[1992]1250          r_lower = 'q(0)      = q(1)'
[97]1251       ENDIF
1252       IF ( ibc_q_t == 0 )  THEN
[1992]1253          r_upper =  'q(nzt+1) = q_top'
[97]1254       ELSE
[1992]1255          r_upper =  'q(nzt+1) = q(nzt) + dq/dz'
[97]1256       ENDIF
[1826]1257       WRITE ( io, 301 ) 'q', r_lower, r_upper
[97]1258    ENDIF
[1]1259
[97]1260    IF ( passive_scalar )  THEN
[1960]1261       IF ( ibc_s_b == 0 )  THEN
[1992]1262          r_lower = 's(0)      = s_surface'
[97]1263       ELSE
[1992]1264          r_lower = 's(0)      = s(1)'
[97]1265       ENDIF
[1960]1266       IF ( ibc_s_t == 0 )  THEN
[1992]1267          r_upper =  's(nzt+1) = s_top'
1268       ELSEIF ( ibc_s_t == 1 )  THEN
1269          r_upper =  's(nzt+1) = s(nzt)'
1270       ELSEIF ( ibc_s_t == 2 )  THEN
1271          r_upper =  's(nzt+1) = s(nzt) + ds/dz'
[97]1272       ENDIF
[1826]1273       WRITE ( io, 301 ) 's', r_lower, r_upper
[1]1274    ENDIF
1275
1276    IF ( use_surface_fluxes )  THEN
1277       WRITE ( io, 303 )
1278       IF ( constant_heatflux )  THEN
[1299]1279          IF ( large_scale_forcing .AND. lsf_surf )  THEN
[2232]1280             IF ( surf_def_h(0)%ns >= 1 )  WRITE ( io, 306 )  surf_def_h(0)%shf(1)
[1241]1281          ELSE
1282             WRITE ( io, 306 )  surface_heatflux
1283          ENDIF
[1]1284          IF ( random_heatflux )  WRITE ( io, 307 )
1285       ENDIF
[75]1286       IF ( humidity  .AND.  constant_waterflux )  THEN
[1299]1287          IF ( large_scale_forcing .AND. lsf_surf )  THEN
[2232]1288             WRITE ( io, 311 ) surf_def_h(0)%qsws(1)
[1241]1289          ELSE
1290             WRITE ( io, 311 ) surface_waterflux
1291          ENDIF
[1]1292       ENDIF
[1960]1293       IF ( passive_scalar  .AND.  constant_scalarflux )  THEN
1294          WRITE ( io, 313 ) surface_scalarflux
[1]1295       ENDIF
1296    ENDIF
1297
[19]1298    IF ( use_top_fluxes )  THEN
1299       WRITE ( io, 304 )
[102]1300       IF ( coupling_mode == 'uncoupled' )  THEN
[151]1301          WRITE ( io, 320 )  top_momentumflux_u, top_momentumflux_v
[102]1302          IF ( constant_top_heatflux )  THEN
1303             WRITE ( io, 306 )  top_heatflux
1304          ENDIF
1305       ELSEIF ( coupling_mode == 'ocean_to_atmosphere' )  THEN
1306          WRITE ( io, 316 )
[19]1307       ENDIF
[3294]1308       IF ( ocean_mode  .AND.  constant_top_salinityflux )                          &
[97]1309          WRITE ( io, 309 )  top_salinityflux
[1960]1310       IF ( humidity       )  WRITE ( io, 315 )
[1992]1311       IF ( passive_scalar .AND.  constant_top_scalarflux )                    &
1312          WRITE ( io, 302 ) top_scalarflux
[19]1313    ENDIF
1314
[1691]1315    IF ( constant_flux_layer )  THEN
1316       WRITE ( io, 305 )  (zu(1)-zu(0)), roughness_length,                     &
1317                          z0h_factor*roughness_length, kappa,                  &
1318                          zeta_min, zeta_max
[1]1319       IF ( .NOT. constant_heatflux )  WRITE ( io, 308 )
[75]1320       IF ( humidity  .AND.  .NOT. constant_waterflux )  THEN
[1]1321          WRITE ( io, 312 )
1322       ENDIF
[1960]1323       IF ( passive_scalar  .AND.  .NOT. constant_scalarflux )  THEN
[1]1324          WRITE ( io, 314 )
1325       ENDIF
1326    ELSE
1327       IF ( INDEX(initializing_actions, 'set_1d-model_profiles') /= 0 )  THEN
[1691]1328          WRITE ( io, 310 )  zeta_min, zeta_max
[1]1329       ENDIF
1330    ENDIF
1331
1332    WRITE ( io, 317 )  bc_lr, bc_ns
[707]1333    IF ( .NOT. bc_lr_cyc  .OR.  .NOT. bc_ns_cyc )  THEN
[1159]1334       WRITE ( io, 318 )  use_cmax, pt_damping_width, pt_damping_factor       
[151]1335       IF ( turbulent_inflow )  THEN
[1560]1336          IF ( .NOT. recycling_yshift ) THEN
1337             WRITE ( io, 319 )  recycling_width, recycling_plane, &
1338                                inflow_damping_height, inflow_damping_width
1339          ELSE
1340             WRITE ( io, 322 )  recycling_width, recycling_plane, &
1341                                inflow_damping_height, inflow_damping_width
1342          END IF
[151]1343       ENDIF
[2050]1344       IF ( turbulent_outflow )  THEN
1345          WRITE ( io, 323 )  outflow_source_plane, INT(outflow_source_plane/dx)
1346       ENDIF
[1]1347    ENDIF
1348
1349!
[1365]1350!-- Initial Profiles
1351    WRITE ( io, 321 )
1352!
1353!-- Initial wind profiles
1354    IF ( u_profile(1) /= 9999999.9_wp )  WRITE ( io, 427 )
1355
1356!
1357!-- Initial temperature profile
1358!-- Building output strings, starting with surface temperature
1359    WRITE ( temperatures, '(F6.2)' )  pt_surface
1360    gradients = '------'
1361    slices = '     0'
1362    coordinates = '   0.0'
1363    i = 1
1364    DO  WHILE ( pt_vertical_gradient_level_ind(i) /= -9999 )
1365
1366       WRITE (coor_chr,'(F7.2)')  pt_init(pt_vertical_gradient_level_ind(i))
1367       temperatures = TRIM( temperatures ) // ' ' // TRIM( coor_chr )
1368
1369       WRITE (coor_chr,'(F7.2)')  pt_vertical_gradient(i)
1370       gradients = TRIM( gradients ) // ' ' // TRIM( coor_chr )
1371
1372       WRITE (coor_chr,'(I7)')  pt_vertical_gradient_level_ind(i)
1373       slices = TRIM( slices ) // ' ' // TRIM( coor_chr )
1374
1375       WRITE (coor_chr,'(F7.1)')  pt_vertical_gradient_level(i)
1376       coordinates = TRIM( coordinates ) // ' '  // TRIM( coor_chr )
1377
1378       IF ( i == 10 )  THEN
1379          EXIT
1380       ELSE
1381          i = i + 1
1382       ENDIF
1383
1384    ENDDO
1385
1386    IF ( .NOT. nudging )  THEN
1387       WRITE ( io, 420 )  TRIM( coordinates ), TRIM( temperatures ), &
1388                          TRIM( gradients ), TRIM( slices )
1389    ELSE
1390       WRITE ( io, 428 ) 
1391    ENDIF
1392
1393!
1394!-- Initial humidity profile
1395!-- Building output strings, starting with surface humidity
[1960]1396    IF ( humidity )  THEN
[1365]1397       WRITE ( temperatures, '(E8.1)' )  q_surface
1398       gradients = '--------'
1399       slices = '       0'
1400       coordinates = '     0.0'
1401       i = 1
1402       DO  WHILE ( q_vertical_gradient_level_ind(i) /= -9999 )
1403         
1404          WRITE (coor_chr,'(E8.1,4X)')  q_init(q_vertical_gradient_level_ind(i))
1405          temperatures = TRIM( temperatures ) // '  ' // TRIM( coor_chr )
1406
1407          WRITE (coor_chr,'(E8.1,4X)')  q_vertical_gradient(i)
1408          gradients = TRIM( gradients ) // '  ' // TRIM( coor_chr )
1409         
1410          WRITE (coor_chr,'(I8,4X)')  q_vertical_gradient_level_ind(i)
1411          slices = TRIM( slices ) // '  ' // TRIM( coor_chr )
1412         
1413          WRITE (coor_chr,'(F8.1,4X)')  q_vertical_gradient_level(i)
1414          coordinates = TRIM( coordinates ) // '  '  // TRIM( coor_chr )
1415
1416          IF ( i == 10 )  THEN
1417             EXIT
1418          ELSE
1419             i = i + 1
1420          ENDIF
1421
1422       ENDDO
1423
[1960]1424       IF ( .NOT. nudging )  THEN
1425          WRITE ( io, 421 )  TRIM( coordinates ), TRIM( temperatures ),        &
[1365]1426                             TRIM( gradients ), TRIM( slices )
1427       ENDIF
1428    ENDIF
[1960]1429!
1430!-- Initial scalar profile
1431!-- Building output strings, starting with surface humidity
1432    IF ( passive_scalar )  THEN
1433       WRITE ( temperatures, '(E8.1)' )  s_surface
1434       gradients = '--------'
1435       slices = '       0'
1436       coordinates = '     0.0'
1437       i = 1
1438       DO  WHILE ( s_vertical_gradient_level_ind(i) /= -9999 )
1439         
[2073]1440          WRITE (coor_chr,'(E8.1,4X)')  s_init(s_vertical_gradient_level_ind(i))
[1960]1441          temperatures = TRIM( temperatures ) // '  ' // TRIM( coor_chr )
[1365]1442
[1960]1443          WRITE (coor_chr,'(E8.1,4X)')  s_vertical_gradient(i)
1444          gradients = TRIM( gradients ) // '  ' // TRIM( coor_chr )
1445         
1446          WRITE (coor_chr,'(I8,4X)')  s_vertical_gradient_level_ind(i)
1447          slices = TRIM( slices ) // '  ' // TRIM( coor_chr )
1448         
1449          WRITE (coor_chr,'(F8.1,4X)')  s_vertical_gradient_level(i)
1450          coordinates = TRIM( coordinates ) // '  '  // TRIM( coor_chr )
1451
1452          IF ( i == 10 )  THEN
1453             EXIT
1454          ELSE
1455             i = i + 1
1456          ENDIF
1457
1458       ENDDO
1459
1460       WRITE ( io, 422 )  TRIM( coordinates ), TRIM( temperatures ),           &
1461                          TRIM( gradients ), TRIM( slices )
1462    ENDIF   
1463
[1365]1464!
1465!-- Initial salinity profile
1466!-- Building output strings, starting with surface salinity
[3294]1467    IF ( ocean_mode )  THEN
[1365]1468       WRITE ( temperatures, '(F6.2)' )  sa_surface
1469       gradients = '------'
1470       slices = '     0'
1471       coordinates = '   0.0'
1472       i = 1
1473       DO  WHILE ( sa_vertical_gradient_level_ind(i) /= -9999 )
1474
1475          WRITE (coor_chr,'(F7.2)')  sa_init(sa_vertical_gradient_level_ind(i))
1476          temperatures = TRIM( temperatures ) // ' ' // TRIM( coor_chr )
1477
1478          WRITE (coor_chr,'(F7.2)')  sa_vertical_gradient(i)
1479          gradients = TRIM( gradients ) // ' ' // TRIM( coor_chr )
1480
1481          WRITE (coor_chr,'(I7)')  sa_vertical_gradient_level_ind(i)
1482          slices = TRIM( slices ) // ' ' // TRIM( coor_chr )
1483
1484          WRITE (coor_chr,'(F7.1)')  sa_vertical_gradient_level(i)
1485          coordinates = TRIM( coordinates ) // ' '  // TRIM( coor_chr )
1486
1487          IF ( i == 10 )  THEN
1488             EXIT
1489          ELSE
1490             i = i + 1
1491          ENDIF
1492
1493       ENDDO
1494
1495       WRITE ( io, 425 )  TRIM( coordinates ), TRIM( temperatures ), &
1496                          TRIM( gradients ), TRIM( slices )
1497    ENDIF
1498
1499
1500!
[1]1501!-- Listing of 1D-profiles
[151]1502    WRITE ( io, 325 )  dt_dopr_listing
[1353]1503    IF ( averaging_interval_pr /= 0.0_wp )  THEN
[151]1504       WRITE ( io, 326 )  averaging_interval_pr, dt_averaging_input_pr
[1]1505    ENDIF
1506
1507!
1508!-- DATA output
1509    WRITE ( io, 330 )
[1353]1510    IF ( averaging_interval_pr /= 0.0_wp )  THEN
[151]1511       WRITE ( io, 326 )  averaging_interval_pr, dt_averaging_input_pr
[1]1512    ENDIF
1513
1514!
1515!-- 1D-profiles
[346]1516    dopr_chr = 'Profile:'
[1]1517    IF ( dopr_n /= 0 )  THEN
1518       WRITE ( io, 331 )
1519
1520       output_format = ''
[1783]1521       output_format = netcdf_data_format_string
1522       IF ( netcdf_deflate == 0 )  THEN
1523          WRITE ( io, 344 )  output_format
1524       ELSE
1525          WRITE ( io, 354 )  TRIM( output_format ), netcdf_deflate
1526       ENDIF
[1]1527
1528       DO  i = 1, dopr_n
1529          dopr_chr = TRIM( dopr_chr ) // ' ' // TRIM( data_output_pr(i) ) // ','
1530          IF ( LEN_TRIM( dopr_chr ) >= 60 )  THEN
1531             WRITE ( io, 332 )  dopr_chr
1532             dopr_chr = '       :'
1533          ENDIF
1534       ENDDO
1535
1536       IF ( dopr_chr /= '' )  THEN
1537          WRITE ( io, 332 )  dopr_chr
1538       ENDIF
1539       WRITE ( io, 333 )  dt_dopr, averaging_interval_pr, dt_averaging_input_pr
[1353]1540       IF ( skip_time_dopr /= 0.0_wp )  WRITE ( io, 339 )  skip_time_dopr
[1]1541    ENDIF
1542
1543!
1544!-- 2D-arrays
1545    DO  av = 0, 1
1546
1547       i = 1
1548       do2d_xy = ''
1549       do2d_xz = ''
1550       do2d_yz = ''
1551       DO  WHILE ( do2d(av,i) /= ' ' )
1552
1553          l = MAX( 2, LEN_TRIM( do2d(av,i) ) )
1554          do2d_mode = do2d(av,i)(l-1:l)
1555
1556          SELECT CASE ( do2d_mode )
1557             CASE ( 'xy' )
1558                ll = LEN_TRIM( do2d_xy )
1559                do2d_xy = do2d_xy(1:ll) // ' ' // do2d(av,i)(1:l-3) // ','
1560             CASE ( 'xz' )
1561                ll = LEN_TRIM( do2d_xz )
1562                do2d_xz = do2d_xz(1:ll) // ' ' // do2d(av,i)(1:l-3) // ','
1563             CASE ( 'yz' )
1564                ll = LEN_TRIM( do2d_yz )
1565                do2d_yz = do2d_yz(1:ll) // ' ' // do2d(av,i)(1:l-3) // ','
1566          END SELECT
1567
1568          i = i + 1
1569
1570       ENDDO
1571
1572       IF ( ( ( do2d_xy /= ''  .AND.  section(1,1) /= -9999 )  .OR.    &
1573              ( do2d_xz /= ''  .AND.  section(1,2) /= -9999 )  .OR.    &
[1327]1574              ( do2d_yz /= ''  .AND.  section(1,3) /= -9999 ) ) )  THEN
[1]1575
1576          IF (  av == 0 )  THEN
1577             WRITE ( io, 334 )  ''
1578          ELSE
1579             WRITE ( io, 334 )  '(time-averaged)'
1580          ENDIF
1581
1582          IF ( do2d_at_begin )  THEN
1583             begin_chr = 'and at the start'
1584          ELSE
1585             begin_chr = ''
1586          ENDIF
1587
1588          output_format = ''
[1783]1589          output_format = netcdf_data_format_string
1590          IF ( netcdf_deflate == 0 )  THEN
1591             WRITE ( io, 344 )  output_format
1592          ELSE
1593             WRITE ( io, 354 )  TRIM( output_format ), netcdf_deflate
1594          ENDIF
[1]1595
1596          IF ( do2d_xy /= ''  .AND.  section(1,1) /= -9999 )  THEN
1597             i = 1
1598             slices = '/'
1599             coordinates = '/'
1600!
[1551]1601!--          Building strings with index and coordinate information of the
[1]1602!--          slices
1603             DO  WHILE ( section(i,1) /= -9999 )
1604
1605                WRITE (section_chr,'(I5)')  section(i,1)
1606                section_chr = ADJUSTL( section_chr )
1607                slices = TRIM( slices ) // TRIM( section_chr ) // '/'
1608
[206]1609                IF ( section(i,1) == -1 )  THEN
[1353]1610                   WRITE (coor_chr,'(F10.1)')  -1.0_wp
[206]1611                ELSE
1612                   WRITE (coor_chr,'(F10.1)')  zu(section(i,1))
1613                ENDIF
[1]1614                coor_chr = ADJUSTL( coor_chr )
1615                coordinates = TRIM( coordinates ) // TRIM( coor_chr ) // '/'
1616
1617                i = i + 1
1618             ENDDO
1619             IF ( av == 0 )  THEN
1620                WRITE ( io, 335 )  'XY', do2d_xy, dt_do2d_xy, &
1621                                   TRIM( begin_chr ), 'k', TRIM( slices ), &
1622                                   TRIM( coordinates )
[1353]1623                IF ( skip_time_do2d_xy /= 0.0_wp )  THEN
[1]1624                   WRITE ( io, 339 )  skip_time_do2d_xy
1625                ENDIF
1626             ELSE
1627                WRITE ( io, 342 )  'XY', do2d_xy, dt_data_output_av, &
1628                                   TRIM( begin_chr ), averaging_interval, &
1629                                   dt_averaging_input, 'k', TRIM( slices ), &
1630                                   TRIM( coordinates )
[1353]1631                IF ( skip_time_data_output_av /= 0.0_wp )  THEN
[1]1632                   WRITE ( io, 339 )  skip_time_data_output_av
1633                ENDIF
1634             ENDIF
[1308]1635             IF ( netcdf_data_format > 4 )  THEN
1636                WRITE ( io, 352 )  ntdim_2d_xy(av)
1637             ELSE
1638                WRITE ( io, 353 )
1639             ENDIF
[1]1640          ENDIF
1641
1642          IF ( do2d_xz /= ''  .AND.  section(1,2) /= -9999 )  THEN
1643             i = 1
1644             slices = '/'
1645             coordinates = '/'
1646!
[1551]1647!--          Building strings with index and coordinate information of the
[1]1648!--          slices
1649             DO  WHILE ( section(i,2) /= -9999 )
1650
1651                WRITE (section_chr,'(I5)')  section(i,2)
1652                section_chr = ADJUSTL( section_chr )
1653                slices = TRIM( slices ) // TRIM( section_chr ) // '/'
1654
1655                WRITE (coor_chr,'(F10.1)')  section(i,2) * dy
1656                coor_chr = ADJUSTL( coor_chr )
1657                coordinates = TRIM( coordinates ) // TRIM( coor_chr ) // '/'
1658
1659                i = i + 1
1660             ENDDO
1661             IF ( av == 0 )  THEN
1662                WRITE ( io, 335 )  'XZ', do2d_xz, dt_do2d_xz, &
1663                                   TRIM( begin_chr ), 'j', TRIM( slices ), &
1664                                   TRIM( coordinates )
[1353]1665                IF ( skip_time_do2d_xz /= 0.0_wp )  THEN
[1]1666                   WRITE ( io, 339 )  skip_time_do2d_xz
1667                ENDIF
1668             ELSE
1669                WRITE ( io, 342 )  'XZ', do2d_xz, dt_data_output_av, &
1670                                   TRIM( begin_chr ), averaging_interval, &
1671                                   dt_averaging_input, 'j', TRIM( slices ), &
1672                                   TRIM( coordinates )
[1353]1673                IF ( skip_time_data_output_av /= 0.0_wp )  THEN
[1]1674                   WRITE ( io, 339 )  skip_time_data_output_av
1675                ENDIF
1676             ENDIF
[1308]1677             IF ( netcdf_data_format > 4 )  THEN
1678                WRITE ( io, 352 )  ntdim_2d_xz(av)
1679             ELSE
1680                WRITE ( io, 353 )
1681             ENDIF
[1]1682          ENDIF
1683
1684          IF ( do2d_yz /= ''  .AND.  section(1,3) /= -9999 )  THEN
1685             i = 1
1686             slices = '/'
1687             coordinates = '/'
1688!
[1551]1689!--          Building strings with index and coordinate information of the
[1]1690!--          slices
1691             DO  WHILE ( section(i,3) /= -9999 )
1692
1693                WRITE (section_chr,'(I5)')  section(i,3)
1694                section_chr = ADJUSTL( section_chr )
1695                slices = TRIM( slices ) // TRIM( section_chr ) // '/'
1696
1697                WRITE (coor_chr,'(F10.1)')  section(i,3) * dx
1698                coor_chr = ADJUSTL( coor_chr )
1699                coordinates = TRIM( coordinates ) // TRIM( coor_chr ) // '/'
1700
1701                i = i + 1
1702             ENDDO
1703             IF ( av == 0 )  THEN
1704                WRITE ( io, 335 )  'YZ', do2d_yz, dt_do2d_yz, &
1705                                   TRIM( begin_chr ), 'i', TRIM( slices ), &
1706                                   TRIM( coordinates )
[1353]1707                IF ( skip_time_do2d_yz /= 0.0_wp )  THEN
[1]1708                   WRITE ( io, 339 )  skip_time_do2d_yz
1709                ENDIF
1710             ELSE
1711                WRITE ( io, 342 )  'YZ', do2d_yz, dt_data_output_av, &
1712                                   TRIM( begin_chr ), averaging_interval, &
1713                                   dt_averaging_input, 'i', TRIM( slices ), &
1714                                   TRIM( coordinates )
[1353]1715                IF ( skip_time_data_output_av /= 0.0_wp )  THEN
[1]1716                   WRITE ( io, 339 )  skip_time_data_output_av
1717                ENDIF
1718             ENDIF
[1308]1719             IF ( netcdf_data_format > 4 )  THEN
1720                WRITE ( io, 352 )  ntdim_2d_yz(av)
1721             ELSE
1722                WRITE ( io, 353 )
1723             ENDIF
[1]1724          ENDIF
1725
1726       ENDIF
1727
1728    ENDDO
1729
1730!
1731!-- 3d-arrays
1732    DO  av = 0, 1
1733
1734       i = 1
1735       do3d_chr = ''
1736       DO  WHILE ( do3d(av,i) /= ' ' )
1737
1738          do3d_chr = TRIM( do3d_chr ) // ' ' // TRIM( do3d(av,i) ) // ','
1739          i = i + 1
1740
1741       ENDDO
1742
1743       IF ( do3d_chr /= '' )  THEN
1744          IF ( av == 0 )  THEN
1745             WRITE ( io, 336 )  ''
1746          ELSE
1747             WRITE ( io, 336 )  '(time-averaged)'
1748          ENDIF
1749
[1783]1750          output_format = netcdf_data_format_string
1751          IF ( netcdf_deflate == 0 )  THEN
1752             WRITE ( io, 344 )  output_format
1753          ELSE
1754             WRITE ( io, 354 )  TRIM( output_format ), netcdf_deflate
1755          ENDIF
[1]1756
1757          IF ( do3d_at_begin )  THEN
1758             begin_chr = 'and at the start'
1759          ELSE
1760             begin_chr = ''
1761          ENDIF
1762          IF ( av == 0 )  THEN
1763             WRITE ( io, 337 )  do3d_chr, dt_do3d, TRIM( begin_chr ), &
1764                                zu(nz_do3d), nz_do3d
1765          ELSE
1766             WRITE ( io, 343 )  do3d_chr, dt_data_output_av,           &
1767                                TRIM( begin_chr ), averaging_interval, &
1768                                dt_averaging_input, zu(nz_do3d), nz_do3d
1769          ENDIF
1770
[1308]1771          IF ( netcdf_data_format > 4 )  THEN
1772             WRITE ( io, 352 )  ntdim_3d(av)
1773          ELSE
1774             WRITE ( io, 353 )
1775          ENDIF
1776
[1]1777          IF ( av == 0 )  THEN
[1353]1778             IF ( skip_time_do3d /= 0.0_wp )  THEN
[1]1779                WRITE ( io, 339 )  skip_time_do3d
1780             ENDIF
1781          ELSE
[1353]1782             IF ( skip_time_data_output_av /= 0.0_wp )  THEN
[1]1783                WRITE ( io, 339 )  skip_time_data_output_av
1784             ENDIF
1785          ENDIF
1786
1787       ENDIF
1788
1789    ENDDO
1790
1791!
[410]1792!-- masked arrays
1793    IF ( masks > 0 )  WRITE ( io, 345 )  &
1794         mask_scale_x, mask_scale_y, mask_scale_z
1795    DO  mid = 1, masks
1796       DO  av = 0, 1
1797
1798          i = 1
1799          domask_chr = ''
1800          DO  WHILE ( domask(mid,av,i) /= ' ' )
1801             domask_chr = TRIM( domask_chr ) // ' ' //  &
1802                          TRIM( domask(mid,av,i) ) // ','
1803             i = i + 1
1804          ENDDO
1805
1806          IF ( domask_chr /= '' )  THEN
1807             IF ( av == 0 )  THEN
1808                WRITE ( io, 346 )  '', mid
1809             ELSE
1810                WRITE ( io, 346 )  ' (time-averaged)', mid
1811             ENDIF
1812
[1783]1813             output_format = netcdf_data_format_string
[1308]1814!--          Parallel output not implemented for mask data, hence
1815!--          output_format must be adjusted.
1816             IF ( netcdf_data_format == 5 ) output_format = 'netCDF4/HDF5'
1817             IF ( netcdf_data_format == 6 ) output_format = 'netCDF4/HDF5 classic'
[1783]1818             IF ( netcdf_deflate == 0 )  THEN
1819                WRITE ( io, 344 )  output_format
1820             ELSE
1821                WRITE ( io, 354 )  TRIM( output_format ), netcdf_deflate
1822             ENDIF
[410]1823
1824             IF ( av == 0 )  THEN
1825                WRITE ( io, 347 )  domask_chr, dt_domask(mid)
1826             ELSE
1827                WRITE ( io, 348 )  domask_chr, dt_data_output_av, &
1828                                   averaging_interval, dt_averaging_input
1829             ENDIF
1830
1831             IF ( av == 0 )  THEN
[1353]1832                IF ( skip_time_domask(mid) /= 0.0_wp )  THEN
[410]1833                   WRITE ( io, 339 )  skip_time_domask(mid)
1834                ENDIF
1835             ELSE
[1353]1836                IF ( skip_time_data_output_av /= 0.0_wp )  THEN
[410]1837                   WRITE ( io, 339 )  skip_time_data_output_av
1838                ENDIF
1839             ENDIF
1840!
1841!--          output locations
1842             DO  dim = 1, 3
[1353]1843                IF ( mask(mid,dim,1) >= 0.0_wp )  THEN
[410]1844                   count = 0
[1353]1845                   DO  WHILE ( mask(mid,dim,count+1) >= 0.0_wp )
[410]1846                      count = count + 1
1847                   ENDDO
1848                   WRITE ( io, 349 )  dir(dim), dir(dim), mid, dir(dim), &
1849                                      mask(mid,dim,:count)
[1353]1850                ELSEIF ( mask_loop(mid,dim,1) < 0.0_wp .AND.  &
1851                         mask_loop(mid,dim,2) < 0.0_wp .AND.  &
1852                         mask_loop(mid,dim,3) == 0.0_wp )  THEN
[410]1853                   WRITE ( io, 350 )  dir(dim), dir(dim)
[1353]1854                ELSEIF ( mask_loop(mid,dim,3) == 0.0_wp )  THEN
[410]1855                   WRITE ( io, 351 )  dir(dim), dir(dim), mid, dir(dim), &
1856                                      mask_loop(mid,dim,1:2)
1857                ELSE
1858                   WRITE ( io, 351 )  dir(dim), dir(dim), mid, dir(dim), &
1859                                      mask_loop(mid,dim,1:3)
1860                ENDIF
1861             ENDDO
1862          ENDIF
1863
1864       ENDDO
1865    ENDDO
1866
1867!
[1]1868!-- Timeseries
[1322]1869    IF ( dt_dots /= 9999999.9_wp )  THEN
[1]1870       WRITE ( io, 340 )
1871
[1783]1872       output_format = netcdf_data_format_string
1873       IF ( netcdf_deflate == 0 )  THEN
1874          WRITE ( io, 344 )  output_format
1875       ELSE
1876          WRITE ( io, 354 )  TRIM( output_format ), netcdf_deflate
1877       ENDIF
[1]1878       WRITE ( io, 341 )  dt_dots
1879    ENDIF
1880
1881#if defined( __dvrp_graphics )
1882!
1883!-- Dvrp-output
[1322]1884    IF ( dt_dvrp /= 9999999.9_wp )  THEN
[1]1885       WRITE ( io, 360 )  dt_dvrp, TRIM( dvrp_output ), TRIM( dvrp_host ), &
1886                          TRIM( dvrp_username ), TRIM( dvrp_directory )
1887       i = 1
1888       l = 0
[336]1889       m = 0
[1]1890       DO WHILE ( mode_dvrp(i) /= ' ' )
1891          IF ( mode_dvrp(i)(1:10) == 'isosurface' )  THEN
[130]1892             READ ( mode_dvrp(i), '(10X,I2)' )  j
[1]1893             l = l + 1
1894             IF ( do3d(0,j) /= ' ' )  THEN
[336]1895                WRITE ( io, 361 )  TRIM( do3d(0,j) ), threshold(l), &
1896                                   isosurface_color(:,l)
[1]1897             ENDIF
1898          ELSEIF ( mode_dvrp(i)(1:6) == 'slicer' )  THEN
[130]1899             READ ( mode_dvrp(i), '(6X,I2)' )  j
[336]1900             m = m + 1
1901             IF ( do2d(0,j) /= ' ' )  THEN
1902                WRITE ( io, 362 )  TRIM( do2d(0,j) ), &
1903                                   slicer_range_limits_dvrp(:,m)
1904             ENDIF
[1]1905          ENDIF
1906          i = i + 1
1907       ENDDO
[237]1908
[336]1909       WRITE ( io, 365 )  groundplate_color, superelevation_x, &
1910                          superelevation_y, superelevation, clip_dvrp_l, &
1911                          clip_dvrp_r, clip_dvrp_s, clip_dvrp_n
1912
1913       IF ( TRIM( topography ) /= 'flat' )  THEN
1914          WRITE ( io, 366 )  topography_color
1915          IF ( cluster_size > 1 )  THEN
1916             WRITE ( io, 367 )  cluster_size
1917          ENDIF
[237]1918       ENDIF
1919
[1]1920    ENDIF
1921#endif
[1957]1922!
1923!-- Output of virtual flight information
1924    IF ( virtual_flight )  CALL flight_header( io )
[1]1925
1926!
[1833]1927!-- Output of spectra related quantities
1928    IF ( calculate_spectra )  CALL spectra_header( io )
[1]1929
1930    WRITE ( io, 99 )
1931
1932!
1933!-- Physical quantities
1934    WRITE ( io, 400 )
1935
1936!
1937!-- Geostrophic parameters
[2575]1938    WRITE ( io, 410 )  latitude, longitude, omega, f, fs
[1]1939
[3241]1940!
1941!-- Day of year, UTC
[2544]1942    WRITE ( io, 456 )  day_of_year_init, time_utc_init
1943   
[1]1944!
1945!-- Other quantities
1946    WRITE ( io, 411 )  g
[1551]1947
[1179]1948    WRITE ( io, 412 )  TRIM( reference_state )
1949    IF ( use_single_reference_value )  THEN
[3294]1950       IF ( ocean_mode )  THEN
[1179]1951          WRITE ( io, 413 )  prho_reference
[97]1952       ELSE
[1179]1953          WRITE ( io, 414 )  pt_reference
[97]1954       ENDIF
1955    ENDIF
[1]1956
1957!
[3274]1958!-- Output of microphysics information
1959    IF ( bulk_cloud_model )  CALL bcm_header( io )
[1]1960
1961!
[824]1962!-- Cloud physcis parameters / quantities / numerical methods
1963    WRITE ( io, 430 )
[3274]1964    IF ( humidity .AND. .NOT. bulk_cloud_model .AND. .NOT. cloud_droplets)  THEN
[824]1965       WRITE ( io, 431 )
[3274]1966    ENDIF
1967    IF ( humidity  .AND.  cloud_droplets )  THEN
[824]1968       WRITE ( io, 433 )
1969       IF ( curvature_solution_effects )  WRITE ( io, 434 )
[825]1970       IF ( collision_kernel /= 'none' )  THEN
1971          WRITE ( io, 435 )  TRIM( collision_kernel )
[828]1972          IF ( collision_kernel(6:9) == 'fast' )  THEN
1973             WRITE ( io, 436 )  radius_classes, dissipation_classes
1974          ENDIF
[825]1975       ELSE
[828]1976          WRITE ( io, 437 )
[825]1977       ENDIF
[824]1978    ENDIF
1979
1980!
[1]1981!-- LES / turbulence parameters
1982    WRITE ( io, 450 )
1983
1984!--
1985! ... LES-constants used must still be added here
1986!--
1987    IF ( constant_diffusion )  THEN
1988       WRITE ( io, 451 )  km_constant, km_constant/prandtl_number, &
1989                          prandtl_number
1990    ENDIF
1991    IF ( .NOT. constant_diffusion)  THEN
[1353]1992       IF ( e_init > 0.0_wp )  WRITE ( io, 455 )  e_init
1993       IF ( e_min > 0.0_wp )  WRITE ( io, 454 )  e_min
[1]1994       IF ( wall_adjustment )  WRITE ( io, 453 )  wall_adjustment_factor
1995    ENDIF
[3083]1996    IF ( rans_mode )  THEN
1997       WRITE ( io, 457 )  rans_const_c, rans_const_sigma
1998    ENDIF
[1]1999!
2000!-- Special actions during the run
2001    WRITE ( io, 470 )
2002    IF ( create_disturbances )  THEN
2003       WRITE ( io, 471 )  dt_disturb, disturbance_amplitude,                   &
2004                          zu(disturbance_level_ind_b), disturbance_level_ind_b,&
2005                          zu(disturbance_level_ind_t), disturbance_level_ind_t
[707]2006       IF ( .NOT. bc_lr_cyc  .OR.  .NOT. bc_ns_cyc )  THEN
[1]2007          WRITE ( io, 472 )  inflow_disturbance_begin, inflow_disturbance_end
2008       ELSE
2009          WRITE ( io, 473 )  disturbance_energy_limit
2010       ENDIF
2011       WRITE ( io, 474 )  TRIM( random_generator )
2012    ENDIF
[1353]2013    IF ( pt_surface_initial_change /= 0.0_wp )  THEN
[1]2014       WRITE ( io, 475 )  pt_surface_initial_change
2015    ENDIF
[1353]2016    IF ( humidity  .AND.  q_surface_initial_change /= 0.0_wp )  THEN
[1]2017       WRITE ( io, 476 )  q_surface_initial_change       
2018    ENDIF
[1353]2019    IF ( passive_scalar  .AND.  q_surface_initial_change /= 0.0_wp )  THEN
[1]2020       WRITE ( io, 477 )  q_surface_initial_change       
2021    ENDIF
2022
[60]2023    IF ( particle_advection )  THEN
[1]2024!
[60]2025!--    Particle attributes
2026       WRITE ( io, 480 )  particle_advection_start, dt_prel, bc_par_lr, &
2027                          bc_par_ns, bc_par_b, bc_par_t, particle_maximum_age, &
[1359]2028                          end_time_prel
[60]2029       IF ( use_sgs_for_particles )  WRITE ( io, 488 )  dt_min_part
2030       IF ( random_start_position )  WRITE ( io, 481 )
[1575]2031       IF ( seed_follows_topography )  WRITE ( io, 496 )
[60]2032       IF ( particles_per_point > 1 )  WRITE ( io, 489 )  particles_per_point
2033       WRITE ( io, 495 )  total_number_of_particles
[1322]2034       IF ( dt_write_particle_data /= 9999999.9_wp )  THEN
[60]2035          WRITE ( io, 485 )  dt_write_particle_data
[1327]2036          IF ( netcdf_data_format > 1 )  THEN
2037             output_format = 'netcdf (64 bit offset) and binary'
[1]2038          ELSE
[1327]2039             output_format = 'netcdf and binary'
[1]2040          ENDIF
[1783]2041          IF ( netcdf_deflate == 0 )  THEN
2042             WRITE ( io, 344 )  output_format
2043          ELSE
2044             WRITE ( io, 354 )  TRIM( output_format ), netcdf_deflate
2045          ENDIF
[1]2046       ENDIF
[1322]2047       IF ( dt_dopts /= 9999999.9_wp )  WRITE ( io, 494 )  dt_dopts
[60]2048       IF ( write_particle_statistics )  WRITE ( io, 486 )
[1]2049
[60]2050       WRITE ( io, 487 )  number_of_particle_groups
[1]2051
[60]2052       DO  i = 1, number_of_particle_groups
[1322]2053          IF ( i == 1  .AND.  density_ratio(i) == 9999999.9_wp )  THEN
[1353]2054             WRITE ( io, 490 )  i, 0.0_wp
[60]2055             WRITE ( io, 492 )
[1]2056          ELSE
[60]2057             WRITE ( io, 490 )  i, radius(i)
[1353]2058             IF ( density_ratio(i) /= 0.0_wp )  THEN
[60]2059                WRITE ( io, 491 )  density_ratio(i)
2060             ELSE
2061                WRITE ( io, 492 )
2062             ENDIF
[1]2063          ENDIF
[60]2064          WRITE ( io, 493 )  psl(i), psr(i), pss(i), psn(i), psb(i), pst(i), &
2065                             pdx(i), pdy(i), pdz(i)
[336]2066          IF ( .NOT. vertical_particle_advection(i) )  WRITE ( io, 482 )
[60]2067       ENDDO
[1]2068
[60]2069    ENDIF
[1]2070
[60]2071
[1]2072!
2073!-- Parameters of 1D-model
2074    IF ( INDEX( initializing_actions, 'set_1d-model_profiles' ) /= 0 )  THEN
2075       WRITE ( io, 500 )  end_time_1d, dt_run_control_1d, dt_pr_1d, &
2076                          mixing_length_1d, dissipation_1d
2077       IF ( damp_level_ind_1d /= nzt+1 )  THEN
2078          WRITE ( io, 502 )  zu(damp_level_ind_1d), damp_level_ind_1d
2079       ENDIF
2080    ENDIF
[3467]2081   
2082!
2083!-- SALSA information
2084    IF ( salsa )  CALL salsa_header( io ) 
[1]2085
2086!
[1551]2087!-- User-defined information
[1]2088    CALL user_header( io )
2089
2090    WRITE ( io, 99 )
2091
2092!
2093!-- Write buffer contents to disc immediately
[1808]2094    FLUSH( io )
[1]2095
2096!
2097!-- Here the FORMATs start
2098
2099 99 FORMAT (1X,78('-'))
[1468]2100100 FORMAT (/1X,'******************************',4X,44('-')/        &
2101            1X,'* ',A,' *',4X,A/                               &
2102            1X,'******************************',4X,44('-'))
[2298]2103101 FORMAT (35X,'coupled run: ',A/ &
[1468]2104            35X,42('-'))
[3529]2105102 FORMAT (/' Date:               ',A10,4X,'Run:       ',A34/      &
[1468]2106            ' Time:                 ',A8,4X,'Run-No.:   ',I2.2/     &
[1106]2107            ' Run on host:        ',A10)
[1]2108#if defined( __parallel )
[1468]2109103 FORMAT (' Number of PEs:',10X,I6,4X,'Processor grid (x,y): (',I4,',',I4, &
[1]2110              ')',1X,A)
[1468]2111104 FORMAT (' Number of PEs:',10X,I6,4X,'Tasks:',I4,'   threads per task:',I4/ &
2112              35X,'Processor grid (x,y): (',I4,',',I4,')',1X,A)
2113105 FORMAT (35X,'One additional PE is used to handle'/37X,'the dvrp output!')
2114107 FORMAT (35X,'A 1d-decomposition along ',A,' is used')
2115108 FORMAT (35X,'Max. # of parallel I/O streams is ',I5)
2116109 FORMAT (35X,'Precursor run for coupled atmos-ocean run'/ &
2117            35X,42('-'))
2118114 FORMAT (35X,'Coupled atmosphere-ocean run following'/ &
2119            35X,'independent precursor runs'/             &
2120            35X,42('-'))
[1]2121#endif
2122110 FORMAT (/' Numerical Schemes:'/ &
2123             ' -----------------'/)
[2696]2124124 FORMAT (' --> Use the ',A,' turbulence closure (',A,' mode).')
[2037]2125121 FORMAT (' --> Use the ',A,' approximation for the model equations.')
[1]2126111 FORMAT (' --> Solve perturbation pressure via FFT using ',A,' routines')
2127112 FORMAT (' --> Solve perturbation pressure via SOR-Red/Black-Schema'/ &
[1697]2128            '     Iterations (initial/other): ',I3,'/',I3,'  omega =',F6.3)
[1]2129113 FORMAT (' --> Momentum advection via Piascek-Williams-Scheme (Form C3)', &
2130                  ' or Upstream')
[1216]2131115 FORMAT ('     FFT and transpositions are overlapping')
[1]2132116 FORMAT (' --> Scalar advection via Piascek-Williams-Scheme (Form C3)', &
2133                  ' or Upstream')
2134118 FORMAT (' --> Scalar advection via Bott-Chlond-Scheme')
[1106]2135119 FORMAT (' --> Galilei-Transform applied to horizontal advection:'/ &
2136            '     translation velocity = ',A/ &
[1]2137            '     distance advected ',A,':  ',F8.3,' km(x)  ',F8.3,' km(y)')
2138122 FORMAT (' --> Time differencing scheme: ',A)
[108]2139123 FORMAT (' --> Rayleigh-Damping active, starts ',A,' z = ',F8.2,' m'/ &
[1697]2140            '     maximum damping coefficient:',F6.3, ' 1/s')
[1]2141129 FORMAT (' --> Additional prognostic equation for the specific humidity')
2142130 FORMAT (' --> Additional prognostic equation for the total water content')
[940]2143131 FORMAT (' --> No pt-equation solved. Neutral stratification with pt = ', &
2144                  F6.2, ' K assumed')
[1]2145134 FORMAT (' --> Additional prognostic equation for a passive scalar')
[1575]2146135 FORMAT (' --> Solve perturbation pressure via ',A,' method (', &
[1]2147                  A,'-cycle)'/ &
2148            '     number of grid levels:                   ',I2/ &
2149            '     Gauss-Seidel red/black iterations:       ',I2)
2150136 FORMAT ('     gridpoints of coarsest subdomain (x,y,z): (',I3,',',I3,',', &
2151                  I3,')')
2152137 FORMAT ('     level data gathered on PE0 at level:     ',I2/ &
2153            '     gridpoints of coarsest subdomain (x,y,z): (',I3,',',I3,',', &
2154                  I3,')'/ &
2155            '     gridpoints of coarsest domain (x,y,z):    (',I3,',',I3,',', &
2156                  I3,')')
[63]2157139 FORMAT (' --> Loop optimization method: ',A)
[1]2158140 FORMAT ('     maximum residual allowed:                ',E10.3)
2159141 FORMAT ('     fixed number of multigrid cycles:        ',I4)
2160142 FORMAT ('     perturbation pressure is calculated at every Runge-Kutta ', &
2161                  'step')
[87]2162143 FORMAT ('     Euler/upstream scheme is used for the SGS turbulent ', &
2163                  'kinetic energy')
[927]2164144 FORMAT ('     masking method is used')
[1]2165150 FORMAT (' --> Volume flow at the right and north boundary will be ', &
[241]2166                  'conserved'/ &
2167            '     using the ',A,' mode')
2168151 FORMAT ('     with u_bulk = ',F7.3,' m/s and v_bulk = ',F7.3,' m/s')
[306]2169152 FORMAT (' --> External pressure gradient directly prescribed by the user:',&
2170           /'     ',2(1X,E12.5),'Pa/m in x/y direction', &
2171           /'     starting from dp_level_b =', F8.3, 'm', A /)
[1]2172200 FORMAT (//' Run time and time step information:'/ &
2173             ' ----------------------------------'/)
[1106]2174201 FORMAT ( ' Timestep:             variable     maximum value: ',F6.3,' s', &
[1697]2175             '    CFL-factor:',F5.2)
[1106]2176202 FORMAT ( ' Timestep:          dt = ',F6.3,' s'/)
2177203 FORMAT ( ' Start time:          ',F9.3,' s'/ &
2178             ' End time:            ',F9.3,' s')
[1]2179204 FORMAT ( A,F9.3,' s')
2180205 FORMAT ( A,F9.3,' s',5X,'restart every',17X,F9.3,' s')
[1106]2181206 FORMAT (/' Time reached:        ',F9.3,' s'/ &
2182             ' CPU-time used:       ',F9.3,' s     per timestep:               ', &
2183               '  ',F9.3,' s'/                                                    &
[1111]2184             '                                      per second of simulated tim', &
[1]2185               'e: ',F9.3,' s')
[1106]2186207 FORMAT ( ' Coupling start time: ',F9.3,' s')
[1]2187250 FORMAT (//' Computational grid and domain size:'/ &
2188              ' ----------------------------------'// &
[3065]2189              ' Grid length:      dx =    ',F8.3,' m    dy =    ',F8.3, ' m')
2190251 FORMAT (  /' Domain size:       x = ',F10.3,' m     y = ',F10.3, &
[1]2191              ' m  z(u) = ',F10.3,' m'/)
[3065]2192253 FORMAT ( '                dz(',I1,') =    ', F8.3, ' m')
2193254 FORMAT (//' Number of gridpoints (x,y,z):  (0:',I4,', 0:',I4,', 0:',I4,')'/ &
[1]2194            ' Subdomain size (x,y,z):        (  ',I4,',   ',I4,',   ',I4,')'/)
2195260 FORMAT (/' The model has a slope in x-direction. Inclination angle: ',F6.2,&
2196             ' degrees')
[1551]2197270 FORMAT (//' Topography information:'/ &
2198              ' ----------------------'// &
[1]2199              1X,'Topography: ',A)
2200271 FORMAT (  ' Building size (x/y/z) in m: ',F5.1,' / ',F5.1,' / ',F5.1/ &
2201              ' Horizontal index bounds (l/r/s/n): ',I4,' / ',I4,' / ',I4, &
2202                ' / ',I4)
[240]2203272 FORMAT (  ' Single quasi-2D street canyon of infinite length in ',A, &
2204              ' direction' / &
2205              ' Canyon height: ', F6.2, 'm, ch = ', I4, '.'      / &
2206              ' Canyon position (',A,'-walls): cxl = ', I4,', cxr = ', I4, '.')
[2232]2207273 FORMAT (  ' Tunnel of infinite length in ',A, &
2208              ' direction' / &
2209              ' Tunnel height: ', F6.2, / &
2210              ' Tunnel-wall depth: ', F6.2      / &
2211              ' Tunnel width: ', F6.2 )
2212274 FORMAT (  ' Tunnel in ', A, ' direction.' / &
2213              ' Tunnel height: ', F6.2, / &   
2214              ' Tunnel-wall depth: ', F6.2      / &
2215              ' Tunnel width: ', F6.2, / &
2216              ' Tunnel length: ', F6.2 )
[256]2217278 FORMAT (' Topography grid definition convention:'/ &
2218            ' cell edge (staggered grid points'/  &
2219            ' (u in x-direction, v in y-direction))' /)
2220279 FORMAT (' Topography grid definition convention:'/ &
2221            ' cell center (scalar grid points)' /)
[2550]2222280 FORMAT (' Complex terrain simulation is activated.')
2223281 FORMAT ('    --> Mean inflow profiles are adjusted.' / &
2224            '    --> Elevation of inflow boundary: ', F7.1, ' m' )
2225282 FORMAT ('    --> Initial data from 3D-precursor run is shifted' / &
2226            '        vertically depending on local surface height.')
[1]2227300 FORMAT (//' Boundary conditions:'/ &
2228             ' -------------------'// &
2229             '                     p                    uv             ', &
[1551]2230             '                     pt'// &
[1]2231             ' B. bound.: ',A/ &
2232             ' T. bound.: ',A)
[97]2233301 FORMAT (/'                     ',A// &
[1]2234             ' B. bound.: ',A/ &
2235             ' T. bound.: ',A)
[19]2236303 FORMAT (/' Bottom surface fluxes are used in diffusion terms at k=1')
2237304 FORMAT (/' Top surface fluxes are used in diffusion terms at k=nzt')
[2270]2238305 FORMAT (//'    Constant flux layer between bottom surface and first ',     &
2239              'computational u,v-level:'// &
2240             '       z_mo = ',F6.2,' m   z0 =',F7.4,' m   z0h =',F8.5,&
[1697]2241             ' m   kappa =',F5.2/ &
2242             '       Rif value range:   ',F8.2,' <= rif <=',F6.2)
[97]2243306 FORMAT ('       Predefined constant heatflux:   ',F9.6,' K m/s')
[1]2244307 FORMAT ('       Heatflux has a random normal distribution')
2245308 FORMAT ('       Predefined surface temperature')
[97]2246309 FORMAT ('       Predefined constant salinityflux:   ',F9.6,' psu m/s')
[1]2247310 FORMAT (//'    1D-Model:'// &
2248             '       Rif value range:   ',F6.2,' <= rif <=',F6.2)
[1960]2249311 FORMAT ('       Predefined constant humidity flux: ',E10.3,' kg/kg m/s')
[1]2250312 FORMAT ('       Predefined surface humidity')
2251313 FORMAT ('       Predefined constant scalar flux: ',E10.3,' kg/(m**2 s)')
2252314 FORMAT ('       Predefined scalar value at the surface')
[1992]2253302 FORMAT ('       Predefined constant scalarflux:   ',F9.6,' kg/(m**2 s)')
2254315 FORMAT ('       Humidity flux at top surface is 0.0')
[102]2255316 FORMAT ('       Sensible heatflux and momentum flux from coupled ', &
2256                    'atmosphere model')
[1]2257317 FORMAT (//' Lateral boundaries:'/ &
2258            '       left/right:  ',A/    &
2259            '       north/south: ',A)
[1159]2260318 FORMAT (/'       use_cmax: ',L1 / &
2261            '       pt damping layer width = ',F8.2,' m, pt ', &
[1697]2262                    'damping factor =',F7.4)
[151]2263319 FORMAT ('       turbulence recycling at inflow switched on'/ &
2264            '       width of recycling domain: ',F7.1,' m   grid index: ',I4/ &
2265            '       inflow damping height: ',F6.1,' m   width: ',F6.1,' m')
2266320 FORMAT ('       Predefined constant momentumflux:  u: ',F9.6,' m**2/s**2'/ &
[103]2267            '                                          v: ',F9.6,' m**2/s**2')
[1365]2268321 FORMAT (//' Initial profiles:'/ &
2269              ' ----------------')
[1560]2270322 FORMAT ('       turbulence recycling at inflow switched on'/ &
2271            '       y shift of the recycled inflow turbulence switched on'/ &
2272            '       width of recycling domain: ',F7.1,' m   grid index: ',I4/ &
[1592]2273            '       inflow damping height: ',F6.1,' m   width: ',F6.1,' m'/)
[2050]2274323 FORMAT ('       turbulent outflow conditon switched on'/ &
2275            '       position of outflow source plane: ',F7.1,' m   ', &
2276                    'grid index: ', I4)
[151]2277325 FORMAT (//' List output:'/ &
[1]2278             ' -----------'//  &
2279            '    1D-Profiles:'/    &
[2883]2280            '       Output every             ',F10.2,' s')
[151]2281326 FORMAT ('       Time averaged over       ',F8.2,' s'/ &
[1]2282            '       Averaging input every    ',F8.2,' s')
2283330 FORMAT (//' Data output:'/ &
2284             ' -----------'/)
2285331 FORMAT (/'    1D-Profiles:')
2286332 FORMAT (/'       ',A)
2287333 FORMAT ('       Output every             ',F8.2,' s',/ &
2288            '       Time averaged over       ',F8.2,' s'/ &
2289            '       Averaging input every    ',F8.2,' s')
2290334 FORMAT (/'    2D-Arrays',A,':')
2291335 FORMAT (/'       ',A2,'-cross-section  Arrays: ',A/ &
2292            '       Output every             ',F8.2,' s  ',A/ &
2293            '       Cross sections at ',A1,' = ',A/ &
2294            '       scalar-coordinates:   ',A,' m'/)
2295336 FORMAT (/'    3D-Arrays',A,':')
2296337 FORMAT (/'       Arrays: ',A/ &
2297            '       Output every             ',F8.2,' s  ',A/ &
2298            '       Upper output limit at    ',F8.2,' m  (GP ',I4,')'/)
2299339 FORMAT ('       No output during initial ',F8.2,' s')
2300340 FORMAT (/'    Time series:')
2301341 FORMAT ('       Output every             ',F8.2,' s'/)
2302342 FORMAT (/'       ',A2,'-cross-section  Arrays: ',A/ &
2303            '       Output every             ',F8.2,' s  ',A/ &
2304            '       Time averaged over       ',F8.2,' s'/ &
2305            '       Averaging input every    ',F8.2,' s'/ &
2306            '       Cross sections at ',A1,' = ',A/ &
2307            '       scalar-coordinates:   ',A,' m'/)
2308343 FORMAT (/'       Arrays: ',A/ &
2309            '       Output every             ',F8.2,' s  ',A/ &
2310            '       Time averaged over       ',F8.2,' s'/ &
2311            '       Averaging input every    ',F8.2,' s'/ &
2312            '       Upper output limit at    ',F8.2,' m  (GP ',I4,')'/)
[292]2313344 FORMAT ('       Output format: ',A/)
[410]2314345 FORMAT (/'    Scaling lengths for output locations of all subsequent mask IDs:',/ &
2315            '       mask_scale_x (in x-direction): ',F9.3, ' m',/ &
2316            '       mask_scale_y (in y-direction): ',F9.3, ' m',/ &
2317            '       mask_scale_z (in z-direction): ',F9.3, ' m' )
2318346 FORMAT (/'    Masked data output',A,' for mask ID ',I2, ':')
2319347 FORMAT ('       Variables: ',A/ &
2320            '       Output every             ',F8.2,' s')
2321348 FORMAT ('       Variables: ',A/ &
2322            '       Output every             ',F8.2,' s'/ &
2323            '       Time averaged over       ',F8.2,' s'/ &
2324            '       Averaging input every    ',F8.2,' s')
2325349 FORMAT (/'       Output locations in ',A,'-direction in multiples of ', &
2326            'mask_scale_',A,' predefined by array mask_',I2.2,'_',A,':'/ &
2327            13('       ',8(F8.2,',')/) )
2328350 FORMAT (/'       Output locations in ',A,'-direction: ', &
2329            'all gridpoints along ',A,'-direction (default).' )
2330351 FORMAT (/'       Output locations in ',A,'-direction in multiples of ', &
2331            'mask_scale_',A,' constructed from array mask_',I2.2,'_',A,'_loop:'/ &
2332            '          loop begin:',F8.2,', end:',F8.2,', stride:',F8.2 )
[1313]2333352 FORMAT  (/'       Number of output time levels allowed: ',I3 /)
2334353 FORMAT  (/'       Number of output time levels allowed: unlimited' /)
[1783]2335354 FORMAT ('       Output format: ',A, '   compressed with level: ',I1/)
[1]2336#if defined( __dvrp_graphics )
2337360 FORMAT ('    Plot-Sequence with dvrp-software:'/ &
2338            '       Output every      ',F7.1,' s'/ &
2339            '       Output mode:      ',A/ &
2340            '       Host / User:      ',A,' / ',A/ &
2341            '       Directory:        ',A// &
2342            '       The sequence contains:')
[337]2343361 FORMAT (/'       Isosurface of "',A,'"    Threshold value: ', E12.3/ &
2344            '          Isosurface color: (',F4.2,',',F4.2,',',F4.2,') (R,G,B)')
2345362 FORMAT (/'       Slicer plane ',A/ &
[336]2346            '       Slicer limits: [',F6.2,',',F6.2,']')
[337]2347365 FORMAT (/'       Groundplate color: (',F4.2,',',F4.2,',',F4.2,') (R,G,B)'/ &
[336]2348            '       Superelevation along (x,y,z): (',F4.1,',',F4.1,',',F4.1, &
2349                     ')'/ &
2350            '       Clipping limits: from x = ',F9.1,' m to x = ',F9.1,' m'/ &
2351            '                        from y = ',F9.1,' m to y = ',F9.1,' m')
[337]2352366 FORMAT (/'       Topography color: (',F4.2,',',F4.2,',',F4.2,') (R,G,B)')
[336]2353367 FORMAT ('       Polygon reduction for topography: cluster_size = ', I1)
[1]2354#endif
2355400 FORMAT (//' Physical quantities:'/ &
2356              ' -------------------'/)
[2575]2357410 FORMAT ('    Geograph. latitude  :   latitude  = ',F4.1,' degr'/   &
2358            '    Geograph. longitude :   longitude = ',F4.1,' degr'/   &
[1697]2359            '    Angular velocity    :   omega  =',E10.3,' rad/s'/  &
[1551]2360            '    Coriolis parameter  :   f      = ',F9.6,' 1/s'/    &
2361            '                            f*     = ',F9.6,' 1/s')
2362411 FORMAT (/'    Gravity             :   g      = ',F4.1,' m/s**2')
[1179]2363412 FORMAT (/'    Reference state used in buoyancy terms: ',A)
2364413 FORMAT ('       Reference density in buoyancy terms: ',F8.3,' kg/m**3')
2365414 FORMAT ('       Reference temperature in buoyancy terms: ',F8.4,' K')
[1]2366420 FORMAT (/'    Characteristic levels of the initial temperature profile:'// &
2367            '       Height:        ',A,'  m'/ &
2368            '       Temperature:   ',A,'  K'/ &
2369            '       Gradient:      ',A,'  K/100m'/ &
2370            '       Gridpoint:     ',A)
2371421 FORMAT (/'    Characteristic levels of the initial humidity profile:'// &
2372            '       Height:      ',A,'  m'/ &
2373            '       Humidity:    ',A,'  kg/kg'/ &
2374            '       Gradient:    ',A,'  (kg/kg)/100m'/ &
2375            '       Gridpoint:   ',A)
2376422 FORMAT (/'    Characteristic levels of the initial scalar profile:'// &
2377            '       Height:                  ',A,'  m'/ &
2378            '       Scalar concentration:    ',A,'  kg/m**3'/ &
2379            '       Gradient:                ',A,'  (kg/m**3)/100m'/ &
2380            '       Gridpoint:               ',A)
2381423 FORMAT (/'    Characteristic levels of the geo. wind component ug:'// &
2382            '       Height:      ',A,'  m'/ &
2383            '       ug:          ',A,'  m/s'/ &
2384            '       Gradient:    ',A,'  1/100s'/ &
2385            '       Gridpoint:   ',A)
2386424 FORMAT (/'    Characteristic levels of the geo. wind component vg:'// &
2387            '       Height:      ',A,'  m'/ &
[97]2388            '       vg:          ',A,'  m/s'/ &
[1]2389            '       Gradient:    ',A,'  1/100s'/ &
2390            '       Gridpoint:   ',A)
[97]2391425 FORMAT (/'    Characteristic levels of the initial salinity profile:'// &
2392            '       Height:     ',A,'  m'/ &
2393            '       Salinity:   ',A,'  psu'/ &
2394            '       Gradient:   ',A,'  psu/100m'/ &
2395            '       Gridpoint:  ',A)
[411]2396426 FORMAT (/'    Characteristic levels of the subsidence/ascent profile:'// &
2397            '       Height:      ',A,'  m'/ &
2398            '       w_subs:      ',A,'  m/s'/ &
2399            '       Gradient:    ',A,'  (m/s)/100m'/ &
2400            '       Gridpoint:   ',A)
[767]2401427 FORMAT (/'    Initial wind profiles (u,v) are interpolated from given'// &
2402                  ' profiles')
[1241]2403428 FORMAT (/'    Initial profiles (u, v, pt, q) are taken from file '/ &
2404             '    NUDGING_DATA')
[824]2405430 FORMAT (//' Cloud physics quantities / methods:'/ &
2406              ' ----------------------------------'/)
[1960]2407431 FORMAT ('    Humidity is considered, bu no condensation')
[824]2408433 FORMAT ('    Cloud droplets treated explicitly using the Lagrangian part', &
2409                 'icle model')
2410434 FORMAT ('    Curvature and solution effecs are considered for growth of', &
2411                 ' droplets < 1.0E-6 m')
[825]2412435 FORMAT ('    Droplet collision is handled by ',A,'-kernel')
[828]2413436 FORMAT ('       Fast kernel with fixed radius- and dissipation classes ', &
2414                    'are used'/ &
2415            '          number of radius classes:       ',I3,'    interval ', &
2416                       '[1.0E-6,2.0E-4] m'/ &
2417            '          number of dissipation classes:   ',I2,'    interval ', &
2418                       '[0,1000] cm**2/s**3')
2419437 FORMAT ('    Droplet collision is switched off')
[1]2420450 FORMAT (//' LES / Turbulence quantities:'/ &
2421              ' ---------------------------'/)
[824]2422451 FORMAT ('    Diffusion coefficients are constant:'/ &
2423            '    Km = ',F6.2,' m**2/s   Kh = ',F6.2,' m**2/s   Pr = ',F5.2)
[1697]2424453 FORMAT ('    Mixing length is limited to',F5.2,' * z')
[824]2425454 FORMAT ('    TKE is not allowed to fall below ',E9.2,' (m/s)**2')
2426455 FORMAT ('    initial TKE is prescribed as ',E9.2,' (m/s)**2')
[3241]2427456 FORMAT (/'    Day of the year at model start :   day_init      =     ',I3 &
2428            /'    UTC time at model start        :   time_utc_init = ',F7.1,' s')
[3083]2429457 FORMAT ('    RANS-mode constants: c_0 = ',F9.5/         &
2430            '                         c_1 = ',F9.5/         &
2431            '                         c_2 = ',F9.5/         &
2432            '                         c_3 = ',F9.5/         &
2433            '                         c_4 = ',F9.5/         &
2434            '                         sigma_e    = ',F9.5/  &
2435            '                         sigma_diss = ',F9.5)
[1]2436470 FORMAT (//' Actions during the simulation:'/ &
2437              ' -----------------------------'/)
[94]2438471 FORMAT ('    Disturbance impulse (u,v) every :   ',F6.2,' s'/            &
[1697]2439            '    Disturbance amplitude           :    ',F5.2, ' m/s'/       &
[94]2440            '    Lower disturbance level         : ',F8.2,' m (GP ',I4,')'/  &
2441            '    Upper disturbance level         : ',F8.2,' m (GP ',I4,')')
[1]2442472 FORMAT ('    Disturbances continued during the run from i/j =',I4, &
2443                 ' to i/j =',I4)
2444473 FORMAT ('    Disturbances cease as soon as the disturbance energy exceeds',&
[1697]2445                 F6.3, ' m**2/s**2')
[1]2446474 FORMAT ('    Random number generator used    : ',A/)
2447475 FORMAT ('    The surface temperature is increased (or decreased, ', &
2448                 'respectively, if'/ &
2449            '    the value is negative) by ',F5.2,' K at the beginning of the',&
2450                 ' 3D-simulation'/)
2451476 FORMAT ('    The surface humidity is increased (or decreased, ',&
2452                 'respectively, if the'/ &
2453            '    value is negative) by ',E8.1,' kg/kg at the beginning of', &
2454                 ' the 3D-simulation'/)
2455477 FORMAT ('    The scalar value is increased at the surface (or decreased, ',&
2456                 'respectively, if the'/ &
2457            '    value is negative) by ',E8.1,' kg/m**3 at the beginning of', &
2458                 ' the 3D-simulation'/)
2459480 FORMAT ('    Particles:'/ &
2460            '    ---------'// &
2461            '       Particle advection is active (switched on at t = ', F7.1, &
2462                    ' s)'/ &
2463            '       Start of new particle generations every  ',F6.1,' s'/ &
2464            '       Boundary conditions: left/right: ', A, ' north/south: ', A/&
2465            '                            bottom:     ', A, ' top:         ', A/&
2466            '       Maximum particle age:                 ',F9.1,' s'/ &
[1359]2467            '       Advection stopped at t = ',F9.1,' s'/)
[1]2468481 FORMAT ('       Particles have random start positions'/)
[336]2469482 FORMAT ('          Particles are advected only horizontally'/)
[1]2470485 FORMAT ('       Particle data are written on file every ', F9.1, ' s')
2471486 FORMAT ('       Particle statistics are written on file'/)
2472487 FORMAT ('       Number of particle groups: ',I2/)
2473488 FORMAT ('       SGS velocity components are used for particle advection'/ &
[1697]2474            '          minimum timestep for advection:', F8.5/)
[1]2475489 FORMAT ('       Number of particles simultaneously released at each ', &
2476                    'point: ', I5/)
2477490 FORMAT ('       Particle group ',I2,':'/ &
2478            '          Particle radius: ',E10.3, 'm')
2479491 FORMAT ('          Particle inertia is activated'/ &
[1697]2480            '             density_ratio (rho_fluid/rho_particle) =',F6.3/)
[1]2481492 FORMAT ('          Particles are advected only passively (no inertia)'/)
2482493 FORMAT ('          Boundaries of particle source: x:',F8.1,' - ',F8.1,' m'/&
2483            '                                         y:',F8.1,' - ',F8.1,' m'/&
2484            '                                         z:',F8.1,' - ',F8.1,' m'/&
2485            '          Particle distances:  dx = ',F8.1,' m  dy = ',F8.1, &
2486                       ' m  dz = ',F8.1,' m'/)
2487494 FORMAT ('       Output of particle time series in NetCDF format every ', &
2488                    F8.2,' s'/)
2489495 FORMAT ('       Number of particles in total domain: ',I10/)
[1575]2490496 FORMAT ('       Initial vertical particle positions are interpreted ', &
2491                    'as relative to the given topography')
[1]2492500 FORMAT (//' 1D-Model parameters:'/                           &
2493              ' -------------------'//                           &
2494            '    Simulation time:                   ',F8.1,' s'/ &
2495            '    Run-controll output every:         ',F8.1,' s'/ &
2496            '    Vertical profile output every:     ',F8.1,' s'/ &
2497            '    Mixing length calculation:         ',A/         &
2498            '    Dissipation calculation:           ',A/)
2499502 FORMAT ('    Damping layer starts from ',F7.1,' m (GP ',I4,')'/)
[667]2500503 FORMAT (' --> Momentum advection via Wicker-Skamarock-Scheme 5th order')
2501504 FORMAT (' --> Scalar advection via Wicker-Skamarock-Scheme 5th order')
[3529]2502512 FORMAT (/' Date:               ',A10,6X,'Run:       ',A34/      &
[1429]2503            ' Time:                 ',A8,6X,'Run-No.:   ',I2.2/     &
2504            ' Run on host:        ',A10,6X,'En-No.:    ',I2.2)
[1791]2505600 FORMAT (/' Nesting informations:'/ &
2506            ' --------------------'/ &
[1797]2507            ' Nesting mode:                     ',A/ &
2508            ' Nesting-datatransfer mode:        ',A// &
[1791]2509            ' Nest id  parent  number   lower left coordinates   name'/ &
2510            ' (*=me)     id    of PEs      x (m)     y (m)' )
2511601 FORMAT (2X,A1,1X,I2.2,6X,I2.2,5X,I5,5X,F8.2,2X,F8.2,5X,A)
[1]2512
2513 END SUBROUTINE header
Note: See TracBrowser for help on using the repository browser.