Skip to content

Commit 1c0f472

Browse files
committed
Adjust error message when computing [M/H] with custom zfracs
Close #515 Reported-by Claudia Reyes
1 parent 48f99a0 commit 1c0f472

File tree

3 files changed

+4
-1
lines changed

3 files changed

+4
-1
lines changed

chem/public/chem_def.f90

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -297,6 +297,7 @@ module chem_def
297297

298298

299299
! identifiers for different Z fractions.
300+
integer, parameter :: Custom_zfracs = 0
300301
integer, parameter :: AG89_zfracs = 1
301302
integer, parameter :: GN93_zfracs = 2
302303
integer, parameter :: GS98_zfracs = 3

chem/public/chem_lib.f90

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -706,6 +706,8 @@ real(dp) function chem_M_div_h(x,z,zfrac_choice) ! Returns [M/H]
706706
case(A09_Prz_zfracs)
707707
zsolar = A09_Prz_zsol
708708
ysolar = A09_Prz_ysol
709+
case(Custom_zfracs)
710+
call mesa_error(__FILE__,__LINE__,"[M/H] not supported with custom zfracs.")
709711
case default
710712
call mesa_error(__FILE__,__LINE__,"Bad zfrac_choice")
711713
end select

star/private/adjust_xyz.f90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1013,7 +1013,7 @@ subroutine get_xa_for_standard_metals( &
10131013
zfrac(:) = L09_element_zfrac(:)
10141014
case (A09_Prz_zfracs)
10151015
zfrac(:) = A09_Prz_zfrac(:)
1016-
case (0) ! use non-standard values given in controls
1016+
case (Custom_zfracs) ! use non-standard values given in controls
10171017
zfrac(:) = 0
10181018
zfrac(e_li) = s% z_fraction_li
10191019
zfrac(e_be) = s% z_fraction_be

0 commit comments

Comments
 (0)