PartMC  2.8.0
Data Types | Functions/Subroutines | Variables
pmc_aero_data Module Reference

The aero_data_t structure and associated subroutines. More...

Data Types

type  aero_data_t
 Aerosol material properties and associated data. More...
 

Functions/Subroutines

real(kind=dp) elemental function aero_data_vol2rad (aero_data, v)
 Convert mass-equivalent volume $V$ (m^3) to geometric radius $R_{\rm geo}$ (m). More...
 
real(kind=dp) elemental function aero_data_vol2diam (aero_data, v)
 Convert mass-equivalent volume $V$ (m^3) to geometric diameter $D_{\rm geo}$ (m). More...
 
real(kind=dp) elemental function aero_data_rad2vol (aero_data, r)
 Convert geometric radius $R_{\rm geo}$ (m) to mass-equivalent volume $V$ (m^3). More...
 
real(kind=dp) elemental function aero_data_diam2vol (aero_data, d)
 Convert geometric diameter $D_{\rm geo}$ (m) to mass-equivalent volume $V$ (m^3). More...
 
real(kind=dp) elemental function aero_data_vol_to_num_of_monomers (aero_data, v)
 Convert mass-equivalent volume $V$ (m^3) to number of monomers $N$ in a fractal particle cluster. More...
 
real(kind=dp) function aero_data_vol_to_mobility_rad (aero_data, v, temp, pressure)
 Convert mass-equivalent volume $V$ (m^3) to mobility equivalent radius $R_{\rm me}$ (m). More...
 
real(kind=dp) function aero_data_mobility_rad_to_vol (aero_data, mobility_rad, temp, pressure)
 Convert mobility equivalent radius $R_{\rm me}$ (m) to mass-equivalent volume $V$ (m^3). More...
 
real(kind=dp) function aero_data_mobility_rad_to_geometric_rad (aero_data, mobility_rad, temp, pressure)
 Convert mobility equivalent radius $R_{\rm me}$ (m) to geometric radius $R_{\rm geo}$ (m^3). More...
 
elemental integer function aero_data_n_spec (aero_data)
 Return the number of aerosol species, or -1 if uninitialized. More...
 
elemental integer function aero_data_n_source (aero_data)
 Return the number of aerosol sources, or -1 if uninitialized. More...
 
elemental integer function aero_data_n_weight_class (aero_data)
 Return the number of aerosol sources, or -1 if uninitialized. More...
 
integer function aero_data_spec_by_name (aero_data, name)
 Returns the number of the species in aero_data with the given name, or returns 0 if there is no such species. More...
 
integer function aero_data_source_by_name (aero_data, name)
 Returns the number of the source in aero_data with the given name, or adds the source if it doesn't exist yet. More...
 
integer function aero_data_weight_class_by_name (aero_data, name)
 Returns the number of the weight class with the given name, or adds the weight class if it doesn't exist yet. More...
 
subroutine aero_data_set_water_index (aero_data)
 Fills in aero_data%i_water. More...
 
subroutine aero_data_set_mosaic_map (aero_data)
 Fills in aero_data%mosaic_index. More...
 
integer function camp_spec_id (aero_data, i_part, i_spec)
 Get the index on the CAMP state array for a specified species and computational particle. More...
 
subroutine spec_file_read_species_list (file, name, aero_data, species_list)
 Read a list of species from the given file with the given name. More...
 
integer function pmc_mpi_pack_size_aero_data (val)
 Determines the number of bytes required to pack the given value. More...
 
subroutine pmc_mpi_pack_aero_data (buffer, position, val)
 Packs the given value into the buffer, advancing position. More...
 
subroutine pmc_mpi_unpack_aero_data (buffer, position, val)
 Unpacks the given value from the buffer, advancing position. More...
 
subroutine aero_data_netcdf_dim_aero_species (aero_data, ncid, dimid_aero_species)
 Write the aero species dimension to the given NetCDF file if it is not already present and in any case return the associated dimid. More...
 
subroutine aero_data_netcdf_dim_aero_source (aero_data, ncid, dimid_aero_source)
 Write the aero source dimension to the given NetCDF file if it is not already present and in any case return the associated dimid. More...
 
subroutine aero_data_netcdf_dim_aero_weight_classes (aero_data, ncid, dimid_aero_weight_class)
 Write the aero weight class dimension to the given NetCDF file if it is not already present and in any case return the associated dimid. More...
 
