PartMC 2.1.2
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

subroutine pmc_aero_state::aero_state_allocate (aero_state)
 Allocates aerosol arrays.
subroutine pmc_aero_state::aero_state_allocate_size (aero_state, n_bin, n_spec, n_source)
 Allocates aerosol arrays with the given sizes.
subroutine pmc_aero_state::aero_state_deallocate (aero_state)
 Deallocates a previously allocated aerosol.
subroutine pmc_aero_state::aero_state_copy (aero_state_from, aero_state_to)
 Copies aerosol to a destination that has already had aero_state_allocate() called on it.
integer pmc_aero_state::aero_state_total_particles (aero_state)
 Returns the total number of particles in an aerosol distribution.
integer pmc_aero_state::aero_state_total_particles_all_procs (aero_state)
 Returns the total number of particles across all processes.
subroutine pmc_aero_state::aero_state_zero (aero_state)
 Resets an aero_state to have zero particles per bin. This must already have had aero_state_allocate() called on it. This function can be called more than once on the same state.
subroutine pmc_aero_state::aero_state_add_particle (aero_state, i_bin, aero_particle)
 Add the given particle.
subroutine pmc_aero_state::aero_state_remove_particle_no_info (aero_state, i_bin, index)
 Remove the given particle without recording it.
subroutine pmc_aero_state::aero_state_remove_particle_with_info (aero_state, i_bin, index, aero_info)
 Remove the given particle and record the removal.
subroutine pmc_aero_state::aero_state_remove_particle (aero_state, i_bin, index, record_removal, aero_info)
 Remove the given particle and possibly record the removal.
subroutine pmc_aero_state::aero_state_remove_rand_particle_from_bin (aero_state, i_bin, aero_particle)
subroutine pmc_aero_state::aero_state_add (aero_state, aero_state_delta)
 aero_state += aero_state_delta, with adding the computational volumes, so the new concentration is the (volume-weighted) average of the two concentration.
subroutine pmc_aero_state::aero_state_add_particles (aero_state, aero_state_delta)
 aero_state += aero_state_delta, with the computational volume of aero_state left unchanged, so the new concentration is the sum of the two concentrations, computed with aero_statecomp_vol.
subroutine pmc_aero_state::aero_state_add_aero_dist_sample (aero_state, bin_grid, aero_data, aero_weight, aero_dist, sample_prop, create_time)
 Generates a Poisson sample of an aero_dist, adding to aero_state. The sampled amount is sample_prop * aero_statecomp_vol.
subroutine pmc_aero_state::aero_state_rand_particle (aero_state, i_bin, i_part)
 Choose a random particle from the aero_state.
subroutine pmc_aero_state::aero_state_sample (aero_state_from, aero_state_to, 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 comp_vol set).
subroutine pmc_aero_state::aero_state_to_binned (bin_grid, aero_data, aero_weight, aero_state, aero_binned)
 Create the bin number and mass arrays from aero_statev.
subroutine pmc_aero_state::aero_state_to_binned_dry (bin_grid, aero_data, aero_weight, aero_state, aero_binned)
 Does the same thing as aero_state_to_bin() but based on dry radius.
subroutine pmc_aero_state::aero_state_double (aero_state)
 Doubles number of particles.
subroutine pmc_aero_state::aero_state_halve (aero_state, bin_grid)
 Remove approximately half of the particles in each bin.
subroutine pmc_aero_state::aero_state_resort (bin_grid, aero_state)
 Takes an aero_state_t where the particles might no longer be in the correct bins and resorts it so that every particle is in the correct bin.
subroutine pmc_aero_state::aero_state_mix (aero_state, del_t, mix_timescale, aero_data, bin_grid)
 Mix the aero_states between all processes. Currently uses a simple all-to-all diffusion.
subroutine pmc_aero_state::send_aero_state_mix (dest_proc, aero_state)
 Send the given aero_state to the destination process for mixing.
subroutine pmc_aero_state::recv_aero_state_mix (aero_state)
 Receive exactly one aero_state for mixing and add it on to the given aero_state.
subroutine pmc_aero_state::aero_state_check (bin_grid, aero_data, aero_state)
 Check that all particles are in the correct bins and that the bin numbers and masses are correct. This is for debugging only.
subroutine pmc_aero_state::aero_state_bin_average_comp (aero_state, bin_grid, aero_data, aero_weight, dry_volume)
 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.
subroutine pmc_aero_state::aero_state_bin_average_size (aero_state, bin_grid, aero_data, aero_weight, dry_volume, 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.
subroutine pmc_aero_state::aero_state_make_dry (aero_state, bin_grid, aero_data)
 Make all particles dry (water set to zero).
integer pmc_aero_state::pmc_mpi_pack_size_aero_state (val)
 Determines the number of bytes required to pack the given value.
subroutine pmc_aero_state::pmc_mpi_pack_aero_state (buffer, position, val)
 Packs the given value into the buffer, advancing position.
subroutine pmc_aero_state::pmc_mpi_unpack_aero_state (buffer, position, val)
 Unpacks the given value from the buffer, advancing position.
subroutine pmc_aero_state::aero_state_mpi_gather (aero_state, aero_state_total)
 Gathers data from all processes into one aero_state on process 0.
subroutine pmc_aero_state::aero_state_mpi_scatter (aero_state_total, aero_state, aero_data)
 Scatters data from process 0 to all processes by assigning each particle to a random process.
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.
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.
subroutine pmc_aero_state::aero_state_output_netcdf (aero_state, ncid, bin_grid, aero_data, aero_weight, record_removals, record_optical)
 Write full state.
subroutine pmc_aero_state::aero_state_input_netcdf (aero_state, ncid, bin_grid, aero_data, aero_weight)
 Read full state.

Variables

integer, parameter pmc_aero_state::AERO_STATE_TAG_MIX = 4987
 MPI tag for mixing particles between processes.
integer, parameter pmc_aero_state::AERO_STATE_TAG_GATHER = 4988
 MPI tag for gathering between processes.
integer, parameter pmc_aero_state::AERO_STATE_TAG_SCATTER = 4989
 MPI tag for scattering between processes.

Detailed Description

The pmc_aero_state module.

Definition in file aero_state.F90.