CAMP 1.0.0
Chemistry Across Multiple Phases
Data Types | Functions/Subroutines | Variables
camp_rxn_data Module Reference

The rxn_data_t structure and associated subroutines. More...

Data Types

interface  initialize
 Reaction initialization. Takes species, phase and reaction parameters and packs required information into the condensed data arrays for use during the model run. More...
 
interface  internal_bin_pack
 Extending-type binary pack function (Internal use only) More...
 
interface  internal_bin_unpack
 Extending-type binary unpack function (Internal use only) More...
 
interface  internal_pack_size
 Extending-type binary pack size (internal use only) More...
 
type  rxn_data_ptr
 Pointer type for building arrays of mixed reactions. More...
 
type  rxn_data_t
 Abstract reaction data type. More...
 
type  rxn_update_data_t
 Update cookie. More...
 

Functions/Subroutines

subroutine load (this, json, j_obj)
 Load reactions from an input file.
 
logical function check_phase (this, rxn_phase)
 Check the phase of the reaction against the phase being solved for. During GAS_RXN integrations, only GAS_RXN reactions are solved. During AERO_RXN integrations, only AERO_RXN and GAS_AERO_RXN reactions are solved. During GAS_AERO_RXN integrations, all reactions are solved.
 
integer(kind=i_kind) function pack_size (this, comm)
 Determine the size of a binary required to pack the reaction data.
 
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)
 Print the reaction data.
 
elemental subroutine dereference (this)
 Dereference a pointer to a reaction.
 
elemental subroutine ptr_finalize (this)
 Finalize a pointer to a reaction.
 
integer(kind=c_int) function rxn_update_data_get_type (this)
 Get the update data reaction type.
 
integer(kind=c_int) function rxn_update_data_get_cell_id (this)
 Get the grid cell id to update.
 
type(c_ptr) function rxn_update_data_get_data (this)
 Get the update data.
 
integer(kind=i_kind) function rxn_update_data_pack_size (this, comm)
 Determine the size of a binary required to pack the reaction data.
 
subroutine rxn_update_data_bin_pack (this, buffer, pos, comm)
 Pack the given value to the buffer, advancing position.
 
subroutine rxn_update_data_bin_unpack (this, buffer, pos, comm)
 Unpack the given value from the buffer, advancing position.
 
subroutine do_rxn_update_data_print (this, file_unit)
 Print the update data.
 

Variables

integer(kind=i_kind), parameter, public gas_rxn = 1
 Gas-phase reaction.
 
integer(kind=i_kind), parameter, public gas_aero_rxn = 2
 Mixed-phase (gas and aerosol) reaction.
 
integer(kind=i_kind), parameter, public aero_rxn = 3
 Aerosol-phase reaction.
 

Detailed Description

The rxn_data_t structure and associated subroutines.

Function/Subroutine Documentation

◆ bin_pack()

subroutine camp_rxn_data::bin_pack ( class(rxn_data_t), intent(in)  this,
character, dimension(:), intent(inout)  buffer,
integer, intent(inout)  pos,
integer, intent(in)  comm 
)
private

Pack the given value to the buffer, advancing position.

Parameters
[in]thisReaction data
[in,out]bufferMemory buffer
[in,out]posCurrent buffer position
[in]commMPI communicator

Definition at line 430 of file rxn_data.F90.

Here is the call graph for this function:

◆ bin_unpack()

subroutine camp_rxn_data::bin_unpack ( class(rxn_data_t), intent(out)  this,
character, dimension(:), intent(inout)  buffer,
integer, intent(inout)  pos,
integer, intent(in)  comm 
)
private

Unpack the given value from the buffer, advancing position.

Parameters
[out]thisReaction data
[in,out]bufferMemory buffer
[in,out]posCurrent buffer position
[in]commMPI communicator

Definition at line 458 of file rxn_data.F90.

Here is the call graph for this function:

◆ check_phase()

logical function camp_rxn_data::check_phase ( class(rxn_data_t), intent(in)  this,
integer(kind=i_kind), intent(in)  rxn_phase 
)
private

Check the phase of the reaction against the phase being solved for. During GAS_RXN integrations, only GAS_RXN reactions are solved. During AERO_RXN integrations, only AERO_RXN and GAS_AERO_RXN reactions are solved. During GAS_AERO_RXN integrations, all reactions are solved.

Parameters
[in]thisReaction data
[in]rxn_phasePhase being solved

Definition at line 392 of file rxn_data.F90.

◆ dereference()

elemental subroutine camp_rxn_data::dereference ( class(rxn_data_ptr), intent(inout)  this)
private

Dereference a pointer to a reaction.

Parameters
[in,out]thisPointer to a reaction

Definition at line 512 of file rxn_data.F90.

◆ do_print()