subroutine aero_data_netcdf_dim_optical_wavelengths (aero_data, ncid, dimid_optical_wavelengths)
 Write the number of wavelength dimension to the given NetCDF file if it is not already present and in any case return the associated dimid. More...
 
subroutine aero_data_input_netcdf (aero_data, ncid)
 Read full state. More...
 

Variables

integer, parameter aero_name_len = 50
 
integer, parameter aero_source_name_len = 100
 
integer, parameter n_swbands = 1
 

Detailed Description

The aero_data_t structure and associated subroutines.

Function/Subroutine Documentation

◆ aero_data_diam2vol()

real(kind=dp) elemental function pmc_aero_data::aero_data_diam2vol ( type(aero_data_t), intent(in)  aero_data,
real(kind=dp), intent(in)  d 
)

Convert geometric diameter $D_{\rm geo}$ (m) to mass-equivalent volume $V$ (m^3).

Parameters
[in]aero_dataAero data structure.
[in]dGeometric diameter (m).

Definition at line 146 of file aero_data.F90.

◆ aero_data_input_netcdf()

subroutine pmc_aero_data::aero_data_input_netcdf ( type(aero_data_t), intent(inout)  aero_data,
integer, intent(in)  ncid 
)

Read full state.

Parameters
[in,out]aero_dataAero_data to read.
[in]ncidNetCDF file ID, in data mode.

Definition at line 930 of file aero_data.F90.

◆ aero_data_mobility_rad_to_geometric_rad()

real(kind=dp) function pmc_aero_data::aero_data_mobility_rad_to_geometric_rad ( type(aero_data_t), intent(in)  aero_data,
real(kind=dp), intent(in)  mobility_rad,
real(kind=dp), intent(in)  temp,
real(kind=dp), intent(in)  pressure 
)

Convert mobility equivalent radius $R_{\rm me}$ (m) to geometric radius $R_{\rm geo}$ (m^3).

Parameters
[in]aero_dataAero data structure.
[in]mobility_radMobility equivalent radius (m).
[in]tempTemperature (K).
[in]pressurePressure (Pa).

Definition at line 224 of file aero_data.F90.

◆ aero_data_mobility_rad_to_vol()

real(kind=dp) function pmc_aero_data::aero_data_mobility_rad_to_vol ( type(aero_data_t), intent(in)  aero_data,
real(kind=dp), intent(in)  mobility_rad,
real(kind=dp), intent(in)  temp,
real(kind=dp), intent(in)  pressure 
)

Convert mobility equivalent radius $R_{\rm me}$ (m) to mass-equivalent volume $V$ (m^3).

Parameters
[in]aero_dataAero data structure.
[in]mobility_radMobility equivalent radius (m).
[in]tempTemperature (K).
[in]pressurePressure (Pa).

Definition at line 203 of file aero_data.F90.

◆ aero_data_n_source()

elemental integer function pmc_aero_data::aero_data_n_source ( type(aero_data_t), intent(in)  aero_data)

Return the number of aerosol sources, or -1 if uninitialized.

Parameters
[in]aero_dataAero data structure.

Definition at line 261 of file aero_data.F90.

◆ aero_data_n_spec()

elemental integer function pmc_aero_data::aero_data_n_spec ( type(aero_data_t), intent(in)  aero_data)

Return the number of aerosol species, or -1 if uninitialized.

Parameters
[in]aero_dataAero data structure.

Definition at line 245 of file aero_data.F90.

◆ aero_data_n_weight_class()

elemental integer function pmc_aero_data::aero_data_n_weight_class ( type(aero_data_t), intent(in)  aero_data)

Return the number of aerosol sources, or -1 if uninitialized.

Parameters
[in]aero_dataAero data structure.

Definition at line 277 of file aero_data.F90.

◆ aero_data_netcdf_dim_aero_source()

subroutine pmc_aero_data::aero_data_netcdf_dim_aero_source ( type(aero_data_t), intent(in)  aero_data,
integer, intent(in)  ncid,
integer, intent(out)  dimid_aero_source 
)

Write the aero source dimension to the given NetCDF file if it is not already present and in any case return the associated dimid.

Parameters
[in]aero_dataAero_data structure.
[in]ncidNetCDF file ID, in data mode.
[out]dimid_aero_sourceDimid of the source dimension.

Definition at line 709 of file aero_data.F90.

