|
CAMP 1.0.0
Chemistry Across Multiple Phases
|
Part-MC model data. More...

Public Member Functions | |
| procedure | load_files (this, input_file_path) |
| Load a set of configuration files. | |
| procedure | load (this, input_file_path) |
| Load model data from a configuration file. | |
| procedure | initialize (this) |
| Initialize the model. | |
| procedure | is_initialized (this) |
| Indicate whether the core has been initialized. | |
| procedure | is_solver_initialized (this) |
| Indicate whether the solver has been initialized. | |
| procedure | get_aero_phase (this, aero_phase_name, aero_phase) |
| Get a pointer to an aerosol phase by name. | |
| procedure | get_aero_rep (this, aero_rep_name, aero_rep) |
| Get a pointer to an aerosol representation by name. | |
| procedure | get_chem_spec_data (this, chem_spec_data) |
| Get a pointer to the set of chemical species. | |
| procedure | get_mechanism (this, mech_name, mechanism) |
| Get a pointer to a mechanism by name. | |
| procedure | get_sub_model (this, sub_model_name, sub_model) |
| Get a pointer to a sub-model by name. | |
| procedure | get_rel_tol (this) |
| Get the relative tolerance for the solver. | |
| procedure | get_abs_tol (this, spec_id) |
| Get the absolute tolerance for a species on the state array. | |
| procedure | new_state_one_cell (this, env_state) |
| Get a new model state variable. | |
| procedure | new_state_multi_cell (this, env_states) |
| Get a model state variable based on the this set of model data. | |
| generic | new_state (this, env_state) |
| Get a new model state variable. | |
| generic | new_state (this, env_states) |
| Get a model state variable based on the this set of model data. | |
| procedure | state_size (this) |
| Get the size of the state array. | |
| procedure | state_size_per_cell (this) |
| Get the size of the state array per grid cell. | |
| procedure | unique_names (this) |
| Get an array of unique names for all species on the state array. | |
| procedure | spec_state_id (this, spec_name, state_id) |
| Get the index of a species on the state array by its unique name. | |
| procedure | solver_initialize (this) |
| Initialize the solver. | |
| procedure | free_solver (this) |
| Free the solver. | |
| generic | initialize_update_object (this, aero_rep, update_data) |
| Initialize an update_data object. | |
| generic | initialize_update_object (this, rxn, update_data) |
| Initialize an update data object for a reaction. | |
| generic | initialize_update_object (this, sub_model, update_data) |
| Initialize an update data object for a sub model. | |
| generic | update_data (this, update_data) |
| Update model data. | |
| generic | update_data (this, update_data) |
| Update data associated with a reaction. This function should be called when reaction parameters need updated from the host model. For example, this function can be called to update photolysis rates from a host model's photolysis module. | |
| generic | update_data (this, update_data) |
| Update data associated with a sub-model. This function should be called when sub-model parameters need updated from the host model. | |
| procedure | solve (this, camp_state, time_step, rxn_phase, solver_stats) |
| Run the chemical mechanisms. | |
| procedure | pack_size (this, comm) |
| Determine the number of bytes required to pack the variable. | |
| procedure | bin_pack (this, buffer, pos, comm) |
| Pack the given variable into a buffer, advancing position. | |
| procedure | bin_unpack (this, buffer, pos, comm) |
| Unpack the given variable from a buffer, advancing position. | |
| procedure | print (this, file_unit, solver_data_only) |
| Print the core data. | |
| final | finalize (this) |
| Finalize the core. | |
| finalize_array (this) | |
| Finalize an array of core data. | |
Public Attributes | |
| type(mechanism_data_ptr), dimension(:), pointer, public | mechanism => null() |
| Chemical mechanisms FIXME set up an iterator for external modules to use and make all data members private. | |
| type(chem_spec_data_t), pointer | chem_spec_data => null() |
| Chemical species data. | |
| type(sub_model_data_ptr), dimension(:), pointer | sub_model => null() |
| Sub models. | |
| type(aero_rep_data_ptr), dimension(:), pointer, public | aero_rep => null() |
| Aerosol representations. | |
| type(aero_phase_data_ptr), dimension(:), pointer | aero_phase => null() |
| Aerosol phases. | |
| integer(kind=i_kind) | size_state_per_cell |
| Size of the state array per grid cell. | |
| integer(kind=i_kind) | n_cells = 1 |
| Number of cells to compute. | |
| real(kind=dp), dimension(:), allocatable | init_state |
| Initial state values. | |
| logical | split_gas_aero = .false. |
| Flag to split gas- and aerosol-phase reactions (for large aerosol representations, like single-particle) | |
| real(kind=dp) | rel_tol = 0.0 |
| Relative integration tolerance. | |
| real(kind=dp), dimension(:), allocatable | abs_tol |
| integer(kind=i_kind), dimension(:), allocatable | var_type |
| type(camp_solver_data_t), pointer, public | solver_data_gas => null() |
| Solver data (gas-phase reactions) | |
| type(camp_solver_data_t), pointer, public | solver_data_aero => null() |
| Solver data (aerosol-phase reactions) | |
| type(camp_solver_data_t), pointer, public | solver_data_gas_aero => null() |
| Solver data (mixed gas- and aerosol-phase reactions) | |
| logical | core_is_initialized = .false. |
| Flag indicating the model data has been initialized. | |
| logical | solver_is_initialized = .false. |
| Flag indicating the solver has been initialized. | |
Private Member Functions | |
| procedure, private | initialize_aero_rep_update_object (this, aero_rep, update_data) |
| Initialize an update_data object. | |
| procedure, private | initialize_rxn_update_object (this, rxn, update_data) |
| Initialize an update data object for a reaction. | |
| procedure, private | initialize_sub_model_update_object (this, sub_model, update_data) |
| Initialize an update data object for a sub model. | |
| procedure, private | aero_rep_update_data (this, update_data) |
| Update model data. | |
| procedure, private | rxn_update_data (this, update_data) |
| Update data associated with a reaction. This function should be called when reaction parameters need updated from the host model. For example, this function can be called to update photolysis rates from a host model's photolysis module. | |
| procedure, private | sub_model_update_data (this, update_data) |
| Update data associated with a sub-model. This function should be called when sub-model parameters need updated from the host model. | |
| procedure, private | add_aero_phase (this, phase_name) |
| Add an aerosol phase to the model. | |
| procedure, private | add_aero_rep (this, rep_name) |
| Add an aerosol representation to the model. | |
| procedure, private | add_mechanism (this, mech_name) |
| Add a mechanism to the model. | |
| procedure, private | add_sub_model (this, sub_model_name) |
| Add a sub-model to the model. | |
Part-MC model data.
Constructor for camp_core_t.
Contains all time-invariant data for a Part-MC model run.
Definition at line 243 of file camp_core.F90.
|
final |
Finalize the core.
| [in,out] | this | CAMP-core data |
Definition at line 229 of file camp_core.F90.

