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

The pmc_aero_state module. More...

Go to the source code of this file.

Data Types

type  pmc_aero_state::aero_state_t
 The current collection of aerosol particles. More...
 

Modules

module  pmc_aero_state
 The aero_state_t structure and assocated subroutines.
 

Functions/Subroutines

elemental integer function pmc_aero_state::aero_state_n_part (aero_state)
 Return the current number of particles. More...
 
subroutine pmc_aero_state::aero_state_copy_weight (aero_state_from, aero_state_to)
 Copies weighting information for an aero_state. More...
 
subroutine pmc_aero_state::aero_state_set_weight (aero_state, aero_data, weight_type, exponent)
 Sets the weighting functions for an aero_state. More...
 
subroutine pmc_aero_state::aero_state_set_n_part_ideal (aero_state, n_part)
 Set the ideal number of particles to the given value. The aero_state%awa must be already set correctly. More...
 
integer function pmc_aero_state::aero_state_weight_class_for_source (aero_state, source)
 Determine the appropriate weight class for a source. More...
 
integer function pmc_aero_state::aero_state_total_particles (aero_state, i_group, i_class)
 Returns the total number of particles in an aerosol distribution. More...
 
integer function pmc_aero_state::aero_state_total_particles_all_procs (aero_state, i_group, i_class)
 Returns the total number of particles across all processes. More...
 
subroutine pmc_aero_state::aero_state_zero (aero_state)
 Resets an aero_state to have zero particles per bin. More...
 
subroutine pmc_aero_state::aero_state_add_particle (aero_state, aero_particle, aero_data, allow_resort)
 Add the given particle. More...
 
subroutine pmc_aero_state::aero_state_remove_particle_no_info (aero_state, i_part)
 Remove the given particle without recording it. More...
 
subroutine pmc_aero_state::aero_state_remove_particle_with_info (aero_state, i_part, aero_info)
 Remove the given particle and record the removal. More...
 
subroutine pmc_aero_state::aero_state_remove_particle (aero_state, i_part, record_removal, aero_info)
 Remove the given particle and possibly record the removal. More...
 
subroutine pmc_aero_state::aero_state_remove_rand_particle_from_bin (aero_state, i_bin, i_class, aero_particle)
 Remove a randomly chosen particle from the given bin and return it. More...
 
subroutine pmc_aero_state::aero_state_dup_particle (aero_state, aero_data, i_part, n_part_mean, random_weight_group)
 Add copies or remove a particle, with a given mean number of resulting particles. More...
 
real(kind=dp) function pmc_aero_state::aero_state_particle_num_conc (aero_state, aero_particle, aero_data)
 The number concentration of a single particle (m^{-3}). More...
 
subroutine pmc_aero_state::aero_state_num_conc_for_reweight (aero_state, aero_data, reweight_num_conc)
 Save the correct number concentrations for later use by aero_state_reweight(). More...
 
subroutine pmc_aero_state::aero_state_reweight (aero_state, aero_data, reweight_num_conc)
 Reweight all particles after their constituent volumes have been altered. More...
 
subroutine pmc_aero_state::aero_state_add (aero_state, aero_state_delta, aero_data)
 aero_state += aero_state_delta, including combining the weights, so the new concentration is the weighted average of the two concentrations. More...
 
subroutine pmc_aero_state::aero_state_add_particles (aero_state, aero_state_delta, aero_data)
 aero_state += aero_state_delta, with the weight of aero_state left unchanged, so the new concentration is the sum of the two concentrations, computed with aero_state%awa. More...
 
subroutine pmc_aero_state::aero_state_prepare_weight_for_add (aero_state, aero_data, i_group, i_class, n_add, allow_doubling, allow_halving)
 Change the weight if necessary to ensure that the addition of about n_add computational particles will give the correct final particle number. More...
 
subroutine pmc_aero_state::aero_state_add_aero_dist_sample (aero_state, aero_data, aero_dist, sample_prop, create_time, allow_doubling, allow_halving, n_part_add)
 Generates a Poisson sample of an aero_dist, adding to aero_state, with the given sample proportion. More...
 
subroutine pmc_aero_state::aero_state_rand_particle (aero_state, i_part)
 Choose a random particle from the aero_state. More...
 
