!> @file package_parin.f90 !--------------------------------------------------------------------------------! ! This file is part of PALM. ! ! PALM is free software: you can redistribute it and/or modify it under the terms ! of the GNU General Public License as published by the Free Software Foundation, ! either version 3 of the License, or (at your option) any later version. ! ! PALM is distributed in the hope that it will be useful, but WITHOUT ANY ! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR ! A PARTICULAR PURPOSE. See the GNU General Public License for more details. ! ! You should have received a copy of the GNU General Public License along with ! PALM. If not, see . ! ! Copyright 1997-2014 Leibniz Universitaet Hannover !--------------------------------------------------------------------------------! ! ! Current revisions: ! ----------------- ! ! ! Former revisions: ! ----------------- ! $Id: package_parin.f90 1683 2015-10-07 23:57:51Z knoop $ ! ! 1682 2015-10-07 23:56:08Z knoop ! Code annotations made doxygen readable ! ! 1585 2015-04-30 07:05:52Z maronga ! Added several radiation_par parameters ! ! 1575 2015-03-27 09:56:27Z raasch ! +seed_follows_topography in particles_par ! ! 1553 2015-03-03 17:33:54Z maronga ! Resorting of lsm_par ! ! 1551 2015-03-03 14:18:16Z maronga ! Several changes in the liste for land surface model and radiation model ! ! 1496 2014-12-02 17:25:50Z maronga ! Added support for the land surface model and radiation scheme ! ! 1484 2014-10-21 10:53:05Z kanani ! Changes due to new module structure of the plant canopy model: ! module plant_canopy_model_mod added, ! new package/namelist canopy_par added, i.e. the canopy model is no longer ! steered over the inipar-namelist, ! drag_coefficient, leaf_surface_concentration and scalar_exchange_coefficient ! renamed to canopy_drag_coeff, leaf_surface_conc and leaf_scalar_exch_coeff. ! Changed statement tags in CONTINUE-statement ! ! 1367 2014-04-23 15:18:30Z witha ! Bugfix: module kinds must be used ! ! 1359 2014-04-11 17:15:14Z hoffmann ! +alloc_factor, + min_nr_particle ! -dt_sort_particles, -maximum_number_of_particles ! ! 1340 2014-03-25 19:45:13Z kanani ! REAL constants defined as wp-kinds ! ! 1324 2014-03-21 09:13:16Z suehring ! Bugfix: Missing variable dt_data_output output added to ONLY statement ! ! 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 ! ! 1036 2012-10-22 13:43:42Z raasch ! code put under GPL (PALM 3.9) ! ! 828 2012-02-21 12:00:36Z raasch ! +dissipation_classes, radius_classes in parpar ! ! 825 2012-02-19 03:03:44Z raasch ! wang_collision_kernel and turbulence_effects_on_collision in particles_par ! replaced by collision_kernel ! ! Revision 1.1 2000/12/28 13:21:57 raasch ! Initial revision ! ! ! Description: ! ------------ !> This subroutine reads from the NAMELIST file variables controling model !> software packages which are used optionally in the run. !------------------------------------------------------------------------------! SUBROUTINE package_parin USE control_parameters, & ONLY: averaging_interval_sp, dt_data_output, dt_dopts, dt_dosp, & dt_dvrp, particle_maximum_age, skip_time_dosp, & threshold USE dvrp_variables, & ONLY: clip_dvrp_l, clip_dvrp_n, clip_dvrp_r, clip_dvrp_s, & cluster_size, color_interval, dvrpsize_interval, & dvrp_directory, dvrp_file, dvrp_host, dvrp_output, & dvrp_password, dvrp_username, groundplate_color, & isosurface_color, mode_dvrp, particle_color, & particle_dvrpsize, pathlines_fadeintime, & pathlines_fadeouttime, pathlines_linecount, & pathlines_maxhistory, pathlines_wavecount, & pathlines_wavetime, slicer_range_limits_dvrp, superelevation, & superelevation_x, superelevation_y, topography_color, & vc_alpha, vc_gradient_normals, vc_mode, vc_size_x, vc_size_y, & vc_size_z USE land_surface_model_mod, & ONLY: alpha_vangenuchten, c_surface, canopy_resistance_coefficient, & conserve_water_content, dewfall, f_shortwave_incoming, & hydraulic_conductivity, lambda_surface_stable, & lambda_surface_unstable, & leaf_area_index, land_surface, l_vangenuchten, & min_canopy_resistance, min_soil_resistance, field_capacity, & residual_moisture, saturation_moisture, wilting_point, & n_vangenuchten, root_fraction, soil_moisture, soil_temperature, & soil_type, vegetation_coverage, veg_type, z0_eb, z0h_eb, zs USE kinds USE particle_attributes, & ONLY: alloc_factor, bc_par_b, bc_par_lr, bc_par_ns, bc_par_t, & collision_kernel, density_ratio, dissipation_classes, & dt_min_part, dt_prel, dt_write_particle_data, dvrp_psize, & end_time_prel, initial_weighting_factor, & maximum_number_of_tailpoints, & maximum_tailpoint_age, minimum_tailpoint_distance, & min_nr_particle, number_of_particle_groups, particles_per_point,& particle_advection, particle_advection_start, pdx, pdy, pdz, & psb, psl, psn, psr, pss, pst, radius, radius_classes, & random_start_position, read_particles_from_restartfile, & seed_follows_topography, skip_particles_for_tail, & use_particle_tails, use_sgs_for_particles, & vertical_particle_advection, write_particle_statistics USE plant_canopy_model_mod, & ONLY: alpha_lad, beta_lad, calc_beta_lad_profile, canopy_drag_coeff, & canopy_mode, cthf, lad_surface, & lad_vertical_gradient, lad_vertical_gradient_level, lai_beta, & leaf_scalar_exch_coeff, leaf_surface_conc, pch_index, & plant_canopy USE radiation_model_mod, & ONLY: albedo, albedo_type, albedo_lw_dif, albedo_lw_dir, albedo_sw_dif,& albedo_sw_dir, day_init, constant_albedo, dt_radiation, lambda, & lw_radiation, net_radiation, radiation, radiation_scheme, & sw_radiation, time_utc_init USE spectrum, & ONLY: comp_spectra_level, data_output_sp, plot_spectra_level, & spectra_direction IMPLICIT NONE CHARACTER (LEN=80) :: line !< NAMELIST /canopy_par/ alpha_lad, beta_lad, canopy_drag_coeff, & canopy_mode, cthf, & lad_surface, & lad_vertical_gradient, & lad_vertical_gradient_level, & lai_beta, & leaf_scalar_exch_coeff, & leaf_surface_conc, pch_index NAMELIST /dvrp_graphics_par/ clip_dvrp_l, clip_dvrp_n, clip_dvrp_r, & clip_dvrp_s, cluster_size, color_interval, & dt_dvrp, dvrpsize_interval, dvrp_directory, & dvrp_file, dvrp_host, dvrp_output, & dvrp_password, dvrp_psize, dvrp_username, & groundplate_color, isosurface_color, & mode_dvrp, particle_color, particle_dvrpsize,& pathlines_fadeintime, pathlines_fadeouttime, & pathlines_linecount, pathlines_maxhistory, & pathlines_wavecount, pathlines_wavetime, & slicer_range_limits_dvrp, superelevation, & superelevation_x, superelevation_y, & threshold, topography_color, vc_alpha, & vc_gradient_normals, vc_mode, vc_size_x, & vc_size_y, vc_size_z NAMELIST /lsm_par/ alpha_vangenuchten, c_surface, & canopy_resistance_coefficient, & conserve_water_content, dewfall, & f_shortwave_incoming, field_capacity, & hydraulic_conductivity, & lambda_surface_stable, & lambda_surface_unstable, leaf_area_index, & l_vangenuchten, min_canopy_resistance, & min_soil_resistance, n_vangenuchten, & residual_moisture, root_fraction, & saturation_moisture, soil_moisture, & soil_temperature, soil_type, & vegetation_coverage, veg_type, wilting_point,& zs, z0_eb, z0h_eb NAMELIST /particles_par/ alloc_factor, bc_par_b, bc_par_lr, & bc_par_ns, bc_par_t, collision_kernel, & density_ratio, dissipation_classes, dt_dopts,& dt_min_part, dt_prel, & dt_write_particle_data, & end_time_prel, initial_weighting_factor, & maximum_number_of_tailpoints, & maximum_tailpoint_age, & minimum_tailpoint_distance, & min_nr_particle, & number_of_particle_groups, & particles_per_point, & particle_advection_start, & particle_maximum_age, pdx, pdy, pdz, psb, & psl, psn, psr, pss, pst, radius, & radius_classes, random_start_position, & read_particles_from_restartfile, & seed_follows_topography, & skip_particles_for_tail, & use_particle_tails, use_sgs_for_particles, & vertical_particle_advection, & write_particle_statistics NAMELIST /radiation_par/ albedo, albedo_type, albedo_lw_dir, & albedo_lw_dif, albedo_sw_dir, albedo_sw_dif, & constant_albedo, day_init, dt_radiation, & lambda, lw_radiation, net_radiation, & radiation_scheme, sw_radiation, time_utc_init NAMELIST /spectra_par/ averaging_interval_sp, comp_spectra_level, & data_output_sp, dt_dosp, plot_spectra_level, & skip_time_dosp, spectra_direction ! !-- Position the namelist-file at the beginning (it was already opened in !-- parin), search for the namelist-group of the package and position the !-- file at this line. Do the same for each optionally used package. line = ' ' ! !-- Try to find canopy package REWIND ( 11 ) line = ' ' DO WHILE ( INDEX( line, '&canopy_par' ) == 0 ) READ ( 11, '(A)', END=10 ) line ENDDO BACKSPACE ( 11 ) ! !-- Read user-defined namelist READ ( 11, canopy_par ) ! !-- Set flag that indicates that canopy model is switched on plant_canopy = .TRUE. ! !-- Set flag that indicates that the lad-profile shall be calculated by using !-- a beta probability density function IF ( alpha_lad /= 9999999.9_wp .AND. beta_lad /= 9999999.9_wp ) & calc_beta_lad_profile = .TRUE. 10 CONTINUE #if defined( __dvrp_graphics ) REWIND ( 11 ) line = ' ' DO WHILE ( INDEX( line, '&dvrp_graphics_par' ) == 0 ) READ ( 11, '(A)', END=20 ) line ENDDO BACKSPACE ( 11 ) ! !-- Read user-defined namelist READ ( 11, dvrp_graphics_par ) 20 CONTINUE #endif ! !-- Try to find particles package REWIND ( 11 ) line = ' ' DO WHILE ( INDEX( line, '&particles_par' ) == 0 ) READ ( 11, '(A)', END=30 ) line ENDDO BACKSPACE ( 11 ) ! !-- Read user-defined namelist READ ( 11, particles_par ) ! !-- Set flag that indicates that particles are switched on particle_advection = .TRUE. 30 CONTINUE #if defined( __spectra ) REWIND ( 11 ) line = ' ' DO WHILE ( INDEX( line, '&spectra_par' ) == 0 ) READ ( 11, '(A)', END=40 ) line ENDDO BACKSPACE ( 11 ) ! !-- Read user-defined namelist READ ( 11, spectra_par ) ! !-- Default setting of dt_dosp here (instead of check_parameters), because its !-- current value is needed in init_pegrid IF ( dt_dosp == 9999999.9_wp ) dt_dosp = dt_data_output 40 CONTINUE #endif ! !-- Try to find land surface model package REWIND ( 11 ) line = ' ' DO WHILE ( INDEX( line, '&lsm_par' ) == 0 ) READ ( 11, '(A)', END=50 ) line ENDDO BACKSPACE ( 11 ) ! !-- Read user-defined namelist READ ( 11, lsm_par ) ! !-- Set flag that indicates that the land surface model is switched on land_surface = .TRUE. 50 CONTINUE ! !-- Try to find radiation package REWIND ( 11 ) line = ' ' DO WHILE ( INDEX( line, '&radiation_par' ) == 0 ) READ ( 11, '(A)', END=51 ) line ENDDO BACKSPACE ( 11 ) ! !-- Read user-defined namelist READ ( 11, radiation_par ) ! !-- Set flag that indicates that the radiation scheme is switched on radiation = .TRUE. 51 CONTINUE END SUBROUTINE package_parin