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

The abstract aero_rep_modal_binned_mass_t structure and associated subroutines. More...

Data Types

interface  aero_rep_free_update_data
 Free an update data object. More...
 
interface  aero_rep_modal_binned_mass_create_gmd_update_data
 Interface to c aerosol representation functions. More...
 
interface  aero_rep_modal_binned_mass_create_gsd_update_data
 Allocate space for a GSD update object. More...
 
interface  aero_rep_modal_binned_mass_set_gmd_update_data
 Set a new mode GMD. More...
 
interface  aero_rep_modal_binned_mass_set_gsd_update_data
 Set a new mode GSD. More...
 
interface  aero_rep_modal_binned_mass_t
 Modal mass aerosol representation. More...
 
type  aero_rep_update_data_modal_binned_mass_gmd_t
 Update GMD object. More...
 
type  aero_rep_update_data_modal_binned_mass_gsd_t
 Update GSD object. More...
 

Functions/Subroutines

type(aero_rep_modal_binned_mass_t) function, pointer constructor ()
 Constructor for aero_rep_modal_binned_mass_t.
 
subroutine initialize (this, aero_phase_set, spec_state_id)
 Initialize the aerosol representation data, validating component data and loading any required information from the aero_rep_data_t::property_set. This routine should be called once for each aerosol representation at the beginning of a model run after all the input files have been read in. It ensures all data required during the model run are included in the condensed data arrays.
 
logical function get_section_id (this, section_name, section_id)
 Get an id for a mode or bin by name for use with updates from external modules.
 
integer(kind=i_kind) function get_size (this)
 Get the size of the section of the camp_camp_state::camp_state_t::state_var array required for this aerosol representation.
 
type(string_t) function, dimension(:), allocatable unique_names (this, phase_name, tracer_type, spec_name)
 Get a list of unique names for each element on the camp_camp_state::camp_state_t::state_var array for this aerosol representation. The list may be restricted to a particular phase and/or aerosol species by including the phase_name and spec_name arguments.
 
integer(kind=i_kind) function spec_state_id (this, unique_name)
 Get a species id on the camp_camp_state::camp_state_t::state_var array by its unique name. These are unique ids for each element on the state array for this aerosol representation and are numbered:
 
character(len=:) function, allocatable spec_name (this, unique_name)
 Get the non-unique name of a species by its unique name.
 
integer(kind=i_kind) function num_phase_instances (this, phase_name)
 Get the number of instances of a specified aerosol phase.
 
integer(kind=i_kind) function num_jac_elem (this, phase_id)
 Get the number of Jacobian elements used in calculations of aerosol mass, volume, number, etc. for a particular phase.
 
elemental subroutine finalize (this)
 Finalize the aerosol representation.
 
subroutine update_data_init_gmd (this, update_data, aero_rep_type)
 Initialize a GMD update object.
 
subroutine update_data_set_gmd (this, section_id, gmd)
 Set packed update data for mode GMD.
 
integer(kind=i_kind) function internal_pack_size_gmd (this, comm)
 Determine the size of a binary required to pack the reaction data.
 
subroutine internal_bin_pack_gmd (this, buffer, pos, comm)
 Pack the given value to the buffer, advancing position.
 
subroutine internal_bin_unpack_gmd (this, buffer, pos, comm)
 Unpack the given value from the buffer, advancing position.
 
elemental subroutine update_data_gmd_finalize (this)
 Finalize a GMD update data object.
 
subroutine update_data_init_gsd (this, update_data, aero_rep_type)
 Initialize a GSD update data object.
 
subroutine update_data_set_gsd (this, section_id, gsd)
 Set packed update data for mode GSD.
 
integer(kind=i_kind) function internal_pack_size_gsd (this, comm)
 Determine the size of a binary required to pack the reaction data.
 
subroutine internal_bin_pack_gsd (this, buffer, pos, comm)
 Pack the given value to the buffer, advancing position.
 
subroutine internal_bin_unpack_gsd (this, buffer, pos, comm)
 Unpack the given value from the buffer, advancing position.
 
elemental subroutine update_data_gsd_finalize (this)
 Finalize a GSD update data object.
 

Variables

integer(kind=i_kind), parameter, public update_gmd = 0
 
integer(kind=i_kind), parameter, public update_gsd = 1
 

Detailed Description

