PartMC 2.1.1
Data Types | Functions/Subroutines | Variables
pmc_aero_particle Module Reference

The aero_particle_t structure and associated subroutines. More...

Data Types

type  aero_particle_t
 Single aerosol particle data structure. More...

Functions/Subroutines

subroutine aero_particle_allocate (aero_particle)
 Allocates memory in an aero_particle_t.
subroutine aero_particle_allocate_size (aero_particle, n_spec, n_source)
 Allocates an aero_particle_t of the given size.
subroutine aero_particle_deallocate (aero_particle)
 Deallocates memory associated with an aero_particle_t.
subroutine aero_particle_copy (aero_particle_from, aero_particle_to)
 Copies a particle.
subroutine aero_particle_shift (aero_particle_from, aero_particle_to)
 Shift data from one aero_particle_t to another and free the first one.
subroutine aero_particle_zero (aero_particle)
 Resets an aero_particle to be zero.
subroutine aero_particle_new_id (aero_particle)
 Assigns a globally-unique new ID number to the particle.
subroutine aero_particle_set_create_time (aero_particle, create_time)
 Sets the creation times for the particle.
subroutine aero_particle_set_vols (aero_particle, vols)
 Sets the aerosol particle volumes.
subroutine aero_particle_set_source (aero_particle, i_source)
 Sets the aerosol particle source.
real(kind=dp) aero_particle_mass (aero_particle, aero_data)
 Total mass of the particle (kg).
real(kind=dp) aero_particle_moles (aero_particle, aero_data)
 Total moles in the particle (1).
real(kind=dp) aero_particle_volume (aero_particle)
 Total volume of the particle (m^3).
real(kind=dp) aero_particle_dry_volume (aero_particle, aero_data)
 Total dry volume of the particle (m^3).
real(kind=dp) aero_particle_volume_maybe_dry (aero_particle, aero_data, dry_volume)
 Total volume (dry or wet) of the particle (m^3).
real(kind=dp) aero_particle_radius (aero_particle)
 Total radius of the particle (m).
real(kind=dp) aero_particle_dry_radius (aero_particle, aero_data)
 Total dry radius of the particle (m).
real(kind=dp) aero_particle_diameter (aero_particle)
 Total diameter of the particle (m).
real(kind=dp) aero_particle_dry_diameter (aero_particle, aero_data)
 Total dry diameter of the particle (m).
real(kind=dp) aero_particle_density (aero_particle, aero_data)
 Average density of the particle (kg/m^3).
integer aero_particle_in_bin (aero_particle, bin_grid)
 Find the bin number that contains a given particle.
real(kind=dp) aero_particle_average_solute_quantity (aero_particle, aero_data, quantity)
 Returns the volume-average of the non-water elements of quantity.
real(kind=dp) aero_particle_total_solute_quantity (aero_particle, aero_data, quantity)
 Returns the volume-total of the non-water elements of quantity.
real(kind=dp) aero_particle_average_water_quantity (aero_particle, aero_data, quantity)
 Returns the water element of quantity.
real(kind=dp) aero_particle_total_water_quantity (aero_particle, aero_data, quantity)
 Returns the volume-total of the water element of quantity.
real(kind=dp) aero_particle_water_molec_weight (aero_data)
 Returns the water molecular weight. (kg/mole)
real(kind=dp) aero_particle_solute_molec_weight (aero_particle, aero_data)
 Returns the average of the solute molecular weight (kg/mole).
real(kind=dp) aero_particle_solute_num_ions (aero_particle, aero_data)
 Returns the average of the solute ion number (1).
real(kind=dp) aero_particle_water_density (aero_data)
 Returns the water density (kg/m^3).
real(kind=dp) aero_particle_solute_density (aero_particle, aero_data)
 Returns the average of the solute densities (kg/m^3).
real(kind=dp) aero_particle_water_mass (aero_particle, aero_data)
 Returns the water mass (kg).
real(kind=dp) aero_particle_solute_mass (aero_particle, aero_data)
 Returns the total solute mass (kg).
real(kind=dp) aero_particle_solute_volume (aero_particle, aero_data)
 Returns the total solute volume (m^3).
real(kind=dp) aero_particle_solute_radius (aero_particle, aero_data)
 Returns the total solute radius (m).
