Skip to content

Commit 6cea2d1

Browse files
committed
Make the special rates look for the rate file in the local dir first
1 parent 2ec6171 commit 6cea2d1

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

rates/private/raw_rates.f90

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -948,14 +948,21 @@ subroutine get_interp_table(f_name, nT8s, T8s_out, f1_out, ierr)
948948
ierr = 0
949949
vec => vec_ary
950950

951-
rate_file = trim(rates_table_dir) // '/' // trim(f_name)
952-
!write(*,*) 'load table ' // trim(rate_file)
951+
952+
! Look for the file based on its name first
953+
954+
rate_file = trim(f_name)
953955

954956
open(newunit=iounit,file=trim(rate_file),action='read',status='old',iostat=ierr)
955957
if (ierr /= 0) then
956-
write(*,*) 'ERROR: cannot open rate info file ' // trim(rate_file)
957-
!return
958-
call mesa_error(__FILE__,__LINE__)
958+
! Look in rates_table_dir
959+
rate_file = trim(rates_table_dir) // '/' // trim(f_name)
960+
open(newunit=iounit,file=trim(rate_file),action='read',status='old',iostat=ierr)
961+
if (ierr /= 0) then
962+
write(*,*) 'ERROR: cannot open rate info file ' // trim(rate_file)
963+
!return
964+
call mesa_error(__FILE__,__LINE__)
965+
end if
959966
end if
960967

961968
do ! read until reach line starting with an integer (nT8s)

0 commit comments

Comments
 (0)