Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rxns with layers #7

Merged
merged 10 commits into from
Jul 2, 2024
Merged

Rxns with layers #7

merged 10 commits into from
Jul 2, 2024

Conversation

jtgasparik
Copy link
Owner

Added is_at_surface flag to indicate if phase exists in the surface layer of particle

Copy link
Collaborator

@mattldawson mattldawson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks great! just a few suggestions


!> List of phase ids
integer(kind=i_kind), allocatable :: phase_ids(:)
!> Aerosol representation data
class(aero_rep_data_t), intent(in) :: this
!> Aerosol phase name
character(len=*), intent(in) :: phase_name
!> Indicates if aerosol phase is at the surface of particle
logical, intent(in), optional :: is_at_surface
logical, allocatable :: aero_is_at_surf(:)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this needed?

Comment on lines 523 to 524
end if
end do
if (.not. is_at_surface) then
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could just be else

Comment on lines 517 to 518
if (this%aero_phase(i_phase)%val%name().eq. phase_name .and. &
aero_is_at_surf(i_phase) .eqv. .true.) then
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if (this%aero_phase(i_phase)%val%name().eq. phase_name .and. &
aero_is_at_surf(i_phase) .eqv. .true.) then
if (this%aero_phase(i_phase)%val%name().eq. phase_name .and. &
aero_is_at_surf(i_phase)) then

Comment on lines 527 to 528
if (this%aero_phase(i_phase)%val%name().eq. phase_name .and. &
aero_is_at_surf(i_phase) .eqv. .false.) then
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if (this%aero_phase(i_phase)%val%name().eq. phase_name .and. &
aero_is_at_surf(i_phase) .eqv. .false.) then
if (this%aero_phase(i_phase)%val%name().eq. phase_name .and. &
.not. aero_is_at_surf(i_phase)) then

src/aero_reps/aero_rep_single_particle.c Show resolved Hide resolved
@@ -374,6 +373,7 @@ subroutine initialize(this, chem_spec_data, aero_rep, n_cells)

! Save the index of the gas-phase species in the state variable array
GAS_SPEC_ = chem_spec_data%gas_state_id(gas_spec_name)
print *, GAS_SPEC_
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please remove debug code

Copy link
Collaborator

@jcurtis2 jcurtis2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While it makes it a longer variable name, I think you should at least consider changing aero_is_at_surface to aero_phase_is_at_surface to more clearly denote what this is and be more consistent with the related variable aero_phase.

Copy link
Collaborator

@mattldawson mattldawson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks great!

@jtgasparik jtgasparik merged commit b429895 into layer_development Jul 2, 2024
2 checks passed
@jtgasparik jtgasparik deleted the rxns_with_layers branch July 2, 2024 16:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants