[mesa-users] ine20

Bill Paxton paxton at kitp.ucsb.edu
Tue Apr 26 16:03:39 EDT 2011


Hi,

This routine should provide a template for what you need:
      
      
      subroutine write_abundance(s, k, cid)
         use chem_def
         type (star_info), pointer :: s
         integer, intent(in) :: k, cid
         integer :: j
         double precision :: abundance
         j = s% net_iso(cid)
         if (j == 0) then
            abundance = 0
         else
            abundance = s% xa(j, k)
         end if
         write(*,*) 'abundance ' // trim(chem_isos% name(cid)), j, cid, abundance
      end subroutine write_abundance



here's how to call it


      integer function extras_finish_step(s, id, id_extra)
         use chem_def
         type (star_info), pointer :: s
         integer, intent(in) :: id, id_extra


         call write_abundance(s, s% nz, ih1)
         call write_abundance(s, s% nz, ihe4)
         call write_abundance(s, s% nz, ic12)
         call write_abundance(s, s% nz, ine20)
         call write_abundance(s, s% nz, img24)



-Bill






More information about the Mesa-users mailing list