Skip to content

Commit

Permalink
Improve error handling in custom photoionization settings
Browse files Browse the repository at this point in the history
  • Loading branch information
Hemaditya Malla committed Nov 8, 2023
1 parent 757bc1b commit 6763a2f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/m_photoi_helmh.f90
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ subroutine photoi_helmh_initialize(tree, cfg, is_used, eta)
coeffs = coeffs * (frac_O2 * gas_pressure)**2 ! 1/m^2
case ("custom")
call CFG_get_size(cfg, "photoi_helmh%lambdas", n_modes)
if (n_modes < 1) error stop "Custom photoionization lambdas and coeffs missing."
allocate(lambdas(n_modes))
allocate(coeffs(n_modes))
call CFG_get(cfg, "photoi_helmh%lambdas", lambdas)
Expand Down

0 comments on commit 6763a2f

Please sign in to comment.