Skip to content
This repository was archived by the owner on Aug 28, 2024. It is now read-only.

Commit

Permalink
Improved parameter file parsing and now take CHK_RMIN value from the …
Browse files Browse the repository at this point in the history
…central body radius if it is not supplied in param.in
  • Loading branch information
daminton committed Aug 18, 2021
1 parent 116abea commit c75fe12
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions src/io/io.f90
Original file line number Diff line number Diff line change
Expand Up @@ -609,12 +609,16 @@ module subroutine io_param_reader(self, unit, iotype, v_list, iostat, iomsg)
write(*,*) "OUT_STAT = ",trim(adjustl(param%out_stat))
write(*,*) "ISTEP_DUMP = ",param%istep_dump
write(*,*) "CHK_CLOSE = ",param%lclose
write(*,*) "CHK_RMIN = ",param%rmin
write(*,*) "CHK_RMAX = ",param%rmax
write(*,*) "CHK_EJECT = ",param%rmaxu
write(*,*) "CHK_QMIN = ",param%qmin
write(*,*) "CHK_QMIN_COORD = ",trim(adjustl(param%qmin_coord))
write(*,*) "CHK_QMIN_RANGE = ",param%qmin_alo, param%qmin_ahi
if (param%rmin > 0.0) then
write(*,*) "CHK_RMIN = ",param%rmin
else
write(*,*) "! CHK_RMIN value will be the central body radius"
end if
if (param%rmax > 0.0_DP) write(*,*) "CHK_RMAX = ",param%rmax
if (param%rmaxu > 0.0_DP) write(*,*) "CHK_EJECT = ",param%rmaxu
if ((param%qmin > 0.0_DP) .or. (param%qmin_alo > 0.0_DP) .or. (param%qmin_ahi > 0.0_DP)) write(*,*) "CHK_QMIN_COORD = ",trim(adjustl(param%qmin_coord))
if (param%qmin > 0.0_DP) write(*,*) "CHK_QMIN = ",param%qmin
if ((param%qmin_alo > 0.0_DP) .or. (param%qmin_ahi > 0.0_DP)) write(*,*) "CHK_QMIN_RANGE = ",param%qmin_alo, param%qmin_ahi
write(*,*) "EXTRA_FORCE = ",param%lextra_force
write(*,*) "RHILL_PRESENT = ",param%lrhill_present
write(*,*) "ROTATION = ", param%lrotation
Expand Down Expand Up @@ -655,7 +659,7 @@ module subroutine io_param_reader(self, unit, iotype, v_list, iostat, iomsg)
end if

associate(integrator => v_list(1))
if (integrator == RMVS) then
if ((integrator == RMVS) .or. (integrator == SYMBA)) then
if (.not.param%lclose) then
write(iomsg,*) 'This integrator requires CHK_CLOSE to be enabled.'
iostat = -1
Expand Down Expand Up @@ -903,6 +907,7 @@ module subroutine io_read_cb_in(self, param)
close(iu, err = 667, iomsg = errmsg)

if (self%j2rp2 /= 0.0_DP) param%loblatecb = .true.
if (param%rmin < 0.0) param%rmin = self%radius

return

Expand Down

0 comments on commit c75fe12

Please sign in to comment.