real(kind=dp) aero_particle_solute_kappa (aero_particle, aero_data)
 Returns the average of the solute kappas (1).
subroutine aero_particle_coagulate (aero_particle_1, aero_particle_2, aero_particle_new)
 Coagulate two particles together to make a new one. The new particle will not have its ID set.
integer pmc_mpi_pack_size_aero_particle (val)
 Determines the number of bytes required to pack the given value.
subroutine pmc_mpi_pack_aero_particle (buffer, position, val)
 Packs the given value into the buffer, advancing position.
subroutine pmc_mpi_unpack_aero_particle (buffer, position, val)
 Unpacks the given value from the buffer, advancing position.

Variables

integer, save next_id = 1
 Next unique ID number to use for a particle.

Detailed Description

The aero_particle_t structure and associated subroutines.


Function/Subroutine Documentation

subroutine pmc_aero_particle::aero_particle_allocate ( type(aero_particle_t),intent(out)  aero_particle)

Allocates memory in an aero_particle_t.

Parameters:
aero_particleParticle to init.
subroutine pmc_aero_particle::aero_particle_allocate_size ( type(aero_particle_t),intent(out)  aero_particle,
integer,intent(in)  n_spec,
integer,intent(in)  n_source 
)

Allocates an aero_particle_t of the given size.

Parameters:
aero_particleParticle to init.
n_specNumber of species.
n_sourceNumber of sources.
real(kind=dp) pmc_aero_particle::aero_particle_average_solute_quantity ( type(aero_particle_t),intent(in)  aero_particle,
type(aero_data_t),intent(in)  aero_data,
real(kind=dp),dimension(:),intent(in)  quantity 
)

Returns the volume-average of the non-water elements of quantity.

Parameters:
aero_particleAerosol particle.
aero_dataAerosol data.
quantityQuantity to average.
real(kind=dp) pmc_aero_particle::aero_particle_average_water_quantity ( type(aero_particle_t),intent(in)  aero_particle,
type(aero_data_t),intent(in)  aero_data,
real(kind=dp),dimension(:),intent(in)  quantity 
)

Returns the water element of quantity.

Parameters:
aero_particleAerosol particle.
aero_dataAerosol data.
quantityQuantity to average.
subroutine pmc_aero_particle::aero_particle_coagulate ( type(aero_particle_t),intent(in)  aero_particle_1,
type(aero_particle_t),intent(in)  aero_particle_2,
type(aero_particle_t),intent(inout)  aero_particle_new 
)

Coagulate two particles together to make a new one. The new particle will not have its ID set.

Parameters:
aero_particle_1First particle.
aero_particle_2Second particle.
aero_particle_newResult particle.
subroutine pmc_aero_particle::aero_particle_copy ( type(aero_particle_t),intent(in)  aero_particle_from,
type(aero_particle_t),intent(inout)  aero_particle_to 
)

Copies a particle.

Parameters:
aero_particle_fromReference particle.
aero_particle_toDestination particle (already alloced on entry).
subroutine pmc_aero_particle::aero_particle_deallocate ( type(aero_particle_t),intent(inout)  aero_particle)

Deallocates memory associated with an aero_particle_t.

Parameters:
aero_particleParticle to free.
real(kind=dp) pmc_aero_particle::aero_particle_density ( type(aero_particle_t),intent(in)  aero_particle,
type(aero_data_t),intent(in)  aero_data 
)

Average density of the particle (kg/m^3).

Parameters:
aero_particleParticle.
aero_dataAerosol data.
real(kind=dp) pmc_aero_particle::aero_particle_diameter ( type(aero_particle_t),intent(in)  aero_particle)

Total diameter of the particle (m).

Parameters:
aero_particleParticle.
real(kind=dp) pmc_aero_particle::aero_particle_dry_diameter ( type(aero_particle_t),intent(in)  aero_particle,
type(aero_data_t),intent(in)  aero_data 
)

Total dry diameter of the particle (m).

Parameters:
aero_particleParticle.
aero_dataAerosol data.
real(kind=dp) pmc_aero_particle::aero_particle_dry_radius ( type(aero_particle_t),intent(in)  aero_particle,
type(aero_data_t),intent(in)  aero_data 
)

Total dry radius of the particle (m).

