!23456789a123456789b123456789c123456789d123456789e123456789f123456789g12
!
! Copyright D.J. Jeffery, 2006jan01.
!
!  rde.f for preparing radioactive decay data.
!
!   References:
!
! \bibitem[Browne \& Firestone(1986)]{browne1986}
!         Browne, E., \& Firestone, R. B. 1986,
!         Table of Radioactive Isotopes (New York:
!         John Wiley \& Sons, Inc.)
!         % Radioacitve isotopes and decay chains and
!         % radiations including all the complex stuff like
!         % X-ray, atomic electron, internal bremstrahlung X-ray.
!
! \bibitem[Huo(1992)]{huo1992} Huo, J. 1992,
!            Nuclear Data Sheets, 67, 523.
!            % all about isobars of atomic mass 56,
!            % especially Ni56 and Co56.
!            % An update of Huo~\etal 1987.
!
! \bibitem[Jeffery(1998)]{jeffery1998} Jeffery, D. J. 1998,
!               astro-ph/9811356
!             % the longer LS grey $\gamma$-ray transfer procedure
!             % for supernovae.
!             % Effectively rejected A\&SS, but just for being
!             % prolix and (in the referee's opinion) worthless.
!             % But the referee did not say anything was wrong.
!             % So unpublished rather than preprint is best.
!             % The later implies eventual publication which
!             % may not be forthcoming.
!             % There is a good review of radioactive decay energy
!             % quantities in Section 5.
!
!  <a href="http://ie.lbl.gov/toi/"> LBNL Isotopes
!      Project - LUNDS Universitet
!      WWW Table of Radioactive Isotopes </a>
!         http://ie.lbl.gov/toi/nuclide.asp?iZA=270056    ! Co-56
!
!     \bibitem[Metcalf et al.(2004)]{metcalf2004} Metcalf, M., Reid, J.,
!          \&~Cohen, M. 2004,
!          Fortran 95/2003 Explained
!          (Oxford:  Oxford University Press) (MRC)
!          % Pretty good reference book.
!
!23456789a123456789b123456789c123456789d123456789e123456789f123456789g12
!
      module rde_mod
      use numerical
      use physical
      use astronomical
      implicit none
!
      character :: aanuclide*5            ! Nuclide name.
      real (kind=nprecision) :: b_coef    ! Energy generation B coefficient
!                                         !   (erg/s/g).
      real (kind=nprecision) :: b_coef_lepton  ! For betas and atomic el.
      real (kind=nprecision) :: b_coef_photon ! For gammas and X-rays.
      real (kind=nprecision) :: b_coef_sun  ! Energy generation B coefficient
!                                           !   (erg/s/mass_sun).
      real (kind=nprecision) :: betamax   ! Maximum beta particle energy (MeV).
      real (kind=nprecision) :: betafrac  ! Fraction of time there is a
!                                         !   beta particle.
      real (kind=nprecision) :: beta_ke   ! Average beta particle energy
!                                         !  per beta (MeV).
      real (kind=nprecision) :: beta_speed   ! Average beta particle 
!                                            !  speed parameter 
      real (kind=nprecision) :: c_coef    ! Energy generation C
!                                         !  coefficient (erg/s/g).
      real (kind=nprecision) :: c_coef_lepton  ! For betas and atomic el.
      real (kind=nprecision) :: c_coef_photon ! For gammas and X-rays.
      real (kind=nprecision) :: c_coef_sun  ! Energy generation C
!                                           !   coefficient (erg/s/mass_sun).
      real (kind=nprecision) :: fatomic   ! Fraction of energy in atomic
!                                         !   electron KE.
      real (kind=nprecision) :: fbeta     ! Fraction of energy in positron KE.
      real (kind=nprecision) :: fgamma    ! Fraction of energy in gamma-rays.
      real (kind=nprecision) :: flepton   ! Fraction of energy in leptons.
      real (kind=nprecision) :: fphoton   ! Fraction of energy in photons.
      real (kind=nprecision) :: fxray     ! Fraction of energy in X-rays.
      integer :: ibeta                    ! The sign of the beta particle.
      integer :: ia                       ! Atomic mass number A.
      integer :: ia_parent                ! Atomic mass number A of parent.
      integer :: iz                       ! Atomic number Z.
      integer :: iz_parent                ! Atomic number Z.
      real (kind=nprecision) :: qval      ! Total disintegration energy (MeV).
      real (kind=nprecision) :: qval_nu_omit  ! The energy that doesn't escape
!                                             !   as neutrinos (MeV).
      real (kind=nprecision) :: qvalerr   ! Error in qval.
      real (kind=nprecision) :: qval_atomic  ! The energy in atomic electrons.
      real (kind=nprecision) :: qval_beta    ! The energy in betas.
      real (kind=nprecision) :: qval_gamma   ! The energy in gammas.
      real (kind=nprecision) :: qval_gamma_direct ! The energy in gamma lines.
      real (kind=nprecision) :: qval_xray    ! The energy in gammas.
      real (kind=nprecision) :: rw7          !  W7 yield in solar masses.
      real (kind=nprecision) :: rw7_parent   !  W7 yield in solar masses.
      real (kind=nprecision) :: t_efold    ! e-folding time (days).
      real (kind=nprecision) :: t_efold_parent    ! e-folding time (days)
!                                                !   of parent.
      real (kind=nprecision) :: t_half     ! Half-life (days).
      real (kind=nprecision) :: t_halferr  ! Half-life error (days).
      real (kind=nprecision) :: t_half_parent     ! Half-life (days) of parent.
!
!-----------------------------------------------------------------------
!
      namelist/param/aanuclide                                              &
     & ,b_coef                                                              &
     & ,b_coef_lepton                                                       &
     & ,b_coef_photon                                                       &
     & ,b_coef_sun                                                          &
     & ,betamax                                                             &
     & ,betafrac                                                            &
     & ,beta_ke                                                             &
     & ,beta_speed                                                          &
     & ,c_coef                                                              &
     & ,c_coef_lepton                                                       &
     & ,c_coef_photon                                                       &
     & ,c_coef_sun                                                          &
     & ,fatomic                                                             &
     & ,fbeta                                                               &
     & ,fgamma                                                              &
     & ,flepton                                                             &
     & ,fphoton                                                             &
     & ,fxray                                                               &
     & ,ibeta                                                               &
     & ,ia                                                                  &
     & ,ia_parent                                                           &
     & ,iz                                                                  &
     & ,iz_parent                                                           &
     & ,qval                                                                &
     & ,qval_nu_omit                                                        &
     & ,qvalerr                                                             &
     & ,qval_atomic                                                         &
     & ,qval_beta                                                           &
     & ,qval_gamma                                                          &
     & ,qval_xray                                                           &
     & ,rw7                                                                 &
     & ,rw7_parent                                                          &
     & ,t_efold                                                             &
     & ,t_efold_parent                                                      &
     & ,t_half                                                              &
     & ,t_halferr                                                           &
     & ,t_half_parent                                                       &
     &   ! Need this place-holder at the end of the namelist.
!
      end module rde_mod
!
!23456789a123456789b123456789c123456789d123456789e123456789f123456789g12
!
! Note we want the new type and old namelist in separate modules
! to prevent the confusion of names and type radio_isotope names.
! They shouldn't have been the same, but that's history.
!
!
      module rde_mod2
      use numerical
      use physical
      use astronomical
      implicit none
!
      type radio_isotope
        integer :: inuclide
        character :: aanuclide*5
        real (kind=nprecision) :: flepton
        real (kind=nprecision) :: fphoton
        real (kind=nprecision) :: gfactor
        real (kind=nprecision) :: hfactor
        integer :: ia
        integer :: ia_parent
        integer :: iz
        integer :: iz_parent
        real (kind=nprecision) :: qval_nu_omit
        real (kind=nprecision) :: t_efold
        real (kind=nprecision) :: t_efold_parent
      end type radio_isotope
!
      integer, parameter :: nradio=20
!
      type(radio_isotope) :: radio(nradio)
!
      end module rde_mod2
