Index: palm/trunk/SOURCE/parin.f90
===================================================================
--- palm/trunk/SOURCE/parin.f90	(revision 4176)
+++ palm/trunk/SOURCE/parin.f90	(revision 4180)
@@ -59,441 +59,4 @@
 ! Delete debug-print statements
 ! 
-! 3646 2018-12-28 17:58:49Z kanani
-! Bugfix: for restarts, reset data_output_during_spinup to FALSE to enable
-! correct calculation of ntdim in check_parameters
-! 
-! 3637 2018-12-20 01:51:36Z knoop
-! Implementation of the PALM module interface
-! 
-! 3569 2018-11-27 17:03:40Z kanani
-! dom_dwd_user, Schrempf:
-! Remove uv exposure model code, this is now part of biometeorology_mod.
-!
-! 3545 2018-11-21 11:19:41Z gronemeier
-! remove rans_mode from initialization_parameters
-! 
-! 3525 2018-11-14 16:06:14Z kanani
-! Changes related to clean-up of biometeorology (dom_dwd_user)
-! 
-! 3473 2018-10-30 20:50:15Z suehring
-! Add virtual measurement module
-! 
-! 3472 2018-10-30 20:43:50Z suehring
-! Add indoor model (kanani, srissman, tlang),
-! minor formatting
-! 
-! 3467 2018-10-30 19:05:21Z suehring
-! Implementation of a new aerosol module salsa.
-! 
-! 3448 2018-10-29 18:14:31Z kanani
-! Add biometeorology
-! 
-! 3435 2018-10-26 18:25:44Z gronemeier
-! Add mask_k_over_surface
-! 
-! 3421 2018-10-24 18:39:32Z gronemeier
-! Added module for data output at surfaces
-! 
-! 3355 2018-10-16 14:03:34Z knoop
-! - offline nesting separated from large-scale forcing module
-! - top boundary condition for pressure in offline nesting changed
-! 
-! 3343 2018-10-15 10:38:52Z suehring
-! Introduced reading of date_init to inipar.(Russo)
-! Add extra profiles for chemistry (basit)
-!
-! 3294 2018-10-01 02:37:10Z raasch
-! changes concerning modularization of ocean option
-! 
-! 3274 2018-09-24 15:42:55Z knoop
-! Modularization of all bulk cloud physics code components
-! 
-! 3248 2018-09-14 09:42:06Z sward
-! Minor formating changes
-! 
-! 3246 2018-09-13 15:14:50Z sward
-! Added error handling for input namelist via parin_fail_message
-! 
-! 3240 2018-09-12 12:04:40Z Giersch
-! A check that controls the number of user-defined profiles on the restart file
-! with the one given for the current run has been added.
-! 
-! 3204 2018-08-23 10:49:05Z raasch
-! additional check for nz
-! 
-! 3184 2018-07-27 17:13:09Z suehring
-! Bugfix, comment setting of chemistry and passive scalar top boundary condition
-! in case of offline nesting
-! 
-! 3183 2018-07-27 14:25:55Z suehring
-! Rename variables and boundary conditions in mesoscale-offline nesting mode
-! 
-! 3182 2018-07-27 13:36:03Z suehring
-! Added multi agent system
-! 
-! 3157 2018-07-19 21:08:49Z maronga
-! added use_free_convection_scaling
-! 
-! 3083 2018-06-19 14:03:12Z gronemeier
-! Added rans_const_c and rans_const_sigma as input parameters (TG)
-! 
-! 3065 2018-06-12 07:03:02Z Giersch
-! New initialization parameters added
-! 
-! 3049 2018-05-29 13:52:36Z Giersch
-! Error messages revised
-! 
-! 3045 2018-05-28 07:55:41Z Giersch
-! z_max_do2d removed, error messages revised
-! 
-! 2995 2018-04-19 12:13:16Z Giersch
-! time_since_reference_point must be calculated/initialized before the first  
-! call of functions related to the radiation model which occur in 
-! time_integration_spinup or time_integration
-! 
-! 2980 2018-04-17 15:19:27Z suehring
-! Revise message call
-! 
-! 2975 2018-04-16 15:22:20Z suehring
-! - Informative message when initializing_actions has been changed 
-!   to set_constant_profile in child domain 
-! - Change location in message call
-! 
-! 2967 2018-04-13 11:22:08Z raasch
-! bugfix: missing parallel cpp-directives added
-! 
-! 2941 2018-04-03 11:54:58Z kanani
-! Fix for spinup in case of restart run
-! 
-! 2938 2018-03-27 15:52:42Z suehring
-! Change initialization in case child domain should be initialized with Inifor.
-! 
-! 2936 2018-03-27 14:49:27Z suehring
-! inipar renamed to initialization_parameters.
-! d3par renamed to runtime_parameters.
-! 
-! 2921 2018-03-22 15:05:23Z Giersch
-! Activation of spinup has been moved from lsm/usm_parin to parin itself
-! 
-! 2906 2018-03-19 08:56:40Z Giersch
-! ENVIRONMENT variables read/write_svf has been added 
-! 
-! 2894 2018-03-15 09:17:58Z Giersch
-! read_var_list has been renamed to rrd_global, all module related _parin 
-! routines are called before reading the global restart data to overwrite them
-! in case of restart runs
-! 
-! 2881 2018-03-13 16:24:40Z suehring
-! Added flag for switching on/off calculation of soil moisture
-! 
-! 2849 2018-03-05 10:49:33Z Giersch
-! Position of d3par namelist in parameter file is unimportant now 
-! 
-! 2826 2018-02-21 12:39:28Z Giersch
-! Bugfix in setting the default boundary conditions for nest domains
-!
-! 2817 2018-02-19 16:32:21Z knoop
-! Preliminary gust module interface implemented
-!
-! 2773 2018-01-30 14:12:54Z suehring
-! Nesting for chemical species implemented
-! 
-! 2766 2018-01-22 17:17:47Z kanani
-! Removed preprocessor directive __chem
-! 
-! 2718 2018-01-02 08:49:38Z maronga
-! Corrected "Former revisions" section
-! 
-! 2696 2017-12-14 17:12:51Z kanani
-! Change in file header (GPL part)
-! Implementation of uv exposure model (FK)
-! Added rans_mode and turbulence_closure to inipar (TG)
-! Implementation of chemistry module
-! Sorting of USE list (FK)
-! Forcing implemented, and initialization with inifor (MS)
-! 
-! 2600 2017-11-01 14:11:20Z raasch
-! some comments added and variables renamed concerning r2599
-! 
-! 2599 2017-11-01 13:18:45Z hellstea
-! The i/o grouping is updated to work correctly also in nested runs.
-! 
-! 2575 2017-10-24 09:57:58Z maronga
-! Renamed phi -> latitude, added longitude
-! 
-! 2563 2017-10-19 15:36:10Z Giersch
-! Changed position where restart files are closed.
-! 
-! 2550 2017-10-16 17:12:01Z boeske
-! Added complex_terrain
-! 
-! 2544 2017-10-13 18:09:32Z maronga
-! Moved day_of_year_init and time_utc_init to inipar.
-! 
-! 2397 2017-09-04 16:22:48Z suehring
-! Enable initialization of 3d model by user in the child domain. 
-! 
-! 2375 2017-08-29 14:10:28Z schwenkel
-! Added aerosol initialization for bulk microphysics
-! 
-! 2372 2017-08-25 12:37:32Z sward
-! y_shift added to namelist
-! 
-! 2365 2017-08-21 14:59:59Z kanani
-! Vertical grid nesting: add vnest_start_time to d3par (SadiqHuq)
-! 
-! 2339 2017-08-07 13:55:26Z gronemeier
-! corrected timestamp in header
-! 
-! 2338 2017-08-07 12:15:38Z gronemeier
-! Modularize 1D model
-! 
-! 2310 2017-07-11 09:37:02Z gronemeier
-! Bugfix: re-arranged call for error messages for ENVPAR file
-! 
-! 2304 2017-07-04 14:35:55Z suehring
-! Bugfix, enable restarts for child domain.
-! 
-! 2298 2017-06-29 09:28:18Z raasch
-! -return_addres, return_username in ENVPAR, -cross_ts_uymax, cross_ts_uymin in
-! d3par
-! 
-! 2296 2017-06-28 07:53:56Z maronga
-! Added parameters for model spinup
-! 
-! 2292 2017-06-20 09:51:42Z schwenkel
-! Implementation of new microphysic scheme: cloud_scheme = 'morrison' 
-! includes two more prognostic equations for cloud drop concentration (nc)  
-! and cloud water content (qc). 
-! 
-! 2267 2017-06-09 09:33:25Z gronemeier
-! Bugfix: removed skipping of reading namelists in case of omitted d3par
-! 
-! 2259 2017-06-08 09:09:11Z gronemeier
-! Implemented synthetic turbulence generator
-!
-! 2233 2017-05-30 18:08:54Z suehring
-! 
-! 2232 2017-05-30 17:47:52Z suehring
-! typo corrected
-! +wall_salinityflux
-! +tunnel_height, tunnel_lenght, tunnel_width_x, tunnel_width_y, 
-!  tunnel_wall_depth
-! 
-! 2118 2017-01-17 16:38:49Z raasch
-! -background_communication from inipar
-! 
-! 2050 2016-11-08 15:00:55Z gronemeier
-! Implement turbulent outflow condition
-! 
-! 2037 2016-10-26 11:15:40Z knoop
-! Anelastic approximation implemented
-! 
-! 2035 2016-10-24 15:06:17Z suehring
-! Remove check for npex and npey in nesting case
-! 
-! 2011 2016-09-19 17:29:57Z kanani
-! Added flag lsf_exception to allow explicit enabling of large scale forcing 
-! together with buildings on flat terrain.
-! 
-! 2007 2016-08-24 15:47:17Z kanani
-! Added call to urban surface model for reading of &urban_surface_par
-! 
-! 2004 2016-08-24 10:25:59Z suehring
-! Humidity and passive scalar treated separately in nesting mode
-! 
-! 2000 2016-08-20 18:09:15Z knoop
-! Forced header and separation lines into 80 columns
-! 
-! 1992 2016-08-12 15:14:59Z suehring
-! +top_scalarflux
-! 
-! 1960 2016-07-12 16:34:24Z suehring
-! Allocation of s_init
-! 
-! 1957 2016-07-07 10:43:48Z suehring
-! flight module added
-! 
-! 1955 2016-07-01 12:38:59Z hellstea
-! The parameter intializating_actions is set to 'set_constant_profiles for 
-! all nest domains in order to make sure that diagnostic variables are properly 
-! initialized for nest domains. Prognostic variables are later initialized by 
-! interpolation from the parent domain. 
-!
-! 1917 2016-05-27 14:28:12Z witha
-! Initial version of purely vertical nesting introduced.
-! 
-! 1914 2016-05-26 14:44:07Z witha
-! Added call to wind turbine model for reading of &wind_turbine_par
-!
-! 1849 2016-04-08 11:33:18Z hoffmann
-! Adapted for modularization of microphysics
-!
-! 1833 2016-04-07 14:23:03Z raasch
-! call of spectra_parin
-! 
-! 1831 2016-04-07 13:15:51Z hoffmann
-! turbulence renamed collision_turbulence, drizzle renamed
-! cloud_water_sedimentation
-! curvature_solution_effects removed
-!
-! 1826 2016-04-07 12:01:39Z maronga
-! Added call to radiation model for reading of &radiation_par.
-! Added call to plant canopy model for reading of &canopy_par.
-! 
-! 1817 2016-04-06 15:44:20Z maronga
-! Added call to land surface model for reading of &lsm_par
-! 
-! 1804 2016-04-05 16:30:18Z maronga
-! Removed code for parameter file check (__check)
-!
-! 1783 2016-03-06 18:36:17Z raasch
-! +netcdf_deflate in d3par, netcdf module and variable names changed
-!
-! 1764 2016-02-28 12:45:19Z raasch
-! cpp-statements for nesting removed, explicit settings of boundary conditions
-! in nest domains,
-! bugfix: npex/npey message moved from inipar to d3par
-! bugfix: check of lateral boundary conditions from check_parameters to here,
-! because they will be already used in init_pegrid and init_grid
-!
-! 1762 2016-02-25 12:31:13Z hellstea
-! Introduction of nested domain feature
-!
-! 1691 2015-10-26 16:17:44Z maronga
-! Added parameter most_method. Renamed prandtl_layer to constant_flux_layer.
-! 
-! 1682 2015-10-07 23:56:08Z knoop
-! Code annotations made doxygen readable 
-! 
-! 1560 2015-03-06 10:48:54Z keck
-! +recycling_yshift
-! 
-! 1496 2014-12-02 17:25:50Z maronga
-! Renamed: "radiation -> "cloud_top_radiation"
-! 
-! 1484 2014-10-21 10:53:05Z kanani
-! Changes due to new module structure of the plant canopy model:
-!   canopy-model related parameters moved to new package canopy_par in 
-!   subroutine package_parin
-! 
-! 1429 2014-07-15 12:53:45Z knoop
-! +ensemble_member_nr to prepare the random_generator for ensemble runs
-! 
-! 1402 2014-05-09 14:25:13Z raasch
-! location messages modified, progress_bar_disabled included in envpar-NAMELIST
-! 
-! 1384 2014-05-02 14:31:06Z raasch
-! location messages added
-! 
-! 1365 2014-04-22 15:03:56Z boeske
-! Usage of large scale forcing enabled:
-! +use_subsidence_tendencies
-! 
-! 1361 2014-04-16 15:17:48Z hoffmann
-! +call_microphysics_at_all_substeps
-! 
-! 1359 2014-04-11 17:15:14Z hoffmann
-! REAL constants provided with KIND-attribute 
-! 
-! 1353 2014-04-08 15:21:23Z heinze
-! REAL constants provided with KIND-attribute 
-! 
-! 1327 2014-03-21 11:00:16Z raasch
-! -data_output_format, do3d_compress, do3d_comp_prec
-!
-! 1320 2014-03-20 08:40:49Z raasch
-! ONLY-attribute added to USE-statements,
-! kind-parameters added to all INTEGER and REAL declaration statements,
-! kinds are defined in new module kinds,
-! old module precision_kind is removed,
-! revision history before 2012 removed,
-! comment fields (!:) to be used for variable explanations added to
-! all variable declaration statements
-!
-! 1318 2014-03-17 13:35:16Z raasch
-! +cpu_log_barrierwait in d3par
-!
-! 1301 2014-03-06 13:29:46Z heinze
-! +large_scale_subsidence
-!
-! 1241 2013-10-30 11:36:58Z heinze
-! +nudging
-! +large_scale_forcing
-!
-! 1216 2013-08-26 09:31:42Z raasch
-! +transpose_compute_overlap in inipar
-!
-! 1195 2013-07-01 12:27:57Z heinze
-! Bugfix: allocate ref_state
-!
-! 1179 2013-06-14 05:57:58Z raasch
-! +reference_state in inipar
-!
-! 1159 2013-05-21 11:58:22Z fricke
-! +use_cmax
-!
-! 1128 2013-04-12 06:19:32Z raasch
-! +background_communication in inipar
-!
-! 1115 2013-03-26 18:16:16Z hoffmann
-! unused variables removed
-!
-! 1092 2013-02-02 11:24:22Z raasch
-! unused variables removed
-!
-! 1065 2012-11-22 17:42:36Z hoffmann
-! +nc, c_sedimentation, limiter_sedimentation, turbulence
-! -mu_constant, mu_constant_value
-!
-! 1053 2012-11-13 17:11:03Z hoffmann
-! necessary expansions according to the two new prognostic equations (nr, qr) 
-! of the two-moment cloud physics scheme and steering parameters:
-! +*_init, *_surface, *_surface_initial_change, *_vertical_gradient, 
-! +*_vertical_gradient_level, surface_waterflux_*, 
-! +cloud_scheme, drizzle, mu_constant, mu_constant_value, ventilation_effect
-!
-! 1036 2012-10-22 13:43:42Z raasch
-! code put under GPL (PALM 3.9)
-!
-! 1015 2012-09-27 09:23:24Z raasch
-! -adjust_mixing_length
-!
-! 1003 2012-09-14 14:35:53Z raasch
-! -grid_matching
-!
-! 1001 2012-09-13 14:08:46Z raasch
-! -cut_spline_overshoot, long_filter_factor, overshoot_limit_*, ups_limit_*
-!
-! 996 2012-09-07 10:41:47Z raasch
-! -use_prior_plot1d_parameters
-!
-! 978 2012-08-09 08:28:32Z fricke
-! -km_damp_max, outflow_damping_width
-! +pt_damping_factor, pt_damping_width
-! +z0h_factor
-!
-! 964 2012-07-26 09:14:24Z raasch
-! -cross_normalized_x, cross_normalized_y, cross_xtext, z_max_do1d,
-! z_max_do1d_normalized
-!
-! 940 2012-07-09 14:31:00Z raasch
-! +neutral in inipar
-!
-! 927 2012-06-06 19:15:04Z raasch
-! +masking_method in inipar
-!
-! 824 2012-02-17 09:09:57Z raasch
-! +curvature_solution_effects in inipar
-!
-! 809 2012-01-30 13:32:58Z maronga
-! Bugfix: replaced .AND. and .NOT. with && and ! in the preprocessor directives
-!
-! 807 2012-01-25 11:53:51Z maronga
-! New cpp directive "__check" implemented which is used by check_namelist_files
-!
-! Revision 1.1  1997/07/24 11:22:50  raasch
-! Initial revision
-!
 !
 ! Description:
