PartMC  2.6.1
Data Types | Functions/Subroutines | Variables
pmc_aero_mode Module Reference

The aero_mode_t structure and associated subroutines. More...

Data Types

type  aero_mode_t
 An aerosol size distribution mode. More...
 

Functions/Subroutines

character(len=aero_mode_type_len) function aero_mode_type_to_string (type)
 Return a string representation of a kernel type. More...
 
real(kind=dp) function aero_mode_total_num_conc (aero_mode)
 Returns the total number concentration of a mode. (#/m^3) More...
 
subroutine num_conc_log_normal (total_num_conc, geom_mean_radius, log10_sigma_g, bin_grid, num_conc)
 Compute a log-normal distribution. More...
 
subroutine vol_conc_log_normal (total_num_conc, geom_mean_radius, log10_sigma_g, bin_grid, aero_data, vol_conc)
 Compute a log-normal distribution in volume. More...
 
subroutine num_conc_exp (total_num_conc, radius_at_mean_vol, bin_grid, aero_data, num_conc)
 Exponential distribution in volume. More...
 
subroutine vol_conc_exp (total_num_conc, radius_at_mean_vol, bin_grid, aero_data, vol_conc)
 Exponential distribution in volume. More...
 
subroutine num_conc_mono (total_num_conc, radius, bin_grid, num_conc)
 Mono-disperse distribution. Normalized so that sum(num_conc(k) * log_width) = 1. More...
 
subroutine vol_conc_mono (total_num_conc, radius, bin_grid, aero_data, vol_conc)
 Mono-disperse distribution in volume. More...
 
subroutine num_conc_sampled (sample_radius, sample_num_conc, bin_grid, num_conc)
 Sampled distribution, not normalized. More...
 
subroutine vol_conc_sampled (sample_radius, sample_num_conc, bin_grid, aero_data, vol_conc)
 Sampled distribution in volume. More...
 
subroutine aero_mode_num_conc (aero_mode, bin_grid, aero_data, num_conc)
 Return the binned number concentration for an aero_mode. More...
 
subroutine aero_mode_vol_conc (aero_mode, bin_grid, aero_data, vol_conc)
 Return the binned per-species volume concentration for an aero_mode. More...
 
subroutine aero_mode_weighted_sampled_num_conc (aero_mode, aero_weight, weighted_num_conc)
 Compute weighted sampled number concentrations. More...
 
real(kind=dp) function aero_mode_number (aero_mode, aero_weight)
 Return the total number of computational particles for an aero_mode. More...
 
subroutine aero_mode_sample_radius (aero_mode, aero_data, aero_weight, radius)
 Return a radius randomly sampled from the mode distribution. More...
 
subroutine aero_mode_sample_vols (aero_mode, total_vol, vols)
 Return an array of volumes randomly sampled from the volume fractions. More...
 
integer function pmc_mpi_pack_size_aero_mode (val)
 Determines the number of bytes required to pack the given value. More...
 
subroutine pmc_mpi_pack_aero_mode (buffer, position, val)
 Packs the given value into the buffer, advancing position. More...
 
subroutine pmc_mpi_unpack_aero_mode (buffer, position, val)
 Unpacks the given value from the buffer, advancing position. More...
 

Variables

integer, parameter aero_mode_name_len = 300
 Maximum length of a mode name. More...
 
integer, parameter aero_mode_type_len = 20
 Maximum length of a mode type. More...
 
integer, parameter aero_mode_type_invalid = 0
 Type code for an undefined or invalid mode. More...
 
integer, parameter aero_mode_type_log_normal = 1
 Type code for a log-normal mode. More...
 
integer, parameter aero_mode_type_exp = 2
 Type code for an exponential mode. More...
 
integer, parameter aero_mode_type_mono = 3
 Type code for a mono-disperse mode. More...
 
integer, parameter aero_mode_type_sampled = 4
 Type code for a sampled mode. More...
 
integer, parameter aero_mode_diam_type_invalid = 0
 Type code for an undefined for invalid diameter type. More...
 
integer, parameter aero_mode_diam_type_geometric = 1
 Type code for geometric diameter. More...
 
integer, parameter aero_mode_diam_type_mobility = 2
 Type code for mobility equivalent diameter. More...
 

Detailed Description

The aero_mode_t structure and associated subroutines.

Function/Subroutine Documentation

◆ aero_mode_num_conc()

subroutine pmc_aero_mode::aero_mode_num_conc ( type(aero_mode_t), intent(in)  aero_mode,
type(bin_grid_t), intent(in)  bin_grid,
type(aero_data_t), intent(in)  aero_data,
real(kind=dp), dimension(bin_grid_size(bin_grid)), intent(out)  num_conc 
)

Return the binned number concentration for an aero_mode.

Parameters
[in]aero_modeAero mode for which to compute number concentration.
[in]bin_gridBin grid.
[in]aero_dataAerosol data.
[out]num_concNumber concentration (#(ln(r))d(ln(r))).

Definition at line 376 of file aero_mode.F90.

◆ aero_mode_number()

real(kind=dp) function pmc_aero_mode::aero_mode_number ( type(aero_mode_t), intent(in)  aero_mode,
type(aero_weight_t), intent(in)  aero_weight 
)

Return the total number of computational particles for an aero_mode.

Parameters
[in]aero_modeAero_mode to sample radius from.
[in]aero_weightAero weight.

Definition at line 494 of file aero_mode.F90.

◆ aero_mode_sample_radius()

subroutine pmc_aero_mode::aero_mode_sample_radius ( type(aero_mode_t), intent(in)  aero_mode,
type(aero_data_t), intent(in)  aero_data,
type(aero_weight_t), intent(in)  aero_weight,
real(kind=dp), intent(out)  radius 
)

Return a radius randomly sampled from the mode distribution.

Parameters
[in]aero_modeAero_mode to sample radius from.
[in]aero_dataAerosol data.
[in]aero_weightAero weight.
[out]radiusSampled radius (m).

Definition at line 547 of file aero_mode.F90.

◆ aero_mode_sample_vols()

subroutine pmc_aero_mode::aero_mode_sample_vols ( type(aero_mode_t), intent(in)  aero_mode,
real(kind=dp), intent(in)  total_vol,
real(kind=dp), dimension(size(aero_mode%vol_frac)), intent(out)  vols 
)

Return an array of volumes randomly sampled from the volume fractions.

Parameters
[in]aero_modeAero_mode to sample from.
[in]total_volTotal volume (m^3).
[out]volsSampled volumes (m^3).

Definition at line 629 of file aero_mode.F90.

◆ aero_mode_total_num_conc()

real(kind=dp) function pmc_aero_mode::aero_mode_total_num_conc ( type(aero_mode_t), intent(in)  aero_mode)

Returns the total number concentration of a mode. (#/m^3)

Parameters
[in]aero_modeAerosol mode.

Definition at line 107 of file aero_mode.F90.

◆ aero_mode_type_to_string()

character(len=aero_mode_type_len) function pmc_aero_mode::aero_mode_type_to_string ( integer, intent(in)  type)

Return a string representation of a kernel type.

Parameters
[in]typeAero mode type.

Definition at line 83 of file aero_mode.F90.

◆ aero_mode_vol_conc()

subroutine pmc_aero_mode::aero_mode_vol_conc ( type(aero_mode_t), intent(in)  aero_mode,
type(bin_grid_t), intent(in)  bin_grid,
type(aero_data_t), intent(in)  aero_data,
real(kind=dp), dimension(bin_grid_size(bin_grid), aero_data_n_spec(aero_data)), intent(out)  vol_conc 
)

Return the binned per-species volume concentration for an aero_mode.

Parameters
[in]aero_modeAero mode for which to compute volume concentration.
[in]bin_gridBin grid.
[in]aero_dataAerosol data.
[out]vol_concVolume concentration (V(ln(r))d(ln(r))).

Definition at line 411 of file aero_mode.F90.

◆ aero_mode_weighted_sampled_num_conc()

subroutine pmc_aero_mode::aero_mode_weighted_sampled_num_conc ( type(aero_mode_t), intent(in)  aero_mode,
type(aero_weight_t), intent(in)  aero_weight,
real(kind=dp), dimension(:), intent(out)  weighted_num_conc 
)

Compute weighted sampled number concentrations.

Parameters
[in]aero_modeAerosol mode.
[in]aero_weightAerosol weight.
[out]weighted_num_concWeighted number concentration

Definition at line 456 of file aero_mode.F90.

◆ num_conc_exp()

subroutine pmc_aero_mode::num_conc_exp ( real(kind=dp), intent(in)  total_num_conc,
real(kind=dp), intent(in)  radius_at_mean_vol,
type(bin_grid_t), intent(in)  bin_grid,
type(aero_data_t), intent(in)  aero_data,
real(kind=dp), dimension(bin_grid_size(bin_grid)), intent(out)  num_conc 
)

Exponential distribution in volume.

\[ n(v) = \frac{1}{\rm mean-vol} \exp(- v / {\rm mean-vol}) \]

Normalized so that sum(num_conc(k) * log_width) = 1

Parameters
[in]total_num_concTotal number concentration of the mode (m^{-3}).
[in]radius_at_mean_volRadius at mean volume (m).
[in]bin_gridBin grid.
[in]aero_dataAerosol data.
[out]num_concNumber concentration (#(ln(r))d(ln(r))).

Definition at line 194 of file aero_mode.F90.

◆ num_conc_log_normal()

subroutine pmc_aero_mode::num_conc_log_normal ( real(kind=dp), intent(in)  total_num_conc,
real(kind=dp), intent(in)  geom_mean_radius,
real(kind=dp), intent(in)  log10_sigma_g,
type(bin_grid_t), intent(in)  bin_grid,
real(kind=dp), dimension(bin_grid_size(bin_grid)), intent(out)  num_conc 
)

Compute a log-normal distribution.

Parameters
[in]total_num_concTotal number concentration of the mode (m^{-3}).
[in]geom_mean_radiusGeometric mean radius (m).
[in]log10_sigma_glog_10(geom. std. dev.) (1).
[in]bin_gridBin grid.
[out]num_concNumber concentration (#(ln(r))d(ln(r))).

Definition at line 129 of file aero_mode.F90.

◆ num_conc_mono()

subroutine pmc_aero_mode::num_conc_mono ( real(kind=dp), intent(in)  total_num_conc,
real(kind=dp), intent(in)  radius,
type(bin_grid_t), intent(in)  bin_grid,
real(kind=dp), dimension(bin_grid_size(bin_grid)), intent(out)  num_conc 
)

Mono-disperse distribution. Normalized so that sum(num_conc(k) * log_width) = 1.

Parameters
[in]total_num_concTotal number concentration of the mode (m^{-3}).
[in]radiusRadius of each particle (m^3).
[in]bin_gridBin grid.
[out]num_concNumber concentration (#(ln(r))d(ln(r))).

Definition at line 250 of file aero_mode.F90.

◆ num_conc_sampled()

subroutine pmc_aero_mode::num_conc_sampled ( real(kind=dp), dimension(:), intent(in)  sample_radius,
real(kind=dp), dimension(:), intent(in)  sample_num_conc,
type(bin_grid_t), intent(in)  bin_grid,
real(kind=dp), dimension(bin_grid_size(bin_grid)), intent(out)  num_conc 
)

Sampled distribution, not normalized.

Parameters
[in]sample_radiusSampled radius bin edges (m).
[in]sample_num_concSampled number concentrations (m^{-3}).
[in]bin_gridBin grid.
[out]num_concNumber concentration (#(ln(r))d(ln(r))).

Definition at line 306 of file aero_mode.F90.

◆ pmc_mpi_pack_aero_mode()

subroutine pmc_aero_mode::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.

Parameters
[in,out]bufferMemory buffer.
[in,out]positionCurrent buffer position.
[in]valValue to pack.

Definition at line 1123 of file aero_mode.F90.

◆ pmc_mpi_pack_size_aero_mode()

integer function pmc_aero_mode::pmc_mpi_pack_size_aero_mode ( type(aero_mode_t), intent(in)  val)

Determines the number of bytes required to pack the given value.

Parameters
[in]valValue to pack.

Definition at line 1101 of file aero_mode.F90.

◆ pmc_mpi_unpack_aero_mode()

subroutine pmc_aero_mode::pmc_mpi_unpack_aero_mode ( character, dimension(:), intent(inout)  buffer,
integer, intent(inout)  position,
type(aero_mode_t), intent(inout)  val 
)

Unpacks the given value from the buffer, advancing position.

Parameters
[in,out]bufferMemory buffer.
[in,out]positionCurrent buffer position.
[in,out]valValue to pack.

Definition at line 1155 of file aero_mode.F90.

◆ vol_conc_exp()

subroutine pmc_aero_mode::vol_conc_exp ( real(kind=dp), intent(in)  total_num_conc,
real(kind=dp), intent(in)  radius_at_mean_vol,
type(bin_grid_t), intent(in)  bin_grid,
type(aero_data_t), intent(in)  aero_data,
real(kind=dp), dimension(bin_grid_size(bin_grid)), intent(out)  vol_conc 
)

Exponential distribution in volume.

Parameters
[in]total_num_concTotal number concentration of the mode (m^{-3}).
[in]radius_at_mean_volRadius at mean volume (m).
[in]bin_gridBin grid.
[in]aero_dataAerosol data.
[out]vol_concVolume concentration (V(ln(r))d(ln(r))).

Definition at line 224 of file aero_mode.F90.

◆ vol_conc_log_normal()

subroutine pmc_aero_mode::vol_conc_log_normal ( real(kind=dp), intent(in)  total_num_conc,
real(kind=dp), intent(in)  geom_mean_radius,
real(kind=dp), intent(in)  log10_sigma_g,
type(bin_grid_t), intent(in)  bin_grid,
type(aero_data_t), intent(in)  aero_data,
real(kind=dp), dimension(bin_grid_size(bin_grid)), intent(out)  vol_conc 
)

Compute a log-normal distribution in volume.

Parameters
[in]total_num_concTotal number concentration of the mode (m^{-3}).
[in]geom_mean_radiusGeometric mean radius (m).
[in]log10_sigma_glog_10(geom. std. dev.) (1).
[in]bin_gridBin grid.
[in]aero_dataAerosol data.
[out]vol_concVolume concentration (V(ln(r))d(ln(r))).

Definition at line 163 of file aero_mode.F90.

◆ vol_conc_mono()

subroutine pmc_aero_mode::vol_conc_mono ( real(kind=dp), intent(in)  total_num_conc,
real(kind=dp), intent(in)  radius,
type(bin_grid_t), intent(in)  bin_grid,
type(aero_data_t), intent(in)  aero_data,
real(kind=dp), dimension(bin_grid_size(bin_grid)), intent(out)  vol_conc 
)

Mono-disperse distribution in volume.

Parameters
[in]total_num_concTotal number concentration of the mode (m^{-3}).
[in]radiusRadius of each particle (m^3).
[in]bin_gridBin grid.
[in]aero_dataAerosol data.
[out]vol_concVolume concentration (V(ln(r))d(ln(r))).

Definition at line 276 of file aero_mode.F90.

◆ vol_conc_sampled()

subroutine pmc_aero_mode::vol_conc_sampled ( real(kind=dp), dimension(:), intent(in)  sample_radius,
real(kind=dp), dimension(:), intent(in)  sample_num_conc,
type(bin_grid_t), intent(in)  bin_grid,
type(aero_data_t), intent(in)  aero_data,
real(kind=dp), dimension(bin_grid_size(bin_grid)), intent(out)  vol_conc 
)

Sampled distribution in volume.

Parameters
[in]sample_radiusSampled radius bin edges (m).
[in]sample_num_concSampled number concentrations (m^{-3}).
[in]bin_gridBin grid.
[in]aero_dataAerosol data.
[out]vol_concVolume concentration (V(ln(r))d(ln(r))).

Definition at line 352 of file aero_mode.F90.

Variable Documentation

◆ aero_mode_diam_type_geometric

integer, parameter pmc_aero_mode::aero_mode_diam_type_geometric = 1

Type code for geometric diameter.

Definition at line 42 of file aero_mode.F90.

◆ aero_mode_diam_type_invalid

integer, parameter pmc_aero_mode::aero_mode_diam_type_invalid = 0

Type code for an undefined for invalid diameter type.

Definition at line 40 of file aero_mode.F90.

◆ aero_mode_diam_type_mobility

integer, parameter pmc_aero_mode::aero_mode_diam_type_mobility = 2

Type code for mobility equivalent diameter.

Definition at line 44 of file aero_mode.F90.

◆ aero_mode_name_len

integer, parameter pmc_aero_mode::aero_mode_name_len = 300

Maximum length of a mode name.

Definition at line 24 of file aero_mode.F90.

◆ aero_mode_type_exp

integer, parameter pmc_aero_mode::aero_mode_type_exp = 2

Type code for an exponential mode.

Definition at line 33 of file aero_mode.F90.

◆ aero_mode_type_invalid

integer, parameter pmc_aero_mode::aero_mode_type_invalid = 0

Type code for an undefined or invalid mode.

Definition at line 29 of file aero_mode.F90.

◆ aero_mode_type_len

integer, parameter pmc_aero_mode::aero_mode_type_len = 20

Maximum length of a mode type.

Definition at line 26 of file aero_mode.F90.

◆ aero_mode_type_log_normal

integer, parameter pmc_aero_mode::aero_mode_type_log_normal = 1

Type code for a log-normal mode.

Definition at line 31 of file aero_mode.F90.

◆ aero_mode_type_mono

integer, parameter pmc_aero_mode::aero_mode_type_mono = 3

Type code for a mono-disperse mode.

Definition at line 35 of file aero_mode.F90.

◆ aero_mode_type_sampled

integer, parameter pmc_aero_mode::aero_mode_type_sampled = 4

Type code for a sampled mode.

Definition at line 37 of file aero_mode.F90.