subroutine pmc_aero_state::aero_state_sample_particles (aero_state_from, aero_state_to, aero_data, sample_prob, removal_action)
 Generates a random sample by removing particles from aero_state_from and adding them to aero_state_to, which must be already allocated (and should have its weight set). More...
 
subroutine pmc_aero_state::aero_state_sample (aero_state_from, aero_state_to, aero_data, sample_prob, removal_action)
 Generates a random sample by removing particles from aero_state_from and adding them to aero_state_to, transfering weight as well. This is the equivalent of aero_state_add(). More...
 
subroutine pmc_aero_state::aero_state_to_binned (bin_grid, aero_data, aero_state, aero_binned)
 Create binned number and mass arrays. More...
 
integer function, dimension(aero_state_n_part(aero_state)) pmc_aero_state::aero_state_ids (aero_state)
 Returns the IDs of all particles. More...
 
real(kind=dp) function, dimension(aero_state_n_part(aero_state)) pmc_aero_state::aero_state_diameters (aero_state, aero_data, include, exclude)
 Returns the diameters of all particles. More...
 
real(kind=dp) function, dimension(aero_state_n_part(aero_state)) pmc_aero_state::aero_state_dry_diameters (aero_state, aero_data)
 Returns the dry diameters of all particles. More...
 
real(kind=dp) function, dimension( aero_state_n_part(aero_state)) pmc_aero_state::aero_state_mobility_diameters (aero_state, aero_data, env_state)
 Returns the mobility diameters of all particles. More...
 
real(kind=dp) function, dimension(aero_state_n_part(aero_state)) pmc_aero_state::aero_state_volumes (aero_state, aero_data, include, exclude)
 Returns the volumes of all particles. More...
 
real(kind=dp) function, dimension(aero_state_n_part(aero_state)) pmc_aero_state::aero_state_masses (aero_state, aero_data, include, exclude)
 Returns the masses of all particles. More...
 
real(kind=dp) function, dimension(aero_state_n_part(aero_state)) pmc_aero_state::aero_state_num_concs (aero_state, aero_data)
 Returns the number concentrations of all particles. More...
 
real(kind=dp) function pmc_aero_state::aero_state_total_num_conc (aero_state, aero_data)
 Returns the total number concentration. More...
 
real(kind=dp) function, dimension(aero_state_n_part(aero_state)) pmc_aero_state::aero_state_mass_entropies (aero_state, aero_data, include, exclude, group, groups)
 Returns the mass-entropies of all particles. More...
 
subroutine pmc_aero_state::aero_state_mixing_state_metrics (aero_state, aero_data, d_alpha, d_gamma, chi, include, exclude, group, groups)
 Returns the mixing state metrics of the population. More...
 
real(kind=dp) function, dimension(aero_state_n_part(aero_state)) pmc_aero_state::aero_state_approx_crit_rel_humids (aero_state, aero_data, env_state)
 Returns the approximate critical relative humidity for all particles (1). More...
 
real(kind=dp) function, dimension(aero_state_n_part(aero_state)) pmc_aero_state::aero_state_crit_rel_humids (aero_state, aero_data, env_state)
 Returns the critical relative humidity for all particles (1). More...
 
subroutine pmc_aero_state::aero_state_to_binned_dry (bin_grid, aero_data, aero_state, aero_binned)
 Does the same thing as aero_state_to_bin() but based on dry radius. More...
 
subroutine pmc_aero_state::aero_state_double (aero_state, aero_data, i_group, i_class)
 Doubles number of particles in the given weight group. More...
 
subroutine pmc_aero_state::aero_state_halve (aero_state, i_group, i_class)
 Remove approximately half of the particles in the given weight group. More...
 
subroutine pmc_aero_state::aero_state_rebalance (aero_state, aero_data, allow_doubling, allow_halving, initial_state_warning)
 Double or halve the particle population in each weight group to maintain close to n_part_ideal particles per process, allocated equally amongst the weight groups. More...
 
subroutine pmc_aero_state::aero_state_scale_weight (aero_state, aero_data, i_group, i_class, weight_ratio, allow_doubling, allow_halving)
 Scale the weighting of the given group/class by the given ratio, altering particle number as necessary to preserve the number concentration. More...
 
