PartMC  2.3.0
Data Types | Public Member Functions | Public Attributes | List of all members
pmc_aero_weight Module Reference

The aero_weight_t structure and associated subroutines. More...

Data Types

type  aero_weight_t
 An aerosol size distribution weighting function. More...
 

Public Member Functions

elemental subroutine aero_weight_allocate (aero_weight)
 Allocates an aero_weight. More...
 
elemental subroutine aero_weight_allocate_size (aero_weight)
 Allocates an aero_weight of the given size. More...
 
elemental subroutine aero_weight_deallocate (aero_weight)
 Free all storage. More...
 
elemental subroutine aero_weight_zero (aero_weight)
 Zeros the contents of the aero_weight. More...
 
elemental subroutine aero_weight_normalize (aero_weight)
 Sets the aero_weight to a non-zero normalized value. More...
 
elemental subroutine aero_weight_copy (aero_weight_from, aero_weight_to)
 Copy an aero_weight. More...
 
elemental subroutine aero_weight_scale (aero_weight, factor)
 Scale the weight by the given fraction, so new_weight = old_weight * factor. More...
 
elemental subroutine aero_weight_combine (aero_weight, aero_weight_delta)
 Combine aero_weight_delta into aero_weight with a harmonic mean. More...
 
elemental subroutine aero_weight_shift (aero_weight_from, aero_weight_to, sample_prop, overwrite_to)
 Adjust source and destination weights to reflect moving sample_prop proportion of particles from aero_weight_from to aero_weight_to. More...
 
real(kind=dp) function aero_weight_num_conc_at_radius (aero_weight, radius)
 Compute the number concentration at a given radius (m^{-3}). More...
 
real(kind=dp) function aero_weight_num_conc (aero_weight, aero_particle)
 Compute the number concentration for a particle (m^{-3}). More...
 
real(kind=dp) function aero_weight_radius_at_num_conc (aero_weight, num_conc)
 Compute the radius at a given number concentration (m). Inverse of aero_weight_num_conc_at_radius(). More...
 
subroutine aero_weight_check_valid_exponent (aero_weight)
 Ensures that a weight function exponent is valid. More...
 
subroutine aero_weight_check_monotonicity (aero_weight, monotone_increasing, monotone_decreasing)
 Determine whether a weight function is monotone increasing, monotone decreasing, or neither. More...
 
integer function pmc_mpi_pack_size_aero_weight (val)
 Determines the number of bytes required to pack the given value. More...
 
subroutine pmc_mpi_pack_aero_weight (buffer, position, val)
 Packs the given value into the buffer, advancing position. More...
 
subroutine pmc_mpi_unpack_aero_weight (buffer, position, val)
 Unpacks the given value from the buffer, advancing position. More...
 

Public Attributes

integer, parameter aero_weight_type_invalid = 0
 Type code for an undefined or invalid weighting. More...
 
integer, parameter aero_weight_type_none = 1
 Type code for no (or flat) weighting. More...
 
integer, parameter aero_weight_type_power = 2
 Type code for power function weighting. More...
 
integer, parameter aero_weight_type_mfa = 3
 Type code for MFA weighting. More...
 

Detailed Description

The aero_weight_t structure and associated subroutines.

Definition at line 9 of file aero_weight.F90.

Member Function/Subroutine Documentation

elemental subroutine pmc_aero_weight::aero_weight_allocate ( type(aero_weight_t), intent(out)  aero_weight)

Allocates an aero_weight.

Parameters
[out]aero_weightAerosol weight.

Definition at line 46 of file aero_weight.F90.

elemental subroutine pmc_aero_weight::aero_weight_allocate_size ( type(aero_weight_t), intent(out)  aero_weight)

Allocates an aero_weight of the given size.

Parameters
[out]aero_weightAerosol weight.

Definition at line 58 of file aero_weight.F90.

subroutine pmc_aero_weight::aero_weight_check_monotonicity ( type(aero_weight_t), intent(in)  aero_weight,
logical, intent(out)  monotone_increasing,
logical, intent(out)  monotone_decreasing 
)

Determine whether a weight function is monotone increasing, monotone decreasing, or neither.

Parameters
[in]aero_weightAerosol weight array.
[out]monotone_increasingWhether all weights are monotone increasing.
[out]monotone_decreasingWhether all weights are monotone decreasing.

Definition at line 278 of file aero_weight.F90.

subroutine pmc_aero_weight::aero_weight_check_valid_exponent ( type(aero_weight_t), intent(in)  aero_weight)

Ensures that a weight function exponent is valid.

Parameters
[in]aero_weightAerosol weight array.

Definition at line 256 of file aero_weight.F90.

elemental subroutine pmc_aero_weight::aero_weight_combine ( type(aero_weight_t), intent(inout)  aero_weight,
type(aero_weight_t), intent(in)  aero_weight_delta 
)

Combine aero_weight_delta into aero_weight with a harmonic mean.

Parameters
[in,out]aero_weightAerosol weight to add into.
[in]aero_weight_deltaAerosol weight to add from.