|
private |
Add an aerosol phase to the model.
| [in,out] | this | Model data |
| [in] | phase_name | Aerosol phase name |
Definition at line 233 of file camp_core.F90.
|
private |
Add an aerosol representation to the model.
| [in,out] | this | Model data |
| [in] | rep_name | Aerosol representation name |
Definition at line 235 of file camp_core.F90.
|
private |
Add a mechanism to the model.
| [in,out] | this | Model data |
| [in] | mech_name | Mechanism name |
Definition at line 237 of file camp_core.F90.
|
private |
Add a sub-model to the model.
| [in,out] | this | Model data |
| [in] | sub_model_name | Sub model name |
Definition at line 239 of file camp_core.F90.
|
private |
Update model data.
| [in] | this | Chemical model |
| [in] | update_data | Update data |
Definition at line 211 of file camp_core.F90.
| procedure camp_camp_core::camp_core_t::bin_pack | ( | class(camp_core_t), intent(in) | this, |
| character, dimension(:), intent(inout) | buffer, | ||
| integer, intent(inout) | pos, | ||
| integer, intent(in), optional | comm ) |
Pack the given variable into a buffer, advancing position.
| [in] | this | Chemical model |
| [in,out] | buffer | Memory buffer |
| [in,out] | pos | Current buffer position |
| [in] | comm | MPI communicator |
Definition at line 223 of file camp_core.F90.
| procedure camp_camp_core::camp_core_t::bin_unpack | ( | class(camp_core_t), intent(inout) | this, |
| character, dimension(:), intent(inout) | buffer, | ||
| integer, intent(inout) | pos, | ||
| integer, intent(in), optional | comm ) |
Unpack the given variable from a buffer, advancing position.
| [in,out] | this | Chemical model |
| [in,out] | buffer | Memory buffer |
| [in,out] | pos | Current buffer position |
| [in] | comm | MPI communicator |
Definition at line 225 of file camp_core.F90.
| camp_camp_core::camp_core_t::finalize_array | ( | type(camp_core_t), dimension(:), intent(inout) | this | ) |
Finalize an array of core data.
| [in,out] | this | CAMP-core data |
Definition at line 229 of file camp_core.F90.
| procedure camp_camp_core::camp_core_t::free_solver | ( | class(camp_core_t), intent(inout) | this | ) |
| procedure camp_camp_core::camp_core_t::get_abs_tol | ( | class(camp_core_t), intent(in) | this, |
| integer(kind=i_kind), intent(in) | spec_id ) |
Get the absolute tolerance for a species on the state array.
| [in] | this | Model data |
| [in] | spec_id | Species id |
Definition at line 185 of file camp_core.F90.
| procedure camp_camp_core::camp_core_t::get_aero_phase | ( | class(camp_core_t), intent(in) | this, |
| character(len=*), intent(in) | aero_phase_name, | ||
| class(aero_phase_data_t), intent(out), pointer | aero_phase ) |
Get a pointer to an aerosol phase by name.
| [in] | this | Model data |
| [in] | aero_phase_name | Aerosol phase name to search for |
| [out] | aero_phase | Pointer to the aerosol phase |
Definition at line 173 of file camp_core.F90.
| procedure camp_camp_core::camp_core_t::get_aero_rep | ( | class(camp_core_t), intent(in) | this, |
| character(len=*), intent(in) | aero_rep_name, | ||
| class(aero_rep_data_t), intent(out), pointer | aero_rep ) |
Get a pointer to an aerosol representation by name.
| [in] | this | Model data |
| [in] | aero_rep_name | Aerosol representation name to search for |
| [out] | aero_rep | Aerosol representation |
Definition at line 175 of file camp_core.F90.
| procedure camp_camp_core::camp_core_t::get_chem_spec_data | ( | class(camp_core_t), intent(in) | this, |
| type(chem_spec_data_t), pointer | chem_spec_data ) |
Get a pointer to the set of chemical species.
| [in] | this | Model data |
| chem_spec_data | Pointer to the chemical species data |
Definition at line 177 of file camp_core.F90.
| procedure camp_camp_core::camp_core_t::get_mechanism | ( | class(camp_core_t), intent(in) | this, |
| character(len=*), intent(in) | mech_name, | ||
| type(mechanism_data_t), intent(out), pointer | mechanism ) |
Get a pointer to a mechanism by name.
| [in] | this | Model data |
| [in] | mech_name | Mechanism name to search for |
| [out] | mechanism | Pointer to the mechanism |
Definition at line 179 of file camp_core.F90.
| procedure camp_camp_core::camp_core_t::get_rel_tol | ( | class(camp_core_t), intent(in) | this | ) |
Get the relative tolerance for the solver.
| [in] | this | Model data |
Definition at line 183 of file camp_core.F90.
| procedure camp_camp_core::camp_core_t::get_sub_model | ( | class(camp_core_t), intent(in) | this, |
| character(len=*), intent(in) | sub_model_name, | ||
| class(sub_model_data_t), intent(out), pointer | sub_model ) |
Get a pointer to a sub-model by name.
| [in] | this | Model data |
| [in] | sub_model_name | Sub model name to search for |
| [out] | sub_model | Sub model |
Definition at line 181 of file camp_core.F90.
| procedure camp_camp_core::camp_core_t::initialize | ( | class(camp_core_t), intent(inout), target | this | ) |
Initialize the model.
| [in,out] | this | Model data |
Definition at line 167 of file camp_core.F90.
|
private |
Initialize an update_data object.
| [in] | this | CAMP core |
| [in,out] | aero_rep | Aerosol representation to be updated |
| [out] | update_data | Update data object |
Definition at line 203 of file camp_core.F90.
|
private |
Initialize an update data object for a reaction.
| [in] | this | CAMP core |
| [in,out] | rxn | Reaction to be updated |
| [out] | update_data | Update data object |
Definition at line 204 of file camp_core.F90.
|
private |
Initialize an update data object for a sub model.
| [in] | this | CAMP core |
| [in,out] | sub_model | Sub model to be updated |
| [out] | update_data | Update data object |
Definition at line 205 of file camp_core.F90.
| generic camp_camp_core::camp_core_t::initialize_update_object | ( | class(camp_core_t), intent(in) | this, |
| class(aero_rep_data_t), intent(inout) | aero_rep, | ||
| class(aero_rep_update_data_t), intent(out) | update_data ) |
Initialize an update_data object.
| [in] | this | CAMP core |
| [in,out] | aero_rep | Aerosol representation to be updated |
| [out] | update_data | Update data object |
Definition at line 206 of file camp_core.F90.

