[mesa-users] check_too_many_bad in astero module

Warrick Ball wball at astro.physik.uni-goettingen.de
Fri Nov 7 01:45:22 EST 2014


Hi,

A separate issue in my searching through some recent runs is the 
subroutine check_too_many_bad in star/astero/src/extras_support.f.  The 
code is short enough for me to copy here:

      subroutine check_too_many_bad
         if (best_chi2 > 0) then
            num_chi2_too_big = num_chi2_too_big + 1
            if (num_chi2_too_big > limit_num_chi2_too_big) then
               write(*,*) 'have reached too many bad chi2 limit'
               do_astero_extras_check_model = terminate
            end if
            return
         end if
         num_chi2_too_big = 0
      end subroutine check_too_many_bad

Fair enough.  But look at this description in the default inlist:

      chi2_relative_increase_limit = 2.0
      limit_num_chi2_too_big = 20
      ! if limit_num_chi2_too_big consequtive chi2s
      ! are > chi2_relative_increase_limit times the best chi2 for the run,
      ! then stop the run.

This suggests that the comparison

         if (best_chi2 > 0) then

should be

         if (best_chi2*chi2_relative_increase_limit > 0) then

The same comparison is done in subroutine final_checks, with the factor 
included, as I'd expect.

No dealbreaker here, just unexpected behaviour.  It's only occasionally 
disruptive because I think there's some confusion about when chi^2 is 
*bad* and when it's *big*.

Cheers,
Warrick


------------
Warrick Ball
Postdoc, Institut für Astrophysik Göttingen
wball at astro.physik.uni-goettingen.de
+49 (0) 551 39 5069


More information about the Mesa-users mailing list