anchor.diff:        goto 30
       end if
   
  +  else if(chr_toUpper(inLine(1:5)) == "TABLE" ) then
  +    ! Read chebyshev coefficients in tabular format
  +    if (chr_toLower(lnSplit(3)) == "y" ) then
  +      ! line with header
  +      if ( lnSplit(2) /= ":" .or. lnSplit(4) /= "|" ) then
  +        write(lerr,"(a)") "CHEBY> ERROR Incorret format of header line."
  +        goto 50
  +      end if
  +      ! - in case, de-allocate
  +      if ( allocated( jOrder ) ) call dealloc(jOrder,'jOrder')
  +      ! - allocate
  +      call alloc( jOrder, nSplit-4, 0, 'jOrder' )
  +      ! - parse header and store it in memory
  +      do jj=1,nSplit-4
  +        call chr_cast(lnSplit(jj+4),jOrder(jj),spErr)
  +        if ( jOrder(jj) < 0 ) then
  +          write(lerr,"(a)") "CHEBY> ERROR Header line contains a negative index."
  +          goto 50
  +        end if
  +      end do
  +      ! - find max order in header
  +      jMax=maxval( jOrder )
  +    elseif (chr_toLower(lnSplit(3)) == "x" ) then
  +      ! line with actual coefficients
  +      if ( .not. allocated( jOrder ) ) then
  +        write(lerr,"(a)") "CHEBY> ERROR Coefficient line comes before/without header line."
  +        goto 50
  +      end if
  +      if ( lnSplit(2) /= ":" .or. lnSplit(5) /= "|" ) then
  +        write(lerr,"(a)") "CHEBY> ERROR Incorret format of line of coefficients."
  +        goto 50
  +      end if
  +      if ( nSplit-5 > size(jOrder) ) then
  +        write(lerr,"(a)") "CHEBY> ERROR Incorret format of line of coefficients."
  +        goto 50
  +      end if
  +      call chr_cast(lnSplit(4),ii,spErr)
  +      ! add new coefficients
  +      iDim = size(cheby_coeffs,1)
  +      jDim = size(cheby_coeffs,2)
  +      if(ii>=iDim)   call alloc(cheby_coeffs,     ii, jDim-1, ncheby_tables, zero, 'cheby_coeffs', 0, 0, 1 )
  +      iDim = size(cheby_coeffs,1)
  +      if(jMax>=jDim) call alloc(cheby_coeffs, iDim-1,   jMax, ncheby_tables, zero, 'cheby_coeffs', 0, 0 ,1 )
  +      do jj=1,nSplit-5
  +        call chr_cast(lnSplit(jj+5),cheby_coeffs(ii,jOrder(jj),ifile),spErr)
  +      end do
  +      cheby_maxOrder(ifile)=max(ii,jMax,cheby_maxOrder(ifile))
  +      if ( cheby_maxOrder(ifile) > cheby_maxNterms-1 ) then
  +        write(lerr,"(2(a,i0))") "CHEBY> ERROR order of map too high: ",cheby_maxOrder(ifile), &
  +             " > ",cheby_maxNterms-1
  +        write(lerr,"(a)")       "CHEBY>       please increase cheby_maxNterms parameter"
  +        goto 30
  +      end if
  +    else
  +      write(lerr,"(a)") "CHEBY> ERROR Un-recognized line for tabular format of coefficients."
  +      goto 50
  +    end if
  +    
     else
  -    ! Read chebyshev coefficients
  +    ! Read chebyshev coefficients in format: "ii jj : value"
       if(nSplit /= 4) then
         write(lerr,"(a)") "CHEBY> ERROR Not enough arguments for expressing Chebyshev coefficients [Vm]."
         write(lerr,"(a)") "CHEBY>       Correct format:"
  
positive.code:   integer, intent(in) :: ifile
  
    character(len=:), allocatable   :: lnSplit(:)
    character(len=mInputLn) inLine
    integer nSplit, ii, jj, fUnit, iDim, jDim
    logical spErr, err, lDefI
  
    lDefI=.true.
  
    write(lout,"(a)") "CHEBY> Parsing file with coefficients for Chebyshev polynomials "//trim(cheby_filename(ifile))
    call f_requestUnit(cheby_filename(ifile),fUnit)
    call f_open(unit=fUnit,file=cheby_filename(ifile),mode='r',err=err,formatted=.true.,status="old")
    if(err) then
  
negative.code: 
  
  ! ================================================================================================ !
  !  Last modified: 2020-04-07
  !  Rewritten by VKBO, June 2018
  !  Read file with coefficients for chebyshev polynomials
  !  ifile is index of file in table of chebyshev files
  