| generic camp_camp_core::camp_core_t::initialize_update_object | ( | class(camp_core_t), intent(in) | this, |
| class(rxn_data_t), intent(inout) | rxn, | ||
| class(rxn_update_data_t), intent(out) | update_data ) |
Initialize an update data object for a reaction.
| [in] | this | CAMP core |
| [in,out] | rxn | Reaction to be updated |
| [out] | update_data | Update data object |
Definition at line 206 of file camp_core.F90.
| generic camp_camp_core::camp_core_t::initialize_update_object | ( | class(camp_core_t), intent(in) | this, |
| class(sub_model_data_t), intent(inout) | sub_model, | ||
| class(sub_model_update_data_t), intent(out) | update_data ) |
Initialize an update data object for a sub model.
| [in] | this | CAMP core |
| [in,out] | sub_model | Sub model to be updated |
| [out] | update_data | Update data object |
Definition at line 206 of file camp_core.F90.
| procedure camp_camp_core::camp_core_t::is_initialized | ( | class(camp_core_t), intent(in) | this | ) |
Indicate whether the core has been initialized.
| [in] | this | Model data |
Definition at line 169 of file camp_core.F90.
| procedure camp_camp_core::camp_core_t::is_solver_initialized | ( | class(camp_core_t), intent(in) | this | ) |
Indicate whether the solver has been initialized.
| [in] | this | Model data |
Definition at line 171 of file camp_core.F90.
| procedure camp_camp_core::camp_core_t::load | ( | class(camp_core_t), intent(inout) | this, |
| type(string_t), dimension(:), intent(in), allocatable | input_file_path ) |
Load model data from a configuration file.
See Input File Format: CAMP-Chem Configuration Data for the input file format.
| [in,out] | this | Model data |
| [in] | input_file_path | Part-MC input file paths |
Definition at line 165 of file camp_core.F90.
| procedure camp_camp_core::camp_core_t::load_files | ( | class(camp_core_t), intent(inout) | this, |
| character(len=*), intent(in) | input_file_path ) |
Load a set of configuration files.
See Input File Format: CAMP-Chem Configuration File List for the input file format.
| [in,out] | this | Model data |
| [in] | input_file_path | Part-MC input file paths |
Definition at line 163 of file camp_core.F90.
| generic camp_camp_core::camp_core_t::new_state | ( | class(camp_core_t), intent(in) | this, |
| type(env_state_t), intent(in), optional, target | env_state ) |
Get a new model state variable.
| [in] | this | Chemical model |
| [in] | env_state | Environmental state array (one element per grid cell to solve simultaneously) |
Definition at line 189 of file camp_core.F90.

