Skip to content

Commit

Permalink
particles can only be made from evolving gases
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicholaswogan committed May 31, 2024
1 parent fc66611 commit 023ce56
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/input/photochem_input_read.f90
Original file line number Diff line number Diff line change
Expand Up @@ -393,14 +393,20 @@ subroutine get_rxmechanism(mapping, infile, dat, var, err)
if (dat%particle_formation_method(i) == CondensingParticle) then
! if a condensing molecule
ind = findloc(dat%species_names,dat%particle_gas_phase(i))
if (ind(1) /= 0) then
dat%particle_gas_phase_ind(i) = ind(1)
else
if (ind(1) == 0) then
err = "IOError: particle "//trim(dat%particle_names(i))// &
" can not be made from "//trim(dat%particle_gas_phase(i))// &
" because "//trim(dat%particle_gas_phase(i))//" is not a gas"// &
" in the model."
return
elseif (ind(1) > dat%nq .or. ind(1) < dat%ng_1) then
err = "Particle "//trim(dat%particle_names(i))// &
" can not be made from "//trim(dat%particle_gas_phase(i))// &
" because "//trim(dat%particle_gas_phase(i))//" is"// &
" is a particle, short-lived species, or background gas."
return
else
dat%particle_gas_phase_ind(i) = ind(1)
endif
endif
enddo
Expand Down

0 comments on commit 023ce56

Please sign in to comment.