CAMP 1.0.0
Chemistry Across Multiple Phases
Public Member Functions | Public Attributes | Private Member Functions | Private Attributes | List of all members
camp_chem_spec_data::chem_spec_data_t Interface Reference

Chemical species data. More...

Collaboration diagram for camp_chem_spec_data::chem_spec_data_t:
Collaboration graph
[legend]

Public Member Functions

procedure load (this, json, j_obj)
 Load species from an input file.
 
procedure initialize (this)
 Initialize the species set.
 
procedure size (this, spec_type, spec_phase)
 Get the number of species with specified conditions.
 
procedure exists (this, spec_name)
 Check if a species name is in the set of chemical species.
 
procedure get_spec_names (this, spec_type, spec_phase)
 Get a list of species names.
 
procedure get_property_set (this, spec_name, property_set)
 Get a species properties.
 
procedure get_type (this, spec_name, spec_type)
 Get a species type.
 
procedure get_phase (this, spec_name, spec_phase)
 Get a species phase.
 
procedure get_abs_tol (this, spec_name, abs_tol)
 Get the absolute integration tolerance of a species.
 
procedure gas_state_id (this, spec_name)
 Get a gas-phase species index in the camp_camp_state::camp_state_t::state_var array. Note that aerosol-phase species indices on the camp_camp_state::camp_state_t::state_var array must be accessed from camp_aero_rep_data::aero_rep_data_t::spec_state_id() for a particular aerosol representation.
 
procedure gas_state_name (this, spec_id)
 Get the name of a gas-phase species in the camp_camp_state::camp_state_t::state_var array. Note that aerosol-phase species names on the camp_camp_state::camp_state_t::state_var array must be accessed from camp_aero_rep_data::aero_rep_data_t::spec_state_id() for a particular aerosol representation.
 
procedure print (this, file_unit)
 Print out the species data.
 
final finalize (this)
 Finalize the chemical species data.
 

Public Attributes

type(string_t), dimension(:), pointer spec_name => null()
 Species name.
 
integer(kind=i_kind), dimension(:), pointer spec_type => null()
 Species type.
 
integer(kind=i_kind), dimension(:), pointer spec_phase => null()
 Species phase.
 
type(property_t), dimension(:), pointer property_set => null()
 Species property set.
 

Private Member Functions

procedure, private ensure_size (this, num_spec)
 Ensure there is enough room in the species dataset to add a specified number of species.
 
procedure, private add (this, spec_name, spec_type, spec_phase, property_set)
 Add a species.
 
procedure, private find (this, spec_name, spec_id)
 Find a species index by name.
 

Private Attributes

integer(kind=i_kind) num_spec = 0
 Number of species.
 

Detailed Description

Chemical species data.

Time-invariant data related to a chemical species

Definition at line 68 of file chem_spec_data.F90.

Constructor & Destructor Documentation

◆ finalize()

final camp_chem_spec_data::chem_spec_data_t::finalize ( type(chem_spec_data_t), intent(inout)  this)
final

Finalize the chemical species data.

Parameters
[in,out]thisSpecies dataset

Definition at line 116 of file chem_spec_data.F90.

Here is the call graph for this function:

Member Function/Subroutine Documentation

◆ add()

procedure, private camp_chem_spec_data::chem_spec_data_t::add ( class(chem_spec_data_t), intent(inout)  this,
character(len=*), intent(in)  spec_name,
integer(kind=i_kind), intent(inout)  spec_type,
integer(kind=i_kind), intent(inout)  spec_phase,
type(property_t), intent(inout), optional  property_set 
)
private

Add a species.

Parameters
[in,out]thisSpecies dataset
[in]spec_nameName of species to add
[in,out]spec_typeState variable type
[in,out]spec_phaseSpecies phase
[in,out]property_setProperty set for new species

Definition at line 123 of file chem_spec_data.F90.

◆ ensure_size()

procedure, private camp_chem_spec_data::chem_spec_data_t::ensure_size ( class(chem_spec_data_t), intent(inout)  this,
integer(i_kind), intent(in)  num_spec 
)
private

Ensure there is enough room in the species dataset to add a specified number of species.

Parameters
[in,out]thisSpecies dataset
[in]num_specNumber of new species to ensure space for

Definition at line 121 of file chem_spec_data.F90.

◆ exists()

procedure camp_chem_spec_data::chem_spec_data_t::exists ( class(chem_spec_data_t), intent(in)  this,
character(len=*), intent(in)  spec_name 
)

Check if a species name is in the set of chemical species.

Parameters
[in]thisSpecies dataset
[in]spec_nameSpecies name

Definition at line 88 of file chem_spec_data.F90.

◆ find()

procedure, private camp_chem_spec_data::chem_spec_data_t::find ( class(chem_spec_data_t), intent(in)  this,
character(len=*), intent(in)  spec_name,
integer(kind=i_kind), intent(out)  spec_id 
)
private

Find a species index by name.

Parameters
[in]thisSpecies dataset
[in]spec_nameSpecies name
[out]spec_idSpecies id

Definition at line 125 of file chem_spec_data.F90.

◆ gas_state_id()

procedure camp_chem_spec_data::chem_spec_data_t::gas_state_id ( class(chem_spec_data_t), intent(in)  this,
character(len=*), intent(in)  spec_name 
)

Get a gas-phase species index in the camp_camp_state::camp_state_t::state_var array. Note that aerosol-phase species indices on the camp_camp_state::camp_state_t::state_var array must be accessed from camp_aero_rep_data::aero_rep_data_t::spec_state_id() for a particular aerosol representation.

Parameters
[in]thisSpecies dataset
[in]spec_nameSpecies name

Definition at line 105 of file chem_spec_data.F90.