Definition at line 137 of file aero_weight.F90.

elemental subroutine pmc_aero_weight::aero_weight_copy ( type(aero_weight_t), intent(in)  aero_weight_from,
type(aero_weight_t), intent(inout)  aero_weight_to 
)

Copy an aero_weight.

Parameters
[in]aero_weight_fromAerosol weight original.
[in,out]aero_weight_toAerosol weight copy.

Definition at line 106 of file aero_weight.F90.

elemental subroutine pmc_aero_weight::aero_weight_deallocate ( type(aero_weight_t), intent(in)  aero_weight)

Free all storage.

Parameters
[in]aero_weightAerosol weight.

Definition at line 70 of file aero_weight.F90.

elemental subroutine pmc_aero_weight::aero_weight_normalize ( type(aero_weight_t), intent(inout)  aero_weight)

Sets the aero_weight to a non-zero normalized value.

Parameters
[in,out]aero_weightAerosol weight.

Definition at line 94 of file aero_weight.F90.

real(kind=dp) function pmc_aero_weight::aero_weight_num_conc ( type(aero_weight_t), intent(in)  aero_weight,
type(aero_particle_t), intent(in)  aero_particle 
)

Compute the number concentration for a particle (m^{-3}).

Parameters
[in]aero_weightAerosol weight.
[in]aero_particleAerosol particle to compute number concentration for.

Definition at line 214 of file aero_weight.F90.

real(kind=dp) function pmc_aero_weight::aero_weight_num_conc_at_radius ( type(aero_weight_t), intent(in)  aero_weight,
real(kind=dp), intent(in)  radius 
)

Compute the number concentration at a given radius (m^{-3}).

Parameters
[in]aero_weightAerosol weight.
[in]radiusRadius to compute number concentration at (m).

Definition at line 190 of file aero_weight.F90.

real(kind=dp) function pmc_aero_weight::aero_weight_radius_at_num_conc ( type(aero_weight_t), intent(in)  aero_weight,
real(kind=dp), intent(in)  num_conc 
)

Compute the radius at a given number concentration (m). Inverse of aero_weight_num_conc_at_radius().

Parameters
[in]aero_weightAerosol weight.
[in]num_concNumber concentration to compute the radius at (m^{-3}).

Definition at line 230 of file aero_weight.F90.

elemental subroutine pmc_aero_weight::aero_weight_scale ( type(aero_weight_t), intent(inout)  aero_weight,
real(kind=dp), intent(in)  factor 
)

Scale the weight by the given fraction, so new_weight = old_weight * factor.

Parameters
[in,out]aero_weightAerosol weight to scale.
[in]factorFactor to scale by.

Definition at line 123 of file aero_weight.F90.

elemental subroutine pmc_aero_weight::aero_weight_shift ( type(aero_weight_t), intent(inout)  aero_weight_from,
type(aero_weight_t), intent(inout)  aero_weight_to,
real(kind=dp), intent(in)  sample_prop,
logical, intent(in), optional  overwrite_to 
)

Adjust source and destination weights to reflect moving sample_prop proportion of particles from aero_weight_from to aero_weight_to.

Parameters
[in,out]aero_weight_fromAerosol weight to shift from.
[in,out]aero_weight_toAerosol weight to shift to.
[in]sample_propProportion of particles being transfered.
[in]overwrite_toWhether to overwrite the destination weight (default: no).

Definition at line 154 of file aero_weight.F90.

elemental subroutine pmc_aero_weight::aero_weight_zero ( type(aero_weight_t), intent(inout)  aero_weight)

Zeros the contents of the aero_weight.

Parameters
[in,out]aero_weightAerosol weight.

Definition at line 80 of file aero_weight.F90.

subroutine pmc_aero_weight::pmc_mpi_pack_aero_weight ( character, dimension(:), intent(inout)  buffer,
integer, intent(inout)  position,
type(aero_weight_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 387 of file aero_weight.F90.

integer function pmc_aero_weight::pmc_mpi_pack_size_aero_weight ( type(aero_weight_t), intent(in)  val)

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

Parameters
[in]valValue to pack.

Definition at line 372 of file aero_weight.F90.

subroutine pmc_aero_weight::pmc_mpi_unpack_aero_weight ( character, dimension(:), intent(inout)  buffer,
integer, intent(inout)  position,
type(aero_weight_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 412 of file aero_weight.F90.

Member Data Documentation

integer, parameter pmc_aero_weight::aero_weight_type_invalid = 0

Type code for an undefined or invalid weighting.

Definition at line 23 of file aero_weight.F90.

integer, parameter pmc_aero_weight::aero_weight_type_mfa = 3

Type code for MFA weighting.

Definition at line 29 of file aero_weight.F90.

integer, parameter pmc_aero_weight::aero_weight_type_none = 1

Type code for no (or flat) weighting.

Definition at line 25 of file aero_weight.F90.

integer, parameter pmc_aero_weight::aero_weight_type_power = 2

Type code for power function weighting.

Definition at line 27 of file aero_weight.F90.


The documentation for this module was generated from the following file: