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

Last change on this file since 2320 was 2320, checked in by suehring, 7 years ago

large-scale forcing and nudging modularized

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