From c75fe12a5b68fae377c07b1a90a4eb3707b2481a Mon Sep 17 00:00:00 2001 From: David A Minton Date: Wed, 18 Aug 2021 08:56:05 -0400 Subject: [PATCH] Improved parameter file parsing and now take CHK_RMIN value from the central body radius if it is not supplied in param.in --- src/io/io.f90 | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/src/io/io.f90 b/src/io/io.f90 index c31718edb..3f7a98cfc 100644 --- a/src/io/io.f90 +++ b/src/io/io.f90 @@ -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 @@ -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 @@ -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