PartMC  2.6.1
Data Types | Functions/Subroutines
pmc_aero_dist Module Reference

The aero_dist_t structure and associated subroutines. More...

Data Types

type  aero_dist_t
 A complete aerosol distribution, consisting of several modes. More...
 

Functions/Subroutines

elemental integer function aero_dist_n_mode (aero_dist)
 Return the number of modes. More...
 
real(kind=dp) function aero_dist_total_num_conc (aero_dist)
 Returns the total number concentration of a distribution. (#/m^3) More...
 
real(kind=dp) function aero_dist_number (aero_dist, aero_weight)
 Returns the total number of particles of a distribution. More...
 
subroutine aero_dist_num_conc (aero_dist, bin_grid, aero_data, num_conc)
 Return the binned number concentration for an aero_dist. More...
 
subroutine aero_dist_vol_conc (aero_dist, bin_grid, aero_data, vol_conc)
 Return the binned per-species volume concentration for an aero_dist. More...
 
elemental logical function aero_dist_contains_aero_mode_type (aero_dist, aero_mode_type)
 Whether any of the modes are of the given type. More...
 
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. More...
 
integer function pmc_mpi_pack_size_aero_dist (val)
 Determines the number of bytes required to pack the given value. More...
 
subroutine pmc_mpi_pack_aero_dist (buffer, position, val)
 Packs the given value into the buffer, advancing position. More...
 
subroutine pmc_mpi_unpack_aero_dist (buffer, position, val)
 Unpacks the given value from the buffer, advancing position. More...
 

Detailed Description

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 concentration distribution to an actual number of particles ready for a particle-resolved simulation.

Initial distributions should be normalized so that sum(n_den) = 1/log_width.

Function/Subroutine Documentation

◆ aero_dist_contains_aero_mode_type()

elemental logical function pmc_aero_dist::aero_dist_contains_aero_mode_type ( type(aero_dist_t), intent(in)  aero_dist,
integer, intent(in)  aero_mode_type 
)

Whether any of the modes are of the given type.

Parameters
[in]aero_distAerosol distribution.
[in]aero_mode_typeAerosol mode type to test for.

Definition at line 153 of file aero_dist.F90.

◆ aero_dist_interp_1d()

subroutine pmc_aero_dist::aero_dist_interp_1d ( type(aero_dist_t), dimension(:), intent(in)  aero_dist_list,
real(kind=dp), dimension(size(aero_dist_list)), intent(in)  time_list,
real(kind=dp), dimension(size(aero_dist_list)), intent(in)  rate_list,
real(kind=dp), intent(in)  time,
type(aero_dist_t), intent(inout)  aero_dist,
real(kind=dp), intent(out)  rate 
)

Determine the current aero_dist and rate by interpolating at the current time with the lists of aero_dists and rates.

Parameters
[in]aero_dist_listGas states.
[in]time_listTimes (s).
[in]rate_listRates (s^{-1}).
[in]timeCurrent time (s).
[in,out]aero_distCurrent gas state.
[out]rateCurrent rate (s^{-1}).

Definition at line 175 of file aero_dist.F90.

◆ aero_dist_n_mode()

elemental integer function pmc_aero_dist::aero_dist_n_mode ( type(aero_dist_t), intent(in)  aero_dist)

Return the number of modes.

Parameters
[in]aero_distAero data structure.

Definition at line 43 of file aero_dist.F90.

◆ aero_dist_num_conc()

subroutine pmc_aero_dist::aero_dist_num_conc ( type(aero_dist_t), intent(in)  aero_dist,
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_dist.

Parameters
[in]aero_distAero dist 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 97 of file aero_dist.F90.

◆ aero_dist_number()

real(kind=dp) function pmc_aero_dist::aero_dist_number ( type(aero_dist_t), intent(in)  aero_dist,
type(aero_weight_t), intent(in)  aero_weight 
)

Returns the total number of particles of a distribution.

Parameters
[in]aero_distAerosol distribution.
[in]aero_weightAerosol weight.

Definition at line 77 of file aero_dist.F90.

◆ aero_dist_total_num_conc()

real(kind=dp) function pmc_aero_dist::aero_dist_total_num_conc ( type(aero_dist_t), intent(in)  aero_dist)

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

Parameters
[in]aero_distAerosol distribution.

Definition at line 59 of file aero_dist.F90.

◆ aero_dist_vol_conc()

subroutine pmc_aero_dist::aero_dist_vol_conc ( type(aero_dist_t), intent(in)  aero_dist,
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_dist.

Parameters
[in]aero_distAero dist 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 125 of file aero_dist.F90.

◆ pmc_mpi_pack_aero_dist()

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.

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

Definition at line 418 of file aero_dist.F90.

◆ pmc_mpi_pack_size_aero_dist()

integer function 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.

Parameters
[in]valValue to pack.

Definition at line 396 of file aero_dist.F90.

◆ pmc_mpi_unpack_aero_dist()

subroutine pmc_aero_dist::pmc_mpi_unpack_aero_dist ( character, dimension(:), intent(inout)  buffer,
integer, intent(inout)  position,
type(aero_dist_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 448 of file aero_dist.F90.