◆ gas_state_name()

procedure camp_chem_spec_data::chem_spec_data_t::gas_state_name ( class(chem_spec_data_t), intent(in)  this,
integer(kind=i_kind), intent(in)  spec_id 
)

Get the name of a gas-phase species in the camp_camp_state::camp_state_t::state_var array. Note that aerosol-phase species names on the camp_camp_state::camp_state_t::state_var array must be accessed from camp_aero_rep_data::aero_rep_data_t::spec_state_id() for a particular aerosol representation.

Returns
Species name
Parameters
[in]thisSpecies dataset
[in]spec_idSpecies id

Definition at line 112 of file chem_spec_data.F90.

◆ get_abs_tol()

procedure camp_chem_spec_data::chem_spec_data_t::get_abs_tol ( class(chem_spec_data_t), intent(in)  this,
character(len=*), intent(in)  spec_name,
real(kind=dp), intent(out)  abs_tol 
)

Get the absolute integration tolerance of a species.

Parameters
[in]thisSpecies dataset
[in]spec_nameSpecies name
[out]abs_tolAbsolute integration tolerance

Definition at line 98 of file chem_spec_data.F90.

◆ get_phase()

procedure camp_chem_spec_data::chem_spec_data_t::get_phase ( class(chem_spec_data_t), intent(in)  this,
character(len=*), intent(in)  spec_name,
integer(kind=i_kind), intent(out)  spec_phase 
)

Get a species phase.

Parameters
[in]thisSpecies dataset
[in]spec_nameSpecies name to find properties of
[out]spec_phaseSpecies phase

Definition at line 96 of file chem_spec_data.F90.

◆ get_property_set()

procedure camp_chem_spec_data::chem_spec_data_t::get_property_set ( class(chem_spec_data_t), intent(in)  this,
character(len=*), intent(in)  spec_name,
type(property_t), intent(out), pointer  property_set 
)

Get a species properties.

Parameters
[in]thisSpecies dataset
[in]spec_nameSpecies name to find properties of
[out]property_setPointer to species properties

Definition at line 92 of file chem_spec_data.F90.

◆ get_spec_names()

procedure camp_chem_spec_data::chem_spec_data_t::get_spec_names ( class(chem_spec_data_t), intent(in)  this,
integer(kind=i_kind), intent(in), optional  spec_type,
integer(kind=i_kind), intent(in), optional  spec_phase 
)

Get a list of species names.

If a type or phase are specified, only species with the specified values are returned. Otherwise, all species names are returned.

Returns
Species names
Parameters
[in]thisSpecies dataset
[in]spec_typeState variable type for the species
[in]spec_phasePhase of the species

Definition at line 90 of file chem_spec_data.F90.

◆ get_type()

procedure camp_chem_spec_data::chem_spec_data_t::get_type ( class(chem_spec_data_t), intent(in)  this,
character(len=*), intent(in)  spec_name,
integer(kind=i_kind), intent(out)  spec_type 
)

Get a species type.

Parameters
[in]thisSpecies dataset
[in]spec_nameSpecies name to find properties of
[out]spec_typeSpecies type

Definition at line 94 of file chem_spec_data.F90.

◆ initialize()

procedure camp_chem_spec_data::chem_spec_data_t::initialize ( class(chem_spec_data_t), intent(inout)  this)

Initialize the species set.

Parameters
[in,out]thisSpecies database

Definition at line 84 of file chem_spec_data.F90.

◆ load()

procedure camp_chem_spec_data::chem_spec_data_t::load ( class(chem_spec_data_t), intent(inout)  this,
type(json_core), intent(in), pointer  json,
type(json_value), intent(in), pointer  j_obj 
)

Load species from an input file.

Parameters
[in,out]thisSpecies dataset
[in]jsonJSON core
[in]j_objJSON object

Definition at line 82 of file chem_spec_data.F90.

◆ print()

procedure camp_chem_spec_data::chem_spec_data_t::print ( class(chem_spec_data_t), intent(in)  this,
integer(kind=i_kind), intent(in), optional  file_unit 
)

Print out the species data.

Parameters
[in]thisChemical species data
[in]file_unitFile unit for output

Definition at line 114 of file chem_spec_data.F90.

◆ size()

procedure camp_chem_spec_data::chem_spec_data_t::size ( class(chem_spec_data_t), intent(in)  this,
integer(kind=i_kind), intent(in), optional  spec_type,
integer(kind=i_kind), intent(in), optional  spec_phase 
)

Get the number of species with specified conditions.

Parameters
[in]thisSpecies database
[in]spec_typeState variable type for the species
[in]spec_phasePhase of the species

Definition at line 86 of file chem_spec_data.F90.

Member Data Documentation

◆ num_spec

integer(kind=i_kind) camp_chem_spec_data::chem_spec_data_t::num_spec = 0
private

Number of species.

Definition at line 71 of file chem_spec_data.F90.

◆ property_set

type(property_t), dimension(:), pointer camp_chem_spec_data::chem_spec_data_t::property_set => null()

Species property set.

Definition at line 79 of file chem_spec_data.F90.

◆ spec_name

type(string_t), dimension(:), pointer camp_chem_spec_data::chem_spec_data_t::spec_name => null()

Species name.

Definition at line 73 of file chem_spec_data.F90.

◆ spec_phase

integer(kind=i_kind), dimension(:), pointer camp_chem_spec_data::chem_spec_data_t::spec_phase => null()

Species phase.

Definition at line 77 of file chem_spec_data.F90.

◆ spec_type

integer(kind=i_kind), dimension(:), pointer camp_chem_spec_data::chem_spec_data_t::spec_type => null()

Species type.

Definition at line 75 of file chem_spec_data.F90.


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