anchor.diff:   end do
    close(55)
   
  -
   ! nx = nxIso
   nx = fgoth*nx + (1.-fgoth)*nxIso
  -print *, "fgoth = ", fgoth
  -
  -print *, "cumint=", cumint(1), cumint(int(nlines/2)), cumint(nlines), "nx=", nx(5)
  +
   Ltrans = 4.*pi*(tab_r+epso)**2.*Rsun**2*kappaofR*fgoth*hgoth*nx*mfp*sqrt(kB*tab_T/mxg)*kB*dTdr;
   
   !get derivative of luminosity - same nonsense as with the temperature
  
positive.code: double precision :: brcoeff(nlines), crcoeff(nlines), drcoeff(nlines) ! for spline
  double precision :: bdcoeff(decsize), cdcoeff(decsize), ddcoeff(decsize) ! for spline
  double precision :: smallgrid(decsize), smallR(decsize), smallT(decsize), smallL(decsize),smalldL(decsize),smalldT(decsize),ispline
  double precision :: Tx, guess_1, guess_2, tolerance ! For the Spergel & Press nonlocal scheme
  !print *, "transgen called"
  
  epso = tab_r(2)/10.d0 ! small number to prevent division by zero
  ! smallr = (/((i*1./dble(decsize-1)),i=1,decsize)/) - 1./dble(decsize-1)
  
negative.code:     alphaofR = alphaofR/(sigma_N*sum(nabund,1))
  
  
  if (nonlocal .eqv. .false.) then ! if nonlocal=false, use Gould & Raffelt regime to calculate transport
  
  !compute mean free path
  