PartMC  2.6.1
Data Types | Modules | Functions/Subroutines | Variables
scenario.F90 File Reference

The pmc_scenario module. More...

Go to the source code of this file.

Data Types

type  pmc_scenario::scenario_t
 Scenario data. More...
 

Modules

module  pmc_scenario
 The scenario_t structure and associated subroutines.
 

Functions/Subroutines

subroutine pmc_scenario::scenario_init_env_state (scenario, env_state, time)
 Initialize the time-dependent contents of the environment. Thereafter scenario_update_env_state() should be used. More...
 
subroutine pmc_scenario::scenario_update_env_state (scenario, env_state, time)
 Update time-dependent contents of the environment. scenario_init_env_state() should have been called at the start. More...
 
subroutine pmc_scenario::scenario_update_gas_state (scenario, delta_t, env_state, old_env_state, gas_data, gas_state)
 Do gas emissions and background dilution. More...
 
subroutine pmc_scenario::scenario_update_aero_state (scenario, delta_t, env_state, old_env_state, aero_data, aero_state, n_emit, n_dil_in, n_dil_out, allow_doubling, allow_halving)
 Do emissions and background dilution for a particle aerosol distribution. More...
 
subroutine pmc_scenario::scenario_update_aero_binned (scenario, delta_t, env_state, old_env_state, bin_grid, aero_data, aero_binned)
 Do emissions and background dilution from the environment for a binned aerosol distribution. More...
 
real(kind=dp) function pmc_scenario::scenario_loss_rate (scenario, vol, density, aero_data, env_state)
 Evaluate a loss rate function. More...
 
real(kind=dp) function pmc_scenario::scenario_loss_rate_dry_dep (vol, density, aero_data, env_state)
 Compute and return the dry deposition rate for a given particle. All equations used here are written in detail in the file doc/deposition/deposition.tex. More...
 
real(kind=dp) function pmc_scenario::scenario_loss_rate_max (scenario, vol, aero_data, env_state)
 Compute and return the max loss rate function for a given volume. More...
 
subroutine pmc_scenario::scenario_loss_rate_bin_max (scenario, bin_grid, aero_data, env_state, loss_max)
 Compute an upper bound on the maximum kernel value for each bin. Value over_scale is multiplied to the maximum sampled value to get the upper bound. A tighter bound may be reached if over_scale is smaller, but that also risks falling below a kernel value. More...
 
subroutine pmc_scenario::scenario_particle_loss (scenario, delta_t, aero_data, aero_state, env_state)
 Performs stochastic particle loss for one time-step. If a particle i_part has a scenario_loss_rate() value of rate, then the probability p will be removed by this function is 1 - exp(-delta_t*rate). Uses an accept-reject algorithm for efficiency, in which a particle is first sampled with rate 1 - exp(-delta_t*over_rate) and then accepted with rate (1 - exp(-delta_t*rate))/(1 - exp(-delta_t*over_rate)). More...
 
subroutine pmc_scenario::scenario_try_single_particle_loss (scenario, delta_t, aero_data, aero_state, env_state, i_part, over_prob)
 Test a candidate particle to see if it should be removed, and remove if necessary. Particle is removed with probability (1d0 - exp(-delta_t*rate))/over_prob, where rate is the loss function evaluated for the given particle. More...
 
elemental logical function pmc_scenario::scenario_contains_aero_mode_type (scenario, aero_mode_type)
 Whether any of the contained aerosol modes are of the given type. More...
 
integer function pmc_scenario::pmc_mpi_pack_size_scenario (val)
 Determines the number of bytes required to pack the given value. More...
 
subroutine pmc_scenario::pmc_mpi_pack_scenario (buffer, position, val)
 Packs the given value into the buffer, advancing position. More...
 
subroutine pmc_scenario::pmc_mpi_unpack_scenario (buffer, position, val)
 Unpacks the given value from the buffer, advancing position. More...
 

Variables

integer, parameter pmc_scenario::scenario_loss_function_invalid = 0
 Type code for an undefined or invalid loss function. More...
 
integer, parameter pmc_scenario::scenario_loss_function_none = 1
 Type code for a zero loss function. More...
 
integer, parameter pmc_scenario::scenario_loss_function_constant = 2
 Type code for a constant loss function. More...
 
integer, parameter pmc_scenario::scenario_loss_function_volume = 3
 Type code for a loss rate function proportional to particle volume. More...
 
integer, parameter pmc_scenario::scenario_loss_function_drydep = 4
 Type code for a loss rate function based on dry deposition. More...
 
integer, parameter pmc_scenario::scenario_loss_function_chamber = 5
 Type code for a loss rate function for chamber experiments. More...
 
real(kind=dp), parameter pmc_scenario::scenario_loss_alg_threshold = 1.0d0
 Parameter to switch between algorithms for particle loss. A value of 0 will always use the naive algorithm, and a value of 1 will always use the accept-reject algorithm. More...
 

Detailed Description

The pmc_scenario module.

Definition in file scenario.F90.