subroutine pmc_aero_state::aero_state_mix (aero_state, del_t, mix_timescale, aero_data, specify_prob_transfer)
 Mix the aero_states between all processes. Currently uses a simple all-to-all diffusion. More...
 
subroutine pmc_aero_state::aero_state_mpi_alltoall (send, recv)
 Do an MPI all-to-all transfer of aerosol states. More...
 
subroutine pmc_aero_state::aero_state_bin_average_comp (aero_state, bin_grid, aero_data)
 Set each aerosol particle to have its original total volume, but species volume ratios given by the total species volume ratio within each bin. This preserves the (weighted) total species volume per bin as well as per-particle total volumes. More...
 
subroutine pmc_aero_state::aero_state_bin_average_size (aero_state, bin_grid, aero_data, bin_center, preserve_number)
 Set each aerosol particle to have its original species ratios, but total volume given by the average volume of all particles within each bin. More...
 
subroutine pmc_aero_state::aero_state_make_dry (aero_state, aero_data)
 Make all particles dry (water set to zero). More...
 
integer function pmc_aero_state::pmc_mpi_pack_size_aero_state (val)
 Determines the number of bytes required to pack the given value. More...
 
subroutine pmc_aero_state::pmc_mpi_pack_aero_state (buffer, position, val)
 Packs the given value into the buffer, advancing position. More...
 
subroutine pmc_aero_state::pmc_mpi_unpack_aero_state (buffer, position, val)
 Unpacks the given value from the buffer, advancing position. More...
 
subroutine pmc_aero_state::aero_state_mpi_gather (aero_state, aero_state_total, aero_data)
 Gathers data from all processes into one aero_state on process 0. More...
 
subroutine pmc_aero_state::aero_state_netcdf_dim_aero_particle (aero_state, ncid, dimid_aero_particle)
 Write the aero particle dimension to the given NetCDF file if it is not already present and in any case return the associated dimid. More...
 
subroutine pmc_aero_state::aero_state_netcdf_dim_aero_removed (aero_state, ncid, dimid_aero_removed)
 Write the aero removed dimension to the given NetCDF file if it is not already present and in any case return the associated dimid. More...
 
subroutine pmc_aero_state::aero_state_input_netcdf (aero_state, ncid, aero_data)
 Read full state. More...
 
subroutine pmc_aero_state::aero_state_sort (aero_state, aero_data, bin_grid, all_procs_same)
 Sorts the particles if necessary. More...
 
subroutine pmc_aero_state::aero_state_check (aero_state, aero_data)
 Check that aerosol state data is consistent. More...
 
subroutine pmc_aero_state::aero_state_initialize (aero_state, aero_data, camp_core)
 Initialize the aero_state_t variable with camp chem data. More...
 

Variables

integer, parameter pmc_aero_state::aero_state_tag_mix = 4987
 MPI tag for mixing particles between processes. More...
 
integer, parameter pmc_aero_state::aero_state_tag_gather = 4988
 MPI tag for gathering between processes. More...
 
integer, parameter pmc_aero_state::aero_state_tag_scatter = 4989
 MPI tag for scattering between processes. More...
 
integer, parameter pmc_aero_state::aero_state_weight_none = 1
 Single flat weighting scheme. More...
 
integer, parameter pmc_aero_state::aero_state_weight_flat = 2
 Single flat weighting scheme. More...
 
integer, parameter pmc_aero_state::aero_state_weight_power = 3
 Power-law weighting scheme. More...
 
integer, parameter pmc_aero_state::aero_state_weight_nummass = 4
 Coupled number/mass weighting scheme. More...
 
integer, parameter pmc_aero_state::aero_state_weight_flat_source = 5
 Flat weighting by source. More...
 
integer, parameter pmc_aero_state::aero_state_weight_power_source = 6
 Power-law weighting by source. More...
 
integer, parameter pmc_aero_state::aero_state_weight_nummass_source = 7
 Coupled number/mass weighting by source. More...
 

Detailed Description

The pmc_aero_state module.

Definition in file aero_state.F90.