From: Bill P. <pa...@ki...> - 2011-04-26 20:03:45
|
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 |