CAMP 1.0.0
Chemistry Across Multiple Phases
|
The chem_spec_data_t structure and associated subroutines. More...
Data Types | |
interface | chem_spec_data_t |
Chemical species data. More... | |
Functions/Subroutines | |
type(chem_spec_data_t) function, pointer | constructor (init_size) |
Constructor for chem_spec_data_t. | |
subroutine | load (this, json, j_obj) |
Load species from an input file. | |
subroutine | initialize (this) |
Initialize the species set. | |
integer(kind=i_kind) function | get_size (this, spec_type, spec_phase) |
Get the number of species with the given properties. If no properties are specified, return the total number of species. | |
logical function | exists (this, spec_name) |
Check if a species name is in the set of chemical species. | |
type(string_t) function, dimension(:), allocatable | get_spec_names (this, spec_type, spec_phase) |
Get a list of species names. | |
logical function | get_property_set (this, spec_name, property_set) |
Get a species property set. Returns true if the species is found, or false otherwise. | |
logical function | get_type (this, spec_name, spec_type) |
Get a species type by species name. Returns true if the species is found or false otherwise. | |
logical function | get_phase (this, spec_name, spec_phase) |
Get a species phase by name. Returns true if the species is found, or false otherwise. | |
logical function | get_abs_tol (this, spec_name, abs_tol) |
Get the absolute integration tolerance of a species by name. Returns true if the species is found, or false otherwise. | |
integer(kind=i_kind) function | 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. Returns a valid state array index if the species is found, or 0 otherwise. | |
character(len=:) function, allocatable | gas_state_name (this, spec_id) |
Get a gas-phase species name 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 a valid state array index if the species is found, or 0 otherwise. | |
subroutine | do_print (this, file_unit) |
Print out the species data. | |
elemental subroutine | finalize (this) |
Finalize the chemical species data. | |
subroutine | ensure_size (this, num_spec) |
Ensure there is enough room in the species dataset to add a specified number of species. | |
subroutine | add (this, spec_name, spec_type, spec_phase, property_set) |
Add a new chemical species. | |
logical function | find (this, spec_name, spec_id) |
Get the index of a chemical species by name. Returns true if the species is found or false otherwise. | |
Variables | |
integer(kind=i_kind), parameter, public | chem_spec_unknown_type = 0 |
State variable types (Must match values in camp_solver.c) | |
integer(kind=i_kind), parameter, public | chem_spec_variable = 1 |
integer(kind=i_kind), parameter, public | chem_spec_constant = 2 |
integer(kind=i_kind), parameter, public | chem_spec_pssa = 3 |
integer(kind=i_kind), parameter, public | chem_spec_activity_coeff = 4 |
integer(kind=i_kind), parameter, public | chem_spec_unknown_phase = 0 |
Species phase. | |
integer(kind=i_kind), parameter, public | chem_spec_gas_phase = 1 |
integer(kind=i_kind), parameter, public | chem_spec_aero_phase = 2 |
integer(kind=i_kind), parameter | realloc_inc = 50 |
Reallocation increment. | |
real(kind=dp), parameter | default_abs_tol = 1.0e-14 |
Default absolute integration tolerance. | |
The chem_spec_data_t structure and associated subroutines.
|
private |
Add a new chemical 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 714 of file chem_spec_data.F90.
|
private |
Constructor for chem_spec_data_t.
[in] | init_size | Number of species to allocate space for initially |
Definition at line 138 of file chem_spec_data.F90.
|
private |
Print out the species data.
[in] | this | Chemical species data |
[in] | file_unit | File unit for output |
Definition at line 607 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 676 of file chem_spec_data.F90.
|
private |
Check if a species name is in the set of chemical species.
[in] | this | Species dataset |
[in] | spec_name | Species name |
Definition at line 380 of file chem_spec_data.F90.
|
private |
Finalize the chemical species data.
[in,out] | this | Species dataset |
Definition at line 660 of file chem_spec_data.F90.
|
private |
Get the index of a chemical species by name. Returns true if the species is found or false otherwise.
[in] | this | Species dataset |
[in] | spec_name | Species name |
[out] | spec_id | Species id |
Definition at line 773 of file chem_spec_data.F90.
|
private |
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. Returns a valid state array index if the species is found, or 0 otherwise.
[in] | this | Species dataset |
[in] | spec_name | Species name |
Definition at line 551 of file chem_spec_data.F90.
|
private |
Get a gas-phase species name 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 a valid state array index if the species is found, or 0 otherwise.
[in] | this | Species dataset |
[in] | spec_id | Species id |
Definition at line 580 of file chem_spec_data.F90.
|
private |
Get the absolute integration tolerance of a species by name. Returns true if the species is found, or false otherwise.
[in] | this | Species dataset |
[in] | spec_name | Species name |
[out] | abs_tol | Absolute integration tolerance |
Definition at line 517 of file chem_spec_data.F90.
|
private |
Get a species phase by name. Returns true if the species is found, or false otherwise.
[in] | this | Species dataset |
[in] | spec_name | Species name to find properties of |
[out] | spec_phase | Species phase |
Definition at line 495 of file chem_spec_data.F90.
|
private |
Get a species property set. Returns true if the species is found, or false otherwise.
[in] | this | Species dataset |
[in] | spec_name | Species name to find properties of |
[out] | property_set | Pointer to species properties |
Definition at line 452 of file chem_spec_data.F90.
|
private |
Get the number of species with the given properties. If no properties are specified, return the total number of species.
[in] | this | Species database |
[in] | spec_type | State variable type for the species |
[in] | spec_phase | Phase of the species |
Definition at line 346 of file chem_spec_data.F90.
|
private |
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 400 of file chem_spec_data.F90.
|
private |
Get a species type by species name. Returns true if the species is found or false otherwise.
[in] | this | Species dataset |
[in] | spec_name | Species name to find properties of |
[out] | spec_type | Species type |
Definition at line 474 of file chem_spec_data.F90.
|
private |
Initialize the species set.
[in,out] | this | Species database |
Definition at line 320 of file chem_spec_data.F90.
|
private |
Load species from an input file.
[in,out] | this | Species dataset |
[in] | json | JSON core |
[in] | j_obj | JSON object |
Definition at line 212 of file chem_spec_data.F90.
integer(kind=i_kind), parameter, public camp_chem_spec_data::chem_spec_activity_coeff = 4 |
Definition at line 53 of file chem_spec_data.F90.
integer(kind=i_kind), parameter, public camp_chem_spec_data::chem_spec_aero_phase = 2 |
Definition at line 58 of file chem_spec_data.F90.
integer(kind=i_kind), parameter, public camp_chem_spec_data::chem_spec_constant = 2 |
Definition at line 51 of file chem_spec_data.F90.
integer(kind=i_kind), parameter, public camp_chem_spec_data::chem_spec_gas_phase = 1 |
Definition at line 57 of file chem_spec_data.F90.
integer(kind=i_kind), parameter, public camp_chem_spec_data::chem_spec_pssa = 3 |
Definition at line 52 of file chem_spec_data.F90.
integer(kind=i_kind), parameter, public camp_chem_spec_data::chem_spec_unknown_phase = 0 |
Species phase.
Definition at line 56 of file chem_spec_data.F90.
integer(kind=i_kind), parameter, public camp_chem_spec_data::chem_spec_unknown_type = 0 |
State variable types (Must match values in camp_solver.c)
Definition at line 49 of file chem_spec_data.F90.
integer(kind=i_kind), parameter, public camp_chem_spec_data::chem_spec_variable = 1 |
Definition at line 50 of file chem_spec_data.F90.
|
private |
Default absolute integration tolerance.
Definition at line 63 of file chem_spec_data.F90.
|
private |
Reallocation increment.
Definition at line 61 of file chem_spec_data.F90.