Skip to content

Commit

Permalink
Prevent fapar and fbpar overwriting include_apar and include_bpar, ab…
Browse files Browse the repository at this point in the history
…ort simulation if fapar > -1 or fbpar > -1 are set in the input. May fix #130.
  • Loading branch information
mrhardman committed Jun 26, 2024
1 parent 6dab824 commit 28ccf39
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions run_parameters.f90
Original file line number Diff line number Diff line change
Expand Up @@ -210,18 +210,17 @@ subroutine read_parameters

if (fapar > -1.0 .or. fbpar > -1.0) then
write (*, *) '!!!WARNING!!!'
write (*, *) 'fapar and fbpar are deprecated: use include_apar instead.'
write (*, *) 'fapar and fbpar are deprecated:'
write (*, *) 'use include_apar and include_bpar instead in namelist physics_flags.'
if (fapar > epsilon(0.0)) then
write (*, *) 'setting include_apar = .true.'
include_apar = .true.
else
write (*, *) 'setting include_apar = .false.'
include_apar = .false.
write (*, *) 'to include apar, set include_apar = .true.'
end if
if (fbpar > epsilon(0.0)) then
write (*, *) 'bpar evolution not currently supported.'
write (*, *) 'to include bpar, set include_bpar = .true.'
end if
write (*, *) 'Aborting simulation.'
write (*, *) '!!!WARNING!!!'
error = .true.
end if

! semi-lagrange advance of mirror term is not supported for EM simulations
Expand Down Expand Up @@ -296,7 +295,7 @@ subroutine read_parameters
call broadcast(mat_read)
! include_apar broadcast in case it is reset according to specification of
! (deprecated) fapar variable
call broadcast(include_apar)
! call broadcast(include_apar)

! calculate some useful derived quantities that are used repeatedly across modules
time_upwind_plus = 0.5 * (1.0 + time_upwind)
Expand Down

0 comments on commit 28ccf39

Please sign in to comment.