Parameters:
aero_particleParticle.
aero_dataAerosol data.
real(kind=dp) pmc_aero_particle::aero_particle_dry_volume ( type(aero_particle_t),intent(in)  aero_particle,
type(aero_data_t),intent(in)  aero_data 
)

Total dry volume of the particle (m^3).

Parameters:
aero_particleParticle.
aero_dataAerosol data.
integer pmc_aero_particle::aero_particle_in_bin ( type(aero_particle_t),intent(in)  aero_particle,
type(bin_grid_t),intent(in)  bin_grid 
)

Find the bin number that contains a given particle.

Parameters:
aero_particleParticle.
bin_gridBin_grid.
real(kind=dp) pmc_aero_particle::aero_particle_mass ( type(aero_particle_t),intent(in)  aero_particle,
type(aero_data_t),intent(in)  aero_data 
)

Total mass of the particle (kg).

Parameters:
aero_particleParticle.
aero_dataAerosol data.
real(kind=dp) pmc_aero_particle::aero_particle_moles ( type(aero_particle_t),intent(in)  aero_particle,
type(aero_data_t),intent(in)  aero_data 
)

Total moles in the particle (1).

Parameters:
aero_particleParticle.
aero_dataAerosol data.
subroutine pmc_aero_particle::aero_particle_new_id ( type(aero_particle_t),intent(inout)  aero_particle)

Assigns a globally-unique new ID number to the particle.

Parameters:
aero_particleParticle to set ID for.
real(kind=dp) pmc_aero_particle::aero_particle_radius ( type(aero_particle_t),intent(in)  aero_particle)

Total radius of the particle (m).

Parameters:
aero_particleParticle.
subroutine pmc_aero_particle::aero_particle_set_create_time ( type(aero_particle_t),intent(inout)  aero_particle,
real(kind=dp),intent(in)  create_time 
)

Sets the creation times for the particle.

Parameters:
aero_particleParticle to set time for.
create_timeCreation time.
subroutine pmc_aero_particle::aero_particle_set_source ( type(aero_particle_t),intent(inout)  aero_particle,
integer,intent(in)  i_source 
)

Sets the aerosol particle source.

Parameters:
aero_particleParticle.
i_sourceSource number for the particle.
subroutine pmc_aero_particle::aero_particle_set_vols ( type(aero_particle_t),intent(inout)  aero_particle,
real(kind=dp),dimension(size(aero_particle%vol)),intent(in)  vols 
)

Sets the aerosol particle volumes.

Parameters:
aero_particleParticle.
volsNew volumes.
subroutine pmc_aero_particle::aero_particle_shift ( type(aero_particle_t),intent(inout)  aero_particle_from,
type(aero_particle_t),intent(inout)  aero_particle_to 
)

Shift data from one aero_particle_t to another and free the first one.

This is roughly equivalent to aero_particle_copy(from, to) followed by aero_particle_deallocate(from), but faster and with different memory allocation requirements.

Parameters:
aero_particle_fromReference particle (will be deallocated on return).
aero_particle_toDestination particle (not allocated on entry).
real(kind=dp) pmc_aero_particle::aero_particle_solute_density ( type(aero_particle_t),intent(in)  aero_particle,
type(aero_data_t),intent(in)  aero_data 
)

Returns the average of the solute densities (kg/m^3).

Parameters:
aero_particleAerosol particle.
aero_dataAerosol data.
real(kind=dp) pmc_aero_particle::aero_particle_solute_kappa ( type(aero_particle_t),intent(in)  aero_particle,
type(aero_data_t),intent(in)  aero_data 
)

Returns the average of the solute kappas (1).

Parameters:
aero_particleAerosol particle.
aero_dataAerosol data.
real(kind=dp) pmc_aero_particle::aero_particle_solute_mass ( type(aero_particle_t),intent(in)  aero_particle,
type(aero_data_t),intent(in)  aero_data 
)

Returns the total solute mass (kg).

Parameters:
aero_particleAerosol particle.
aero_dataAerosol data.
real(kind=dp) pmc_aero_particle::aero_particle_solute_molec_weight ( type(aero_particle_t),intent(in)  aero_particle,
type(aero_data_t),intent(in)  aero_data 
)

Returns the average of the solute molecular weight (kg/mole).