◆ aero_data_netcdf_dim_aero_species()

subroutine pmc_aero_data::aero_data_netcdf_dim_aero_species ( type(aero_data_t), intent(in)  aero_data,
integer, intent(in)  ncid,
integer, intent(out)  dimid_aero_species 
)

Write the aero species dimension to the given NetCDF file if it is not already present and in any case return the associated dimid.

Parameters
[in]aero_dataAero_data structure.
[in]ncidNetCDF file ID, in data mode.
[out]dimid_aero_speciesDimid of the species dimension.

Definition at line 652 of file aero_data.F90.

◆ aero_data_netcdf_dim_aero_weight_classes()

subroutine pmc_aero_data::aero_data_netcdf_dim_aero_weight_classes ( type(aero_data_t), intent(in)  aero_data,
integer, intent(in)  ncid,
integer, intent(out)  dimid_aero_weight_class 
)

Write the aero weight class dimension to the given NetCDF file if it is not already present and in any case return the associated dimid.

Parameters
[in]aero_dataAero_data structure.
[in]ncidNetCDF file ID, in data mode.
[out]dimid_aero_weight_classDimid of the weight class dimension.

Definition at line 766 of file aero_data.F90.

◆ aero_data_netcdf_dim_optical_wavelengths()

subroutine pmc_aero_data::aero_data_netcdf_dim_optical_wavelengths ( type(aero_data_t), intent(in)  aero_data,
integer, intent(in)  ncid,
integer, intent(out)  dimid_optical_wavelengths 
)

Write the number of wavelength dimension to the given NetCDF file if it is not already present and in any case return the associated dimid.

Parameters
[in]aero_dataaero_data structure.
[in]ncidNetCDF file ID, in data mode.
[out]dimid_optical_wavelengthsDimid of the optical wavelength dimension.

Definition at line 824 of file aero_data.F90.

◆ aero_data_rad2vol()

real(kind=dp) elemental function pmc_aero_data::aero_data_rad2vol ( type(aero_data_t), intent(in)  aero_data,
real(kind=dp), intent(in)  r 
)

Convert geometric radius $R_{\rm geo}$ (m) to mass-equivalent volume $V$ (m^3).

Parameters
[in]aero_dataAero data structure.
[in]rGeometric radius (m).

Definition at line 131 of file aero_data.F90.

◆ aero_data_set_mosaic_map()

subroutine pmc_aero_data::aero_data_set_mosaic_map ( type(aero_data_t), intent(inout)  aero_data)

Fills in aero_data%mosaic_index.

Parameters
[in,out]aero_dataAero_data data.

Definition at line 385 of file aero_data.F90.

◆ aero_data_set_water_index()

subroutine pmc_aero_data::aero_data_set_water_index ( type(aero_data_t), intent(inout)  aero_data)

Fills in aero_data%i_water.

Parameters
[in,out]aero_dataAero_data data.

Definition at line 371 of file aero_data.F90.

◆ aero_data_source_by_name()

integer function pmc_aero_data::aero_data_source_by_name ( type(aero_data_t), intent(inout)  aero_data,
character(len=*), intent(in)  name 
)

Returns the number of the source in aero_data with the given name, or adds the source if it doesn't exist yet.

Parameters
[in,out]aero_dataAero_data data.
[in]nameName of source to find.

Definition at line 323 of file aero_data.F90.

◆ aero_data_spec_by_name()

integer function pmc_aero_data::aero_data_spec_by_name ( type(aero_data_t), intent(in)  aero_data,
character(len=*), intent(in)  name 
)

Returns the number of the species in aero_data with the given name, or returns 0 if there is no such species.

Parameters
[in]aero_dataAero_data data.
[in]nameName of species to find.

Definition at line 294 of file aero_data.F90.

◆ aero_data_vol2diam()

real(kind=dp) elemental function pmc_aero_data::aero_data_vol2diam ( type(aero_data_t), intent(in)  aero_data,
real(kind=dp), intent(in)  v 
)

Convert mass-equivalent volume $V$ (m^3) to geometric diameter $D_{\rm geo}$ (m).

Parameters
[in]aero_dataAero data structure.
[in]vParticle mass-equivalent volume (m^3).

Definition at line 116 of file aero_data.F90.

◆ aero_data_vol2rad()

