214 integer(kind=i_kind),
parameter,
public ::
rxn_troe = 2
259 function create(this, type_name)
result (new_obj)
266 character(len=*),
intent(in) :: type_name
271 select case (type_name)
278 case (
"CMAQ_OH_HNO3")
282 case (
"HL_PHASE_TRANSFER")
284 case (
"AQUEOUS_EQUILIBRIUM")
286 case (
"SIMPOL_PHASE_TRANSFER")
288 case (
"CONDENSED_PHASE_ARRHENIUS")
290 case (
"CONDENSED_PHASE_PHOTOLYSIS")
292 case (
"FIRST_ORDER_LOSS")
296 case (
"WET_DEPOSITION")
298 case (
"TERNARY_CHEMICAL_ACTIVATION")
300 case (
"WENNBERG_TUNNELING")
302 case (
"WENNBERG_NO_RO2")
306 case (
"CONDENSED_PHASE_DIFFUSION")
309 call die_msg(367114278,
"Unknown chemical reaction type: " &
319 function load(this, json, j_obj)
result (new_obj)
326 type(json_core),
pointer,
intent(in) :: json
328 type(json_value),
pointer,
intent(in) :: j_obj
330 character(kind=json_ck, len=:),
allocatable :: unicode_type_name
331 character(len=:),
allocatable :: type_name
332 logical(kind=json_lk) :: found
337 call json%get(j_obj,
"type", unicode_type_name, found)
338 call assert_msg(137665576, found,
'Missing chemical reaction type.')
339 type_name = unicode_type_name
342 new_obj => this%create(type_name)
345 call new_obj%load(json, j_obj)
349 function load(this)
result (new_obj)
358 call warn_msg(979827016,
"No support for input files.")
365 integer(kind=i_kind) function get_type(this, rxn)
result (rxn_type)
410 call die_msg(343941184,
"Unknown reaction type.")
427 select type (update_data)
433 call die_msg(519416239,
"Update data <-> rxn mismatch")
438 call rxn%update_data_initialize(update_data,
rxn_emission)
440 call die_msg(395116041,
"Update data <-> rxn mismatch")
447 call die_msg(172384885,
"Update data <-> rxn mismatch")
454 call die_msg(284703230,
"Update data <-> rxn mismatch")
461 call die_msg(284703230,
"Update data <-> rxn mismatch")
464 call die_msg(239438576,
"Internal error - update data type missing.")
472 integer(kind=i_kind) function pack_size(this, rxn, comm)
479 integer,
intent(in) :: comm
496 character,
intent(inout) :: buffer(:)
498 integer,
intent(inout) :: pos
500 integer,
intent(in) :: comm
503 integer :: rxn_type, i_rxn, prev_position
544 call die_msg(343941184,
"Trying to pack reaction of unknown type.")
547 call rxn%bin_pack(buffer, pos, comm)
549 pos - prev_position <= this%pack_size(rxn, comm))
564 character,
intent(inout) :: buffer(:)
566 integer,
intent(inout) :: pos
568 integer,
intent(in) :: comm
571 integer :: rxn_type, i_rxn, prev_position
575 select case (rxn_type)
614 "Trying to unpack reaction of unknown type:"// &
617 call rxn%bin_unpack(buffer, pos, comm)
619 pos - prev_position <= this%pack_size(rxn, comm))
Interface for to_string functions.
integer, parameter dp
Kind of a double precision real number.
integer, parameter i_kind
Kind of an integer.
Wrapper functions for MPI.
subroutine camp_mpi_unpack_integer(buffer, position, val, comm)
Unpacks the given value from the buffer, advancing position.
subroutine camp_mpi_pack_integer(buffer, position, val, comm)
Packs the given value into the buffer, advancing position.
integer function camp_mpi_pack_size_integer(val, comm)
Determines the number of bytes required to pack the given value.
The rxn_aqueous_equilibrium_t type and associated functions.
The rxn_arrhenius_t type and associated functions.
The rxn_CMAQ_H2O2_t type and associated functions.
The rxn_CMAQ_OH_HNO3_t type and associated functions.
The rxn_condensed_phase_arrhenius_t type and associated functions.
The rxn_condensed_phase_diffusion_t type and associated functions.
The rxn_condensed_phase_photolysis_t type and associated functions.
The rxn_data_t structure and associated subroutines.
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 load(this, json, j_obj)
Load reactions from an input file.
The rxn_emission_t type and associated functions.
The abstract rxn_factory_t structure and associated subroutines.
integer(kind=i_kind), parameter, public rxn_photolysis
integer(kind=i_kind), parameter, public rxn_condensed_phase_arrhenius
integer(kind=i_kind), parameter, public rxn_surface
integer(kind=i_kind), parameter, public rxn_condensed_phase_photolysis
integer(kind=i_kind), parameter, public rxn_cmaq_oh_hno3
class(rxn_data_t) function, pointer create(this, type_name)
Create a new chemical reaction by type name.
integer(kind=i_kind), parameter, public rxn_ternary_chemical_activation
integer(kind=i_kind), parameter, public rxn_first_order_loss
integer(kind=i_kind) function get_type(this, rxn)
Get the reaction type as a RxnType.
integer(kind=i_kind), parameter, public rxn_condensed_phase_diffusion
integer(kind=i_kind), parameter, public rxn_troe
integer(kind=i_kind), parameter, public rxn_simpol_phase_transfer
integer(kind=i_kind), parameter, public rxn_cmaq_h2o2
integer(kind=i_kind), parameter, public rxn_emission
integer(kind=i_kind), parameter, public rxn_hl_phase_transfer
integer(kind=i_kind), parameter, public rxn_wennberg_tunneling
integer(kind=i_kind), parameter, public rxn_aqueous_equilibrium
integer(kind=i_kind), parameter, public rxn_arrhenius
Identifiers for reaction types - used by binary packing/unpacking functions.
integer(kind=i_kind), parameter, public rxn_wet_deposition
subroutine initialize_update_data(this, rxn, update_data)
Initialize an update data object.
integer(kind=i_kind), parameter, public rxn_wennberg_no_ro2
The rxn_first_order_loss_t type and associated functions.
The rxn_HL_phase_transfer_t type and associated functions.
The rxn_photolysis_t type and associated functions.
The rxn_SIMPOL_phase_transfer_t type and associated functions.
The rxn_surface_t type and associated functions.
The rxn_ternary_chemical_activation_t type and associated functions.
The rxn_troe_t type and associated functions.
The rxn_wennberg_no_ro2_t type and associated functions.
The rxn_wennberg_tunneling_t type and associated functions.
The rxn_wet_deposition_t type and associated functions.
Common utility subroutines.
subroutine assert(code, condition_ok)
Errors unless condition_ok is true.
subroutine die_msg(code, error_msg)
Error immediately.
subroutine assert_msg(code, condition_ok, error_msg)
Errors unless condition_ok is true.
subroutine warn_msg(code, warning_msg, already_warned)
Prints a warning message.
Generic test reaction data type.
Generic test reaction data type.
Generic test reaction data type.
Generic test reaction data type.
Generic test reaction data type.
Generic test reaction data type.
Generic test reaction data type.
Condensed-phase Photolysis rate update object.
Abstract reaction data type.
Generic test reaction data type.
Emission rate update object.
Factory type for chemical reactions.
Generic test reaction data type.
First-Order Loss rate update object.
Generic test reaction data type.
Generic test reaction data type.
Photolysis rate update object.
Generic test reaction data type.
Generic test reaction data type.
Generic test reaction data type.
Generic test reaction data type.
Generic test reaction data type.
Generic test reaction data type.
Wet Deposition rate update object.
Generic test reaction data type.
String type for building arrays of string of various size.