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

Last change on this file since 1822 was 1822, checked in by hoffmann, 8 years ago

changes in LPM and bulk cloud microphysics

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