CAMP 1.0.0
Chemistry Across Multiple Phases
|
Chemical species data. More...
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. | |
Chemical species data.
Time-invariant data related to a chemical species
Definition at line 68 of file chem_spec_data.F90.
|
final |
Finalize the chemical species data.
[in,out] | this | Species dataset |
Definition at line 116 of file chem_spec_data.F90.
|
private |
Add a species.
[in,out] | this | Species dataset |
[in] | spec_name | Name of species to add |
[in,out] | spec_type | State variable type |
[in,out] | spec_phase | Species phase |
[in,out] | property_set | Property set for new species |
Definition at line 123 of file chem_spec_data.F90.
|
private |
Ensure there is enough room in the species dataset to add a specified number of species.
[in,out] | this | Species dataset |
[in] | num_spec | Number of new species to ensure space for |
Definition at line 121 of file chem_spec_data.F90.
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.
[in] | this | Species dataset |
[in] | spec_name | Species name |
Definition at line 88 of file chem_spec_data.F90.
|
private |
Find a species index by name.
[in] | this | Species dataset |
[in] | spec_name | Species name |
[out] | spec_id | Species id |
Definition at line 125 of file chem_spec_data.F90.
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.
[in] | this | Species dataset |
[in] | spec_name | Species name |
Definition at line 105 of file chem_spec_data.F90.
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.
[in] | this | Species dataset |
[in] | spec_id | Species id |
Definition at line 112 of file chem_spec_data.F90.
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.
[in] | this | Species dataset |
[in] | spec_name | Species name |
[out] | abs_tol | Absolute integration tolerance |
Definition at line 98 of file chem_spec_data.F90.
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.
[in] | this | Species dataset |
[in] | spec_name | Species name to find properties of |
[out] | spec_phase | Species phase |
Definition at line 96 of file chem_spec_data.F90.
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.
[in] | this | Species dataset |
[in] | spec_name | Species name to find properties of |
[out] | property_set | Pointer to species properties |
Definition at line 92 of file chem_spec_data.F90.
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.
[in] | this | Species dataset |
[in] | spec_type | State variable type for the species |
[in] | spec_phase | Phase of the species |
Definition at line 90 of file chem_spec_data.F90.
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.
[in] | this | Species dataset |
[in] | spec_name | Species name to find properties of |
[out] | spec_type | Species type |
Definition at line 94 of file chem_spec_data.F90.
procedure camp_chem_spec_data::chem_spec_data_t::initialize | ( | class(chem_spec_data_t), intent(inout) | this | ) |
Initialize the species set.
[in,out] | this | Species database |
Definition at line 84 of file chem_spec_data.F90.
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.
[in,out] | this | Species dataset |
[in] | json | JSON core |
[in] | j_obj | JSON object |
Definition at line 82 of file chem_spec_data.F90.
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.
[in] | this | Chemical species data |
[in] | file_unit | File unit for output |
Definition at line 114 of file chem_spec_data.F90.
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.
[in] | this | Species database |
[in] | spec_type | State variable type for the species |
[in] | spec_phase | Phase of the species |
Definition at line 86 of file chem_spec_data.F90.
|
private |
Number of species.
Definition at line 71 of file chem_spec_data.F90.
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.
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.
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.
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.