| generic camp_camp_core::camp_core_t::new_state | ( | class(camp_core_t), intent(in) | this, |
| type(env_state_ptr), dimension(:), intent(in), target | env_states ) |
Get a model state variable based on the this set of model data.
| [in] | this | Chemical model |
| [in] | env_states | Environmental state array (one element per grid cell to solve simultaneously) |
Definition at line 189 of file camp_core.F90.
| procedure camp_camp_core::camp_core_t::new_state_multi_cell | ( | class(camp_core_t), intent(in) | this, |
| type(env_state_ptr), dimension(:), intent(in), target | env_states ) |
Get a model state variable based on the this set of model data.
| [in] | this | Chemical model |
| [in] | env_states | Environmental state array (one element per grid cell to solve simultaneously) |
Definition at line 188 of file camp_core.F90.
| procedure camp_camp_core::camp_core_t::new_state_one_cell | ( | class(camp_core_t), intent(in) | this, |
| type(env_state_t), intent(in), optional, target | env_state ) |
Get a new model state variable.
| [in] | this | Chemical model |
| [in] | env_state | Environmental state array (one element per grid cell to solve simultaneously) |
Definition at line 187 of file camp_core.F90.
| procedure camp_camp_core::camp_core_t::pack_size | ( | class(camp_core_t), intent(in) | this, |
| integer, intent(in), optional | comm ) |
Determine the number of bytes required to pack the variable.
| [in] | this | Chemical model |
| [in] | comm | MPI communicator |
Definition at line 221 of file camp_core.F90.
| procedure camp_camp_core::camp_core_t::print | ( | class(camp_core_t), intent(in) | this, |
| integer(kind=i_kind), intent(in), optional | file_unit, | ||
| logical, intent(in), optional | solver_data_only ) |
Print the core data.
| [in] | this | Core data |
| [in] | file_unit | File unit for output |
| [in] | solver_data_only | Print only the solver data (can be used during runtime for debugging) |
Definition at line 227 of file camp_core.F90.
|
private |
Update data associated with a reaction. This function should be called when reaction parameters need updated from the host model. For example, this function can be called to update photolysis rates from a host model's photolysis module.
| [in] | this | Chemical model |
| [in] | update_data | Update data |
Definition at line 212 of file camp_core.F90.
| procedure camp_camp_core::camp_core_t::solve | ( | class(camp_core_t), intent(in) | this, |
| type(camp_state_t), intent(inout), target | camp_state, | ||
| real(kind=dp), intent(in) | time_step, | ||
| integer(kind=i_kind), intent(in), optional | rxn_phase, | ||
| type(solver_stats_t), intent(inout), optional, target | solver_stats ) |
Run the chemical mechanisms.
| [in] | this | Chemical model |
| [in,out] | camp_state | Current model state |
| [in] | time_step | Time step over which to integrate (s) |
| [in] | rxn_phase | Phase to solve - gas, aerosol, or both (default) Use parameters in camp_rxn_data to specify phase: GAS_RXN, AERO_RXN, GAS_AERO_RXN |
| [in,out] | solver_stats | Return solver statistics to the host model |
Definition at line 219 of file camp_core.F90.
| procedure camp_camp_core::camp_core_t::solver_initialize | ( | class(camp_core_t), intent(inout) | this | ) |
Initialize the solver.
| [in,out] | this | Chemical model |
Definition at line 199 of file camp_core.F90.
| procedure camp_camp_core::camp_core_t::spec_state_id | ( | class(camp_core_t), intent(in) | this, |
| character(len=*), intent(in) | spec_name, | ||
| integer(kind=i_kind), intent(inout) | state_id ) |
Get the index of a species on the state array by its unique name.
| [in] | this | CAMP core |
| [in] | spec_name | Species unique name |
| [in,out] | state_id | Species state id |
Definition at line 197 of file camp_core.F90.
| procedure camp_camp_core::camp_core_t::state_size | ( | class(camp_core_t), intent(in) | this | ) |
Get the size of the state array.
| [in] | this | Chemical model |
Definition at line 191 of file camp_core.F90.
| procedure camp_camp_core::camp_core_t::state_size_per_cell | ( | class(camp_core_t), intent(in) | this | ) |
Get the size of the state array per grid cell.
| [in] | this | Chemical model |
Definition at line 193 of file camp_core.F90.
|
private |
Update data associated with a sub-model. This function should be called when sub-model parameters need updated from the host model.
| [in] | this | Chemical model |
| [in] | update_data | Update data |
Definition at line 213 of file camp_core.F90.
| procedure camp_camp_core::camp_core_t::unique_names | ( | class(camp_core_t), intent(in) | this | ) |
Get an array of unique names for all species on the state array.
The order of this array is the same as the state array for one grid cell
| [in] | this | CAMP core |
Definition at line 195 of file camp_core.F90.
| generic camp_camp_core::camp_core_t::update_data | ( | class(camp_core_t), intent(in) | this, |
| class(aero_rep_update_data_t), intent(in) | update_data ) |
Update model data.
| [in] | this | Chemical model |
| [in] | update_data | Update data |
Definition at line 214 of file camp_core.F90.
| generic camp_camp_core::camp_core_t::update_data | ( | class(camp_core_t), intent(in) | this, |
| class(rxn_update_data_t), intent(in) | update_data ) |
Update data associated with a reaction. This function should be called when reaction parameters need updated from the host model. For example, this function can be called to update photolysis rates from a host model's photolysis module.
| [in] | this | Chemical model |
| [in] | update_data | Update data |
Definition at line 214 of file camp_core.F90.
| generic camp_camp_core::camp_core_t::update_data | ( | class(camp_core_t), intent(in) | this, |
| class(sub_model_update_data_t), intent(in) | update_data ) |
Update data associated with a sub-model. This function should be called when sub-model parameters need updated from the host model.
| [in] | this | Chemical model |
| [in] | update_data | Update data |
Definition at line 214 of file camp_core.F90.
| real(kind=dp), dimension(:), allocatable camp_camp_core::camp_core_t::abs_tol |
Definition at line 148 of file camp_core.F90.
| type(aero_phase_data_ptr), dimension(:), pointer camp_camp_core::camp_core_t::aero_phase => null() |
Aerosol phases.
Definition at line 134 of file camp_core.F90.
| type(aero_rep_data_ptr), dimension(:), pointer, public camp_camp_core::camp_core_t::aero_rep => null() |
Aerosol representations.
Definition at line 132 of file camp_core.F90.
| type(chem_spec_data_t), pointer camp_camp_core::camp_core_t::chem_spec_data => null() |
Chemical species data.
Definition at line 128 of file camp_core.F90.
| logical camp_camp_core::camp_core_t::core_is_initialized = .false. |
Flag indicating the model data has been initialized.
Definition at line 158 of file camp_core.F90.
| real(kind=dp), dimension(:), allocatable camp_camp_core::camp_core_t::init_state |
Initial state values.
Definition at line 140 of file camp_core.F90.
| type(mechanism_data_ptr), dimension(:), pointer, public camp_camp_core::camp_core_t::mechanism => null() |
Chemical mechanisms FIXME set up an iterator for external modules to use and make all data members private.
Definition at line 126 of file camp_core.F90.
| integer(kind=i_kind) camp_camp_core::camp_core_t::n_cells = 1 |
Number of cells to compute.
Definition at line 138 of file camp_core.F90.
| real(kind=dp) camp_camp_core::camp_core_t::rel_tol = 0.0 |
Relative integration tolerance.
Definition at line 145 of file camp_core.F90.
| integer(kind=i_kind) camp_camp_core::camp_core_t::size_state_per_cell |
Size of the state array per grid cell.
Definition at line 136 of file camp_core.F90.
| type(camp_solver_data_t), pointer, public camp_camp_core::camp_core_t::solver_data_aero => null() |
Solver data (aerosol-phase reactions)
Definition at line 154 of file camp_core.F90.
| type(camp_solver_data_t), pointer, public camp_camp_core::camp_core_t::solver_data_gas => null() |
Solver data (gas-phase reactions)
Definition at line 152 of file camp_core.F90.
| type(camp_solver_data_t), pointer, public camp_camp_core::camp_core_t::solver_data_gas_aero => null() |
Solver data (mixed gas- and aerosol-phase reactions)
Definition at line 156 of file camp_core.F90.
| logical camp_camp_core::camp_core_t::solver_is_initialized = .false. |
Flag indicating the solver has been initialized.
Definition at line 160 of file camp_core.F90.
| logical camp_camp_core::camp_core_t::split_gas_aero = .false. |
Flag to split gas- and aerosol-phase reactions (for large aerosol representations, like single-particle)
Definition at line 143 of file camp_core.F90.
| type(sub_model_data_ptr), dimension(:), pointer camp_camp_core::camp_core_t::sub_model => null() |
Sub models.
Definition at line 130 of file camp_core.F90.
| integer(kind=i_kind), dimension(:), allocatable camp_camp_core::camp_core_t::var_type |
Definition at line 150 of file camp_core.F90.