Parameters:
aero_particleAerosol particle.
aero_dataAerosol data.
real(kind=dp) pmc_aero_particle::aero_particle_solute_num_ions ( type(aero_particle_t),intent(in)  aero_particle,
type(aero_data_t),intent(in)  aero_data 
)

Returns the average of the solute ion number (1).

Parameters:
aero_particleAerosol particle.
aero_dataAerosol data.
real(kind=dp) pmc_aero_particle::aero_particle_solute_radius ( type(aero_particle_t),intent(in)  aero_particle,
type(aero_data_t),intent(in)  aero_data 
)

Returns the total solute radius (m).

Parameters:
aero_particleAerosol particle.
aero_dataAerosol data.
real(kind=dp) pmc_aero_particle::aero_particle_solute_volume ( type(aero_particle_t),intent(in)  aero_particle,
type(aero_data_t),intent(in)  aero_data 
)

Returns the total solute volume (m^3).

Parameters:
aero_particleAerosol particle.
aero_dataAerosol data.
real(kind=dp) pmc_aero_particle::aero_particle_total_solute_quantity ( type(aero_particle_t),intent(in)  aero_particle,
type(aero_data_t),intent(in)  aero_data,
real(kind=dp),dimension(:),intent(in)  quantity 
)

Returns the volume-total of the non-water elements of quantity.

Parameters:
aero_particleAerosol particle.
aero_dataAerosol data.
quantityQuantity to total.
real(kind=dp) pmc_aero_particle::aero_particle_total_water_quantity ( type(aero_particle_t),intent(in)  aero_particle,
type(aero_data_t),intent(in)  aero_data,
real(kind=dp),dimension(:),intent(in)  quantity 
)

Returns the volume-total of the water element of quantity.

Parameters:
aero_particleAerosol particle.
aero_dataAerosol data.
quantityQuantity to total.
real(kind=dp) pmc_aero_particle::aero_particle_volume ( type(aero_particle_t),intent(in)  aero_particle)

Total volume of the particle (m^3).

Parameters:
aero_particleParticle.
real(kind=dp) pmc_aero_particle::aero_particle_volume_maybe_dry ( type(aero_particle_t),intent(in)  aero_particle,
type(aero_data_t),intent(in)  aero_data,
logical,intent(in)  dry_volume 
)

Total volume (dry or wet) of the particle (m^3).

Parameters:
aero_particleParticle.
aero_dataAerosol data.
dry_volumeWhether the desired volume is dry (otherwise wet).
real(kind=dp) pmc_aero_particle::aero_particle_water_density ( type(aero_data_t),intent(in)  aero_data)

Returns the water density (kg/m^3).

Parameters:
aero_dataAerosol data.
real(kind=dp) pmc_aero_particle::aero_particle_water_mass ( type(aero_particle_t),intent(in)  aero_particle,
type(aero_data_t),intent(in)  aero_data 
)

Returns the water mass (kg).

Parameters:
aero_particleAerosol particle.
aero_dataAerosol data.
real(kind=dp) pmc_aero_particle::aero_particle_water_molec_weight ( type(aero_data_t),intent(in)  aero_data)

Returns the water molecular weight. (kg/mole)

Parameters:
aero_dataAerosol data.
subroutine pmc_aero_particle::aero_particle_zero ( type(aero_particle_t),intent(inout)  aero_particle)

Resets an aero_particle to be zero.

Parameters:
aero_particleParticle to zero.
subroutine pmc_aero_particle::pmc_mpi_pack_aero_particle ( character,dimension(:),intent(inout)  buffer,
integer,intent(inout)  position,
type(aero_particle_t),intent(in)  val 
)

Packs the given value into the buffer, advancing position.

Parameters:
bufferMemory buffer.
positionCurrent buffer position.
valValue to pack.
integer pmc_aero_particle::pmc_mpi_pack_size_aero_particle ( type(aero_particle_t),intent(in)  val)

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

Parameters:
valValue to pack.
subroutine pmc_aero_particle::pmc_mpi_unpack_aero_particle ( character,dimension(:),intent(inout)  buffer,
integer,intent(inout)  position,
type(aero_particle_t),intent(inout)  val 
)

Unpacks the given value from the buffer, advancing position.

Parameters:
bufferMemory buffer.
positionCurrent buffer position.
valValue to pack.

Variable Documentation

integer,save pmc_aero_particle::next_id = 1

Next unique ID number to use for a particle.