Skip to content

Commit 1406c51

Browse files
committed
Dont error when we cant find a special rate if we are changing the net.
This is mostly the case when loading a zams model which uses basic.net, that can't find the special rate until after the net change.
1 parent c58daa7 commit 1406c51

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

star/job/run_star_support.f90

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1582,6 +1582,14 @@ subroutine set_rate_factors(id, ierr)
15821582

15831583
s% rate_factors(:) = 1
15841584
if (s% job% num_special_rate_factors <= 0) return
1585+
1586+
! Dont error if we are changing net
1587+
if ((s% job% change_initial_net .or. s% job% change_net) .and. &
1588+
trim(s% job% new_net_name)/=trim(s% net_name)) then
1589+
!write(*,*) "Not changing special rates untill net change"
1590+
return
1591+
end if
1592+
15851593

15861594
call get_net_reaction_table_ptr(s% net_handle, net_reaction_ptr, ierr)
15871595
if (ierr /= 0) return
@@ -1592,14 +1600,14 @@ subroutine set_rate_factors(id, ierr)
15921600
j = 0
15931601
if (ir > 0) j = net_reaction_ptr(ir)
15941602
if (j <= 0) then
1595-
write(*,2) 'Failed to find reaction_for_special_factor ' // &
1603+
write(*,*) 'Failed to find reaction_for_special_factor ' // &
15961604
trim(s% job% reaction_for_special_factor(i)), &
15971605
j, s% job% special_rate_factor(i)
15981606
error = .true.
15991607
cycle
16001608
end if
16011609
s% rate_factors(j) = s% job% special_rate_factor(i)
1602-
write(*,2) 'set special rate factor for ' // &
1610+
write(*,*) 'set special rate factor for ' // &
16031611
trim(s% job% reaction_for_special_factor(i)), &
16041612
j, s% job% special_rate_factor(i)
16051613
end do

0 commit comments

Comments
 (0)