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

Last change on this file since 1932 was 1932, checked in by suehring, 8 years ago

last commit documented

  • Property svn:keywords set to Id
File size: 86.2 KB
RevLine 
[1682]1!> @file header.f90
[1036]2!--------------------------------------------------------------------------------!
3! This file is part of PALM.
4!
5! PALM is free software: you can redistribute it and/or modify it under the terms
6! of the GNU General Public License as published by the Free Software Foundation,
7! either version 3 of the License, or (at your option) any later version.
8!
9! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
10! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
11! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
12!
13! You should have received a copy of the GNU General Public License along with
14! PALM. If not, see <http://www.gnu.org/licenses/>.
15!
[1818]16! Copyright 1997-2016 Leibniz Universitaet Hannover
[1036]17!--------------------------------------------------------------------------------!
18!
[254]19! Current revisions:
[1]20! -----------------
[1932]21!
22!
[1485]23! Former revisions:
24! -----------------
25! $Id: header.f90 1932 2016-06-10 12:09:21Z suehring $
26!
[1932]27! 1931 2016-06-10 12:06:59Z suehring
28! Rename multigrid into multigrid_noopt
29!
[1903]30! 1902 2016-05-09 11:18:56Z suehring
31! Write information about masking_method only for multigrid solver
32!
[1851]33! 1849 2016-04-08 11:33:18Z hoffmann
34! Adapted for modularization of microphysics
35!
[1834]36! 1833 2016-04-07 14:23:03Z raasch
37! spectrum renamed spectra_mod, output of spectra related quantities moved to
38! spectra_mod
39!
[1832]40! 1831 2016-04-07 13:15:51Z hoffmann
41! turbulence renamed collision_turbulence,
42! drizzle renamed cloud_water_sedimentation
43!
[1827]44! 1826 2016-04-07 12:01:39Z maronga
45! Moved radiation model header output to the respective module.
46! Moved canopy model header output to the respective module.
47!
[1823]48! 1822 2016-04-07 07:49:42Z hoffmann
49! Tails removed. icloud_scheme replaced by microphysics_*
50!
[1818]51! 1817 2016-04-06 15:44:20Z maronga
52! Moved land_surface_model header output to the respective module.
53!
[1809]54! 1808 2016-04-05 19:44:00Z raasch
55! routine local_flush replaced by FORTRAN statement
56!
[1798]57! 1797 2016-03-21 16:50:28Z raasch
58! output of nesting datatransfer mode
59!
[1792]60! 1791 2016-03-11 10:41:25Z raasch
61! output of nesting informations of all domains
62!
[1789]63! 1788 2016-03-10 11:01:04Z maronga
64! Parameter dewfall removed
65!
[1787]66! 1786 2016-03-08 05:49:27Z raasch
67! cpp-direktives for spectra removed
68!
[1784]69! 1783 2016-03-06 18:36:17Z raasch
70! netcdf module and variable names changed, output of netcdf_deflate
71!
[1765]72! 1764 2016-02-28 12:45:19Z raasch
73! output of nesting informations
74!
[1698]75! 1697 2015-10-28 17:14:10Z raasch
76! small E- and F-FORMAT changes to avoid informative compiler messages about
77! insufficient field width
78!
[1692]79! 1691 2015-10-26 16:17:44Z maronga
80! Renamed prandtl_layer to constant_flux_layer, renames rif_min/rif_max to
81! zeta_min/zeta_max.
82!
[1683]83! 1682 2015-10-07 23:56:08Z knoop
84! Code annotations made doxygen readable
85!
[1676]86! 1675 2015-10-02 08:28:59Z gronemeier
87! Bugfix: Definition of topography grid levels
88!
[1662]89! 1660 2015-09-21 08:15:16Z gronemeier
90! Bugfix: Definition of building/street canyon height if vertical grid stretching
91!         starts below the maximum topography height.
92!
[1591]93! 1590 2015-05-08 13:56:27Z maronga
94! Bugfix: Added TRIM statements for character strings for LSM and radiation code
95!
[1586]96! 1585 2015-04-30 07:05:52Z maronga
97! Further output for radiation model(s).
98!
[1576]99! 1575 2015-03-27 09:56:27Z raasch
100! adjustments for psolver-queries, output of seed_follows_topography
101!
[1561]102! 1560 2015-03-06 10:48:54Z keck
103! output for recycling y shift
104!
[1558]105! 1557 2015-03-05 16:43:04Z suehring
106! output for monotonic limiter
107!
[1552]108! 1551 2015-03-03 14:18:16Z maronga
109! Added informal output for land surface model and radiation model. Removed typo.
110!
[1497]111! 1496 2014-12-02 17:25:50Z maronga
112! Renamed: "radiation -> "cloud_top_radiation"
113!
[1485]114! 1484 2014-10-21 10:53:05Z kanani
[1484]115! Changes due to new module structure of the plant canopy model:
116!   module plant_canopy_model_mod and output for new canopy model parameters
117!   (alpha_lad, beta_lad, lai_beta,...) added,
118!   drag_coefficient, leaf_surface_concentration and scalar_exchange_coefficient
119!   renamed to canopy_drag_coeff, leaf_surface_conc and leaf_scalar_exch_coeff,
120!   learde renamed leaf_area_density.
121! Bugfix: DO-WHILE-loop for lad header information additionally restricted
122! by maximum number of gradient levels (currently 10)
[1483]123!
124! 1482 2014-10-18 12:34:45Z raasch
125! information about calculated or predefined virtual processor topology adjusted
126!
[1469]127! 1468 2014-09-24 14:06:57Z maronga
128! Adapted for use on up to 6-digit processor cores
129!
[1430]130! 1429 2014-07-15 12:53:45Z knoop
131! header exended to provide ensemble_member_nr if specified
132!
[1377]133! 1376 2014-04-26 11:21:22Z boeske
134! Correction of typos
135!
[1366]136! 1365 2014-04-22 15:03:56Z boeske
137! New section 'Large scale forcing and nudging':
138! output of large scale forcing and nudging information,
139! new section for initial profiles created
140!
[1360]141! 1359 2014-04-11 17:15:14Z hoffmann
142! dt_sort_particles removed
143!
[1354]144! 1353 2014-04-08 15:21:23Z heinze
145! REAL constants provided with KIND-attribute
146!
[1329]147! 1327 2014-03-21 11:00:16Z raasch
148! parts concerning iso2d and avs output removed,
149! -netcdf output queries
150!
[1325]151! 1324 2014-03-21 09:13:16Z suehring
152! Bugfix: module spectrum added
153!
[1323]154! 1322 2014-03-20 16:38:49Z raasch
155! REAL functions provided with KIND-attribute,
156! some REAL constants defined as wp-kind
157!
[1321]158! 1320 2014-03-20 08:40:49Z raasch
[1320]159! ONLY-attribute added to USE-statements,
160! kind-parameters added to all INTEGER and REAL declaration statements,
161! kinds are defined in new module kinds,
162! revision history before 2012 removed,
163! comment fields (!:) to be used for variable explanations added to
164! all variable declaration statements
[1321]165!
[1309]166! 1308 2014-03-13 14:58:42Z fricke
167! output of the fixed number of output time levels
168! output_format adjusted for masked data if netcdf_data_format > 5
169!
[1300]170! 1299 2014-03-06 13:15:21Z heinze
171! output for using large_scale subsidence in combination
172! with large_scale_forcing
173! reformatting, more detailed explanations
174!
[1242]175! 1241 2013-10-30 11:36:58Z heinze
176! output for nudging + large scale forcing from external file
177!
[1217]178! 1216 2013-08-26 09:31:42Z raasch
179! output for transpose_compute_overlap
180!
[1213]181! 1212 2013-08-15 08:46:27Z raasch
182! output for poisfft_hybrid removed
183!
[1182]184! 1179 2013-06-14 05:57:58Z raasch
185! output of reference_state, use_reference renamed use_single_reference_value
186!
[1160]187! 1159 2013-05-21 11:58:22Z fricke
188! +use_cmax
189!
[1116]190! 1115 2013-03-26 18:16:16Z hoffmann
191! descriptions for Seifert-Beheng-cloud-physics-scheme added
192!
[1112]193! 1111 2013-03-08 23:54:10Z raasch
194! output of accelerator board information
195! ibc_p_b = 2 removed
196!
[1109]197! 1108 2013-03-05 07:03:32Z raasch
198! bugfix for r1106
199!
[1107]200! 1106 2013-03-04 05:31:38Z raasch
201! some format changes for coupled runs
202!
[1093]203! 1092 2013-02-02 11:24:22Z raasch
204! unused variables removed
205!
[1037]206! 1036 2012-10-22 13:43:42Z raasch
207! code put under GPL (PALM 3.9)
208!
[1035]209! 1031 2012-10-19 14:35:30Z raasch
210! output of netCDF data format modified
211!
[1017]212! 1015 2012-09-27 09:23:24Z raasch
[1365]213! output of Adjustment of mixing length to the Prandtl mixing length at first
[1017]214! grid point above ground removed
215!
[1004]216! 1003 2012-09-14 14:35:53Z raasch
217! output of information about equal/unequal subdomain size removed
218!
[1002]219! 1001 2012-09-13 14:08:46Z raasch
220! all actions concerning leapfrog- and upstream-spline-scheme removed
221!
[979]222! 978 2012-08-09 08:28:32Z fricke
223! -km_damp_max, outflow_damping_width
224! +pt_damping_factor, pt_damping_width
225! +z0h
226!
[965]227! 964 2012-07-26 09:14:24Z raasch
228! output of profil-related quantities removed
229!
[941]230! 940 2012-07-09 14:31:00Z raasch
231! Output in case of simulations for pure neutral stratification (no pt-equation
232! solved)
233!
[928]234! 927 2012-06-06 19:15:04Z raasch
235! output of masking_method for mg-solver
236!
[869]237! 868 2012-03-28 12:21:07Z raasch
238! translation velocity in Galilean transformation changed to 0.6 * ug
239!
[834]240! 833 2012-02-22 08:55:55Z maronga
241! Adjusted format for leaf area density
242!
[829]243! 828 2012-02-21 12:00:36Z raasch
244! output of dissipation_classes + radius_classes
245!
[826]246! 825 2012-02-19 03:03:44Z raasch
247! Output of cloud physics parameters/quantities complemented and restructured
248!
[1]249! Revision 1.1  1997/08/11 06:17:20  raasch
250! Initial revision
251!
252!
253! Description:
254! ------------
[1764]255!> Writing a header with all important information about the current run.
[1682]256!> This subroutine is called three times, two times at the beginning
257!> (writing information on files RUN_CONTROL and HEADER) and one time at the
258!> end of the run, then writing additional information about CPU-usage on file
259!> header.
[411]260!-----------------------------------------------------------------------------!
[1682]261 SUBROUTINE header
262 
[1]263
[1320]264    USE arrays_3d,                                                             &
[1660]265        ONLY:  pt_init, qsws, q_init, sa_init, shf, ug, vg, w_subs, zu, zw
[1320]266       
[1]267    USE control_parameters
[1320]268       
269    USE cloud_parameters,                                                      &
[1849]270        ONLY:  cp, l_v, r_d
271
[1320]272    USE cpulog,                                                                &
273        ONLY:  log_point_s
274       
275    USE dvrp_variables,                                                        &
276        ONLY:  use_seperate_pe_for_dvrp_output
277       
278    USE grid_variables,                                                        &
279        ONLY:  dx, dy
280       
281    USE indices,                                                               &
282        ONLY:  mg_loc_ind, nnx, nny, nnz, nx, ny, nxl_mg, nxr_mg, nyn_mg,      &
283               nys_mg, nzt, nzt_mg
284       
285    USE kinds
[1817]286 
[1551]287    USE land_surface_model_mod,                                                &
[1817]288        ONLY: land_surface, lsm_header
[1849]289
290    USE microphysics_mod,                                                      &
291        ONLY:  cloud_water_sedimentation, collision_turbulence,                &
292               c_sedimentation, limiter_sedimentation, nc_const,               &
293               ventilation_effect
294
[1320]295    USE model_1d,                                                              &
296        ONLY:  damp_level_ind_1d, dt_pr_1d, dt_run_control_1d, end_time_1d
297       
[1783]298    USE netcdf_interface,                                                      &
299        ONLY:  netcdf_data_format, netcdf_data_format_string, netcdf_deflate
300
[1320]301    USE particle_attributes,                                                   &
302        ONLY:  bc_par_b, bc_par_lr, bc_par_ns, bc_par_t, collision_kernel,     &
[1831]303               curvature_solution_effects,                                     &
[1320]304               density_ratio, dissipation_classes, dt_min_part, dt_prel,       &
[1359]305               dt_write_particle_data, end_time_prel,                          &
[1822]306               number_of_particle_groups, particle_advection,                  &
307               particle_advection_start,                                       &
[1320]308               particles_per_point, pdx, pdy, pdz,  psb, psl, psn, psr, pss,   &
309               pst, radius, radius_classes, random_start_position,             &
[1575]310               seed_follows_topography,                                        &
[1822]311               total_number_of_particles, use_sgs_for_particles,               &
[1320]312               vertical_particle_advection, write_particle_statistics
313       
[1]314    USE pegrid
[1484]315
316    USE plant_canopy_model_mod,                                                &
[1826]317        ONLY:  pcm_header, plant_canopy
[1551]318
[1791]319    USE pmc_handle_communicator,                                               &
320        ONLY:  pmc_get_model_info
321
[1764]322    USE pmc_interface,                                                         &
[1797]323        ONLY:  nested_run, nesting_datatransfer_mode, nesting_mode
[1764]324
[1551]325    USE radiation_model_mod,                                                   &
[1826]326        ONLY:  radiation, radiation_header
[1324]327   
[1833]328    USE spectra_mod,                                                           &
329        ONLY:  calculate_spectra, spectra_header
[1]330
331    IMPLICIT NONE
332
[1682]333    CHARACTER (LEN=1)  ::  prec                !<
[1320]334   
[1682]335    CHARACTER (LEN=2)  ::  do2d_mode           !<
[1320]336   
[1682]337    CHARACTER (LEN=5)  ::  section_chr         !<
[1320]338   
[1682]339    CHARACTER (LEN=10) ::  coor_chr            !<
340    CHARACTER (LEN=10) ::  host_chr            !<
[1320]341   
[1682]342    CHARACTER (LEN=16) ::  begin_chr           !<
[1320]343   
[1682]344    CHARACTER (LEN=26) ::  ver_rev             !<
[1791]345
346    CHARACTER (LEN=32) ::  cpl_name            !<
[1320]347   
[1682]348    CHARACTER (LEN=40) ::  output_format       !<
[1320]349   
[1682]350    CHARACTER (LEN=70) ::  char1               !<
351    CHARACTER (LEN=70) ::  char2               !<
352    CHARACTER (LEN=70) ::  dopr_chr            !<
353    CHARACTER (LEN=70) ::  do2d_xy             !<
354    CHARACTER (LEN=70) ::  do2d_xz             !<
355    CHARACTER (LEN=70) ::  do2d_yz             !<
356    CHARACTER (LEN=70) ::  do3d_chr            !<
357    CHARACTER (LEN=70) ::  domask_chr          !<
358    CHARACTER (LEN=70) ::  run_classification  !<
[1320]359   
[1826]360    CHARACTER (LEN=85) ::  r_upper             !<
361    CHARACTER (LEN=85) ::  r_lower             !<
[1320]362   
[1682]363    CHARACTER (LEN=86) ::  coordinates         !<
364    CHARACTER (LEN=86) ::  gradients           !<
365    CHARACTER (LEN=86) ::  slices              !<
366    CHARACTER (LEN=86) ::  temperatures        !<
367    CHARACTER (LEN=86) ::  ugcomponent         !<
368    CHARACTER (LEN=86) ::  vgcomponent         !<
[1]369
[1682]370    CHARACTER (LEN=1), DIMENSION(1:3) ::  dir = (/ 'x', 'y', 'z' /)  !<
[410]371
[1791]372    INTEGER(iwp) ::  av             !<
373    INTEGER(iwp) ::  bh             !<
374    INTEGER(iwp) ::  blx            !<
375    INTEGER(iwp) ::  bly            !<
376    INTEGER(iwp) ::  bxl            !<
377    INTEGER(iwp) ::  bxr            !<
378    INTEGER(iwp) ::  byn            !<
379    INTEGER(iwp) ::  bys            !<
380    INTEGER(iwp) ::  ch             !<
381    INTEGER(iwp) ::  count          !<
382    INTEGER(iwp) ::  cpl_parent_id  !<
383    INTEGER(iwp) ::  cwx            !<
384    INTEGER(iwp) ::  cwy            !<
385    INTEGER(iwp) ::  cxl            !<
386    INTEGER(iwp) ::  cxr            !<
387    INTEGER(iwp) ::  cyn            !<
388    INTEGER(iwp) ::  cys            !<
389    INTEGER(iwp) ::  dim            !<
390    INTEGER(iwp) ::  i              !<
391    INTEGER(iwp) ::  io             !<
392    INTEGER(iwp) ::  j              !<
393    INTEGER(iwp) ::  k              !<
394    INTEGER(iwp) ::  l              !<
395    INTEGER(iwp) ::  ll             !<
396    INTEGER(iwp) ::  mpi_type       !<
397    INTEGER(iwp) ::  my_cpl_id      !<
398    INTEGER(iwp) ::  n              !<
399    INTEGER(iwp) ::  ncpl           !<
400    INTEGER(iwp) ::  npe_total      !<
[1320]401   
[1826]402
[1682]403    REAL(wp) ::  cpuseconds_per_simulated_second  !<
[1791]404    REAL(wp) ::  lower_left_coord_x               !< x-coordinate of nest domain
405    REAL(wp) ::  lower_left_coord_y               !< y-coordinate of nest domain
[1]406
407!
408!-- Open the output file. At the end of the simulation, output is directed
409!-- to unit 19.
410    IF ( ( runnr == 0 .OR. force_print_header )  .AND. &
411         .NOT. simulated_time_at_begin /= simulated_time )  THEN
412       io = 15   !  header output on file RUN_CONTROL
413    ELSE
414       io = 19   !  header output on file HEADER
415    ENDIF
416    CALL check_open( io )
417
418!
419!-- At the end of the run, output file (HEADER) will be rewritten with
[1551]420!-- new information
[1]421    IF ( io == 19 .AND. simulated_time_at_begin /= simulated_time ) REWIND( 19 )
422
423!
424!-- Determine kind of model run
425    IF ( TRIM( initializing_actions ) == 'read_restart_data' )  THEN
[1764]426       run_classification = 'restart run'
[328]427    ELSEIF ( TRIM( initializing_actions ) == 'cyclic_fill' )  THEN
[1764]428       run_classification = 'run with cyclic fill of 3D - prerun data'
[147]429    ELSEIF ( INDEX( initializing_actions, 'set_constant_profiles' ) /= 0 )  THEN
[1764]430       run_classification = 'run without 1D - prerun'
[197]431    ELSEIF ( INDEX( initializing_actions, 'set_1d-model_profiles' ) /= 0 )  THEN
[1764]432       run_classification = 'run with 1D - prerun'
[197]433    ELSEIF ( INDEX( initializing_actions, 'by_user' ) /=0 )  THEN
[1764]434       run_classification = 'run initialized by user'
[1]435    ELSE
[254]436       message_string = ' unknown action(s): ' // TRIM( initializing_actions )
437       CALL message( 'header', 'PA0191', 0, 0, 0, 6, 0 )
[1]438    ENDIF
[1764]439    IF ( nested_run )  run_classification = 'nested ' // run_classification
[97]440    IF ( ocean )  THEN
441       run_classification = 'ocean - ' // run_classification
442    ELSE
443       run_classification = 'atmosphere - ' // run_classification
444    ENDIF
[1]445
446!
447!-- Run-identification, date, time, host
448    host_chr = host(1:10)
[75]449    ver_rev = TRIM( version ) // '  ' // TRIM( revision )
[102]450    WRITE ( io, 100 )  ver_rev, TRIM( run_classification )
[291]451    IF ( TRIM( coupling_mode ) /= 'uncoupled' )  THEN
452#if defined( __mpi2 )
453       mpi_type = 2
454#else
455       mpi_type = 1
456#endif
457       WRITE ( io, 101 )  mpi_type, coupling_mode
458    ENDIF
[1108]459#if defined( __parallel )
[1353]460    IF ( coupling_start_time /= 0.0_wp )  THEN
[1106]461       IF ( coupling_start_time > simulated_time_at_begin )  THEN
462          WRITE ( io, 109 )
463       ELSE
464          WRITE ( io, 114 )
465       ENDIF
466    ENDIF
[1108]467#endif
[1429]468    IF ( ensemble_member_nr /= 0 )  THEN
469       WRITE ( io, 512 )  run_date, run_identifier, run_time, runnr,           &
470                       ADJUSTR( host_chr ), ensemble_member_nr
471    ELSE
472       WRITE ( io, 102 )  run_date, run_identifier, run_time, runnr,           &
[102]473                       ADJUSTR( host_chr )
[1429]474    ENDIF
[1]475#if defined( __parallel )
[1482]476    IF ( npex == -1  .AND.  npey == -1 )  THEN
[1]477       char1 = 'calculated'
478    ELSE
479       char1 = 'predefined'
480    ENDIF
481    IF ( threads_per_task == 1 )  THEN
[102]482       WRITE ( io, 103 )  numprocs, pdims(1), pdims(2), TRIM( char1 )
[1]483    ELSE
[102]484       WRITE ( io, 104 )  numprocs*threads_per_task, numprocs, &
[1]485                          threads_per_task, pdims(1), pdims(2), TRIM( char1 )
486    ENDIF
[1111]487    IF ( num_acc_per_node /= 0 )  WRITE ( io, 117 )  num_acc_per_node   
[1]488    IF ( ( host(1:3) == 'ibm'  .OR.  host(1:3) == 'nec'  .OR.    &
489           host(1:2) == 'lc'   .OR.  host(1:3) == 'dec' )  .AND. &
490         npex == -1  .AND.  pdims(2) == 1 )                      &
491    THEN
[102]492       WRITE ( io, 106 )
[1]493    ELSEIF ( pdims(2) == 1 )  THEN
[102]494       WRITE ( io, 107 )  'x'
[1]495    ELSEIF ( pdims(1) == 1 )  THEN
[102]496       WRITE ( io, 107 )  'y'
[1]497    ENDIF
[102]498    IF ( use_seperate_pe_for_dvrp_output )  WRITE ( io, 105 )
[759]499    IF ( numprocs /= maximum_parallel_io_streams )  THEN
500       WRITE ( io, 108 )  maximum_parallel_io_streams
501    ENDIF
[1111]502#else
503    IF ( num_acc_per_node /= 0 )  WRITE ( io, 120 )  num_acc_per_node
[1]504#endif
[1764]505
506!
507!-- Nesting informations
508    IF ( nested_run )  THEN
[1791]509
[1797]510       WRITE ( io, 600 )  TRIM( nesting_mode ),                                &
511                          TRIM( nesting_datatransfer_mode )
[1791]512       CALL pmc_get_model_info( ncpl = ncpl, cpl_id = my_cpl_id )
513
514       DO  n = 1, ncpl
515          CALL pmc_get_model_info( request_for_cpl_id = n, cpl_name = cpl_name,&
516                                   cpl_parent_id = cpl_parent_id,              &
517                                   lower_left_x = lower_left_coord_x,          &
518                                   lower_left_y = lower_left_coord_y,          &
519                                   npe_total = npe_total )
520          IF ( n == my_cpl_id )  THEN
521             char1 = '*'
522          ELSE
523             char1 = ' '
524          ENDIF
525          WRITE ( io, 601 )  TRIM( char1 ), n, cpl_parent_id, npe_total,       &
526                             lower_left_coord_x, lower_left_coord_y,           &
527                             TRIM( cpl_name )
528       ENDDO
[1764]529    ENDIF
[1]530    WRITE ( io, 99 )
531
532!
533!-- Numerical schemes
534    WRITE ( io, 110 )
535    IF ( psolver(1:7) == 'poisfft' )  THEN
536       WRITE ( io, 111 )  TRIM( fft_method )
[1216]537       IF ( transpose_compute_overlap )  WRITE( io, 115 )
[1]538    ELSEIF ( psolver == 'sor' )  THEN
539       WRITE ( io, 112 )  nsor_ini, nsor, omega_sor
[1575]540    ELSEIF ( psolver(1:9) == 'multigrid' )  THEN
541       WRITE ( io, 135 )  TRIM(psolver), cycle_mg, maximum_grid_level, ngsrb
[1]542       IF ( mg_cycles == -1 )  THEN
543          WRITE ( io, 140 )  residual_limit
544       ELSE
545          WRITE ( io, 141 )  mg_cycles
546       ENDIF
547       IF ( mg_switch_to_pe0_level == 0 )  THEN
548          WRITE ( io, 136 )  nxr_mg(1)-nxl_mg(1)+1, nyn_mg(1)-nys_mg(1)+1, &
549                             nzt_mg(1)
[197]550       ELSEIF (  mg_switch_to_pe0_level /= -1 )  THEN
[1]551          WRITE ( io, 137 )  mg_switch_to_pe0_level,            &
552                             mg_loc_ind(2,0)-mg_loc_ind(1,0)+1, &
553                             mg_loc_ind(4,0)-mg_loc_ind(3,0)+1, &
554                             nzt_mg(mg_switch_to_pe0_level),    &
555                             nxr_mg(1)-nxl_mg(1)+1, nyn_mg(1)-nys_mg(1)+1, &
556                             nzt_mg(1)
557       ENDIF
[1931]558       IF ( psolver == 'multigrid_noopt' .AND. masking_method )  WRITE ( io, 144 )
[1]559    ENDIF
560    IF ( call_psolver_at_all_substeps  .AND. timestep_scheme(1:5) == 'runge' ) &
561    THEN
562       WRITE ( io, 142 )
563    ENDIF
564
565    IF ( momentum_advec == 'pw-scheme' )  THEN
566       WRITE ( io, 113 )
[1299]567    ELSEIF (momentum_advec == 'ws-scheme' )  THEN
[667]568       WRITE ( io, 503 )
[1]569    ENDIF
570    IF ( scalar_advec == 'pw-scheme' )  THEN
571       WRITE ( io, 116 )
[667]572    ELSEIF ( scalar_advec == 'ws-scheme' )  THEN
573       WRITE ( io, 504 )
[1557]574    ELSEIF ( scalar_advec == 'ws-scheme-mono' )  THEN
575       WRITE ( io, 513 )
[1]576    ELSE
577       WRITE ( io, 118 )
578    ENDIF
[63]579
580    WRITE ( io, 139 )  TRIM( loop_optimization )
581
[1]582    IF ( galilei_transformation )  THEN
583       IF ( use_ug_for_galilei_tr )  THEN
[868]584          char1 = '0.6 * geostrophic wind'
[1]585       ELSE
586          char1 = 'mean wind in model domain'
587       ENDIF
588       IF ( simulated_time_at_begin == simulated_time )  THEN
589          char2 = 'at the start of the run'
590       ELSE
591          char2 = 'at the end of the run'
592       ENDIF
[1353]593       WRITE ( io, 119 )  TRIM( char1 ), TRIM( char2 ),                        &
594                          advected_distance_x/1000.0_wp,                       &
595                          advected_distance_y/1000.0_wp
[1]596    ENDIF
[1001]597    WRITE ( io, 122 )  timestep_scheme
[87]598    IF ( use_upstream_for_tke )  WRITE ( io, 143 )
[1353]599    IF ( rayleigh_damping_factor /= 0.0_wp )  THEN
[108]600       IF ( .NOT. ocean )  THEN
601          WRITE ( io, 123 )  'above', rayleigh_damping_height, &
602               rayleigh_damping_factor
603       ELSE
604          WRITE ( io, 123 )  'below', rayleigh_damping_height, &
605               rayleigh_damping_factor
606       ENDIF
[1]607    ENDIF
[940]608    IF ( neutral )  WRITE ( io, 131 )  pt_surface
[75]609    IF ( humidity )  THEN
[1]610       IF ( .NOT. cloud_physics )  THEN
611          WRITE ( io, 129 )
612       ELSE
613          WRITE ( io, 130 )
614       ENDIF
615    ENDIF
616    IF ( passive_scalar )  WRITE ( io, 134 )
[240]617    IF ( conserve_volume_flow )  THEN
[241]618       WRITE ( io, 150 )  conserve_volume_flow_mode
619       IF ( TRIM( conserve_volume_flow_mode ) == 'bulk_velocity' )  THEN
620          WRITE ( io, 151 )  u_bulk, v_bulk
621       ENDIF
[240]622    ELSEIF ( dp_external )  THEN
623       IF ( dp_smooth )  THEN
[241]624          WRITE ( io, 152 )  dpdxy, dp_level_b, ', vertically smoothed.'
[240]625       ELSE
[241]626          WRITE ( io, 152 )  dpdxy, dp_level_b, '.'
[240]627       ENDIF
628    ENDIF
[1]629    WRITE ( io, 99 )
630
631!
[1551]632!-- Runtime and timestep information
[1]633    WRITE ( io, 200 )
634    IF ( .NOT. dt_fixed )  THEN
635       WRITE ( io, 201 )  dt_max, cfl_factor
636    ELSE
637       WRITE ( io, 202 )  dt
638    ENDIF
639    WRITE ( io, 203 )  simulated_time_at_begin, end_time
640
[1322]641    IF ( time_restart /= 9999999.9_wp  .AND. &
[1]642         simulated_time_at_begin == simulated_time )  THEN
[1322]643       IF ( dt_restart == 9999999.9_wp )  THEN
[1]644          WRITE ( io, 204 )  ' Restart at:       ',time_restart
645       ELSE
646          WRITE ( io, 205 )  ' Restart at:       ',time_restart, dt_restart
647       ENDIF
648    ENDIF
649
650    IF ( simulated_time_at_begin /= simulated_time )  THEN
651       i = MAX ( log_point_s(10)%counts, 1 )
[1353]652       IF ( ( simulated_time - simulated_time_at_begin ) == 0.0_wp )  THEN
653          cpuseconds_per_simulated_second = 0.0_wp
[1]654       ELSE
655          cpuseconds_per_simulated_second = log_point_s(10)%sum / &
656                                            ( simulated_time -    &
657                                              simulated_time_at_begin )
658       ENDIF
[1322]659       WRITE ( io, 206 )  simulated_time, log_point_s(10)%sum,      &
660                          log_point_s(10)%sum / REAL( i, KIND=wp ), &
[1]661                          cpuseconds_per_simulated_second
[1322]662       IF ( time_restart /= 9999999.9_wp  .AND.  time_restart < end_time )  THEN
663          IF ( dt_restart == 9999999.9_wp )  THEN
[1106]664             WRITE ( io, 204 )  ' Next restart at:     ',time_restart
[1]665          ELSE
[1106]666             WRITE ( io, 205 )  ' Next restart at:     ',time_restart, dt_restart
[1]667          ENDIF
668       ENDIF
669    ENDIF
670
[1324]671
[1]672!
[291]673!-- Start time for coupled runs, if independent precursor runs for atmosphere
[1106]674!-- and ocean are used or have been used. In this case, coupling_start_time
675!-- defines the time when the coupling is switched on.
[1353]676    IF ( coupling_start_time /= 0.0_wp )  THEN
[1106]677       WRITE ( io, 207 )  coupling_start_time
[291]678    ENDIF
679
680!
[1]681!-- Computational grid
[94]682    IF ( .NOT. ocean )  THEN
683       WRITE ( io, 250 )  dx, dy, dz, (nx+1)*dx, (ny+1)*dy, zu(nzt+1)
684       IF ( dz_stretch_level_index < nzt+1 )  THEN
685          WRITE ( io, 252 )  dz_stretch_level, dz_stretch_level_index, &
686                             dz_stretch_factor, dz_max
687       ENDIF
688    ELSE
689       WRITE ( io, 250 )  dx, dy, dz, (nx+1)*dx, (ny+1)*dy, zu(0)
690       IF ( dz_stretch_level_index > 0 )  THEN
691          WRITE ( io, 252 )  dz_stretch_level, dz_stretch_level_index, &
692                             dz_stretch_factor, dz_max
693       ENDIF
[1]694    ENDIF
695    WRITE ( io, 254 )  nx, ny, nzt+1, MIN( nnx, nx+1 ), MIN( nny, ny+1 ), &
696                       MIN( nnz+2, nzt+2 )
697    IF ( sloping_surface )  WRITE ( io, 260 )  alpha_surface
698
699!
[1365]700!-- Large scale forcing and nudging
701    WRITE ( io, 160 )
702    IF ( large_scale_forcing )  THEN
703       WRITE ( io, 162 )
704       WRITE ( io, 163 )
705
706       IF ( large_scale_subsidence )  THEN
707          IF ( .NOT. use_subsidence_tendencies )  THEN
708             WRITE ( io, 164 )
709          ELSE
710             WRITE ( io, 165 )
711          ENDIF
712       ENDIF
713
714       IF ( bc_pt_b == 'dirichlet' )  THEN
715          WRITE ( io, 180 )
716       ELSEIF ( bc_pt_b == 'neumann' )  THEN
717          WRITE ( io, 181 )
718       ENDIF
719
720       IF ( bc_q_b == 'dirichlet' )  THEN
721          WRITE ( io, 182 )
722       ELSEIF ( bc_q_b == 'neumann' )  THEN
723          WRITE ( io, 183 )
724       ENDIF
725
726       WRITE ( io, 167 )
727       IF ( nudging )  THEN
728          WRITE ( io, 170 )
729       ENDIF
730    ELSE
731       WRITE ( io, 161 )
732       WRITE ( io, 171 )
733    ENDIF
734    IF ( large_scale_subsidence )  THEN
735       WRITE ( io, 168 )
736       WRITE ( io, 169 )
737    ENDIF
738
739!
740!-- Profile for the large scale vertial velocity
741!-- Building output strings, starting with surface value
742    IF ( large_scale_subsidence )  THEN
743       temperatures = '   0.0'
744       gradients = '------'
745       slices = '     0'
746       coordinates = '   0.0'
747       i = 1
748       DO  WHILE ( subs_vertical_gradient_level_i(i) /= -9999 )
749
750          WRITE (coor_chr,'(E10.2,7X)')  &
751                                w_subs(subs_vertical_gradient_level_i(i))
752          temperatures = TRIM( temperatures ) // ' ' // TRIM( coor_chr )
753
754          WRITE (coor_chr,'(E10.2,7X)')  subs_vertical_gradient(i)
755          gradients = TRIM( gradients ) // ' ' // TRIM( coor_chr )
756
757          WRITE (coor_chr,'(I10,7X)')  subs_vertical_gradient_level_i(i)
758          slices = TRIM( slices ) // ' ' // TRIM( coor_chr )
759
760          WRITE (coor_chr,'(F10.2,7X)')  subs_vertical_gradient_level(i)
761          coordinates = TRIM( coordinates ) // ' '  // TRIM( coor_chr )
762
763          IF ( i == 10 )  THEN
764             EXIT
765          ELSE
766             i = i + 1
767          ENDIF
768
769       ENDDO
770
771 
772       IF ( .NOT. large_scale_forcing )  THEN
773          WRITE ( io, 426 )  TRIM( coordinates ), TRIM( temperatures ), &
774                             TRIM( gradients ), TRIM( slices )
775       ENDIF
776
777
778    ENDIF
779
780!-- Profile of the geostrophic wind (component ug)
781!-- Building output strings
782    WRITE ( ugcomponent, '(F6.2)' )  ug_surface
783    gradients = '------'
784    slices = '     0'
785    coordinates = '   0.0'
786    i = 1
787    DO  WHILE ( ug_vertical_gradient_level_ind(i) /= -9999 )
788     
789       WRITE (coor_chr,'(F6.2,1X)')  ug(ug_vertical_gradient_level_ind(i))
790       ugcomponent = TRIM( ugcomponent ) // '  ' // TRIM( coor_chr )
791
792       WRITE (coor_chr,'(F6.2,1X)')  ug_vertical_gradient(i)
793       gradients = TRIM( gradients ) // '  ' // TRIM( coor_chr )
794
795       WRITE (coor_chr,'(I6,1X)')  ug_vertical_gradient_level_ind(i)
796       slices = TRIM( slices ) // '  ' // TRIM( coor_chr )
797
798       WRITE (coor_chr,'(F6.1,1X)')  ug_vertical_gradient_level(i)
799       coordinates = TRIM( coordinates ) // '  ' // TRIM( coor_chr )
800
801       IF ( i == 10 )  THEN
802          EXIT
803       ELSE
804          i = i + 1
805       ENDIF
806
807    ENDDO
808
809    IF ( .NOT. large_scale_forcing )  THEN
810       WRITE ( io, 423 )  TRIM( coordinates ), TRIM( ugcomponent ), &
811                          TRIM( gradients ), TRIM( slices )
812    ENDIF
813
814!-- Profile of the geostrophic wind (component vg)
815!-- Building output strings
816    WRITE ( vgcomponent, '(F6.2)' )  vg_surface
817    gradients = '------'
818    slices = '     0'
819    coordinates = '   0.0'
820    i = 1
821    DO  WHILE ( vg_vertical_gradient_level_ind(i) /= -9999 )
822
823       WRITE (coor_chr,'(F6.2,1X)')  vg(vg_vertical_gradient_level_ind(i))
824       vgcomponent = TRIM( vgcomponent ) // '  ' // TRIM( coor_chr )
825
826       WRITE (coor_chr,'(F6.2,1X)')  vg_vertical_gradient(i)
827       gradients = TRIM( gradients ) // '  ' // TRIM( coor_chr )
828
829       WRITE (coor_chr,'(I6,1X)')  vg_vertical_gradient_level_ind(i)
830       slices = TRIM( slices ) // '  ' // TRIM( coor_chr )
831
832       WRITE (coor_chr,'(F6.1,1X)')  vg_vertical_gradient_level(i)
833       coordinates = TRIM( coordinates ) // '  ' // TRIM( coor_chr )
834
835       IF ( i == 10 )  THEN
836          EXIT
837       ELSE
838          i = i + 1
839       ENDIF
840 
841    ENDDO
842
843    IF ( .NOT. large_scale_forcing )  THEN
844       WRITE ( io, 424 )  TRIM( coordinates ), TRIM( vgcomponent ), &
845                          TRIM( gradients ), TRIM( slices )
846    ENDIF
847
848!
[1]849!-- Topography
850    WRITE ( io, 270 )  topography
851    SELECT CASE ( TRIM( topography ) )
852
853       CASE ( 'flat' )
854          ! no actions necessary
855
856       CASE ( 'single_building' )
857          blx = INT( building_length_x / dx )
858          bly = INT( building_length_y / dy )
[1675]859          bh  = MINLOC( ABS( zw - building_height ), 1 ) - 1
860          IF ( ABS( zw(bh  ) - building_height ) == &
861               ABS( zw(bh+1) - building_height )    )  bh = bh + 1
[1]862
[1322]863          IF ( building_wall_left == 9999999.9_wp )  THEN
[1]864             building_wall_left = ( nx + 1 - blx ) / 2 * dx
865          ENDIF
[1353]866          bxl = INT ( building_wall_left / dx + 0.5_wp )
[1]867          bxr = bxl + blx
868
[1322]869          IF ( building_wall_south == 9999999.9_wp )  THEN
[1]870             building_wall_south = ( ny + 1 - bly ) / 2 * dy
871          ENDIF
[1353]872          bys = INT ( building_wall_south / dy + 0.5_wp )
[1]873          byn = bys + bly
874
875          WRITE ( io, 271 )  building_length_x, building_length_y, &
876                             building_height, bxl, bxr, bys, byn
877
[240]878       CASE ( 'single_street_canyon' )
[1675]879          ch  = MINLOC( ABS( zw - canyon_height ), 1 ) - 1
880          IF ( ABS( zw(ch  ) - canyon_height ) == &
881               ABS( zw(ch+1) - canyon_height )    )  ch = ch + 1
[1322]882          IF ( canyon_width_x /= 9999999.9_wp )  THEN
[240]883!
884!--          Street canyon in y direction
885             cwx = NINT( canyon_width_x / dx )
[1322]886             IF ( canyon_wall_left == 9999999.9_wp )  THEN
[240]887                canyon_wall_left = ( nx + 1 - cwx ) / 2 * dx
888             ENDIF
889             cxl = NINT( canyon_wall_left / dx )
890             cxr = cxl + cwx
891             WRITE ( io, 272 )  'y', canyon_height, ch, 'u', cxl, cxr
892
[1322]893          ELSEIF ( canyon_width_y /= 9999999.9_wp )  THEN
[240]894!
895!--          Street canyon in x direction
896             cwy = NINT( canyon_width_y / dy )
[1322]897             IF ( canyon_wall_south == 9999999.9_wp )  THEN
[240]898                canyon_wall_south = ( ny + 1 - cwy ) / 2 * dy
899             ENDIF
900             cys = NINT( canyon_wall_south / dy )
901             cyn = cys + cwy
902             WRITE ( io, 272 )  'x', canyon_height, ch, 'v', cys, cyn
903          ENDIF
904
[1]905    END SELECT
906
[256]907    IF ( TRIM( topography ) /= 'flat' )  THEN
908       IF ( TRIM( topography_grid_convention ) == ' ' )  THEN
909          IF ( TRIM( topography ) == 'single_building' .OR.  &
910               TRIM( topography ) == 'single_street_canyon' )  THEN
911             WRITE ( io, 278 )
912          ELSEIF ( TRIM( topography ) == 'read_from_file' )  THEN
913             WRITE ( io, 279 )
914          ENDIF
915       ELSEIF ( TRIM( topography_grid_convention ) == 'cell_edge' )  THEN
916          WRITE ( io, 278 )
917       ELSEIF ( TRIM( topography_grid_convention ) == 'cell_center' )  THEN
918          WRITE ( io, 279 )
919       ENDIF
920    ENDIF
921
[1826]922    IF ( plant_canopy )  CALL pcm_header ( io )
[138]923
[1817]924    IF ( land_surface )  CALL lsm_header ( io )
[1484]925
[1826]926    IF ( radiation )  CALL radiation_header ( io )
[1551]927
928!
[1]929!-- Boundary conditions
930    IF ( ibc_p_b == 0 )  THEN
[1826]931       r_lower = 'p(0)     = 0      |'
[1]932    ELSEIF ( ibc_p_b == 1 )  THEN
[1826]933       r_lower = 'p(0)     = p(1)   |'
[1]934    ENDIF
935    IF ( ibc_p_t == 0 )  THEN
[1826]936       r_upper  = 'p(nzt+1) = 0      |'
[1]937    ELSE
[1826]938       r_upper  = 'p(nzt+1) = p(nzt) |'
[1]939    ENDIF
940
941    IF ( ibc_uv_b == 0 )  THEN
[1826]942       r_lower = TRIM( r_lower ) // ' uv(0)     = -uv(1)                |'
[1]943    ELSE
[1826]944       r_lower = TRIM( r_lower ) // ' uv(0)     = uv(1)                 |'
[1]945    ENDIF
[132]946    IF ( TRIM( bc_uv_t ) == 'dirichlet_0' )  THEN
[1826]947       r_upper  = TRIM( r_upper  ) // ' uv(nzt+1) = 0                     |'
[132]948    ELSEIF ( ibc_uv_t == 0 )  THEN
[1826]949       r_upper  = TRIM( r_upper  ) // ' uv(nzt+1) = ug(nzt+1), vg(nzt+1)  |'
[1]950    ELSE
[1826]951       r_upper  = TRIM( r_upper  ) // ' uv(nzt+1) = uv(nzt)               |'
[1]952    ENDIF
953
954    IF ( ibc_pt_b == 0 )  THEN
[1551]955       IF ( land_surface )  THEN
[1826]956          r_lower = TRIM( r_lower ) // ' pt(0)     = from soil model'
[1551]957       ELSE
[1826]958          r_lower = TRIM( r_lower ) // ' pt(0)     = pt_surface'
[1551]959       ENDIF
[102]960    ELSEIF ( ibc_pt_b == 1 )  THEN
[1826]961       r_lower = TRIM( r_lower ) // ' pt(0)     = pt(1)'
[102]962    ELSEIF ( ibc_pt_b == 2 )  THEN
[1826]963       r_lower = TRIM( r_lower ) // ' pt(0)     = from coupled model'
[1]964    ENDIF
965    IF ( ibc_pt_t == 0 )  THEN
[1826]966       r_upper  = TRIM( r_upper  ) // ' pt(nzt+1) = pt_top'
[19]967    ELSEIF( ibc_pt_t == 1 )  THEN
[1826]968       r_upper  = TRIM( r_upper  ) // ' pt(nzt+1) = pt(nzt)'
[19]969    ELSEIF( ibc_pt_t == 2 )  THEN
[1826]970       r_upper  = TRIM( r_upper  ) // ' pt(nzt+1) = pt(nzt) + dpt/dz_ini'
[667]971
[1]972    ENDIF
973
[1826]974    WRITE ( io, 300 )  r_lower, r_upper
[1]975
976    IF ( .NOT. constant_diffusion )  THEN
977       IF ( ibc_e_b == 1 )  THEN
[1826]978          r_lower = 'e(0)     = e(1)'
[1]979       ELSE
[1826]980          r_lower = 'e(0)     = e(1) = (u*/0.1)**2'
[1]981       ENDIF
[1826]982       r_upper = 'e(nzt+1) = e(nzt) = e(nzt-1)'
[1]983
[1826]984       WRITE ( io, 301 )  'e', r_lower, r_upper       
[1]985
986    ENDIF
987
[97]988    IF ( ocean )  THEN
[1826]989       r_lower = 'sa(0)    = sa(1)'
[97]990       IF ( ibc_sa_t == 0 )  THEN
[1826]991          r_upper =  'sa(nzt+1) = sa_surface'
[1]992       ELSE
[1826]993          r_upper =  'sa(nzt+1) = sa(nzt)'
[1]994       ENDIF
[1826]995       WRITE ( io, 301 ) 'sa', r_lower, r_upper
[97]996    ENDIF
[1]997
[97]998    IF ( humidity )  THEN
999       IF ( ibc_q_b == 0 )  THEN
[1551]1000          IF ( land_surface )  THEN
[1826]1001             r_lower = 'q(0)     = from soil model'
[1551]1002          ELSE
[1826]1003             r_lower = 'q(0)     = q_surface'
[1551]1004          ENDIF
1005
[97]1006       ELSE
[1826]1007          r_lower = 'q(0)     = q(1)'
[97]1008       ENDIF
1009       IF ( ibc_q_t == 0 )  THEN
[1826]1010          r_upper =  'q(nzt)   = q_top'
[97]1011       ELSE
[1826]1012          r_upper =  'q(nzt)   = q(nzt-1) + dq/dz'
[97]1013       ENDIF
[1826]1014       WRITE ( io, 301 ) 'q', r_lower, r_upper
[97]1015    ENDIF
[1]1016
[97]1017    IF ( passive_scalar )  THEN
1018       IF ( ibc_q_b == 0 )  THEN
[1826]1019          r_lower = 's(0)     = s_surface'
[97]1020       ELSE
[1826]1021          r_lower = 's(0)     = s(1)'
[97]1022       ENDIF
1023       IF ( ibc_q_t == 0 )  THEN
[1826]1024          r_upper =  's(nzt)   = s_top'
[97]1025       ELSE
[1826]1026          r_upper =  's(nzt)   = s(nzt-1) + ds/dz'
[97]1027       ENDIF
[1826]1028       WRITE ( io, 301 ) 's', r_lower, r_upper
[1]1029    ENDIF
1030
1031    IF ( use_surface_fluxes )  THEN
1032       WRITE ( io, 303 )
1033       IF ( constant_heatflux )  THEN
[1299]1034          IF ( large_scale_forcing .AND. lsf_surf )  THEN
[1241]1035             WRITE ( io, 306 )  shf(0,0)
1036          ELSE
1037             WRITE ( io, 306 )  surface_heatflux
1038          ENDIF
[1]1039          IF ( random_heatflux )  WRITE ( io, 307 )
1040       ENDIF
[75]1041       IF ( humidity  .AND.  constant_waterflux )  THEN
[1299]1042          IF ( large_scale_forcing .AND. lsf_surf )  THEN
[1241]1043             WRITE ( io, 311 ) qsws(0,0)
1044          ELSE
1045             WRITE ( io, 311 ) surface_waterflux
1046          ENDIF
[1]1047       ENDIF
1048       IF ( passive_scalar  .AND.  constant_waterflux )  THEN
1049          WRITE ( io, 313 ) surface_waterflux
1050       ENDIF
1051    ENDIF
1052
[19]1053    IF ( use_top_fluxes )  THEN
1054       WRITE ( io, 304 )
[102]1055       IF ( coupling_mode == 'uncoupled' )  THEN
[151]1056          WRITE ( io, 320 )  top_momentumflux_u, top_momentumflux_v
[102]1057          IF ( constant_top_heatflux )  THEN
1058             WRITE ( io, 306 )  top_heatflux
1059          ENDIF
1060       ELSEIF ( coupling_mode == 'ocean_to_atmosphere' )  THEN
1061          WRITE ( io, 316 )
[19]1062       ENDIF
[97]1063       IF ( ocean  .AND.  constant_top_salinityflux )  THEN
1064          WRITE ( io, 309 )  top_salinityflux
1065       ENDIF
[75]1066       IF ( humidity  .OR.  passive_scalar )  THEN
[19]1067          WRITE ( io, 315 )
1068       ENDIF
1069    ENDIF
1070
[1691]1071    IF ( constant_flux_layer )  THEN
1072       WRITE ( io, 305 )  (zu(1)-zu(0)), roughness_length,                     &
1073                          z0h_factor*roughness_length, kappa,                  &
1074                          zeta_min, zeta_max
[1]1075       IF ( .NOT. constant_heatflux )  WRITE ( io, 308 )
[75]1076       IF ( humidity  .AND.  .NOT. constant_waterflux )  THEN
[1]1077          WRITE ( io, 312 )
1078       ENDIF
1079       IF ( passive_scalar  .AND.  .NOT. constant_waterflux )  THEN
1080          WRITE ( io, 314 )
1081       ENDIF
1082    ELSE
1083       IF ( INDEX(initializing_actions, 'set_1d-model_profiles') /= 0 )  THEN
[1691]1084          WRITE ( io, 310 )  zeta_min, zeta_max
[1]1085       ENDIF
1086    ENDIF
1087
1088    WRITE ( io, 317 )  bc_lr, bc_ns
[707]1089    IF ( .NOT. bc_lr_cyc  .OR.  .NOT. bc_ns_cyc )  THEN
[1159]1090       WRITE ( io, 318 )  use_cmax, pt_damping_width, pt_damping_factor       
[151]1091       IF ( turbulent_inflow )  THEN
[1560]1092          IF ( .NOT. recycling_yshift ) THEN
1093             WRITE ( io, 319 )  recycling_width, recycling_plane, &
1094                                inflow_damping_height, inflow_damping_width
1095          ELSE
1096             WRITE ( io, 322 )  recycling_width, recycling_plane, &
1097                                inflow_damping_height, inflow_damping_width
1098          END IF
[151]1099       ENDIF
[1]1100    ENDIF
1101
1102!
[1365]1103!-- Initial Profiles
1104    WRITE ( io, 321 )
1105!
1106!-- Initial wind profiles
1107    IF ( u_profile(1) /= 9999999.9_wp )  WRITE ( io, 427 )
1108
1109!
1110!-- Initial temperature profile
1111!-- Building output strings, starting with surface temperature
1112    WRITE ( temperatures, '(F6.2)' )  pt_surface
1113    gradients = '------'
1114    slices = '     0'
1115    coordinates = '   0.0'
1116    i = 1
1117    DO  WHILE ( pt_vertical_gradient_level_ind(i) /= -9999 )
1118
1119       WRITE (coor_chr,'(F7.2)')  pt_init(pt_vertical_gradient_level_ind(i))
1120       temperatures = TRIM( temperatures ) // ' ' // TRIM( coor_chr )
1121
1122       WRITE (coor_chr,'(F7.2)')  pt_vertical_gradient(i)
1123       gradients = TRIM( gradients ) // ' ' // TRIM( coor_chr )
1124
1125       WRITE (coor_chr,'(I7)')  pt_vertical_gradient_level_ind(i)
1126       slices = TRIM( slices ) // ' ' // TRIM( coor_chr )
1127
1128       WRITE (coor_chr,'(F7.1)')  pt_vertical_gradient_level(i)
1129       coordinates = TRIM( coordinates ) // ' '  // TRIM( coor_chr )
1130
1131       IF ( i == 10 )  THEN
1132          EXIT
1133       ELSE
1134          i = i + 1
1135       ENDIF
1136
1137    ENDDO
1138
1139    IF ( .NOT. nudging )  THEN
1140       WRITE ( io, 420 )  TRIM( coordinates ), TRIM( temperatures ), &
1141                          TRIM( gradients ), TRIM( slices )
1142    ELSE
1143       WRITE ( io, 428 ) 
1144    ENDIF
1145
1146!
1147!-- Initial humidity profile
1148!-- Building output strings, starting with surface humidity
1149    IF ( humidity  .OR.  passive_scalar )  THEN
1150       WRITE ( temperatures, '(E8.1)' )  q_surface
1151       gradients = '--------'
1152       slices = '       0'
1153       coordinates = '     0.0'
1154       i = 1
1155       DO  WHILE ( q_vertical_gradient_level_ind(i) /= -9999 )
1156         
1157          WRITE (coor_chr,'(E8.1,4X)')  q_init(q_vertical_gradient_level_ind(i))
1158          temperatures = TRIM( temperatures ) // '  ' // TRIM( coor_chr )
1159
1160          WRITE (coor_chr,'(E8.1,4X)')  q_vertical_gradient(i)
1161          gradients = TRIM( gradients ) // '  ' // TRIM( coor_chr )
1162         
1163          WRITE (coor_chr,'(I8,4X)')  q_vertical_gradient_level_ind(i)
1164          slices = TRIM( slices ) // '  ' // TRIM( coor_chr )
1165         
1166          WRITE (coor_chr,'(F8.1,4X)')  q_vertical_gradient_level(i)
1167          coordinates = TRIM( coordinates ) // '  '  // TRIM( coor_chr )
1168
1169          IF ( i == 10 )  THEN
1170             EXIT
1171          ELSE
1172             i = i + 1
1173          ENDIF
1174
1175       ENDDO
1176
1177       IF ( humidity )  THEN
1178          IF ( .NOT. nudging )  THEN
1179             WRITE ( io, 421 )  TRIM( coordinates ), TRIM( temperatures ), &
1180                                TRIM( gradients ), TRIM( slices )
1181          ENDIF
1182       ELSE
1183          WRITE ( io, 422 )  TRIM( coordinates ), TRIM( temperatures ), &
1184                             TRIM( gradients ), TRIM( slices )
1185       ENDIF
1186    ENDIF
1187
1188!
1189!-- Initial salinity profile
1190!-- Building output strings, starting with surface salinity
1191    IF ( ocean )  THEN
1192       WRITE ( temperatures, '(F6.2)' )  sa_surface
1193       gradients = '------'
1194       slices = '     0'
1195       coordinates = '   0.0'
1196       i = 1
1197       DO  WHILE ( sa_vertical_gradient_level_ind(i) /= -9999 )
1198
1199          WRITE (coor_chr,'(F7.2)')  sa_init(sa_vertical_gradient_level_ind(i))
1200          temperatures = TRIM( temperatures ) // ' ' // TRIM( coor_chr )
1201
1202          WRITE (coor_chr,'(F7.2)')  sa_vertical_gradient(i)
1203          gradients = TRIM( gradients ) // ' ' // TRIM( coor_chr )
1204
1205          WRITE (coor_chr,'(I7)')  sa_vertical_gradient_level_ind(i)
1206          slices = TRIM( slices ) // ' ' // TRIM( coor_chr )
1207
1208          WRITE (coor_chr,'(F7.1)')  sa_vertical_gradient_level(i)
1209          coordinates = TRIM( coordinates ) // ' '  // TRIM( coor_chr )
1210
1211          IF ( i == 10 )  THEN
1212             EXIT
1213          ELSE
1214             i = i + 1
1215          ENDIF
1216
1217       ENDDO
1218
1219       WRITE ( io, 425 )  TRIM( coordinates ), TRIM( temperatures ), &
1220                          TRIM( gradients ), TRIM( slices )
1221    ENDIF
1222
1223
1224!
[1]1225!-- Listing of 1D-profiles
[151]1226    WRITE ( io, 325 )  dt_dopr_listing
[1353]1227    IF ( averaging_interval_pr /= 0.0_wp )  THEN
[151]1228       WRITE ( io, 326 )  averaging_interval_pr, dt_averaging_input_pr
[1]1229    ENDIF
1230
1231!
1232!-- DATA output
1233    WRITE ( io, 330 )
[1353]1234    IF ( averaging_interval_pr /= 0.0_wp )  THEN
[151]1235       WRITE ( io, 326 )  averaging_interval_pr, dt_averaging_input_pr
[1]1236    ENDIF
1237
1238!
1239!-- 1D-profiles
[346]1240    dopr_chr = 'Profile:'
[1]1241    IF ( dopr_n /= 0 )  THEN
1242       WRITE ( io, 331 )
1243
1244       output_format = ''
[1783]1245       output_format = netcdf_data_format_string
1246       IF ( netcdf_deflate == 0 )  THEN
1247          WRITE ( io, 344 )  output_format
1248       ELSE
1249          WRITE ( io, 354 )  TRIM( output_format ), netcdf_deflate
1250       ENDIF
[1]1251
1252       DO  i = 1, dopr_n
1253          dopr_chr = TRIM( dopr_chr ) // ' ' // TRIM( data_output_pr(i) ) // ','
1254          IF ( LEN_TRIM( dopr_chr ) >= 60 )  THEN
1255             WRITE ( io, 332 )  dopr_chr
1256             dopr_chr = '       :'
1257          ENDIF
1258       ENDDO
1259
1260       IF ( dopr_chr /= '' )  THEN
1261          WRITE ( io, 332 )  dopr_chr
1262       ENDIF
1263       WRITE ( io, 333 )  dt_dopr, averaging_interval_pr, dt_averaging_input_pr
[1353]1264       IF ( skip_time_dopr /= 0.0_wp )  WRITE ( io, 339 )  skip_time_dopr
[1]1265    ENDIF
1266
1267!
1268!-- 2D-arrays
1269    DO  av = 0, 1
1270
1271       i = 1
1272       do2d_xy = ''
1273       do2d_xz = ''
1274       do2d_yz = ''
1275       DO  WHILE ( do2d(av,i) /= ' ' )
1276
1277          l = MAX( 2, LEN_TRIM( do2d(av,i) ) )
1278          do2d_mode = do2d(av,i)(l-1:l)
1279
1280          SELECT CASE ( do2d_mode )
1281             CASE ( 'xy' )
1282                ll = LEN_TRIM( do2d_xy )
1283                do2d_xy = do2d_xy(1:ll) // ' ' // do2d(av,i)(1:l-3) // ','
1284             CASE ( 'xz' )
1285                ll = LEN_TRIM( do2d_xz )
1286                do2d_xz = do2d_xz(1:ll) // ' ' // do2d(av,i)(1:l-3) // ','
1287             CASE ( 'yz' )
1288                ll = LEN_TRIM( do2d_yz )
1289                do2d_yz = do2d_yz(1:ll) // ' ' // do2d(av,i)(1:l-3) // ','
1290          END SELECT
1291
1292          i = i + 1
1293
1294       ENDDO
1295
1296       IF ( ( ( do2d_xy /= ''  .AND.  section(1,1) /= -9999 )  .OR.    &
1297              ( do2d_xz /= ''  .AND.  section(1,2) /= -9999 )  .OR.    &
[1327]1298              ( do2d_yz /= ''  .AND.  section(1,3) /= -9999 ) ) )  THEN
[1]1299
1300          IF (  av == 0 )  THEN
1301             WRITE ( io, 334 )  ''
1302          ELSE
1303             WRITE ( io, 334 )  '(time-averaged)'
1304          ENDIF
1305
1306          IF ( do2d_at_begin )  THEN
1307             begin_chr = 'and at the start'
1308          ELSE
1309             begin_chr = ''
1310          ENDIF
1311
1312          output_format = ''
[1783]1313          output_format = netcdf_data_format_string
1314          IF ( netcdf_deflate == 0 )  THEN
1315             WRITE ( io, 344 )  output_format
1316          ELSE
1317             WRITE ( io, 354 )  TRIM( output_format ), netcdf_deflate
1318          ENDIF
[1]1319
1320          IF ( do2d_xy /= ''  .AND.  section(1,1) /= -9999 )  THEN
1321             i = 1
1322             slices = '/'
1323             coordinates = '/'
1324!
[1551]1325!--          Building strings with index and coordinate information of the
[1]1326!--          slices
1327             DO  WHILE ( section(i,1) /= -9999 )
1328
1329                WRITE (section_chr,'(I5)')  section(i,1)
1330                section_chr = ADJUSTL( section_chr )
1331                slices = TRIM( slices ) // TRIM( section_chr ) // '/'
1332
[206]1333                IF ( section(i,1) == -1 )  THEN
[1353]1334                   WRITE (coor_chr,'(F10.1)')  -1.0_wp
[206]1335                ELSE
1336                   WRITE (coor_chr,'(F10.1)')  zu(section(i,1))
1337                ENDIF
[1]1338                coor_chr = ADJUSTL( coor_chr )
1339                coordinates = TRIM( coordinates ) // TRIM( coor_chr ) // '/'
1340
1341                i = i + 1
1342             ENDDO
1343             IF ( av == 0 )  THEN
1344                WRITE ( io, 335 )  'XY', do2d_xy, dt_do2d_xy, &
1345                                   TRIM( begin_chr ), 'k', TRIM( slices ), &
1346                                   TRIM( coordinates )
[1353]1347                IF ( skip_time_do2d_xy /= 0.0_wp )  THEN
[1]1348                   WRITE ( io, 339 )  skip_time_do2d_xy
1349                ENDIF
1350             ELSE
1351                WRITE ( io, 342 )  'XY', do2d_xy, dt_data_output_av, &
1352                                   TRIM( begin_chr ), averaging_interval, &
1353                                   dt_averaging_input, 'k', TRIM( slices ), &
1354                                   TRIM( coordinates )
[1353]1355                IF ( skip_time_data_output_av /= 0.0_wp )  THEN
[1]1356                   WRITE ( io, 339 )  skip_time_data_output_av
1357                ENDIF
1358             ENDIF
[1308]1359             IF ( netcdf_data_format > 4 )  THEN
1360                WRITE ( io, 352 )  ntdim_2d_xy(av)
1361             ELSE
1362                WRITE ( io, 353 )
1363             ENDIF
[1]1364          ENDIF
1365
1366          IF ( do2d_xz /= ''  .AND.  section(1,2) /= -9999 )  THEN
1367             i = 1
1368             slices = '/'
1369             coordinates = '/'
1370!
[1551]1371!--          Building strings with index and coordinate information of the
[1]1372!--          slices
1373             DO  WHILE ( section(i,2) /= -9999 )
1374
1375                WRITE (section_chr,'(I5)')  section(i,2)
1376                section_chr = ADJUSTL( section_chr )
1377                slices = TRIM( slices ) // TRIM( section_chr ) // '/'
1378
1379                WRITE (coor_chr,'(F10.1)')  section(i,2) * dy
1380                coor_chr = ADJUSTL( coor_chr )
1381                coordinates = TRIM( coordinates ) // TRIM( coor_chr ) // '/'
1382
1383                i = i + 1
1384             ENDDO
1385             IF ( av == 0 )  THEN
1386                WRITE ( io, 335 )  'XZ', do2d_xz, dt_do2d_xz, &
1387                                   TRIM( begin_chr ), 'j', TRIM( slices ), &
1388                                   TRIM( coordinates )
[1353]1389                IF ( skip_time_do2d_xz /= 0.0_wp )  THEN
[1]1390                   WRITE ( io, 339 )  skip_time_do2d_xz
1391                ENDIF
1392             ELSE
1393                WRITE ( io, 342 )  'XZ', do2d_xz, dt_data_output_av, &
1394                                   TRIM( begin_chr ), averaging_interval, &
1395                                   dt_averaging_input, 'j', TRIM( slices ), &
1396                                   TRIM( coordinates )
[1353]1397                IF ( skip_time_data_output_av /= 0.0_wp )  THEN
[1]1398                   WRITE ( io, 339 )  skip_time_data_output_av
1399                ENDIF
1400             ENDIF
[1308]1401             IF ( netcdf_data_format > 4 )  THEN
1402                WRITE ( io, 352 )  ntdim_2d_xz(av)
1403             ELSE
1404                WRITE ( io, 353 )
1405             ENDIF
[1]1406          ENDIF
1407
1408          IF ( do2d_yz /= ''  .AND.  section(1,3) /= -9999 )  THEN
1409             i = 1
1410             slices = '/'
1411             coordinates = '/'
1412!
[1551]1413!--          Building strings with index and coordinate information of the
[1]1414!--          slices
1415             DO  WHILE ( section(i,3) /= -9999 )
1416
1417                WRITE (section_chr,'(I5)')  section(i,3)
1418                section_chr = ADJUSTL( section_chr )
1419                slices = TRIM( slices ) // TRIM( section_chr ) // '/'
1420
1421                WRITE (coor_chr,'(F10.1)')  section(i,3) * dx
1422                coor_chr = ADJUSTL( coor_chr )
1423                coordinates = TRIM( coordinates ) // TRIM( coor_chr ) // '/'
1424
1425                i = i + 1
1426             ENDDO
1427             IF ( av == 0 )  THEN
1428                WRITE ( io, 335 )  'YZ', do2d_yz, dt_do2d_yz, &
1429                                   TRIM( begin_chr ), 'i', TRIM( slices ), &
1430                                   TRIM( coordinates )
[1353]1431                IF ( skip_time_do2d_yz /= 0.0_wp )  THEN
[1]1432                   WRITE ( io, 339 )  skip_time_do2d_yz
1433                ENDIF
1434             ELSE
1435                WRITE ( io, 342 )  'YZ', do2d_yz, dt_data_output_av, &
1436                                   TRIM( begin_chr ), averaging_interval, &
1437                                   dt_averaging_input, 'i', TRIM( slices ), &
1438                                   TRIM( coordinates )
[1353]1439                IF ( skip_time_data_output_av /= 0.0_wp )  THEN
[1]1440                   WRITE ( io, 339 )  skip_time_data_output_av
1441                ENDIF
1442             ENDIF
[1308]1443             IF ( netcdf_data_format > 4 )  THEN
1444                WRITE ( io, 352 )  ntdim_2d_yz(av)
1445             ELSE
1446                WRITE ( io, 353 )
1447             ENDIF
[1]1448          ENDIF
1449
1450       ENDIF
1451
1452    ENDDO
1453
1454!
1455!-- 3d-arrays
1456    DO  av = 0, 1
1457
1458       i = 1
1459       do3d_chr = ''
1460       DO  WHILE ( do3d(av,i) /= ' ' )
1461
1462          do3d_chr = TRIM( do3d_chr ) // ' ' // TRIM( do3d(av,i) ) // ','
1463          i = i + 1
1464
1465       ENDDO
1466
1467       IF ( do3d_chr /= '' )  THEN
1468          IF ( av == 0 )  THEN
1469             WRITE ( io, 336 )  ''
1470          ELSE
1471             WRITE ( io, 336 )  '(time-averaged)'
1472          ENDIF
1473
[1783]1474          output_format = netcdf_data_format_string
1475          IF ( netcdf_deflate == 0 )  THEN
1476             WRITE ( io, 344 )  output_format
1477          ELSE
1478             WRITE ( io, 354 )  TRIM( output_format ), netcdf_deflate
1479          ENDIF
[1]1480
1481          IF ( do3d_at_begin )  THEN
1482             begin_chr = 'and at the start'
1483          ELSE
1484             begin_chr = ''
1485          ENDIF
1486          IF ( av == 0 )  THEN
1487             WRITE ( io, 337 )  do3d_chr, dt_do3d, TRIM( begin_chr ), &
1488                                zu(nz_do3d), nz_do3d
1489          ELSE
1490             WRITE ( io, 343 )  do3d_chr, dt_data_output_av,           &
1491                                TRIM( begin_chr ), averaging_interval, &
1492                                dt_averaging_input, zu(nz_do3d), nz_do3d
1493          ENDIF
1494
[1308]1495          IF ( netcdf_data_format > 4 )  THEN
1496             WRITE ( io, 352 )  ntdim_3d(av)
1497          ELSE
1498             WRITE ( io, 353 )
1499          ENDIF
1500
[1]1501          IF ( av == 0 )  THEN
[1353]1502             IF ( skip_time_do3d /= 0.0_wp )  THEN
[1]1503                WRITE ( io, 339 )  skip_time_do3d
1504             ENDIF
1505          ELSE
[1353]1506             IF ( skip_time_data_output_av /= 0.0_wp )  THEN
[1]1507                WRITE ( io, 339 )  skip_time_data_output_av
1508             ENDIF
1509          ENDIF
1510
1511       ENDIF
1512
1513    ENDDO
1514
1515!
[410]1516!-- masked arrays
1517    IF ( masks > 0 )  WRITE ( io, 345 )  &
1518         mask_scale_x, mask_scale_y, mask_scale_z
1519    DO  mid = 1, masks
1520       DO  av = 0, 1
1521
1522          i = 1
1523          domask_chr = ''
1524          DO  WHILE ( domask(mid,av,i) /= ' ' )
1525             domask_chr = TRIM( domask_chr ) // ' ' //  &
1526                          TRIM( domask(mid,av,i) ) // ','
1527             i = i + 1
1528          ENDDO
1529
1530          IF ( domask_chr /= '' )  THEN
1531             IF ( av == 0 )  THEN
1532                WRITE ( io, 346 )  '', mid
1533             ELSE
1534                WRITE ( io, 346 )  ' (time-averaged)', mid
1535             ENDIF
1536
[1783]1537             output_format = netcdf_data_format_string
[1308]1538!--          Parallel output not implemented for mask data, hence
1539!--          output_format must be adjusted.
1540             IF ( netcdf_data_format == 5 ) output_format = 'netCDF4/HDF5'
1541             IF ( netcdf_data_format == 6 ) output_format = 'netCDF4/HDF5 classic'
[1783]1542             IF ( netcdf_deflate == 0 )  THEN
1543                WRITE ( io, 344 )  output_format
1544             ELSE
1545                WRITE ( io, 354 )  TRIM( output_format ), netcdf_deflate
1546             ENDIF
[410]1547
1548             IF ( av == 0 )  THEN
1549                WRITE ( io, 347 )  domask_chr, dt_domask(mid)
1550             ELSE
1551                WRITE ( io, 348 )  domask_chr, dt_data_output_av, &
1552                                   averaging_interval, dt_averaging_input
1553             ENDIF
1554
1555             IF ( av == 0 )  THEN
[1353]1556                IF ( skip_time_domask(mid) /= 0.0_wp )  THEN
[410]1557                   WRITE ( io, 339 )  skip_time_domask(mid)
1558                ENDIF
1559             ELSE
[1353]1560                IF ( skip_time_data_output_av /= 0.0_wp )  THEN
[410]1561                   WRITE ( io, 339 )  skip_time_data_output_av
1562                ENDIF
1563             ENDIF
1564!
1565!--          output locations
1566             DO  dim = 1, 3
[1353]1567                IF ( mask(mid,dim,1) >= 0.0_wp )  THEN
[410]1568                   count = 0
[1353]1569                   DO  WHILE ( mask(mid,dim,count+1) >= 0.0_wp )
[410]1570                      count = count + 1
1571                   ENDDO
1572                   WRITE ( io, 349 )  dir(dim), dir(dim), mid, dir(dim), &
1573                                      mask(mid,dim,:count)
[1353]1574                ELSEIF ( mask_loop(mid,dim,1) < 0.0_wp .AND.  &
1575                         mask_loop(mid,dim,2) < 0.0_wp .AND.  &
1576                         mask_loop(mid,dim,3) == 0.0_wp )  THEN
[410]1577                   WRITE ( io, 350 )  dir(dim), dir(dim)
[1353]1578                ELSEIF ( mask_loop(mid,dim,3) == 0.0_wp )  THEN
[410]1579                   WRITE ( io, 351 )  dir(dim), dir(dim), mid, dir(dim), &
1580                                      mask_loop(mid,dim,1:2)
1581                ELSE
1582                   WRITE ( io, 351 )  dir(dim), dir(dim), mid, dir(dim), &
1583                                      mask_loop(mid,dim,1:3)
1584                ENDIF
1585             ENDDO
1586          ENDIF
1587
1588       ENDDO
1589    ENDDO
1590
1591!
[1]1592!-- Timeseries
[1322]1593    IF ( dt_dots /= 9999999.9_wp )  THEN
[1]1594       WRITE ( io, 340 )
1595
[1783]1596       output_format = netcdf_data_format_string
1597       IF ( netcdf_deflate == 0 )  THEN
1598          WRITE ( io, 344 )  output_format
1599       ELSE
1600          WRITE ( io, 354 )  TRIM( output_format ), netcdf_deflate
1601       ENDIF
[1]1602       WRITE ( io, 341 )  dt_dots
1603    ENDIF
1604
1605#if defined( __dvrp_graphics )
1606!
1607!-- Dvrp-output
[1322]1608    IF ( dt_dvrp /= 9999999.9_wp )  THEN
[1]1609       WRITE ( io, 360 )  dt_dvrp, TRIM( dvrp_output ), TRIM( dvrp_host ), &
1610                          TRIM( dvrp_username ), TRIM( dvrp_directory )
1611       i = 1
1612       l = 0
[336]1613       m = 0
[1]1614       DO WHILE ( mode_dvrp(i) /= ' ' )
1615          IF ( mode_dvrp(i)(1:10) == 'isosurface' )  THEN
[130]1616             READ ( mode_dvrp(i), '(10X,I2)' )  j
[1]1617             l = l + 1
1618             IF ( do3d(0,j) /= ' ' )  THEN
[336]1619                WRITE ( io, 361 )  TRIM( do3d(0,j) ), threshold(l), &
1620                                   isosurface_color(:,l)
[1]1621             ENDIF
1622          ELSEIF ( mode_dvrp(i)(1:6) == 'slicer' )  THEN
[130]1623             READ ( mode_dvrp(i), '(6X,I2)' )  j
[336]1624             m = m + 1
1625             IF ( do2d(0,j) /= ' ' )  THEN
1626                WRITE ( io, 362 )  TRIM( do2d(0,j) ), &
1627                                   slicer_range_limits_dvrp(:,m)
1628             ENDIF
[1]1629          ENDIF
1630          i = i + 1
1631       ENDDO
[237]1632
[336]1633       WRITE ( io, 365 )  groundplate_color, superelevation_x, &
1634                          superelevation_y, superelevation, clip_dvrp_l, &
1635                          clip_dvrp_r, clip_dvrp_s, clip_dvrp_n
1636
1637       IF ( TRIM( topography ) /= 'flat' )  THEN
1638          WRITE ( io, 366 )  topography_color
1639          IF ( cluster_size > 1 )  THEN
1640             WRITE ( io, 367 )  cluster_size
1641          ENDIF
[237]1642       ENDIF
1643
[1]1644    ENDIF
1645#endif
1646
1647!
[1833]1648!-- Output of spectra related quantities
1649    IF ( calculate_spectra )  CALL spectra_header( io )
[1]1650
1651    WRITE ( io, 99 )
1652
1653!
1654!-- Physical quantities
1655    WRITE ( io, 400 )
1656
1657!
1658!-- Geostrophic parameters
[1551]1659    WRITE ( io, 410 )  phi, omega, f, fs
[1]1660
1661!
1662!-- Other quantities
1663    WRITE ( io, 411 )  g
[1551]1664
[1179]1665    WRITE ( io, 412 )  TRIM( reference_state )
1666    IF ( use_single_reference_value )  THEN
[97]1667       IF ( ocean )  THEN
[1179]1668          WRITE ( io, 413 )  prho_reference
[97]1669       ELSE
[1179]1670          WRITE ( io, 414 )  pt_reference
[97]1671       ENDIF
1672    ENDIF
[1]1673
1674!
1675!-- Cloud physics parameters
[1299]1676    IF ( cloud_physics )  THEN
[57]1677       WRITE ( io, 415 )
1678       WRITE ( io, 416 ) surface_pressure, r_d, rho_surface, cp, l_v
[1822]1679       IF ( microphysics_seifert )  THEN
[1353]1680          WRITE ( io, 510 ) 1.0E-6_wp * nc_const
[1822]1681          WRITE ( io, 511 ) c_sedimentation
[1115]1682       ENDIF
[1]1683    ENDIF
1684
1685!
[824]1686!-- Cloud physcis parameters / quantities / numerical methods
1687    WRITE ( io, 430 )
1688    IF ( humidity .AND. .NOT. cloud_physics .AND. .NOT. cloud_droplets)  THEN
1689       WRITE ( io, 431 )
1690    ELSEIF ( humidity  .AND.  cloud_physics )  THEN
1691       WRITE ( io, 432 )
[1496]1692       IF ( cloud_top_radiation )  WRITE ( io, 132 )
[1822]1693       IF ( microphysics_kessler )  THEN
1694          WRITE ( io, 133 )
1695       ELSEIF ( microphysics_seifert )  THEN
[1831]1696          IF ( cloud_water_sedimentation )  WRITE ( io, 506 )
[1822]1697          WRITE ( io, 505 )
[1831]1698          IF ( collision_turbulence )  WRITE ( io, 507 )
[1822]1699          IF ( ventilation_effect )  WRITE ( io, 508 )
1700          IF ( limiter_sedimentation )  WRITE ( io, 509 )
[1115]1701       ENDIF
[824]1702    ELSEIF ( humidity  .AND.  cloud_droplets )  THEN
1703       WRITE ( io, 433 )
1704       IF ( curvature_solution_effects )  WRITE ( io, 434 )
[825]1705       IF ( collision_kernel /= 'none' )  THEN
1706          WRITE ( io, 435 )  TRIM( collision_kernel )
[828]1707          IF ( collision_kernel(6:9) == 'fast' )  THEN
1708             WRITE ( io, 436 )  radius_classes, dissipation_classes
1709          ENDIF
[825]1710       ELSE
[828]1711          WRITE ( io, 437 )
[825]1712       ENDIF
[824]1713    ENDIF
1714
1715!
[1]1716!-- LES / turbulence parameters
1717    WRITE ( io, 450 )
1718
1719!--
1720! ... LES-constants used must still be added here
1721!--
1722    IF ( constant_diffusion )  THEN
1723       WRITE ( io, 451 )  km_constant, km_constant/prandtl_number, &
1724                          prandtl_number
1725    ENDIF
1726    IF ( .NOT. constant_diffusion)  THEN
[1353]1727       IF ( e_init > 0.0_wp )  WRITE ( io, 455 )  e_init
1728       IF ( e_min > 0.0_wp )  WRITE ( io, 454 )  e_min
[1]1729       IF ( wall_adjustment )  WRITE ( io, 453 )  wall_adjustment_factor
1730    ENDIF
1731
1732!
1733!-- Special actions during the run
1734    WRITE ( io, 470 )
1735    IF ( create_disturbances )  THEN
1736       WRITE ( io, 471 )  dt_disturb, disturbance_amplitude,                   &
1737                          zu(disturbance_level_ind_b), disturbance_level_ind_b,&
1738                          zu(disturbance_level_ind_t), disturbance_level_ind_t
[707]1739       IF ( .NOT. bc_lr_cyc  .OR.  .NOT. bc_ns_cyc )  THEN
[1]1740          WRITE ( io, 472 )  inflow_disturbance_begin, inflow_disturbance_end
1741       ELSE
1742          WRITE ( io, 473 )  disturbance_energy_limit
1743       ENDIF
1744       WRITE ( io, 474 )  TRIM( random_generator )
1745    ENDIF
[1353]1746    IF ( pt_surface_initial_change /= 0.0_wp )  THEN
[1]1747       WRITE ( io, 475 )  pt_surface_initial_change
1748    ENDIF
[1353]1749    IF ( humidity  .AND.  q_surface_initial_change /= 0.0_wp )  THEN
[1]1750       WRITE ( io, 476 )  q_surface_initial_change       
1751    ENDIF
[1353]1752    IF ( passive_scalar  .AND.  q_surface_initial_change /= 0.0_wp )  THEN
[1]1753       WRITE ( io, 477 )  q_surface_initial_change       
1754    ENDIF
1755
[60]1756    IF ( particle_advection )  THEN
[1]1757!
[60]1758!--    Particle attributes
1759       WRITE ( io, 480 )  particle_advection_start, dt_prel, bc_par_lr, &
1760                          bc_par_ns, bc_par_b, bc_par_t, particle_maximum_age, &
[1359]1761                          end_time_prel
[60]1762       IF ( use_sgs_for_particles )  WRITE ( io, 488 )  dt_min_part
1763       IF ( random_start_position )  WRITE ( io, 481 )
[1575]1764       IF ( seed_follows_topography )  WRITE ( io, 496 )
[60]1765       IF ( particles_per_point > 1 )  WRITE ( io, 489 )  particles_per_point
1766       WRITE ( io, 495 )  total_number_of_particles
[1322]1767       IF ( dt_write_particle_data /= 9999999.9_wp )  THEN
[60]1768          WRITE ( io, 485 )  dt_write_particle_data
[1327]1769          IF ( netcdf_data_format > 1 )  THEN
1770             output_format = 'netcdf (64 bit offset) and binary'
[1]1771          ELSE
[1327]1772             output_format = 'netcdf and binary'
[1]1773          ENDIF
[1783]1774          IF ( netcdf_deflate == 0 )  THEN
1775             WRITE ( io, 344 )  output_format
1776          ELSE
1777             WRITE ( io, 354 )  TRIM( output_format ), netcdf_deflate
1778          ENDIF
[1]1779       ENDIF
[1322]1780       IF ( dt_dopts /= 9999999.9_wp )  WRITE ( io, 494 )  dt_dopts
[60]1781       IF ( write_particle_statistics )  WRITE ( io, 486 )
[1]1782
[60]1783       WRITE ( io, 487 )  number_of_particle_groups
[1]1784
[60]1785       DO  i = 1, number_of_particle_groups
[1322]1786          IF ( i == 1  .AND.  density_ratio(i) == 9999999.9_wp )  THEN
[1353]1787             WRITE ( io, 490 )  i, 0.0_wp
[60]1788             WRITE ( io, 492 )
[1]1789          ELSE
[60]1790             WRITE ( io, 490 )  i, radius(i)
[1353]1791             IF ( density_ratio(i) /= 0.0_wp )  THEN
[60]1792                WRITE ( io, 491 )  density_ratio(i)
1793             ELSE
1794                WRITE ( io, 492 )
1795             ENDIF
[1]1796          ENDIF
[60]1797          WRITE ( io, 493 )  psl(i), psr(i), pss(i), psn(i), psb(i), pst(i), &
1798                             pdx(i), pdy(i), pdz(i)
[336]1799          IF ( .NOT. vertical_particle_advection(i) )  WRITE ( io, 482 )
[60]1800       ENDDO
[1]1801
[60]1802    ENDIF
[1]1803
[60]1804
[1]1805!
1806!-- Parameters of 1D-model
1807    IF ( INDEX( initializing_actions, 'set_1d-model_profiles' ) /= 0 )  THEN
1808       WRITE ( io, 500 )  end_time_1d, dt_run_control_1d, dt_pr_1d, &
1809                          mixing_length_1d, dissipation_1d
1810       IF ( damp_level_ind_1d /= nzt+1 )  THEN
1811          WRITE ( io, 502 )  zu(damp_level_ind_1d), damp_level_ind_1d
1812       ENDIF
1813    ENDIF
1814
1815!
[1551]1816!-- User-defined information
[1]1817    CALL user_header( io )
1818
1819    WRITE ( io, 99 )
1820
1821!
1822!-- Write buffer contents to disc immediately
[1808]1823    FLUSH( io )
[1]1824
1825!
1826!-- Here the FORMATs start
1827
1828 99 FORMAT (1X,78('-'))
[1468]1829100 FORMAT (/1X,'******************************',4X,44('-')/        &
1830            1X,'* ',A,' *',4X,A/                               &
1831            1X,'******************************',4X,44('-'))
1832101 FORMAT (35X,'coupled run using MPI-',I1,': ',A/ &
1833            35X,42('-'))
1834102 FORMAT (/' Date:                 ',A8,4X,'Run:       ',A20/      &
1835            ' Time:                 ',A8,4X,'Run-No.:   ',I2.2/     &
[1106]1836            ' Run on host:        ',A10)
[1]1837#if defined( __parallel )
[1468]1838103 FORMAT (' Number of PEs:',10X,I6,4X,'Processor grid (x,y): (',I4,',',I4, &
[1]1839              ')',1X,A)
[1468]1840104 FORMAT (' Number of PEs:',10X,I6,4X,'Tasks:',I4,'   threads per task:',I4/ &
1841              35X,'Processor grid (x,y): (',I4,',',I4,')',1X,A)
1842105 FORMAT (35X,'One additional PE is used to handle'/37X,'the dvrp output!')
1843106 FORMAT (35X,'A 1d-decomposition along x is forced'/ &
1844            35X,'because the job is running on an SMP-cluster')
1845107 FORMAT (35X,'A 1d-decomposition along ',A,' is used')
1846108 FORMAT (35X,'Max. # of parallel I/O streams is ',I5)
1847109 FORMAT (35X,'Precursor run for coupled atmos-ocean run'/ &
1848            35X,42('-'))
1849114 FORMAT (35X,'Coupled atmosphere-ocean run following'/ &
1850            35X,'independent precursor runs'/             &
1851            35X,42('-'))
[1111]1852117 FORMAT (' Accelerator boards / node:  ',I2)
[1]1853#endif
1854110 FORMAT (/' Numerical Schemes:'/ &
1855             ' -----------------'/)
1856111 FORMAT (' --> Solve perturbation pressure via FFT using ',A,' routines')
1857112 FORMAT (' --> Solve perturbation pressure via SOR-Red/Black-Schema'/ &
[1697]1858            '     Iterations (initial/other): ',I3,'/',I3,'  omega =',F6.3)
[1]1859113 FORMAT (' --> Momentum advection via Piascek-Williams-Scheme (Form C3)', &
1860                  ' or Upstream')
[1216]1861115 FORMAT ('     FFT and transpositions are overlapping')
[1]1862116 FORMAT (' --> Scalar advection via Piascek-Williams-Scheme (Form C3)', &
1863                  ' or Upstream')
1864118 FORMAT (' --> Scalar advection via Bott-Chlond-Scheme')
[1106]1865119 FORMAT (' --> Galilei-Transform applied to horizontal advection:'/ &
1866            '     translation velocity = ',A/ &
[1]1867            '     distance advected ',A,':  ',F8.3,' km(x)  ',F8.3,' km(y)')
[1111]1868120 FORMAT (' Accelerator boards: ',8X,I2)
[1]1869122 FORMAT (' --> Time differencing scheme: ',A)
[108]1870123 FORMAT (' --> Rayleigh-Damping active, starts ',A,' z = ',F8.2,' m'/ &
[1697]1871            '     maximum damping coefficient:',F6.3, ' 1/s')
[1]1872129 FORMAT (' --> Additional prognostic equation for the specific humidity')
1873130 FORMAT (' --> Additional prognostic equation for the total water content')
[940]1874131 FORMAT (' --> No pt-equation solved. Neutral stratification with pt = ', &
1875                  F6.2, ' K assumed')
[824]1876132 FORMAT ('     Parameterization of long-wave radiation processes via'/ &
[1]1877            '     effective emissivity scheme')
[824]1878133 FORMAT ('     Precipitation parameterization via Kessler-Scheme')
[1]1879134 FORMAT (' --> Additional prognostic equation for a passive scalar')
[1575]1880135 FORMAT (' --> Solve perturbation pressure via ',A,' method (', &
[1]1881                  A,'-cycle)'/ &
1882            '     number of grid levels:                   ',I2/ &
1883            '     Gauss-Seidel red/black iterations:       ',I2)
1884136 FORMAT ('     gridpoints of coarsest subdomain (x,y,z): (',I3,',',I3,',', &
1885                  I3,')')
1886137 FORMAT ('     level data gathered on PE0 at level:     ',I2/ &
1887            '     gridpoints of coarsest subdomain (x,y,z): (',I3,',',I3,',', &
1888                  I3,')'/ &
1889            '     gridpoints of coarsest domain (x,y,z):    (',I3,',',I3,',', &
1890                  I3,')')
[63]1891139 FORMAT (' --> Loop optimization method: ',A)
[1]1892140 FORMAT ('     maximum residual allowed:                ',E10.3)
1893141 FORMAT ('     fixed number of multigrid cycles:        ',I4)
1894142 FORMAT ('     perturbation pressure is calculated at every Runge-Kutta ', &
1895                  'step')
[87]1896143 FORMAT ('     Euler/upstream scheme is used for the SGS turbulent ', &
1897                  'kinetic energy')
[927]1898144 FORMAT ('     masking method is used')
[1]1899150 FORMAT (' --> Volume flow at the right and north boundary will be ', &
[241]1900                  'conserved'/ &
1901            '     using the ',A,' mode')
1902151 FORMAT ('     with u_bulk = ',F7.3,' m/s and v_bulk = ',F7.3,' m/s')
[306]1903152 FORMAT (' --> External pressure gradient directly prescribed by the user:',&
1904           /'     ',2(1X,E12.5),'Pa/m in x/y direction', &
1905           /'     starting from dp_level_b =', F8.3, 'm', A /)
[1365]1906160 FORMAT (//' Large scale forcing and nudging:'/ &
1907              ' -------------------------------'/)
1908161 FORMAT (' --> No large scale forcing from external is used (default) ')
1909162 FORMAT (' --> Large scale forcing from external file LSF_DATA is used: ')
1910163 FORMAT ('     - large scale advection tendencies ')
1911164 FORMAT ('     - large scale subsidence velocity w_subs ')
1912165 FORMAT ('     - large scale subsidence tendencies ')
1913167 FORMAT ('     - and geostrophic wind components ug and vg')
1914168 FORMAT (' --> Large-scale vertical motion is used in the ', &
[1299]1915                  'prognostic equation(s) for')
[1365]1916169 FORMAT ('     the scalar(s) only')
1917170 FORMAT (' --> Nudging is used')
1918171 FORMAT (' --> No nudging is used (default) ')
1919180 FORMAT ('     - prescribed surface values for temperature')
[1376]1920181 FORMAT ('     - prescribed surface fluxes for temperature')
1921182 FORMAT ('     - prescribed surface values for humidity')
[1365]1922183 FORMAT ('     - prescribed surface fluxes for humidity')
[1]1923200 FORMAT (//' Run time and time step information:'/ &
1924             ' ----------------------------------'/)
[1106]1925201 FORMAT ( ' Timestep:             variable     maximum value: ',F6.3,' s', &
[1697]1926             '    CFL-factor:',F5.2)
[1106]1927202 FORMAT ( ' Timestep:          dt = ',F6.3,' s'/)
1928203 FORMAT ( ' Start time:          ',F9.3,' s'/ &
1929             ' End time:            ',F9.3,' s')
[1]1930204 FORMAT ( A,F9.3,' s')
1931205 FORMAT ( A,F9.3,' s',5X,'restart every',17X,F9.3,' s')
[1106]1932206 FORMAT (/' Time reached:        ',F9.3,' s'/ &
1933             ' CPU-time used:       ',F9.3,' s     per timestep:               ', &
1934               '  ',F9.3,' s'/                                                    &
[1111]1935             '                                      per second of simulated tim', &
[1]1936               'e: ',F9.3,' s')
[1106]1937207 FORMAT ( ' Coupling start time: ',F9.3,' s')
[1]1938250 FORMAT (//' Computational grid and domain size:'/ &
1939              ' ----------------------------------'// &
1940              ' Grid length:      dx =    ',F7.3,' m    dy =    ',F7.3, &
1941              ' m    dz =    ',F7.3,' m'/ &
1942              ' Domain size:       x = ',F10.3,' m     y = ',F10.3, &
1943              ' m  z(u) = ',F10.3,' m'/)
1944252 FORMAT (' dz constant up to ',F10.3,' m (k=',I4,'), then stretched by', &
[1697]1945              ' factor:',F6.3/ &
[1]1946            ' maximum dz not to be exceeded is dz_max = ',F10.3,' m'/)
1947254 FORMAT (' Number of gridpoints (x,y,z):  (0:',I4,', 0:',I4,', 0:',I4,')'/ &
1948            ' Subdomain size (x,y,z):        (  ',I4,',   ',I4,',   ',I4,')'/)
1949260 FORMAT (/' The model has a slope in x-direction. Inclination angle: ',F6.2,&
1950             ' degrees')
[1551]1951270 FORMAT (//' Topography information:'/ &
1952              ' ----------------------'// &
[1]1953              1X,'Topography: ',A)
1954271 FORMAT (  ' Building size (x/y/z) in m: ',F5.1,' / ',F5.1,' / ',F5.1/ &
1955              ' Horizontal index bounds (l/r/s/n): ',I4,' / ',I4,' / ',I4, &
1956                ' / ',I4)
[240]1957272 FORMAT (  ' Single quasi-2D street canyon of infinite length in ',A, &
1958              ' direction' / &
1959              ' Canyon height: ', F6.2, 'm, ch = ', I4, '.'      / &
1960              ' Canyon position (',A,'-walls): cxl = ', I4,', cxr = ', I4, '.')
[256]1961278 FORMAT (' Topography grid definition convention:'/ &
1962            ' cell edge (staggered grid points'/  &
1963            ' (u in x-direction, v in y-direction))' /)
1964279 FORMAT (' Topography grid definition convention:'/ &
1965            ' cell center (scalar grid points)' /)
[1]1966300 FORMAT (//' Boundary conditions:'/ &
1967             ' -------------------'// &
1968             '                     p                    uv             ', &
[1551]1969             '                     pt'// &
[1]1970             ' B. bound.: ',A/ &
1971             ' T. bound.: ',A)
[97]1972301 FORMAT (/'                     ',A// &
[1]1973             ' B. bound.: ',A/ &
1974             ' T. bound.: ',A)
[19]1975303 FORMAT (/' Bottom surface fluxes are used in diffusion terms at k=1')
1976304 FORMAT (/' Top surface fluxes are used in diffusion terms at k=nzt')
1977305 FORMAT (//'    Prandtl-Layer between bottom surface and first ', &
1978               'computational u,v-level:'// &
[1697]1979             '       zp = ',F6.2,' m   z0 =',F7.4,' m   z0h =',F8.5,&
1980             ' m   kappa =',F5.2/ &
1981             '       Rif value range:   ',F8.2,' <= rif <=',F6.2)
[97]1982306 FORMAT ('       Predefined constant heatflux:   ',F9.6,' K m/s')
[1]1983307 FORMAT ('       Heatflux has a random normal distribution')
1984308 FORMAT ('       Predefined surface temperature')
[97]1985309 FORMAT ('       Predefined constant salinityflux:   ',F9.6,' psu m/s')
[1]1986310 FORMAT (//'    1D-Model:'// &
1987             '       Rif value range:   ',F6.2,' <= rif <=',F6.2)
1988311 FORMAT ('       Predefined constant humidity flux: ',E10.3,' m/s')
1989312 FORMAT ('       Predefined surface humidity')
1990313 FORMAT ('       Predefined constant scalar flux: ',E10.3,' kg/(m**2 s)')
1991314 FORMAT ('       Predefined scalar value at the surface')
[19]1992315 FORMAT ('       Humidity / scalar flux at top surface is 0.0')
[102]1993316 FORMAT ('       Sensible heatflux and momentum flux from coupled ', &
1994                    'atmosphere model')
[1]1995317 FORMAT (//' Lateral boundaries:'/ &
1996            '       left/right:  ',A/    &
1997            '       north/south: ',A)
[1159]1998318 FORMAT (/'       use_cmax: ',L1 / &
1999            '       pt damping layer width = ',F8.2,' m, pt ', &
[1697]2000                    'damping factor =',F7.4)
[151]2001319 FORMAT ('       turbulence recycling at inflow switched on'/ &
2002            '       width of recycling domain: ',F7.1,' m   grid index: ',I4/ &
2003            '       inflow damping height: ',F6.1,' m   width: ',F6.1,' m')
2004320 FORMAT ('       Predefined constant momentumflux:  u: ',F9.6,' m**2/s**2'/ &
[103]2005            '                                          v: ',F9.6,' m**2/s**2')
[1365]2006321 FORMAT (//' Initial profiles:'/ &
2007              ' ----------------')
[1560]2008322 FORMAT ('       turbulence recycling at inflow switched on'/ &
2009            '       y shift of the recycled inflow turbulence switched on'/ &
2010            '       width of recycling domain: ',F7.1,' m   grid index: ',I4/ &
[1592]2011            '       inflow damping height: ',F6.1,' m   width: ',F6.1,' m'/)
[151]2012325 FORMAT (//' List output:'/ &
[1]2013             ' -----------'//  &
2014            '    1D-Profiles:'/    &
2015            '       Output every             ',F8.2,' s')
[151]2016326 FORMAT ('       Time averaged over       ',F8.2,' s'/ &
[1]2017            '       Averaging input every    ',F8.2,' s')
2018330 FORMAT (//' Data output:'/ &
2019             ' -----------'/)
2020331 FORMAT (/'    1D-Profiles:')
2021332 FORMAT (/'       ',A)
2022333 FORMAT ('       Output every             ',F8.2,' s',/ &
2023            '       Time averaged over       ',F8.2,' s'/ &
2024            '       Averaging input every    ',F8.2,' s')
2025334 FORMAT (/'    2D-Arrays',A,':')
2026335 FORMAT (/'       ',A2,'-cross-section  Arrays: ',A/ &
2027            '       Output every             ',F8.2,' s  ',A/ &
2028            '       Cross sections at ',A1,' = ',A/ &
2029            '       scalar-coordinates:   ',A,' m'/)
2030336 FORMAT (/'    3D-Arrays',A,':')
2031337 FORMAT (/'       Arrays: ',A/ &
2032            '       Output every             ',F8.2,' s  ',A/ &
2033            '       Upper output limit at    ',F8.2,' m  (GP ',I4,')'/)
2034339 FORMAT ('       No output during initial ',F8.2,' s')
2035340 FORMAT (/'    Time series:')
2036341 FORMAT ('       Output every             ',F8.2,' s'/)
2037342 FORMAT (/'       ',A2,'-cross-section  Arrays: ',A/ &
2038            '       Output every             ',F8.2,' s  ',A/ &
2039            '       Time averaged over       ',F8.2,' s'/ &
2040            '       Averaging input every    ',F8.2,' s'/ &
2041            '       Cross sections at ',A1,' = ',A/ &
2042            '       scalar-coordinates:   ',A,' m'/)
2043343 FORMAT (/'       Arrays: ',A/ &
2044            '       Output every             ',F8.2,' s  ',A/ &
2045            '       Time averaged over       ',F8.2,' s'/ &
2046            '       Averaging input every    ',F8.2,' s'/ &
2047            '       Upper output limit at    ',F8.2,' m  (GP ',I4,')'/)
[292]2048344 FORMAT ('       Output format: ',A/)
[410]2049345 FORMAT (/'    Scaling lengths for output locations of all subsequent mask IDs:',/ &
2050            '       mask_scale_x (in x-direction): ',F9.3, ' m',/ &
2051            '       mask_scale_y (in y-direction): ',F9.3, ' m',/ &
2052            '       mask_scale_z (in z-direction): ',F9.3, ' m' )
2053346 FORMAT (/'    Masked data output',A,' for mask ID ',I2, ':')
2054347 FORMAT ('       Variables: ',A/ &
2055            '       Output every             ',F8.2,' s')
2056348 FORMAT ('       Variables: ',A/ &
2057            '       Output every             ',F8.2,' s'/ &
2058            '       Time averaged over       ',F8.2,' s'/ &
2059            '       Averaging input every    ',F8.2,' s')
2060349 FORMAT (/'       Output locations in ',A,'-direction in multiples of ', &
2061            'mask_scale_',A,' predefined by array mask_',I2.2,'_',A,':'/ &
2062            13('       ',8(F8.2,',')/) )
2063350 FORMAT (/'       Output locations in ',A,'-direction: ', &
2064            'all gridpoints along ',A,'-direction (default).' )
2065351 FORMAT (/'       Output locations in ',A,'-direction in multiples of ', &
2066            'mask_scale_',A,' constructed from array mask_',I2.2,'_',A,'_loop:'/ &
2067            '          loop begin:',F8.2,', end:',F8.2,', stride:',F8.2 )
[1313]2068352 FORMAT  (/'       Number of output time levels allowed: ',I3 /)
2069353 FORMAT  (/'       Number of output time levels allowed: unlimited' /)
[1783]2070354 FORMAT ('       Output format: ',A, '   compressed with level: ',I1/)
[1]2071#if defined( __dvrp_graphics )
2072360 FORMAT ('    Plot-Sequence with dvrp-software:'/ &
2073            '       Output every      ',F7.1,' s'/ &
2074            '       Output mode:      ',A/ &
2075            '       Host / User:      ',A,' / ',A/ &
2076            '       Directory:        ',A// &
2077            '       The sequence contains:')
[337]2078361 FORMAT (/'       Isosurface of "',A,'"    Threshold value: ', E12.3/ &
2079            '          Isosurface color: (',F4.2,',',F4.2,',',F4.2,') (R,G,B)')
2080362 FORMAT (/'       Slicer plane ',A/ &
[336]2081            '       Slicer limits: [',F6.2,',',F6.2,']')
[337]2082365 FORMAT (/'       Groundplate color: (',F4.2,',',F4.2,',',F4.2,') (R,G,B)'/ &
[336]2083            '       Superelevation along (x,y,z): (',F4.1,',',F4.1,',',F4.1, &
2084                     ')'/ &
2085            '       Clipping limits: from x = ',F9.1,' m to x = ',F9.1,' m'/ &
2086            '                        from y = ',F9.1,' m to y = ',F9.1,' m')
[337]2087366 FORMAT (/'       Topography color: (',F4.2,',',F4.2,',',F4.2,') (R,G,B)')
[336]2088367 FORMAT ('       Polygon reduction for topography: cluster_size = ', I1)
[1]2089#endif
2090400 FORMAT (//' Physical quantities:'/ &
2091              ' -------------------'/)
[1551]2092410 FORMAT ('    Geograph. latitude  :   phi    = ',F4.1,' degr'/   &
[1697]2093            '    Angular velocity    :   omega  =',E10.3,' rad/s'/  &
[1551]2094            '    Coriolis parameter  :   f      = ',F9.6,' 1/s'/    &
2095            '                            f*     = ',F9.6,' 1/s')
2096411 FORMAT (/'    Gravity             :   g      = ',F4.1,' m/s**2')
[1179]2097412 FORMAT (/'    Reference state used in buoyancy terms: ',A)
2098413 FORMAT ('       Reference density in buoyancy terms: ',F8.3,' kg/m**3')
2099414 FORMAT ('       Reference temperature in buoyancy terms: ',F8.4,' K')
[1551]2100415 FORMAT (/' Cloud physics parameters:'/ &
2101             ' ------------------------'/)
2102416 FORMAT ('    Surface pressure   :   p_0   = ',F7.2,' hPa'/      &
2103            '    Gas constant       :   R     = ',F5.1,' J/(kg K)'/ &
[1697]2104            '    Density of air     :   rho_0 =',F6.3,' kg/m**3'/  &
[1551]2105            '    Specific heat cap. :   c_p   = ',F6.1,' J/(kg K)'/ &
[1697]2106            '    Vapourization heat :   L_v   =',E9.2,' J/kg')
[1551]2107417 FORMAT ('    Geograph. longitude :   lambda = ',F4.1,' degr')
2108418 FORMAT (/'    Day of the year at model start :   day_init      =     ',I3 &
2109            /'    UTC time at model start        :   time_utc_init = ',F7.1' s')
[1]2110420 FORMAT (/'    Characteristic levels of the initial temperature profile:'// &
2111            '       Height:        ',A,'  m'/ &
2112            '       Temperature:   ',A,'  K'/ &
2113            '       Gradient:      ',A,'  K/100m'/ &
2114            '       Gridpoint:     ',A)
2115421 FORMAT (/'    Characteristic levels of the initial humidity profile:'// &
2116            '       Height:      ',A,'  m'/ &
2117            '       Humidity:    ',A,'  kg/kg'/ &
2118            '       Gradient:    ',A,'  (kg/kg)/100m'/ &
2119            '       Gridpoint:   ',A)
2120422 FORMAT (/'    Characteristic levels of the initial scalar profile:'// &
2121            '       Height:                  ',A,'  m'/ &
2122            '       Scalar concentration:    ',A,'  kg/m**3'/ &
2123            '       Gradient:                ',A,'  (kg/m**3)/100m'/ &
2124            '       Gridpoint:               ',A)
2125423 FORMAT (/'    Characteristic levels of the geo. wind component ug:'// &
2126            '       Height:      ',A,'  m'/ &
2127            '       ug:          ',A,'  m/s'/ &
2128            '       Gradient:    ',A,'  1/100s'/ &
2129            '       Gridpoint:   ',A)
2130424 FORMAT (/'    Characteristic levels of the geo. wind component vg:'// &
2131            '       Height:      ',A,'  m'/ &
[97]2132            '       vg:          ',A,'  m/s'/ &
[1]2133            '       Gradient:    ',A,'  1/100s'/ &
2134            '       Gridpoint:   ',A)
[97]2135425 FORMAT (/'    Characteristic levels of the initial salinity profile:'// &
2136            '       Height:     ',A,'  m'/ &
2137            '       Salinity:   ',A,'  psu'/ &
2138            '       Gradient:   ',A,'  psu/100m'/ &
2139            '       Gridpoint:  ',A)
[411]2140426 FORMAT (/'    Characteristic levels of the subsidence/ascent profile:'// &
2141            '       Height:      ',A,'  m'/ &
2142            '       w_subs:      ',A,'  m/s'/ &
2143            '       Gradient:    ',A,'  (m/s)/100m'/ &
2144            '       Gridpoint:   ',A)
[767]2145427 FORMAT (/'    Initial wind profiles (u,v) are interpolated from given'// &
2146                  ' profiles')
[1241]2147428 FORMAT (/'    Initial profiles (u, v, pt, q) are taken from file '/ &
2148             '    NUDGING_DATA')
[824]2149430 FORMAT (//' Cloud physics quantities / methods:'/ &
2150              ' ----------------------------------'/)
2151431 FORMAT ('    Humidity is treated as purely passive scalar (no condensati', &
2152                 'on)')
2153432 FORMAT ('    Bulk scheme with liquid water potential temperature and'/ &
2154            '    total water content is used.'/ &
2155            '    Condensation is parameterized via 0% - or 100% scheme.')
2156433 FORMAT ('    Cloud droplets treated explicitly using the Lagrangian part', &
2157                 'icle model')
2158434 FORMAT ('    Curvature and solution effecs are considered for growth of', &
2159                 ' droplets < 1.0E-6 m')
[825]2160435 FORMAT ('    Droplet collision is handled by ',A,'-kernel')
[828]2161436 FORMAT ('       Fast kernel with fixed radius- and dissipation classes ', &
2162                    'are used'/ &
2163            '          number of radius classes:       ',I3,'    interval ', &
2164                       '[1.0E-6,2.0E-4] m'/ &
2165            '          number of dissipation classes:   ',I2,'    interval ', &
2166                       '[0,1000] cm**2/s**3')
2167437 FORMAT ('    Droplet collision is switched off')
[1]2168450 FORMAT (//' LES / Turbulence quantities:'/ &
2169              ' ---------------------------'/)
[824]2170451 FORMAT ('    Diffusion coefficients are constant:'/ &
2171            '    Km = ',F6.2,' m**2/s   Kh = ',F6.2,' m**2/s   Pr = ',F5.2)
[1697]2172453 FORMAT ('    Mixing length is limited to',F5.2,' * z')
[824]2173454 FORMAT ('    TKE is not allowed to fall below ',E9.2,' (m/s)**2')
2174455 FORMAT ('    initial TKE is prescribed as ',E9.2,' (m/s)**2')
[1]2175470 FORMAT (//' Actions during the simulation:'/ &
2176              ' -----------------------------'/)
[94]2177471 FORMAT ('    Disturbance impulse (u,v) every :   ',F6.2,' s'/            &
[1697]2178            '    Disturbance amplitude           :    ',F5.2, ' m/s'/       &
[94]2179            '    Lower disturbance level         : ',F8.2,' m (GP ',I4,')'/  &
2180            '    Upper disturbance level         : ',F8.2,' m (GP ',I4,')')
[1]2181472 FORMAT ('    Disturbances continued during the run from i/j =',I4, &
2182                 ' to i/j =',I4)
2183473 FORMAT ('    Disturbances cease as soon as the disturbance energy exceeds',&
[1697]2184                 F6.3, ' m**2/s**2')
[1]2185474 FORMAT ('    Random number generator used    : ',A/)
2186475 FORMAT ('    The surface temperature is increased (or decreased, ', &
2187                 'respectively, if'/ &
2188            '    the value is negative) by ',F5.2,' K at the beginning of the',&
2189                 ' 3D-simulation'/)
2190476 FORMAT ('    The surface humidity is increased (or decreased, ',&
2191                 'respectively, if the'/ &
2192            '    value is negative) by ',E8.1,' kg/kg at the beginning of', &
2193                 ' the 3D-simulation'/)
2194477 FORMAT ('    The scalar value is increased at the surface (or decreased, ',&
2195                 'respectively, if the'/ &
2196            '    value is negative) by ',E8.1,' kg/m**3 at the beginning of', &
2197                 ' the 3D-simulation'/)
2198480 FORMAT ('    Particles:'/ &
2199            '    ---------'// &
2200            '       Particle advection is active (switched on at t = ', F7.1, &
2201                    ' s)'/ &
2202            '       Start of new particle generations every  ',F6.1,' s'/ &
2203            '       Boundary conditions: left/right: ', A, ' north/south: ', A/&
2204            '                            bottom:     ', A, ' top:         ', A/&
2205            '       Maximum particle age:                 ',F9.1,' s'/ &
[1359]2206            '       Advection stopped at t = ',F9.1,' s'/)
[1]2207481 FORMAT ('       Particles have random start positions'/)
[336]2208482 FORMAT ('          Particles are advected only horizontally'/)
[1]2209485 FORMAT ('       Particle data are written on file every ', F9.1, ' s')
2210486 FORMAT ('       Particle statistics are written on file'/)
2211487 FORMAT ('       Number of particle groups: ',I2/)
2212488 FORMAT ('       SGS velocity components are used for particle advection'/ &
[1697]2213            '          minimum timestep for advection:', F8.5/)
[1]2214489 FORMAT ('       Number of particles simultaneously released at each ', &
2215                    'point: ', I5/)
2216490 FORMAT ('       Particle group ',I2,':'/ &
2217            '          Particle radius: ',E10.3, 'm')
2218491 FORMAT ('          Particle inertia is activated'/ &
[1697]2219            '             density_ratio (rho_fluid/rho_particle) =',F6.3/)
[1]2220492 FORMAT ('          Particles are advected only passively (no inertia)'/)
2221493 FORMAT ('          Boundaries of particle source: x:',F8.1,' - ',F8.1,' m'/&
2222            '                                         y:',F8.1,' - ',F8.1,' m'/&
2223            '                                         z:',F8.1,' - ',F8.1,' m'/&
2224            '          Particle distances:  dx = ',F8.1,' m  dy = ',F8.1, &
2225                       ' m  dz = ',F8.1,' m'/)
2226494 FORMAT ('       Output of particle time series in NetCDF format every ', &
2227                    F8.2,' s'/)
2228495 FORMAT ('       Number of particles in total domain: ',I10/)
[1575]2229496 FORMAT ('       Initial vertical particle positions are interpreted ', &
2230                    'as relative to the given topography')
[1]2231500 FORMAT (//' 1D-Model parameters:'/                           &
2232              ' -------------------'//                           &
2233            '    Simulation time:                   ',F8.1,' s'/ &
2234            '    Run-controll output every:         ',F8.1,' s'/ &
2235            '    Vertical profile output every:     ',F8.1,' s'/ &
2236            '    Mixing length calculation:         ',A/         &
2237            '    Dissipation calculation:           ',A/)
2238502 FORMAT ('    Damping layer starts from ',F7.1,' m (GP ',I4,')'/)
[667]2239503 FORMAT (' --> Momentum advection via Wicker-Skamarock-Scheme 5th order')
2240504 FORMAT (' --> Scalar advection via Wicker-Skamarock-Scheme 5th order')
[1115]2241505 FORMAT ('    Precipitation parameterization via Seifert-Beheng-Scheme')
[1831]2242506 FORMAT ('    Cloud water sedimentation parameterization via Stokes law')
[1115]2243507 FORMAT ('    Turbulence effects on precipitation process')
2244508 FORMAT ('    Ventilation effects on evaporation of rain drops')
2245509 FORMAT ('    Slope limiter used for sedimentation process')
[1551]2246510 FORMAT ('    Droplet density    :   N_c   = ',F6.1,' 1/cm**3')
2247511 FORMAT ('    Sedimentation Courant number:                  '/&
[1697]2248            '                               C_s   =',F4.1,'        ')
[1429]2249512 FORMAT (/' Date:                 ',A8,6X,'Run:       ',A20/      &
2250            ' Time:                 ',A8,6X,'Run-No.:   ',I2.2/     &
2251            ' Run on host:        ',A10,6X,'En-No.:    ',I2.2)
[1557]2252513 FORMAT (' --> Scalar advection via Wicker-Skamarock-Scheme 5th order ' // & 
2253            '+ monotonic adjustment')
[1791]2254600 FORMAT (/' Nesting informations:'/ &
2255            ' --------------------'/ &
[1797]2256            ' Nesting mode:                     ',A/ &
2257            ' Nesting-datatransfer mode:        ',A// &
[1791]2258            ' Nest id  parent  number   lower left coordinates   name'/ &
2259            ' (*=me)     id    of PEs      x (m)     y (m)' )
2260601 FORMAT (2X,A1,1X,I2.2,6X,I2.2,5X,I5,5X,F8.2,2X,F8.2,5X,A)
[1]2261
2262 END SUBROUTINE header
Note: See TracBrowser for help on using the repository browser.