docs: def write_LEAFS_model(self,nzn=30000000,dr=5.e4,
                            rhostrip=5.e-4):
          """
          write an ascii file that will be read by Sam's version of
          inimod.F90 in order to make an initial model for LEAFS
          """
  
          from scipy import interpolate
  
          ye = self.get('ye')
          newye=[]
          rho = 10.**self.get('logRho')[::-1] # centre to surface
          # get index to strip all but the core:
          idx = np.abs(rho - rhostrip).argmin() + 1
          rho = rho[:idx]
          rhoc = rho[0]
          rad  = 10.**self.get('logR') * ast.rsun_cm
          rad = rad[::-1][:idx]
          ye = ye[::-1][:idx]
  
          print('there will be about ',old_div(rad[-1], dr), 'mass cells...')
  
          # add r = 0 point to all arrays
          rad = np.insert(rad,0,0)
          ye  = np.insert(ye,0,ye[0])
          rho = np.insert(rho,0,rho[0])
  
          print(rad)
  
          # interpolate
          fye  = interpolate.interp1d(rad,ye)
          frho = interpolate.interp1d(rad,rho)
          newye = []
          newrho = []
          newrad = []
  
          Tc   = 10.**self.get('logT')[-1]
  
          for i in range(nzn):
              if i * dr > rad[-1]: break
              newye.append(fye( i * dr ))
              newrho.append(frho( i * dr ))
              newrad.append( i * dr )
  
          f = open('M875.inimod','w')
  
          f.write(str(Tc)+' \n')
          f.write(str(rhoc)+' \n')
          for i in range(len(newye)):
              f.write(str(i+1)+'  '+str(newrad[i])+'  '+\
                      str(newrho[i])+'  '+str(newye[i])+' \n')
  
          f.close()