The abstract aero_rep_modal_binned_mass_t structure and associated subroutines.

Function/Subroutine Documentation

◆ constructor()

type(aero_rep_modal_binned_mass_t) function, pointer camp_aero_rep_modal_binned_mass::constructor
private

Constructor for aero_rep_modal_binned_mass_t.

Returns
New aerosol representation

Definition at line 317 of file aero_rep_modal_binned_mass.F90.

◆ finalize()

elemental subroutine camp_aero_rep_modal_binned_mass::finalize ( type(aero_rep_modal_binned_mass_t), intent(inout)  this)
private

Finalize the aerosol representation.

Parameters
[in,out]thisAerosol representation data

Definition at line 1007 of file aero_rep_modal_binned_mass.F90.

◆ get_section_id()

logical function camp_aero_rep_modal_binned_mass::get_section_id ( class(aero_rep_modal_binned_mass_t), intent(in)  this,
character(len=*), intent(in)  section_name,
integer(kind=i_kind), intent(out)  section_id 
)
private

Get an id for a mode or bin by name for use with updates from external modules.

Returns
Flag indicating whether the mode/bin was found
Parameters
[in]thisAerosol representation
[in]section_nameSection name
[out]section_idSection id

Definition at line 671 of file aero_rep_modal_binned_mass.F90.

Here is the call graph for this function:

◆ get_size()

integer(kind=i_kind) function camp_aero_rep_modal_binned_mass::get_size ( class(aero_rep_modal_binned_mass_t), intent(in)  this)
private

Get the size of the section of the camp_camp_state::camp_state_t::state_var array required for this aerosol representation.

For a modal/binned mass representation, the size will correspond to the the sum of the sizes of a single instance of each aerosol phase provided to aero_rep_modal_binned_mass::initialize()

Returns
Size on the state array
Parameters
[in]thisAerosol representation data

Definition at line 708 of file aero_rep_modal_binned_mass.F90.

◆ initialize()

subroutine camp_aero_rep_modal_binned_mass::initialize ( class(aero_rep_modal_binned_mass_t), intent(inout)  this,
type(aero_phase_data_ptr), dimension(:), intent(in), pointer  aero_phase_set,
integer(kind=i_kind), intent(in)  spec_state_id 
)
private

Initialize the aerosol representation data, validating component data and loading any required information from the aero_rep_data_t::property_set. This routine should be called once for each aerosol representation at the beginning of a model run after all the input files have been read in. It ensures all data required during the model run are included in the condensed data arrays.

Parameters
[in,out]thisAerosol representation data
[in]aero_phase_setThe set of aerosol phases
[in]spec_state_idBeginning state id for this aerosol representationin the model species state array

Definition at line 334 of file aero_rep_modal_binned_mass.F90.

Here is the call graph for this function:

◆ internal_bin_pack_gmd()

