The aero_dist_t structure and associated subroutines. More...
Classes | |
struct | aero_mode_t |
An aerosol size distribution mode. More... | |
struct | aero_dist_t |
A complete aerosol distribution con. More... | |
Functions | |
subroutine | aero_mode_alloc (aero_mode, n_bin, n_spec) |
Allocates an aero_mode. | |
subroutine | aero_mode_free (aero_mode) |
Free all storage. | |
subroutine | aero_mode_copy (aero_mode_from, aero_mode_to) |
Copy an aero_mode. | |
subroutine | aero_mode_add (aero_mode, aero_mode_delta) |
aero_mode += aero_mode_delta | |
subroutine | aero_mode_scale (aero_mode, alpha) |
Scale an aero_mode. | |
subroutine | aero_dist_alloc (aero_dist, n_mode, n_bin, n_spec) |
Allocates an aero_dist. | |
subroutine | aero_dist_free (aero_dist) |
Free all storage. | |
subroutine | aero_dist_copy (aero_dist_from, aero_dist_to) |
Copy an aero_dist. | |
subroutine | aero_dist_add (aero_dist, aero_dist_delta) |
aero_dist += aero_dist_delta | |
subroutine | aero_dist_scale (aero_dist, alpha) |
aero_dist *= alpha | |
real *8 | aero_dist_total_num_den (bin_grid, aero_dist) |
Returns the total number concentration in #/m^3 of a distribution. (#/m^3). | |
subroutine | num_den_log_normal (mean_radius, log_sigma, bin_grid, num_den) |
Compute a log-normal distribution, normalized so that sum(num_den(k) * dlnr) = 1. | |
subroutine | num_den_exp (mean_radius, bin_grid, num_den) |
Exponential distribution in volume n(v) = 1 / mean_vol * exp(- v / mean_vol) Normalized so that sum(num_den(k) * dlnr) = 1. | |
subroutine | num_den_mono (radius, bin_grid, num_den) |
Mono-disperse distribution. Normalized so that sum(num_den(k) * dlnr) = 1. | |
subroutine | aero_dist_interp_1d (aero_dist_list, time_list, rate_list, time, aero_dist, rate) |
Determine the current aero_dist and rate by interpolating at the current time with the lists of aero_dists and rates. | |
subroutine | inout_write_aero_mode (file, aero_mode) |
Write full state. | |
subroutine | inout_write_aero_dist (file, aero_dist) |
Write full state. | |
subroutine | inout_read_aero_mode (file, aero_mode) |
Read full state. | |
subroutine | inout_read_aero_dist (file, aero_dist) |
Read full state. | |
subroutine | spec_read_vol_frac (file, aero_data, vol_frac) |
Read volume fractions from a data file. | |
subroutine | spec_read_aero_mode_shape (file, aero_data, bin_grid, num_den) |
Read the shape (number density) of one mode of an aerosol distribution. | |
subroutine | spec_read_aero_mode (file, aero_data, bin_grid, aero_mode) |
Read one mode of an aerosol distribution (number density and volume fractions). | |
subroutine | spec_read_aero_dist (file, aero_data, bin_grid, aero_dist) |
Read continuous aerosol distribution composed of several modes. | |
subroutine | spec_read_aero_dist_filename (file, aero_data, bin_grid, name, dist) |
Read aerosol distribution from filename on line in file. | |
subroutine | spec_read_aero_dists_times_rates (file, aero_data, bin_grid, name, times, rates, aero_dists) |
Read an array of aero_dists with associated times and rates from the given file. | |
subroutine | aero_mode_average (aero_mode_vec, aero_mode_avg) |
Computes the average of an array of aero_mode. | |
subroutine | aero_dist_average (aero_dist_vec, aero_dist_avg) |
Computes the average of an array of aero_dist. | |
integer | pmc_mpi_pack_size_aero_mode (val) |
Determines the number of bytes required to pack the given value. | |
integer | pmc_mpi_pack_size_aero_dist (val) |
Determines the number of bytes required to pack the given value. | |
subroutine | pmc_mpi_pack_aero_mode (buffer, position, val) |
Packs the given value into the buffer, advancing position. | |
subroutine | pmc_mpi_pack_aero_dist (buffer, position, val) |
Packs the given value into the buffer, advancing position. | |
subroutine | pmc_mpi_unpack_aero_mode (buffer, position, val) |
Unpacks the given value from the buffer, advancing position. | |
subroutine | pmc_mpi_unpack_aero_dist (buffer, position, val) |
Unpacks the given value from the buffer, advancing position. |
The aero_dist_t structure and associated subroutines.
The initial size distributions are computed as number densities, so they can be used for both sectional and particle-resolved simulations. The routine dist_to_n() converts a number density distribution to an actual number of particles ready for a particle-resolved simulation.
Initial distributions should be normalized so that sum(n_den) = 1/dlnr
.
subroutine pmc_aero_dist::aero_dist_add | ( | type(aero_dist_t),intent(inout) | aero_dist, | |
type(aero_dist_t),intent(in) | aero_dist_delta | |||
) |
aero_dist += aero_dist_delta
aero_dist | Aero_dist. | |
aero_dist_delta | Increment. |
subroutine pmc_aero_dist::aero_dist_alloc | ( | type(aero_dist_t),intent(out) | aero_dist, | |
integer,intent(in) | n_mode, | |||
integer,intent(in) | n_bin, | |||
integer,intent(in) | n_spec | |||
) |
Allocates an aero_dist.
aero_dist | Aerosol distribution. | |
n_mode | Number of modes. | |
n_bin | Number of bins. | |
n_spec | Number of species. |
subroutine pmc_aero_dist::aero_dist_average | ( | type(aero_dist_t),dimension(:),intent(in) | aero_dist_vec, | |
type(aero_dist_t),intent(out) | aero_dist_avg | |||
) |
Computes the average of an array of aero_dist.
aero_dist_vec | Array of aero_dist. | |
aero_dist_avg | Avg of aero_dist_vec. |
subroutine pmc_aero_dist::aero_dist_copy | ( | type(aero_dist_t),intent(in) | aero_dist_from, | |
type(aero_dist_t),intent(inout) | aero_dist_to | |||
) |
Copy an aero_dist.
aero_dist_from | Aero_dist original. | |
aero_dist_to | Aero_dist copy. |
subroutine pmc_aero_dist::aero_dist_free | ( | type(aero_dist_t),intent(inout) | aero_dist | ) |
Free all storage.
aero_dist | Aerosol distribution. |
subroutine pmc_aero_dist::aero_dist_interp_1d | ( | type(aero_dist_t),dimension(:),intent(in) | aero_dist_list, | |
real*8,dimension(size(aero_dist_list),intent(in) | time_list, | |||
real*8,dimension(size(aero_dist_list),intent(in) | rate_list, | |||
real*8,intent(in) | time, | |||
type(aero_dist_t),intent(inout) | aero_dist, | |||
real*8,intent(out) | rate | |||
) |
Determine the current aero_dist and rate by interpolating at the current time with the lists of aero_dists and rates.
aero_dist_list | Gas states. | |
time_list | Times (s). | |
rate_list | Rates (s^{-1}). | |
time | Current time (s). | |
aero_dist | Current gas state. | |
rate | Current rate (s^{-1}). |
subroutine pmc_aero_dist::aero_dist_scale | ( | type(aero_dist_t),intent(inout) | aero_dist, | |
real*8,intent(in) | alpha | |||
) |
aero_dist *= alpha
aero_dist | Aero_dist. | |
alpha | Scale factor. |
real*8 pmc_aero_dist::aero_dist_total_num_den | ( | type(bin_grid_t),intent(in) | bin_grid, | |
type(aero_dist_t),intent(in) | aero_dist | |||
) |
Returns the total number concentration in #/m^3 of a distribution. (#/m^3).
bin_grid | Bin grid. | |
aero_dist | Aerosol distribution. |
subroutine pmc_aero_dist::aero_mode_add | ( | type(aero_mode_t),intent(inout) | aero_mode, | |
type(aero_mode_t),intent(in) | aero_mode_delta | |||
) |
aero_mode += aero_mode_delta
aero_mode | Aerosol mode. | |
aero_mode_delta | Increment. |
subroutine pmc_aero_dist::aero_mode_alloc | ( | type(aero_mode_t),intent(out) | aero_mode, | |
integer,intent(in) | n_bin, | |||
integer,intent(in) | n_spec | |||
) |
Allocates an aero_mode.
aero_mode | Aerosol mode. | |
n_bin | Number of bins. | |
n_spec | Number of species. |
subroutine pmc_aero_dist::aero_mode_average | ( | type(aero_mode_t),dimension(:),intent(in) | aero_mode_vec, | |
type(aero_mode_t),intent(out) | aero_mode_avg | |||
) |
Computes the average of an array of aero_mode.
aero_mode_vec | Array of aero_mode. | |
aero_mode_avg | Avg of aero_mode_vec. |
subroutine pmc_aero_dist::aero_mode_copy | ( | type(aero_mode_t),intent(in) | aero_mode_from, | |
type(aero_mode_t),intent(inout) | aero_mode_to | |||
) |
Copy an aero_mode.
aero_mode_from | Aerosol mode original. | |
aero_mode_to | Aerosol mode copy. |
subroutine pmc_aero_dist::aero_mode_free | ( | type(aero_mode_t),intent(inout) | aero_mode | ) |
Free all storage.
aero_mode | Aerosol mode. |
subroutine pmc_aero_dist::aero_mode_scale | ( | type(aero_mode_t),intent(inout) | aero_mode, | |
real*8,intent(in) | alpha | |||
) |
Scale an aero_mode.
aero_mode | Aerosol mode. | |
alpha | Scale factor. |
subroutine pmc_aero_dist::inout_read_aero_dist | ( | type(inout_file_t),intent(inout) | file, | |
type(aero_dist_t),intent(out) | aero_dist | |||
) |
Read full state.
file | File to read from. | |
aero_dist | Aero_dist to read. |
subroutine pmc_aero_dist::inout_read_aero_mode | ( | type(inout_file_t),intent(inout) | file, | |
type(aero_mode_t),intent(out) | aero_mode | |||
) |
Read full state.
file | File to read from. | |
aero_mode | Aero_mode to read. |
subroutine pmc_aero_dist::inout_write_aero_dist | ( | type(inout_file_t),intent(inout) | file, | |
type(aero_dist_t),intent(in) | aero_dist | |||
) |
Write full state.
file | File to write to. | |
aero_dist | Aero_dist to write. |
subroutine pmc_aero_dist::inout_write_aero_mode | ( | type(inout_file_t),intent(inout) | file, | |
type(aero_mode_t),intent(in) | aero_mode | |||
) |
Write full state.
file | File to write to. | |
aero_mode | Aero_mode to write. |
subroutine pmc_aero_dist::num_den_exp | ( | real*8,intent(in) | mean_radius, | |
type(bin_grid_t),intent(in) | bin_grid, | |||
real*8,dimension(bin_grid%n_bin),intent(out) | num_den | |||
) |
Exponential distribution in volume n(v) = 1 / mean_vol * exp(- v / mean_vol) Normalized so that sum(num_den(k) * dlnr) = 1.
mean_radius | Mean radius (m). | |
bin_grid | Bin grid. | |
num_den | Num den (#(ln(r))d(ln(r))). |
subroutine pmc_aero_dist::num_den_log_normal | ( | real*8,intent(in) | mean_radius, | |
real*8,intent(in) | log_sigma, | |||
type(bin_grid_t),intent(in) | bin_grid, | |||
real*8,dimension(bin_grid%n_bin),intent(out) | num_den | |||
) |
Compute a log-normal distribution, normalized so that sum(num_den(k) * dlnr) = 1.
mean_radius | Geometric mean radius (m). | |
log_sigma | log_10(geom. std dev) (1). | |
bin_grid | Bin grid. | |
num_den | Normalized number density (#(ln(r))d(ln(r))). |
subroutine pmc_aero_dist::num_den_mono | ( | real*8,intent(in) | radius, | |
type(bin_grid_t),intent(in) | bin_grid, | |||
real*8,dimension(bin_grid%n_bin),intent(out) | num_den | |||
) |
Mono-disperse distribution. Normalized so that sum(num_den(k) * dlnr) = 1.
radius | Radius of each particle (m^3). | |
bin_grid | Bin grid. | |
num_den | Num den (#(ln(r))d(ln(r))). |
subroutine pmc_aero_dist::pmc_mpi_pack_aero_dist | ( | character,dimension(:),intent(inout) | buffer, | |
integer,intent(inout) | position, | |||
type(aero_dist_t),intent(in) | val | |||
) |
Packs the given value into the buffer, advancing position.
buffer | Memory buffer. | |
position | Current buffer position. | |
val | Value to pack. |
subroutine pmc_aero_dist::pmc_mpi_pack_aero_mode | ( | character,dimension(:),intent(inout) | buffer, | |
integer,intent(inout) | position, | |||
type(aero_mode_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_dist::pmc_mpi_pack_size_aero_dist | ( | type(aero_dist_t),intent(in) | val | ) |
Determines the number of bytes required to pack the given value.
val | Value to pack. |
integer pmc_aero_dist::pmc_mpi_pack_size_aero_mode | ( | type(aero_mode_t),intent(in) | val | ) |
Determines the number of bytes required to pack the given value.
val | Value to pack. |
subroutine pmc_aero_dist::pmc_mpi_unpack_aero_dist | ( | character,dimension(:),intent(inout) | buffer, | |
integer,intent(inout) | position, | |||
type(aero_dist_t),intent(out) | val | |||
) |
Unpacks the given value from the buffer, advancing position.
buffer | Memory buffer. | |
position | Current buffer position. | |
val | Value to pack. |
subroutine pmc_aero_dist::pmc_mpi_unpack_aero_mode | ( | character,dimension(:),intent(inout) | buffer, | |
integer,intent(inout) | position, | |||
type(aero_mode_t),intent(out) | val | |||
) |
Unpacks the given value from the buffer, advancing position.
buffer | Memory buffer. | |
position | Current buffer position. | |
val | Value to pack. |
subroutine pmc_aero_dist::spec_read_aero_dist | ( | type(inout_file_t),intent(inout) | file, | |
type(aero_data_t),intent(in) | aero_data, | |||
type(bin_grid_t),intent(in) | bin_grid, | |||
type(aero_dist_t),intent(inout) | aero_dist | |||
) |
Read continuous aerosol distribution composed of several modes.
file | Inout file. | |
aero_data | Aero_data data. | |
bin_grid | Bin grid. | |
aero_dist | Aerosol dist,. |
subroutine pmc_aero_dist::spec_read_aero_dist_filename | ( | type(inout_file_t),intent(inout) | file, | |
type(aero_data_t),intent(in) | aero_data, | |||
type(bin_grid_t),intent(in) | bin_grid, | |||
character(len=*),intent(in) | name, | |||
type(aero_dist_t),intent(inout) | dist | |||
) |
Read aerosol distribution from filename on line in file.
file | Inout file. | |
aero_data | Aero_data data. | |
bin_grid | Bin grid. | |
name | Name of data line for filename. | |
dist | Aerosol distribution. |
subroutine pmc_aero_dist::spec_read_aero_dists_times_rates | ( | type(inout_file_t),intent(inout) | file, | |
type(aero_data_t),intent(in) | aero_data, | |||
type(bin_grid_t),intent(in) | bin_grid, | |||
character(len=*),intent(in) | name, | |||
real*8,dimension(:),pointer | times, | |||
real*8,dimension(:),pointer | rates, | |||
type(aero_dist_t),dimension(:),pointer | aero_dists | |||
) |
Read an array of aero_dists with associated times and rates from the given file.
file | Inout file. | |
aero_data | Aero data. | |
bin_grid | Bin grid. | |
name | Name of data line for filename. | |
times | Times (s). | |
rates | Rates (s^{-1}). | |
aero_dists | Aero dists. |
subroutine pmc_aero_dist::spec_read_aero_mode | ( | type(inout_file_t),intent(inout) | file, | |
type(aero_data_t),intent(in) | aero_data, | |||
type(bin_grid_t),intent(in) | bin_grid, | |||
type(aero_mode_t),intent(inout) | aero_mode | |||
) |
Read one mode of an aerosol distribution (number density and volume fractions).
file | Inout file. | |
aero_data | Aero_data data. | |
bin_grid | Bin grid. | |
aero_mode | Aerosol mode (will be allocated). |
subroutine pmc_aero_dist::spec_read_aero_mode_shape | ( | type(inout_file_t),intent(inout) | file, | |
type(aero_data_t),intent(in) | aero_data, | |||
type(bin_grid_t),intent(in) | bin_grid, | |||
real*8,dimension(bin_grid%n_bin) | num_den | |||
) |
Read the shape (number density) of one mode of an aerosol distribution.
file | Inout file. | |
aero_data | Aero_data data. | |
bin_grid | Bin grid. | |
num_den | Mode density. |
subroutine pmc_aero_dist::spec_read_vol_frac | ( | type(inout_file_t),intent(inout) | file, | |
type(aero_data_t),intent(in) | aero_data, | |||
real*8,dimension(:),intent(out) | vol_frac | |||
) |
Read volume fractions from a data file.
file | Inout file. | |
aero_data | Aero_data data. | |
vol_frac | Aerosol species volume fractions. |