CAMP 1.0.0
Chemistry Across Multiple Phases
|
The camp_core_t structure and associated subroutines. More...
Data Types | |
interface | camp_core_t |
Part-MC model data. More... | |
Functions/Subroutines | |
type(camp_core_t) function, pointer | constructor (input_file_path, n_cells) |
Constructor for camp_core_t. | |
subroutine | load_files (this, input_file_path) |
Load a set of model data files. | |
subroutine | load (this, input_file_path) |
Load model data from input files. | |
subroutine | initialize (this) |
Initialize the model data. | |
logical function | is_initialized (this) |
Inidicate whether the core has been initialized. | |
logical function | is_solver_initialized (this) |
Inidicate whether the solver has been initialized. | |
logical function | get_aero_phase (this, aero_phase_name, aero_phase) |
Get a pointer to an aerosol phase by name. | |
logical function | get_aero_rep (this, aero_rep_name, aero_rep) |
Get a pointer to an aerosol representation by name. | |
logical function | get_chem_spec_data (this, chem_spec_data) |
Get a pointer to the chemical species data. | |
logical function | get_mechanism (this, mech_name, mechanism) |
Get a pointer to a mechanism by name. | |
logical function | get_sub_model (this, sub_model_name, sub_model) |
Find an sub-model by name. | |
real(kind=dp) function | get_rel_tol (this) |
Get the relative tolerance for the solver. | |
real(kind=dp) function | get_abs_tol (this, spec_id) |
Get the absolute tolerance for a species on the state array. | |
type(camp_state_t) function, pointer | new_state_multi_cell (this, env_states) |
Get a model state variable based on the this set of model data. | |
type(camp_state_t) function, pointer | new_state_one_cell (this, env_state) |
Get a model state variable based on the this set of model data This is also called for multi-cell systems when no env_state_t array is passed. | |
integer(kind=i_kind) function | state_size (this) |
Get the size of the state array. | |
integer(kind=i_kind) function | state_size_per_cell (this) |
Get the size of the state array for each grid cell. | |
type(string_t) function, dimension(:), allocatable | unique_names (this) |
Get an array of unique names for all species on the state array. | |
logical function | spec_state_id (this, spec_name, state_id) |
Get the id of a species on the state array by its unique name. | |
subroutine | solver_initialize (this) |
Initialize the solver. | |
subroutine | free_solver (this) |
Free the solver memory. | |
subroutine | initialize_aero_rep_update_object (this, aero_rep, update_data) |
Initialize an update data object for an aerosol representation. | |
subroutine | initialize_rxn_update_object (this, rxn, update_data) |
Initialize an update data object for a reaction. | |
subroutine | initialize_sub_model_update_object (this, sub_model, update_data) |
Initialize an update data object for a sub model. | |
subroutine | aero_rep_update_data (this, update_data) |
Update data associated with an aerosol representation. This function should be called by an external aerosol microphysics model whenever the aerosol condensed data needs updated based on changes in, e.g., particle size or number concentration. The update types are aerosol- representation specific. | |
subroutine | 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. | |
subroutine | 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. | |
subroutine | solve (this, camp_state, time_step, rxn_phase, solver_stats) |
Integrate the chemical mechanism. | |
integer(kind=i_kind) function | pack_size (this, comm) |
Determine the size of a binary required to pack the mechanism. | |
subroutine | bin_pack (this, buffer, pos, comm) |
Pack the given value to the buffer, advancing position. | |
subroutine | bin_unpack (this, buffer, pos, comm) |
Unpack the given value from the buffer, advancing position. | |
subroutine | do_print (this, file_unit, solver_data_only) |
Print the core data. | |
elemental subroutine | finalize (this) |
Finalize the core. | |
subroutine | add_aero_phase (this, phase_name) |
Add a aerosol phase to the model data. | |
subroutine | add_aero_rep (this, rep_name) |
Add a aerosol representation to the model data. | |
subroutine | add_mechanism (this, mech_name) |
Add a chemical mechanism to the model data. | |
subroutine | add_sub_model (this, sub_model_name) |
Add a sub-model to the model data. | |
The camp_core_t structure and associated subroutines.
|
private |
Add a aerosol phase to the model data.
[in,out] | this | Model data |
[in] | phase_name | Aerosol phase name |
Definition at line 1748 of file camp_core.F90.
|
private |
Add a aerosol representation to the model data.
[in,out] | this | Model data |
[in] | rep_name | Aerosol representation name |
Definition at line 1772 of file camp_core.F90.
|
private |
Add a chemical mechanism to the model data.
[in,out] | this | Model data |
[in] | mech_name | Mechanism name |
Definition at line 1798 of file camp_core.F90.
|
private |
Add a sub-model to the model data.
[in,out] | this | Model data |
[in] | sub_model_name | Sub model name |
Definition at line 1823 of file camp_core.F90.
|
private |
Update data associated with an aerosol representation. This function should be called by an external aerosol microphysics model whenever the aerosol condensed data needs updated based on changes in, e.g., particle size or number concentration. The update types are aerosol- representation specific.
[in] | this | Chemical model |
[in] | update_data | Update data |
Definition at line 1292 of file camp_core.F90.
|
private |
Pack the given value to the 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 1477 of file camp_core.F90.
|
private |
Unpack the given value from the 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 1542 of file camp_core.F90.
|
private |
Constructor for camp_core_t.
[in] | input_file_path | Part-MC input file paths |
n_cells | Num cells to compute simulatenously |
Definition at line 252 of file camp_core.F90.
|
private |
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 1610 of file camp_core.F90.
|
private |
Finalize the core.
[in,out] | this | CAMP-core data |
Definition at line 1717 of file camp_core.F90.
|
private |
Free the solver memory.
[in,out] | this | CAMP-core |
Definition at line 1208 of file camp_core.F90.
|
private |
Get the absolute tolerance for a species on the state array.
[in] | this | Model data |
[in] | spec_id | Species id |
Definition at line 963 of file camp_core.F90.
|
private |
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 823 of file camp_core.F90.
|
private |
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 851 of file camp_core.F90.
|
private |
Get a pointer to the chemical species data.
[in] | this | Model data |
chem_spec_data | Pointer to the chemical species data |
Definition at line 878 of file camp_core.F90.
|
private |
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 894 of file camp_core.F90.
|
private |
Get the relative tolerance for the solver.
[in] | this | Model data |
Definition at line 949 of file camp_core.F90.
|
private |
Find an 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 921 of file camp_core.F90.
|
private |
Initialize the model data.
[in,out] | this | Model data |
Definition at line 654 of file camp_core.F90.
|
private |
Initialize an update data object for an aerosol representation.
[in] | this | CAMP core |
[in,out] | aero_rep | Aerosol representation to be updated |
[out] | update_data | Update data object |
Definition at line 1225 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 1246 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 1267 of file camp_core.F90.
|
private |
Inidicate whether the core has been initialized.
[in] | this | Model data |
Definition at line 799 of file camp_core.F90.
|
private |
Inidicate whether the solver has been initialized.
[in] | this | Model data |
Definition at line 811 of file camp_core.F90.
|
private |
Load model data from input files.
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 423 of file camp_core.F90.
|
private |
Load a set of model data 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 302 of file camp_core.F90.
|
private |
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 983 of file camp_core.F90.
|
private |
Get a model state variable based on the this set of model data This is also called for multi-cell systems when no env_state_t array is passed.
[in] | this | Chemical model |
[in] | env_state | Environmental state array (one element per grid cell to solve simultaneously) |
Definition at line 1006 of file camp_core.F90.
|
private |
Determine the size of a binary required to pack the mechanism.
[in] | this | Chemical model |
[in] | comm | MPI communicator |
Definition at line 1418 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 1314 of file camp_core.F90.
|
private |
Integrate the chemical mechanism.
[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 1353 of file camp_core.F90.
|
private |
Initialize the solver.
[in,out] | this | Chemical model |
Definition at line 1135 of file camp_core.F90.
|
private |
Get the id 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 1105 of file camp_core.F90.
|
private |
Get the size of the state array.
[in] | this | Chemical model |
Definition at line 1034 of file camp_core.F90.
|
private |
Get the size of the state array for each grid cell.
[in] | this | Chemical model |
Definition at line 1052 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 1334 of file camp_core.F90.
|
private |
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 1072 of file camp_core.F90.