subroutine camp_rxn_data::do_print ( class(rxn_data_t), intent(in)  this,
integer(kind=i_kind), optional  file_unit 
)
private

Print the reaction data.

Parameters
[in]thisReaction data
file_unitFile unit for output

Definition at line 487 of file rxn_data.F90.

◆ do_rxn_update_data_print()

subroutine camp_rxn_data::do_rxn_update_data_print ( class(rxn_update_data_t), intent(in)  this,
integer(kind=i_kind), optional  file_unit 
)
private

Print the update data.

Parameters
[in]thisReaction update data
file_unitFile unit for output

Definition at line 680 of file rxn_data.F90.

◆ load()

subroutine camp_rxn_data::load ( class(rxn_data_t), intent(inout)  this,
type(json_core), intent(in), pointer  json,
type(json_value), intent(in), pointer  j_obj 
)
private

Load reactions from an input file.

Parameters
[in,out]thisReaction data
[in]jsonJSON core
[in]j_objJSON object

Definition at line 343 of file rxn_data.F90.

◆ pack_size()

integer(kind=i_kind) function camp_rxn_data::pack_size ( class(rxn_data_t), intent(in)  this,
integer, intent(in)  comm 
)
private

Determine the size of a binary required to pack the reaction data.

Parameters
[in]thisReaction data
[in]commMPI communicator

Definition at line 412 of file rxn_data.F90.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ptr_finalize()

elemental subroutine camp_rxn_data::ptr_finalize ( type(rxn_data_ptr), intent(inout)  this)
private

Finalize a pointer to a reaction.

Parameters
[in,out]thisPointer to a reaction

Definition at line 524 of file rxn_data.F90.

◆ rxn_update_data_bin_pack()

subroutine camp_rxn_data::rxn_update_data_bin_pack ( class(rxn_update_data_t), intent(in)  this,
character, dimension(:), intent(inout)  buffer,
integer, intent(inout)  pos,
integer, intent(in), optional  comm 
)
private

Pack the given value to the buffer, advancing position.

Parameters
[in]thisReaction update data
[in,out]bufferMemory buffer
[in,out]posCurrent buffer position
[in]commMPI communicator

Definition at line 609 of file rxn_data.F90.

Here is the call graph for this function:

◆ rxn_update_data_bin_unpack()

subroutine camp_rxn_data::rxn_update_data_bin_unpack ( class(rxn_update_data_t), intent(out)  this,
character, dimension(:), intent(inout)  buffer,
integer, intent(inout)  pos,
integer, intent(in), optional  comm 
)
private

Unpack the given value from the buffer, advancing position.

Parameters
[out]thisReaction update data
[in,out]bufferMemory buffer
[in,out]posCurrent buffer position
[in]commMPI communicator

Definition at line 644 of file rxn_data.F90.

Here is the call graph for this function:

◆ rxn_update_data_get_cell_id()

integer(kind=c_int) function camp_rxn_data::rxn_update_data_get_cell_id ( class(rxn_update_data_t), intent(in)  this)
private

Get the grid cell id to update.

Returns
Grid cell id
Parameters
[in]thisUpdate data

Definition at line 550 of file rxn_data.F90.

◆ rxn_update_data_get_data()

type(c_ptr) function camp_rxn_data::rxn_update_data_get_data ( class(rxn_update_data_t), intent(in)  this)
private

Get the update data.

Returns
Update data ptr
Parameters
[in]thisUpdate data

Definition at line 564 of file rxn_data.F90.

◆ rxn_update_data_get_type()

integer(kind=c_int) function camp_rxn_data::rxn_update_data_get_type ( class(rxn_update_data_t), intent(in)  this)
private

Get the update data reaction type.

Returns
Reaction type
Parameters
[in]thisUpdate data

Definition at line 536 of file rxn_data.F90.

◆ rxn_update_data_pack_size()

integer(kind=i_kind) function camp_rxn_data::rxn_update_data_pack_size ( class(rxn_update_data_t), intent(in)  this,
integer, intent(in), optional  comm 
)
private

Determine the size of a binary required to pack the reaction data.

Parameters
[in]thisReaction update data
[in]commMPI communicator

Definition at line 578 of file rxn_data.F90.

Here is the call graph for this function:

Variable Documentation

◆ aero_rxn

integer(kind=i_kind), parameter, public camp_rxn_data::aero_rxn = 3

Aerosol-phase reaction.

Definition at line 88 of file rxn_data.F90.

◆ gas_aero_rxn

integer(kind=i_kind), parameter, public camp_rxn_data::gas_aero_rxn = 2

Mixed-phase (gas and aerosol) reaction.

Definition at line 86 of file rxn_data.F90.

◆ gas_rxn

integer(kind=i_kind), parameter, public camp_rxn_data::gas_rxn = 1

Gas-phase reaction.

Definition at line 84 of file rxn_data.F90.