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

Last change on this file since 2338 was 2338, checked in by gronemeier, 7 years ago

modularized 1d model

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