subroutine camp_aero_rep_modal_binned_mass::internal_bin_pack_gmd ( class(aero_rep_update_data_modal_binned_mass_gmd_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]thisAerosol representation update data
[in,out]bufferMemory buffer
[in,out]posCurrent buffer position
[in]commMPI communicator

Definition at line 1092 of file aero_rep_modal_binned_mass.F90.

Here is the call graph for this function:

◆ internal_bin_pack_gsd()

subroutine camp_aero_rep_modal_binned_mass::internal_bin_pack_gsd ( class(aero_rep_update_data_modal_binned_mass_gsd_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]thisAerosol representation update data
[in,out]bufferMemory buffer
[in,out]posCurrent buffer position
[in]commMPI communicator

Definition at line 1219 of file aero_rep_modal_binned_mass.F90.

Here is the call graph for this function:

◆ internal_bin_unpack_gmd()

subroutine camp_aero_rep_modal_binned_mass::internal_bin_unpack_gmd ( class(aero_rep_update_data_modal_binned_mass_gmd_t), intent(inout)  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
[in,out]thisAerosol representation update data
[in,out]bufferMemory buffer
[in,out]posCurrent buffer position
[in]commMPI communicator

Definition at line 1118 of file aero_rep_modal_binned_mass.F90.

Here is the call graph for this function:

◆ internal_bin_unpack_gsd()

subroutine camp_aero_rep_modal_binned_mass::internal_bin_unpack_gsd ( class(aero_rep_update_data_modal_binned_mass_gsd_t), intent(inout)  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
[in,out]thisAerosol representation update data
[in,out]bufferMemory buffer
[in,out]posCurrent buffer position
[in]commMPI communicator

Definition at line 1245 of file aero_rep_modal_binned_mass.F90.

Here is the call graph for this function:

◆ internal_pack_size_gmd()

integer(kind=i_kind) function camp_aero_rep_modal_binned_mass::internal_pack_size_gmd ( class(aero_rep_update_data_modal_binned_mass_gmd_t), intent(in)  this,
integer, intent(in)  comm 
)
private

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

Parameters
[in]thisAerosol representation update data
[in]commMPI communicator

Definition at line 1075 of file aero_rep_modal_binned_mass.F90.

Here is the call graph for this function:

◆ internal_pack_size_gsd()

integer(kind=i_kind) function camp_aero_rep_modal_binned_mass::internal_pack_size_gsd ( class(aero_rep_update_data_modal_binned_mass_gsd_t), intent(in)  this,
integer, intent(in)  comm 
)
private

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

Parameters
[in]thisAerosol representation update data
[in]commMPI communicator

Definition at line 1202 of file aero_rep_modal_binned_mass.F90.

Here is the call graph for this function:

◆ num_jac_elem()

integer(kind=i_kind) function camp_aero_rep_modal_binned_mass::num_jac_elem ( class(aero_rep_modal_binned_mass_t), intent(in)  this,
integer(kind=i_kind), intent(in)  phase_id 
)
private

Get the number of Jacobian elements used in calculations of aerosol mass, volume, number, etc. for a particular phase.

Returns
Number of Jacobian elements used
Parameters
[in]thisAerosol respresentation data
[in]phase_idAerosol phase id

Definition at line 968 of file aero_rep_modal_binned_mass.F90.

◆ num_phase_instances()

integer(kind=i_kind) function camp_aero_rep_modal_binned_mass::num_phase_instances ( class(aero_rep_modal_binned_mass_t), intent(in)  this,
character(len=*), intent(in)  phase_name 
)
private

Get the number of instances of a specified aerosol phase.

Returns
Number of instances of the aerosol phase
Parameters
[in]thisAerosol representation data
[in]phase_nameAerosol phase name

Definition at line 944 of file aero_rep_modal_binned_mass.F90.

◆ spec_name()

character(len=:) function, allocatable camp_aero_rep_modal_binned_mass::spec_name ( class(aero_rep_modal_binned_mass_t), intent(in)  this,
character(len=*), intent(in)  unique_name 
)
private

Get the non-unique name of a species by its unique name.

Returns
Chemical species name
Parameters
[in]thisAerosol representation data
[in]unique_nameUnique name of the species in this aerosol representation

Definition at line 905 of file aero_rep_modal_binned_mass.F90.

◆ spec_state_id()

integer(kind=i_kind) function camp_aero_rep_modal_binned_mass::spec_state_id ( class(aero_rep_modal_binned_mass_t), intent(in)  this,
character(len=*), intent(in)  unique_name 
)
private

Get a species id on the camp_camp_state::camp_state_t::state_var array by its unique name. These are unique ids for each element on the state array for this aerosol representation and are numbered:

\[x_u \in x_f ... (x_f+n-1)\]

where \(x_u\) is the id of the element corresponding to the species with unique name \(u\) on the camp_camp_state::camp_state_t::state_var array, \(x_f\) is the index of the first element for this aerosol representation on the state array and \(n\) is the total number of variables on the state array from this aerosol representation.

Returns
Species state id
Parameters
[in]thisAerosol representation data
[in]unique_nameUnique name

Definition at line 878 of file aero_rep_modal_binned_mass.F90.

Here is the call graph for this function:

◆ unique_names()

type(string_t) function, dimension(:), allocatable camp_aero_rep_modal_binned_mass::unique_names ( class(aero_rep_modal_binned_mass_t), intent(in)  this,
character(len=*), intent(in), optional  phase_name,
integer(kind=i_kind), intent(in), optional  tracer_type,
character(len=*), intent(in), optional  spec_name 
)
private

Get a list of unique names for each element on the camp_camp_state::camp_state_t::state_var array for this aerosol representation. The list may be restricted to a particular phase and/or aerosol species by including the phase_name and spec_name arguments.

For a modal/binned mass representation, the unique names for bins are:

  • "bin name.bin #.phase name.species name"

... and for modes are:

  • "mode name.phase name.species name"
    Returns
    List of unique names
    Parameters
    [in]thisAerosol representation data
    [in]phase_nameAerosol phase name
    [in]tracer_typeAerosol-phase species tracer type
    [in]spec_nameAerosol-phase species name

Definition at line 737 of file aero_rep_modal_binned_mass.F90.

◆ update_data_gmd_finalize()

elemental subroutine camp_aero_rep_modal_binned_mass::update_data_gmd_finalize ( type(aero_rep_update_data_modal_binned_mass_gmd_t), intent(inout)  this)
private

Finalize a GMD update data object.

Parameters
[in,out]thisUpdate data object to free

Definition at line 1145 of file aero_rep_modal_binned_mass.F90.

Here is the caller graph for this function:

◆ update_data_gsd_finalize()

elemental subroutine camp_aero_rep_modal_binned_mass::update_data_gsd_finalize ( type(aero_rep_update_data_modal_binned_mass_gsd_t), intent(inout)  this)
private

Finalize a GSD update data object.

Parameters
[in,out]thisUpdate data object to free

Definition at line 1272 of file aero_rep_modal_binned_mass.F90.

Here is the caller graph for this function:

◆ update_data_init_gmd()

subroutine camp_aero_rep_modal_binned_mass::update_data_init_gmd ( class(aero_rep_modal_binned_mass_t), intent(inout)  this,
class(aero_rep_update_data_modal_binned_mass_gmd_t), intent(out)  update_data,
integer(kind=i_kind), intent(in)  aero_rep_type 
)
private

Initialize a GMD update object.

Parameters
[in,out]thisAerosol representation to update
[out]update_dataUpdate data object
[in]aero_rep_typeAerosol representation id

Definition at line 1030 of file aero_rep_modal_binned_mass.F90.

Here is the call graph for this function:

◆ update_data_init_gsd()

subroutine camp_aero_rep_modal_binned_mass::update_data_init_gsd ( class(aero_rep_modal_binned_mass_t), intent(inout)  this,
class(aero_rep_update_data_modal_binned_mass_gsd_t), intent(out)  update_data,
integer(kind=i_kind), intent(in)  aero_rep_type 
)
private

Initialize a GSD update data object.

Parameters
[in,out]thisAerosol representation to update
[out]update_dataUpdate data object
[in]aero_rep_typeAerosol representation id

Definition at line 1157 of file aero_rep_modal_binned_mass.F90.

Here is the call graph for this function:

◆ update_data_set_gmd()

subroutine camp_aero_rep_modal_binned_mass::update_data_set_gmd ( class(aero_rep_update_data_modal_binned_mass_gmd_t), intent(inout)  this,
integer(kind=i_kind), intent(in)  section_id,
real(kind=dp), intent(in)  gmd 
)
private

Set packed update data for mode GMD.

Parameters
[in,out]thisUpdate data
[in]section_idAerosol section id from camp_aero_rep_modal_binned_mass::aero_rep_modal_binned_mass_t::get_section_id
[in]gmdUpdated GMD (m)

Definition at line 1057 of file aero_rep_modal_binned_mass.F90.

◆ update_data_set_gsd()

subroutine camp_aero_rep_modal_binned_mass::update_data_set_gsd ( class(aero_rep_update_data_modal_binned_mass_gsd_t), intent(inout)  this,
integer(kind=i_kind), intent(in)  section_id,
real(kind=dp), intent(in)  gsd 
)
private

Set packed update data for mode GSD.

Parameters
[in,out]thisUpdate data
[in]section_idAerosol section id from camp_aero_rep_modal_binned_mass::aero_rep_modal_binned_mass_t::get_section_id
[in]gsdUpdated GSD (m)

Definition at line 1184 of file aero_rep_modal_binned_mass.F90.

Variable Documentation

◆ update_gmd

integer(kind=i_kind), parameter, public camp_aero_rep_modal_binned_mass::update_gmd = 0

Definition at line 132 of file aero_rep_modal_binned_mass.F90.

◆ update_gsd

integer(kind=i_kind), parameter, public camp_aero_rep_modal_binned_mass::update_gsd = 1

Definition at line 133 of file aero_rep_modal_binned_mass.F90.