61#define NUM_LAYERS_ this%condensed_data_int(1)
62#define AERO_REP_ID_ this%condensed_data_int(2)
63#define MAX_PARTICLES_ this%condensed_data_int(3)
64#define PARTICLE_STATE_SIZE_ this%condensed_data_int(4)
65#define NUM_INT_PROP_ 4
66#define NUM_REAL_PROP_ 0
67#define NUM_ENV_PARAM_PER_PARTICLE_ 1
68#define LAYER_PHASE_START_(l) this%condensed_data_int(NUM_INT_PROP_+l)
69#define LAYER_PHASE_END_(l) this%condensed_data_int(NUM_INT_PROP_+NUM_LAYERS_+l)
70#define TOTAL_NUM_PHASES_ (LAYER_PHASE_END_(NUM_LAYERS_))
71#define NUM_PHASES_(l) (LAYER_PHASE_END_(l)-LAYER_PHASE_START_(l)+1)
72#define PHASE_STATE_ID_(l,p) this%condensed_data_int(NUM_INT_PROP_+2*NUM_LAYERS_+LAYER_PHASE_START_(l)+p-1)
73#define PHASE_MODEL_DATA_ID_(l,p) this%condensed_data_int(NUM_INT_PROP_+2*NUM_LAYERS_+TOTAL_NUM_PHASES_+LAYER_PHASE_START_(l)+p-1)
74#define PHASE_NUM_JAC_ELEM_(l,p) this%condensed_data_int(NUM_INT_PROP_+2*NUM_LAYERS_+2*TOTAL_NUM_PHASES_+LAYER_PHASE_START_(l)+p-1)
89 type(
string_t),
allocatable,
private :: unique_names_(:)
91 type(
string_t),
allocatable,
private :: layer_names_(:)
93 integer(kind=i_kind) :: state_id_start = -99999
173 logical :: is_malloced = .false.
175 integer(kind=i_kind) :: aero_rep_unique_id = 0
197 result(update_data)
bind (c)
199 type(c_ptr) :: update_data
204 update_data, aero_rep_unique_id, particle_id, number_conc) &
208 type(c_ptr),
value :: update_data
210 integer(kind=c_int),
value :: aero_rep_unique_id
212 integer(kind=c_int),
value :: particle_id
214 real(kind=c_double),
value :: number_conc
221 type(c_ptr),
value,
intent(in) :: update_data
256 integer(kind=i_kind),
intent(in) :: spec_state_id
259 type(
string_t),
allocatable :: layer_names_unordered(:)
261 type(
string_t),
allocatable :: cover_names_unordered(:)
264 integer(kind=i_kind),
allocatable :: ordered_layer_id(:)
266 character(len=:),
allocatable :: key_name, layer_name, layer_covers, &
270 integer(kind=i_kind) :: i_particle, i_phase, i_layer, i_aero, curr_id
271 integer(kind=i_kind) :: i_cover, j_phase, j_layer, i_map, curr_phase
272 integer(kind=i_kind) :: num_phases, num_int_param, num_float_param, &
277 key_name =
"maximum computational particles"
279 this%property_set%get_int(key_name, num_particles), &
280 "Missing maximum number of computational particles")
285 this%property_set%get_property_t(key_name, layers), &
286 "Missing layers for single-particle aerosol "// &
287 "representation '"//this%rep_name//
"'")
288 call assert_msg(168669831, layers%size() .gt. 0, &
289 "No Layers specified for single-particle layer "// &
290 "aerosol representation '"//this%rep_name//
"'")
293 allocate(phases(layers%size()))
294 allocate(cover_names_unordered(layers%size()))
295 allocate(layer_names_unordered(layers%size()))
300 call layers%iter_reset()
301 do i_layer = 1, layers%size()
304 call assert_msg(303808978, layers%get_property_t(val=layer), &
305 "Invalid structure for layer '"// &
306 layer_names_unordered(i_layer)%string// &
307 "' in single-particle layer representation '"// &
312 call assert_msg(364496472, layer%get_string(key_name, layer_name), &
313 "Missing layer name in single-particle layer aerosol "// &
314 "representation '"//this%rep_name//
"'")
315 layer_names_unordered(i_layer)%string = layer_name
319 call assert_msg(350939595, layer%get_string(key_name, layer_covers), &
320 "Missing cover name in layer'"// &
321 layer_names_unordered(i_layer)%string// &
322 "' in single-particle layer aerosol representation '"// &
324 cover_names_unordered(i_layer)%string = layer_covers
329 layer%get_property_t(key_name, phases(i_layer)%val_), &
330 "Missing phases for layer '"// &
331 layer_names_unordered(i_layer)%string// &
332 "' in single-particle layer aerosol representation '"// &
336 call assert_msg(002679882, phases(i_layer)%val_%size().gt.0, &
337 "No phases specified for layer '"// &
338 layer_names_unordered(i_layer)%string// &
339 "' in single-particle layer aerosol representation '"// &
343 num_phases = num_phases + phases(i_layer)%val_%size()
345 call layers%iter_next()
350 cover_names_unordered)
353 allocate(this%layer_names_(
size(ordered_layer_id)))
354 this%layer_names_(:) = layer_names_unordered(ordered_layer_id(:))
357 num_int_param = num_int_prop_ + 2 * layers%size() + 3 * num_phases
358 num_float_param = num_real_prop_
359 allocate(this%condensed_data_int(num_int_param))
360 allocate(this%condensed_data_real(num_float_param))
361 this%condensed_data_int(:) = int(0, kind=i_kind)
362 this%condensed_data_real(:) = real(0.0, kind=dp)
365 this%num_env_params = num_env_param_per_particle_ * num_particles
368 num_layers_ = layers%size()
369 max_particles_ = num_particles
374 allocate(this%aero_phase(num_phases * num_particles))
375 allocate(this%aero_phase_is_at_surface(num_phases * num_particles))
377 do i_layer = 1,
size(ordered_layer_id)
378 j_layer = ordered_layer_id(i_layer)
381 layer_phase_start_(i_layer) = curr_phase
382 layer_phase_end_(i_layer) = curr_phase + phases(j_layer)%val_%size() - 1
384 curr_phase = curr_phase + phases(j_layer)%val_%size()
390 do i_layer = 1,
size(ordered_layer_id)
391 j_layer = ordered_layer_id(i_layer)
393 call phases(j_layer)%val_%iter_reset()
394 do i_phase = 1, phases(j_layer)%val_%size()
398 phases(j_layer)%val_%get_string(val=phase_name), &
399 "Non-string phase name for layer '"// &
400 layer_names_unordered(j_layer)%string// &
401 "' in single-particle layer aerosol representation '"// &
405 do j_phase = 1,
size(aero_phase_set)
406 if (aero_phase_set(j_phase)%val%name() .eq. phase_name)
then
408 do i_particle = 0, num_particles-1
409 this%aero_phase(i_particle*num_phases + curr_phase) = &
410 aero_phase_set(j_phase)
411 if (i_layer .eq. num_layers_)
then
412 this%aero_phase_is_at_surface(i_particle*num_phases + curr_phase) = &
415 this%aero_phase_is_at_surface(i_particle*num_phases + curr_phase) = &
419 phase_state_id_(i_layer,i_phase) = curr_id
420 phase_model_data_id_(i_layer,i_phase) = j_phase
421 curr_id = curr_id + aero_phase_set(j_phase)%val%size()
422 curr_phase = curr_phase + 1
426 call assert(373124707, found)
428 call phases(j_layer)%val_%iter_next()
437 this%unique_names_ = this%unique_names( )
465 integer(kind=i_kind) :: state_size
469 state_size = max_particles_ * particle_state_size_
483 integer(kind=i_kind) :: state_size
487 state_size = particle_state_size_
510 character(len=*),
optional,
intent(in) :: phase_name
512 integer(kind=i_kind),
optional,
intent(in) :: tracer_type
514 character(len=*),
optional,
intent(in) ::
spec_name
516 logical,
optional,
intent(in) :: phase_is_at_surface
518 integer :: i_particle, i_layer, i_phase, i_spec, j_spec
519 integer :: num_spec, curr_tracer_type
520 type(
string_t),
allocatable :: spec_names(:)
523 if (.not.
present(phase_name) .and. &
524 .not.
present(tracer_type) .and. &
526 allocated(this%unique_names_))
then
533 do i_phase = 1,
size(this%aero_phase)
534 if (
present(phase_name))
then
535 if(phase_name .ne. this%aero_phase(i_phase)%val%name()) cycle
537 if (
present(phase_is_at_surface))
then
538 if (phase_is_at_surface .neqv. &
539 this%aero_phase_is_at_surface(i_phase)) cycle
541 if (
present(
spec_name) .or.
present(tracer_type))
then
542 spec_names = this%aero_phase(i_phase)%val%get_species_names()
543 do j_spec = 1,
size(spec_names)
545 if (
spec_name .ne. spec_names(j_spec)%string) cycle
547 if (
present(tracer_type))
then
549 this%aero_phase(i_phase)%val%get_species_type( &
550 spec_names(j_spec)%string)
551 if (tracer_type .ne. curr_tracer_type) cycle
553 num_spec = num_spec + 1
555 deallocate(spec_names)
557 num_spec = num_spec + this%aero_phase(i_phase)%val%size()
562 num_spec = num_spec / max_particles_
565 do i_layer = 1, num_layers_
566 do i_phase = layer_phase_start_(i_layer), layer_phase_end_(i_layer)
567 if (
present(phase_name))
then
568 if(phase_name .ne. this%aero_phase(i_phase)%val%name()) cycle
570 if (
present(phase_is_at_surface))
then
571 if (phase_is_at_surface .neqv. &
572 this%aero_phase_is_at_surface(i_phase)) cycle
574 spec_names = this%aero_phase(i_phase)%val%get_species_names()
575 do j_spec = 1, this%aero_phase(i_phase)%val%size()
577 if (
spec_name .ne. spec_names(j_spec)%string) cycle
579 if (
present(tracer_type))
then
581 this%aero_phase(i_phase)%val%get_species_type( &
582 spec_names(j_spec)%string)
583 if (tracer_type .ne. curr_tracer_type) cycle
585 do i_particle = 1, max_particles_
586 unique_names((i_particle-1)*num_spec+i_spec)%string =
'P'// &
588 this%layer_names_(i_layer)%string//
"."// &
589 this%aero_phase(i_phase)%val%name()//
"."// &
590 spec_names(j_spec)%string
594 deallocate(spec_names)
618 integer(kind=i_kind) :: spec_id
622 character(len=*),
intent(in) :: unique_name
624 integer(kind=i_kind) :: i_spec
626 spec_id = this%state_id_start
627 do i_spec = 1,
size(this%unique_names_)
628 if (this%unique_names_(i_spec)%string .eq. unique_name)
then
631 spec_id = spec_id + 1
633 call die_msg( 449087541,
"Cannot find species '"//unique_name//
"'" )
644 character(len=:),
allocatable ::
spec_name
648 character(len=*),
intent(in) :: unique_name
650 type(string_t) :: l_unique_name
651 type(string_t),
allocatable :: substrs(:)
653 l_unique_name%string = unique_name
654 substrs = l_unique_name%split(
".")
655 call assert(407537518,
size( substrs ) .eq. 4 )
671 character(len=*),
intent(in) :: phase_name
673 logical,
intent(in),
optional :: is_at_surface
675 integer(kind=i_kind) :: i_phase, i_layer, phase_index
678 if (
present(is_at_surface))
then
679 do i_layer = 1, num_layers_
680 do i_phase = layer_phase_start_(i_layer), layer_phase_end_(i_layer)
681 if (this%aero_phase(i_phase)%val%name() .eq. phase_name)
then
682 if (this%aero_phase_is_at_surface(i_phase) .eqv. is_at_surface)
then
689 do i_layer = 1, num_layers_
690 do i_phase = layer_phase_start_(i_layer), layer_phase_end_(i_layer)
691 if (this%aero_phase(i_phase)%val%name() .eq. phase_name)
then
712 integer(kind=i_kind),
intent(in) :: phase_id
714 integer(kind=i_kind) :: i_phase
716 call assert_msg(927040495, phase_id .ge. 1 .and. &
717 phase_id .le.
size( this%aero_phase ), &
718 "Aerosol phase index out of range. Got "// &
719 trim( integer_to_string( phase_id ) )//
", expected 1:"// &
720 trim( integer_to_string(
size( this%aero_phase ) ) ) )
722 do i_phase = 1, total_num_phases_
724 this%aero_phase(i_phase)%val%num_jac_elem()
749 integer,
optional,
intent(in) :: layer
751 if (
present(layer))
then
752 num_phases = layer_phase_end_(layer) - layer_phase_start_(layer) + 1
754 num_phases = layer_phase_end_(num_layers_) - layer_phase_start_(1) + 1
769 integer,
optional,
intent(in) :: layer
771 integer,
optional,
intent(in) :: phase
773 if (
present(layer) .and.
present(phase))
then
774 if (layer .eq. num_layers_ .and. phase .eq. num_phases_(layer))
then
776 phase_state_id_(layer, phase)
777 else if (phase .eq. num_phases_(layer))
then
779 phase_state_id_(layer, phase)
782 phase_state_id_(layer, phase)
784 else if (
present(layer))
then
785 if (layer .eq. num_layers_)
then
787 phase_state_id_(layer, 1)
790 phase_state_id_(layer, 1)
792 else if (
present(phase))
then
793 call die_msg(917793122,
"Must specify layer if including phase is "// &
794 "state size request")
806 phase_name_second)
result(index_pairs)
811 character(len=*),
intent(in) :: phase_name_first
813 character(len=*),
intent(in) :: phase_name_second
814 type(
index_pair_t),
allocatable :: temp_index_pairs(:), index_pairs(:)
816 integer(kind=i_kind),
allocatable :: layer_first(:)
817 integer(kind=i_kind),
allocatable :: layer_second(:)
818 integer(kind=i_kind),
allocatable :: phase_id_first_(:)
819 integer(kind=i_kind),
allocatable :: phase_id_second_(:)
820 integer(kind=i_kind) :: i_layer, i_phase, i_instance, j_phase, i_particle, i
821 integer(kind=i_kind) :: offset, num_adjacent_pairs
823 allocate(layer_first(num_layers_))
824 allocate(layer_second(num_layers_))
825 allocate(phase_id_first_(num_layers_))
826 allocate(phase_id_second_(num_layers_))
829 phase_id_first_ = -9999
830 phase_id_second_ = -9999
834 do i_layer = 1, num_layers_
835 do i_phase = 1, num_phases_(i_layer)
836 if (phase_name_first .eq. phase_name_second)
then
837 if (this%aero_phase(i_instance)%val%name() .eq. phase_name_first)
then
838 layer_first(i_layer) = phase_model_data_id_(i_layer, i_phase)
839 phase_id_first_(i_layer) = i_instance
842 if (this%aero_phase(i_instance)%val%name() .eq. phase_name_first)
then
843 layer_first(i_layer) = phase_model_data_id_(i_layer, i_phase)
844 phase_id_first_(i_layer) = i_instance
845 else if (this%aero_phase(i_instance)%val%name() .eq. phase_name_second)
then
846 layer_second(i_layer) = phase_model_data_id_(i_layer, i_phase)
847 phase_id_second_(i_layer) = i_instance
850 i_instance = i_instance + 1
855 allocate(temp_index_pairs(i_instance))
857 do i_layer = 1, num_layers_-1
858 do i_phase = 1, num_phases_(i_layer)
859 do j_phase = 1, num_phases_(i_layer+1)
860 if (phase_name_first .eq. phase_name_second)
then
861 if (layer_first(i_layer) .eq. phase_model_data_id_(i_layer,i_phase) .and. &
862 layer_first(i_layer+1) .eq. phase_model_data_id_(i_layer+1,j_phase))
then
863 temp_index_pairs(i_instance)%first_ = phase_id_first_(i_layer)
864 temp_index_pairs(i_instance)%second_ = phase_id_first_(i_layer+1)
865 i_instance = i_instance + 1
868 if (layer_first(i_layer) .eq. phase_model_data_id_(i_layer, i_phase) .and. &
869 layer_second(i_layer+1) .eq. phase_model_data_id_(i_layer+1, j_phase))
then
870 temp_index_pairs(i_instance)%first_ = phase_id_first_(i_layer)
871 temp_index_pairs(i_instance)%second_ = phase_id_second_(i_layer+1)
872 i_instance = i_instance + 1
873 else if (layer_second(i_layer) .eq. phase_model_data_id_(i_layer, i_phase) .and. &
874 layer_first(i_layer+1) .eq. phase_model_data_id_(i_layer+1, j_phase))
then
875 temp_index_pairs(i_instance)%first_ = phase_id_second_(i_layer)
876 temp_index_pairs(i_instance)%second_ = phase_id_first_(i_layer+1)
877 i_instance = i_instance + 1
885 allocate(index_pairs((i_instance-1) * max_particles_))
886 num_adjacent_pairs = i_instance - 1
887 do i_particle = 1, max_particles_
888 offset = (i_particle -1) * total_num_phases_
889 do i = 1, num_adjacent_pairs
890 index_pairs((i_particle -1) * num_adjacent_pairs + i)%first_ = &
891 temp_index_pairs(i)%first_ + offset
892 index_pairs((i_particle -1) * num_adjacent_pairs + i)%second_ = &
893 temp_index_pairs(i)%second_ + offset
896 deallocate(temp_index_pairs)
908 integer(kind=i_kind) :: spec_id
912 integer(kind=i_kind),
intent(in) :: phase_id
914 character(len=*),
intent(in) ::
spec_name
916 integer(kind=i_kind) :: particle_number, phase_in_particle, i_layer
917 character(len=:),
allocatable :: unique_name, phase_name
920 call assert_msg(782814629, phase_id .ge. 1 .and. &
921 phase_id .le.
size(this%aero_phase), &
922 "Phase id out of range")
925 particle_number = (phase_id - 1) / total_num_phases_ + 1
926 phase_in_particle = mod(phase_id - 1, total_num_phases_) + 1
928 call assert_msg(918734061, particle_number .ge. 1 .and. &
929 particle_number .le. max_particles_, &
930 "Invalid particle number from phase_id")
933 do i_layer = 1, num_layers_
934 if (phase_in_particle .ge. layer_phase_start_(i_layer) .and. &
935 phase_in_particle .le. layer_phase_end_(i_layer))
then
937 phase_name = this%aero_phase(phase_in_particle)%val%name()
939 this%layer_names_(i_layer)%string //
'.' // &
941 spec_id = this%spec_state_id(unique_name)
947 call die_msg(649201846,
"Could not find layer for phase id "// &
960 if (
allocated(this%rep_name))
deallocate(this%rep_name)
961 if (
allocated(this%aero_phase))
then
963 call this%aero_phase(:)%dereference()
964 deallocate(this%aero_phase)
966 if (
allocated(this%unique_names_))
deallocate(this%unique_names_)
967 if (
allocated(this%layer_names_))
deallocate(this%layer_names_)
968 if (
associated(this%property_set))
deallocate(this%property_set)
969 if (
allocated(this%condensed_data_real)) &
970 deallocate(this%condensed_data_real)
971 if (
allocated(this%condensed_data_int)) &
972 deallocate(this%condensed_data_int)
984 integer(kind=i_kind) :: i_aero
986 do i_aero = 1,
size(this_array)
1005 integer(kind=i_kind),
intent(in) :: aero_rep_type
1008 if (aero_rep_id_.eq.-1)
then
1012 update_data%aero_rep_unique_id = aero_rep_id_
1013 update_data%maximum_computational_particles = &
1014 this%maximum_computational_particles( )
1015 update_data%aero_rep_type = int(aero_rep_type, kind=c_int)
1016 update_data%update_data = &
1018 update_data%is_malloced = .true.
1028 type(string_t),
intent(in) :: layer_names_unordered(:)
1030 type(string_t),
intent(in) :: cover_names_unordered(:)
1034 integer(kind=i_kind) :: i_layer, j_layer, i_cover
1037 do i_layer = 1,
size(layer_names_unordered)
1038 do j_layer = 1,
size(layer_names_unordered)
1039 if (i_layer .eq. j_layer) cycle
1040 call assert_msg(781626922, layer_names_unordered(i_layer)%string .ne. &
1041 layer_names_unordered(j_layer)%string, &
1042 "Duplicate layer name in single particle "// &
1043 "representation: '"// &
1044 trim(layer_names_unordered(i_layer)%string)//
"'")
1051 do i_layer = 1,
size(layer_names_unordered)
1052 if (cover_names_unordered(i_layer)%string ==
"none")
then
1059 do i_layer = 1,
size(layer_names_unordered)
1061 .eq. cover_names_unordered(i_layer)%string)
then
1080 integer(kind=i_kind),
intent(in) :: particle_id
1082 real(kind=dp),
intent(in) :: number_conc
1084 call assert_msg(611967802, this%is_malloced, &
1085 "Trying to set number of uninitialized update object.")
1086 call assert_msg(689085496, particle_id .ge. 1 .and. &
1087 particle_id .le. this%maximum_computational_particles, &
1088 "Invalid computational particle index: "// &
1089 trim(integer_to_string(particle_id)))
1091 this%get_data(), this%aero_rep_unique_id, particle_id-1, &
1105 integer,
intent(in) :: comm
1122 character,
intent(inout) :: buffer(:)
1124 integer,
intent(inout) :: pos
1126 integer,
intent(in) :: comm
1129 integer :: prev_position
1134 this%maximum_computational_particles, comm)
1136 call assert(411585487, &
1137 pos - prev_position <= this%pack_size(comm))
1150 character,
intent(inout) :: buffer(:)
1152 integer,
intent(inout) :: pos
1154 integer,
intent(in) :: comm
1157 integer :: prev_position
1162 this%maximum_computational_particles, comm)
1164 call assert(351557153, &
1165 pos - prev_position <= this%pack_size(comm))
1192 integer(kind=i_kind) :: i_aero
1194 do i_aero = 1,
size(this)
Determine if specified phase(s) exist in adjacent layers. Returns array of phase_ids for adjacent pha...
Get the size of the section of the camp_camp_state::camp_state_t::state_var array required for this a...
Initialize the aerosol representation data, validating component data and loading any required inform...
Extending-type binary pack function (Internal use only)
Extending-type binary unpack function (Internal use only)
Extending-type binary pack size (internal use only)
Get the number of Jacobian elements used in calculations of aerosol mass, volume, number,...
Get the number of instances of a specified aerosol phase.
Get the non-unique name of a chemical species by its unique name.
Get the species id on the state array by phase_id and species name.
Get a species id on the camp_camp_state::camp_state_t::state_var array by unique name....
Get a list of unique names for each element on the camp_camp_state::camp_state_t::state_var array for...
Free an update data object.
Interface to c aerosol representation functions.
Set a new particle number concentration.
Interface for to_string functions.
The abstract aero_phase_data_t structure and associated subroutines.
subroutine finalize_array(this)
Finalize the aerosol phase data.
type(aero_phase_data_t) function, pointer constructor(phase_name, init_size)
Constructor for aero_phase_data_t.
subroutine finalize(this)
Finalize the aerosol phase data.
integer(kind=i_kind) function pack_size(this, comm)
Determine the size of a binary required to pack the aerosol representation data.
The abstract aero_rep_data_t structure and associated subroutines.
The aero_rep_single_particle_t type and associated subroutines.
integer(kind=i_kind) function internal_pack_size_number(this, comm)
Determine the size of a binary required to pack the reaction data.
subroutine update_data_init_number(this, update_data, aero_rep_type)
Initialize an update data object.
integer function num_layers(this)
Returns the number of layers.
subroutine update_data_number_finalize_array(this)
Finalize an array of number update data objects.
subroutine internal_bin_unpack_number(this, buffer, pos, comm)
Unpack the given value from the buffer, advancing position.
integer(kind=i_kind) function per_particle_size(this)
Get the number of state variables per-particle.
integer(kind=i_kind), parameter, public update_number_conc
subroutine update_data_number_finalize(this)
Finalize a number update data object.
subroutine update_data_set_number__n_m3(this, particle_id, number_conc)
Set packed update data for particle number (#/m3) for a particular computational particle.
integer function, dimension(:), allocatable, public ordered_layer_ids(layer_names_unordered, cover_names_unordered)
Order layer array from inner most layer to outermost.
subroutine internal_bin_pack_number(this, buffer, pos, comm)
Pack the given value to the buffer, advancing position.
integer function phase_state_size(this, layer, phase)
Returns the number of state variables for a layer and phase.
integer function num_phases(this, layer)
Returns the number of phases in a layer or overall.
integer(kind=i_kind) function maximum_computational_particles(this)
Returns the maximum nunmber of computational particles.
The camp_state_t structure and associated subroutines.
The chem_spec_data_t structure and associated subroutines.
Wrapper functions for MPI.
subroutine camp_mpi_pack_logical(buffer, position, val, comm)
Packs the given value into the buffer, advancing position.
subroutine camp_mpi_unpack_integer(buffer, position, val, comm)
Unpacks the given value from the buffer, advancing position.
subroutine camp_mpi_unpack_logical(buffer, position, val, comm)
Unpacks the given value from the buffer, advancing position.
integer function camp_mpi_pack_size_logical(val, comm)
Determines the number of bytes required to pack the given value.
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 property_t structure and associated subroutines.
Random number generators.
integer(kind=i_kind) function generate_int_id()
Generate an integer id Ids will be sequential, and can only be generated by the primary process.
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.
character(len=camp_util_convert_string_len) function integer_to_string(val)
Convert an integer to a string format.
Pointer type for building arrays.
Abstract aerosol representation data type.
Define index_pair array for adjacent_phases functions.
Single particle aerosol representation.
Single particle update number concentration object.
String type for building arrays of string of various size.