real(kind=dp) elemental function pmc_aero_data::aero_data_vol2rad ( type(aero_data_t), intent(in)  aero_data,
real(kind=dp), intent(in)  v 
)

Convert mass-equivalent volume $V$ (m^3) to geometric radius $R_{\rm geo}$ (m).

Parameters
[in]aero_dataAero data structure.
[in]vParticle mass-equivalent volume (m^3).

Definition at line 101 of file aero_data.F90.

◆ aero_data_vol_to_mobility_rad()

real(kind=dp) function pmc_aero_data::aero_data_vol_to_mobility_rad ( type(aero_data_t), intent(in)  aero_data,
real(kind=dp), intent(in)  v,
real(kind=dp), intent(in)  temp,
real(kind=dp), intent(in)  pressure 
)

Convert mass-equivalent volume $V$ (m^3) to mobility equivalent radius $R_{\rm me}$ (m).

Based on Eq. 5, 21 and 30 in Naumann [2003].

Parameters
[in]aero_dataAero data structure.
[in]vParticle mass-equivalent volume (m^3).
[in]tempTemperature (K).
[in]pressurePressure (Pa).

Definition at line 182 of file aero_data.F90.

◆ aero_data_vol_to_num_of_monomers()

real(kind=dp) elemental function pmc_aero_data::aero_data_vol_to_num_of_monomers ( type(aero_data_t), intent(in)  aero_data,
real(kind=dp), intent(in)  v 
)

Convert mass-equivalent volume $V$ (m^3) to number of monomers $N$ in a fractal particle cluster.

Based on Eq. 5 in Naumann [2003].

Parameters
[in]aero_dataAero data structure.
[in]vParticle mass-equivalent volume (m^3).

Definition at line 163 of file aero_data.F90.

◆ aero_data_weight_class_by_name()

integer function pmc_aero_data::aero_data_weight_class_by_name ( type(aero_data_t), intent(inout)  aero_data,
character(len=*), intent(in)  name 
)

Returns the number of the weight class with the given name, or adds the weight class if it doesn't exist yet.

Parameters
[in,out]aero_dataAero_data data.
[in]nameName of source to find.

Definition at line 347 of file aero_data.F90.

◆ camp_spec_id()

integer function pmc_aero_data::camp_spec_id ( class(aero_data_t), intent(in)  aero_data,
integer, intent(in)  i_part,
integer, intent(in)  i_spec 
)

Get the index on the CAMP state array for a specified species and computational particle.

Parameters
[in]aero_dataAerosol data.
[in]i_partComputational particle index (1...aero_state_tn_part).
[in]i_specAerosol species index in aero_particle_tvol(:) array.

Definition at line 412 of file aero_data.F90.

◆ pmc_mpi_pack_aero_data()

subroutine pmc_aero_data::pmc_mpi_pack_aero_data ( character, dimension(:), intent(inout)  buffer,
integer, intent(inout)  position,
type(aero_data_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 584 of file aero_data.F90.

◆ pmc_mpi_pack_size_aero_data()

integer function pmc_aero_data::pmc_mpi_pack_size_aero_data ( type(aero_data_t), intent(in)  val)

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

Parameters
[in]valValue to pack.

Definition at line 561 of file aero_data.F90.

◆ pmc_mpi_unpack_aero_data()

subroutine pmc_aero_data::pmc_mpi_unpack_aero_data ( character, dimension(:), intent(inout)  buffer,
integer, intent(inout)  position,
type(aero_data_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 617 of file aero_data.F90.

◆ spec_file_read_species_list()

subroutine pmc_aero_data::spec_file_read_species_list ( type(spec_file_t), intent(inout)  file,
character(len=*), intent(in)  name,
type(aero_data_t), intent(in)  aero_data,
integer, dimension(:), allocatable  species_list 
)

Read a list of species from the given file with the given name.

Parameters
[in,out]fileSpec file.
[in]nameName of line.
[in]aero_dataAero_data data.
species_listList of species numbers.

Definition at line 530 of file aero_data.F90.

Variable Documentation

◆ aero_name_len

integer, parameter pmc_aero_data::aero_name_len = 50

Definition at line 28 of file aero_data.F90.

◆ aero_source_name_len

integer, parameter pmc_aero_data::aero_source_name_len = 100

Definition at line 29 of file aero_data.F90.

◆ n_swbands

integer, parameter pmc_aero_data::n_swbands = 1

Definition at line 34 of file aero_data.F90.