Classes | |
struct | aero_state_t |
The current collection of aerosol particles. More... | |
Functions | |
subroutine | aero_state_allocate (aero_state) |
Allocates aerosol arrays. | |
subroutine | aero_state_allocate_size (aero_state, n_bin, n_spec) |
Allocates aerosol arrays with the given sizes. | |
subroutine | aero_state_deallocate (aero_state) |
Deallocates a previously allocated aerosol. | |
subroutine | 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 | aero_state_total_particles (aero_state) |
Returns the total number of particles in an aerosol distribution. | |
subroutine | 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 | aero_state_add_particle (aero_state, i_bin, aero_particle) |
Add the given particle. | |
subroutine | aero_state_remove_particle (aero_state, i_bin, index, record_removal, aero_info) |
Remove the given particle. | |
subroutine | aero_state_add (aero_state, aero_state_delta) |
aero_state += aero_state_delta | |
subroutine | aero_state_add_aero_dist_sample (aero_state, bin_grid, aero_data, 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 | aero_state_rand_particle (aero_state, i_bin, i_part) |
Choose a random particle from the aero_state. | |
subroutine | aero_state_sample (aero_state_from, aero_state_to, sample_prop, removal_action) |
Generates a Poisson 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 | aero_state_sample_rough (aero_state_from, aero_state_to, sample_prop, removal_action) |
Generates a rough bin-wise 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 | aero_state_add_particles (aero_state, aero_state_delta) |
Adds aero_state_delta particles to aero_state. The number of particles added depends on the computational volume ratio, so either more or less particles might be added than are actually in aero_state_delta. | |
subroutine | aero_state_to_binned (bin_grid, aero_data, aero_state, aero_binned) |
Create the bin number and mass arrays from aero_statev. | |
subroutine | 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. | |
subroutine | aero_state_double (aero_state) |
Doubles number of particles. | |
subroutine | aero_state_halve (aero_state, bin_grid) |
Remove approximately half of the particles in each bin. | |
subroutine | 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 | aero_state_mix_to (aero_state, mix_rate, dest, aero_data, bin_grid) |
Send a sample to the given process, and receive exactly one sample from an unspecified source. | |
subroutine | aero_state_mix (aero_state, mix_rate, aero_data, bin_grid) |
Mix the aero_states between all processes. Currently uses a simple periodic-1D diffusion. | |
subroutine | 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. | |
integer | pmc_mpi_pack_size_aero_state (val) |
Determines the number of bytes required to pack the given value. | |
subroutine | pmc_mpi_pack_aero_state (buffer, position, val) |
Packs the given value into the buffer, advancing position. | |
subroutine | pmc_mpi_unpack_aero_state (buffer, position, val) |
Unpacks the given value from the buffer, advancing position. | |
subroutine | 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 | 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 | aero_state_output_netcdf (aero_state, ncid, bin_grid, aero_data, record_removals) |
Write full state. | |
subroutine | aero_state_input_netcdf (aero_state, ncid, bin_grid, aero_data) |
Read full state. |
subroutine pmc_aero_state::aero_state_add | ( | type(aero_state_t),intent(inout) | aero_state, | |
type(aero_state_t),intent(in) | aero_state_delta | |||
) |
aero_state += aero_state_delta
aero_state | Aerosol state. |
aero_state_delta | Increment. |
subroutine pmc_aero_state::aero_state_add_aero_dist_sample | ( | type(aero_state_t),intent(inout) | aero_state, | |
type(bin_grid_t),intent(in) | bin_grid, | |||
type(aero_data_t),intent(in) | aero_data, | |||
type(aero_dist_t),intent(in) | aero_dist, | |||
real*8,intent(in) | sample_prop, | |||
real*8,intent(in) | create_time | |||
) |
Generates a Poisson sample of an aero_dist, adding to aero_state. The sampled amount is sample_prop * aero_statecomp_vol.
aero_state | Aero state to add to. |
bin_grid | Bin grid. |
aero_data | Aero data values. |
aero_dist | Distribution to sample. |
sample_prop | Volume fraction to sample (1). |
create_time | Creation time for new particles (s). |
subroutine pmc_aero_state::aero_state_add_particle | ( | type(aero_state_t),intent(inout) | aero_state, | |
integer,intent(in) | i_bin, | |||
type(aero_particle_t),intent(in) | aero_particle | |||
) |
Add the given particle.
aero_state | Aerosol state. |
i_bin | Bin number of particle to add. |
aero_particle | Particle to add. |
subroutine pmc_aero_state::aero_state_add_particles | ( | type(aero_state_t),intent(inout) | aero_state, | |
type(aero_state_t),intent(in) | aero_state_delta | |||
) |
Adds aero_state_delta particles to aero_state. The number of particles added depends on the computational volume ratio, so either more or less particles might be added than are actually in aero_state_delta.
aero_state | Base state. |
aero_state_delta | State to add. |
subroutine pmc_aero_state::aero_state_allocate | ( | type(aero_state_t),intent(inout) | aero_state | ) |
Allocates aerosol arrays.
aero_state | Aerosol to initialize. |
subroutine pmc_aero_state::aero_state_allocate_size | ( | type(aero_state_t),intent(inout) | aero_state, | |
integer,intent(in) | n_bin, | |||
integer,intent(in) | n_spec | |||
) |
Allocates aerosol arrays with the given sizes.
aero_state | Aerosol to initialize. |
n_bin | Number of bins. |
n_spec | Number of species. |
subroutine pmc_aero_state::aero_state_check | ( | type(bin_grid_t),intent(in) | bin_grid, | |
type(aero_data_t),intent(in) | aero_data, | |||
type(aero_state_t),intent(inout) | 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.
bin_grid | Bin_grid. |
aero_data | Aerosol data. |
aero_state | Aerosol state. |
subroutine pmc_aero_state::aero_state_copy | ( | type(aero_state_t),intent(in) | aero_state_from, | |
type(aero_state_t),intent(inout) | aero_state_to | |||
) |
Copies aerosol to a destination that has already had aero_state_allocate() called on it.
aero_state_from | Reference aerosol. |
aero_state_to | Already allocated. |
subroutine pmc_aero_state::aero_state_deallocate | ( | type(aero_state_t),intent(inout) | aero_state | ) |
Deallocates a previously allocated aerosol.
aero_state | Aerosol to initialize. |
subroutine pmc_aero_state::aero_state_double | ( | type(aero_state_t),intent(inout) | aero_state | ) |
Doubles number of particles.
aero_state | Aerosol state. |
subroutine pmc_aero_state::aero_state_halve | ( | type(aero_state_t),intent(inout) | aero_state, | |
type(bin_grid_t),intent(in) | bin_grid | |||
) |
Remove approximately half of the particles in each bin.
aero_state | Aerosol state. |
bin_grid | Bin grid. |
subroutine pmc_aero_state::aero_state_input_netcdf | ( | type(aero_state_t),intent(inout) | aero_state, | |
integer,intent(in) | ncid, | |||
type(bin_grid_t),intent(in) | bin_grid, | |||
type(aero_data_t),intent(in) | aero_data | |||
) |
Read full state.
aero_state | aero_state to read. |
ncid | NetCDF file ID, in data mode. |
bin_grid | bin_grid structure. |
aero_data | aero_data structure. |
subroutine pmc_aero_state::aero_state_mix | ( | type(aero_state_t),intent(inout) | aero_state, | |
real*8,intent(in) | mix_rate, | |||
type(aero_data_t),intent(in) | aero_data, | |||
type(bin_grid_t),intent(in) | bin_grid | |||
) |
Mix the aero_states between all processes. Currently uses a simple periodic-1D diffusion.
aero_state | Aerosol state. |
mix_rate | Mixing rate (0 to 1). |
aero_data | Aero data values. |
bin_grid | Bin grid. |
subroutine pmc_aero_state::aero_state_mix_to | ( | type(aero_state_t),intent(inout) | aero_state, | |
real*8,intent(in) | mix_rate, | |||
integer,intent(in) | dest, | |||
type(aero_data_t),intent(in) | aero_data, | |||
type(bin_grid_t),intent(in) | bin_grid | |||
) |
Send a sample to the given process, and receive exactly one sample from an unspecified source.
aero_state | Aerosol state. |
mix_rate | Mixing rate (0 to 1). |
dest | Process to send to. |
aero_data | Aero data values. |
bin_grid | Bin grid. |
subroutine pmc_aero_state::aero_state_netcdf_dim_aero_particle | ( | type(aero_state_t),intent(in) | aero_state, | |
integer,intent(in) | ncid, | |||
integer,intent(out) | 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.
aero_state | aero_state structure. |
ncid | NetCDF file ID, in data mode. |
dimid_aero_particle | Dimid of the aero particle dimension. |
subroutine pmc_aero_state::aero_state_netcdf_dim_aero_removed | ( | type(aero_state_t),intent(in) | aero_state, | |
integer,intent(in) | ncid, | |||
integer,intent(out) | 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.
aero_state | aero_state structure. |
ncid | NetCDF file ID, in data mode. |
dimid_aero_removed | Dimid of the aero removed dimension. |
subroutine pmc_aero_state::aero_state_output_netcdf | ( | type(aero_state_t),intent(in) | aero_state, | |
integer,intent(in) | ncid, | |||
type(bin_grid_t),intent(in) | bin_grid, | |||
type(aero_data_t),intent(in) | aero_data, | |||
logical,intent(in) | record_removals | |||
) |
Write full state.
aero_state | aero_state to write. |
ncid | NetCDF file ID, in data mode. |
bin_grid | bin_grid structure. |
aero_data | aero_data structure. |
record_removals | Whether to output particle removal info. |
subroutine pmc_aero_state::aero_state_rand_particle | ( | type(aero_state_t),intent(in) | aero_state, | |
integer,intent(out) | i_bin, | |||
integer,intent(out) | i_part | |||
) |
Choose a random particle from the aero_state.
aero_state | Original state. |
i_bin | Bin number of particle. |
i_part | Particle number within bin. |
subroutine pmc_aero_state::aero_state_remove_particle | ( | type(aero_state_t),intent(inout) | aero_state, | |
integer,intent(in) | i_bin, | |||
integer,intent(in) | index, | |||
logical,intent(in) | record_removal, | |||
type(aero_info_t),intent(in) | aero_info | |||
) |
Remove the given particle.
aero_state | Aerosol state. |
i_bin | Bin number of particle to remove. |
index | Index in bin of particle to remove. |
record_removal | Whether to record the removal in the aero_info_array. |
aero_info | Removal info. |
subroutine pmc_aero_state::aero_state_resort | ( | type(bin_grid_t),intent(in) | bin_grid, | |
type(aero_state_t),intent(inout) | 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.
bin_grid | Bin_grid. |
aero_state | Aerosol state. |
subroutine pmc_aero_state::aero_state_sample | ( | type(aero_state_t),intent(inout) | aero_state_from, | |
type(aero_state_t),intent(inout) | aero_state_to, | |||
real*8,intent(in) | sample_prop, | |||
integer,intent(in) | removal_action | |||
) |
Generates a Poisson 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).
aero_state_from | Original state. |
aero_state_to | Destination state. |
sample_prop | Proportion to sample. |
removal_action | Action for removal (see pmc_aero_info module for action parameters). Set to AERO_INFO_NONE to not log removal. |
subroutine pmc_aero_state::aero_state_sample_rough | ( | type(aero_state_t),intent(inout) | aero_state_from, | |
type(aero_state_t),intent(inout) | aero_state_to, | |||
real*8,intent(in) | sample_prop, | |||
integer,intent(in) | removal_action | |||
) |
Generates a rough bin-wise 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).
aero_state_from | Original state. |
aero_state_to | Destination state. |
sample_prop | Proportion to sample. |
removal_action | Action for removal (see pmc_aero_info module for action parameters). Set to AERO_INFO_NONE to not log removal. |
subroutine pmc_aero_state::aero_state_to_binned | ( | type(bin_grid_t),intent(in) | bin_grid, | |
type(aero_data_t),intent(in) | aero_data, | |||
type(aero_state_t),intent(in) | aero_state, | |||
type(aero_binned_t),intent(out) | aero_binned | |||
) |
Create the bin number and mass arrays from aero_statev.
bin_grid | Bin grid. |
aero_data | Aerosol data. |
aero_state | Aerosol state. |
aero_binned | Binned distributions. |
subroutine pmc_aero_state::aero_state_to_binned_dry | ( | type(bin_grid_t),intent(in) | bin_grid, | |
type(aero_data_t),intent(in) | aero_data, | |||
type(aero_state_t),intent(in) | aero_state, | |||
type(aero_binned_t),intent(out) | aero_binned | |||
) |
Does the same thing as aero_state_to_bin() but based on dry radius.
bin_grid | Bin grid. |
aero_data | Aerosol data. |
aero_state | Aerosol state. |
aero_binned | Binned distributions. |
integer pmc_aero_state::aero_state_total_particles | ( | type(aero_state_t),intent(in) | aero_state | ) |
Returns the total number of particles in an aerosol distribution.
aero_state | Aerosol state. |
subroutine pmc_aero_state::aero_state_zero | ( | type(aero_state_t),intent(inout) | 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.
aero_state | State to zero. |
subroutine pmc_aero_state::pmc_mpi_pack_aero_state | ( | character,dimension(:),intent(inout) | buffer, | |
integer,intent(inout) | position, | |||
type(aero_state_t),intent(in) | val | |||
) |
Packs the given value into the buffer, advancing position.
buffer | Memory buffer. |
position | Current buffer position. |
val | Value to pack. |
integer pmc_aero_state::pmc_mpi_pack_size_aero_state | ( | type(aero_state_t),intent(in) | val | ) |
Determines the number of bytes required to pack the given value.
val | Value to pack. |
subroutine pmc_aero_state::pmc_mpi_unpack_aero_state | ( | character,dimension(:),intent(inout) | buffer, | |
integer,intent(inout) | position, | |||
type(aero_state_t),intent(out) | val | |||
) |
Unpacks the given value from the buffer, advancing position.
buffer | Memory buffer. |
position | Current buffer position. |
val | Value to pack. |