anchor.diff:  
     logical,            public,  save :: dist_enable     ! DIST input block given
     logical,            public,  save :: dist_echo       ! Echo the read distribution?
  +  logical,            public,  save :: dist_hasFormat  ! Whether the format flag is set
     character(len=256), public,  save :: dist_readFile   ! File name for reading the distribution
     character(len=256), public,  save :: dist_echoFile   ! File name for echoing the distribution
     integer,            private, save :: dist_readUnit   ! Unit for reading the distribution
     integer,            private, save :: dist_echoUnit   ! Unit for echoing the distribution
   
  +  integer, allocatable, private, save :: dist_colFormat(:) ! The format of the file columns
  +  integer,              private, save :: dist_nColumns = 0 ! The number of columns in the file
  +
  +  !  Column formats
  +  ! ================
  +  integer, parameter :: dist_fmtNONE        = 0
  +  integer, parameter :: dist_fmtPartID      = 1
  +  integer, parameter :: dist_fmtParentID    = 2
  +
  +  ! Physical Coordinates
  +  integer, parameter :: dist_fmtX           = 11 ! Horizontal position
  +  integer, parameter :: dist_fmtY           = 12 ! Vertical positiom
  +  integer, parameter :: dist_fmtXP          = 13 ! Horizontal angle
  +  integer, parameter :: dist_fmtYP          = 14 ! Vertical angle
  +  integer, parameter :: dist_fmtPX          = 15 ! Horizontal momentum
  +  integer, parameter :: dist_fmtPY          = 16 ! Vertical momentum
  +  integer, parameter :: dist_fmtSIGMA       = 17 ! Longitudinal relative position
  +  integer, parameter :: dist_fmtDT          = 18 ! Time delay
  +  integer, parameter :: dist_fmtE           = 19 ! Particle energy
  +  integer, parameter :: dist_fmtP           = 20 ! Particle momentum
  +  integer, parameter :: dist_fmtDEE0        = 21 ! Relative particle energy (to reference particle)
  +  integer, parameter :: dist_fmtDPP0        = 22 ! Relative particle momentum (to reference particle)
  +
  +  ! Normalised Coordinates
  +  integer, parameter :: dist_fmtX_NORM      = 31 ! Normalised horizontal position
  +  integer, parameter :: dist_fmtY_NORM      = 32 ! Normalised vertical positiom
  +  integer, parameter :: dist_fmtXP_NORM     = 33 ! Normalised horizontal angle
  +  integer, parameter :: dist_fmtYP_NORM     = 34 ! Normalised vertical angle
  +  integer, parameter :: dist_fmtPX_NORM     = 35 ! Normalised horizontal momentum
  +  integer, parameter :: dist_fmtPY_NORM     = 36 ! Normalised vertical momentum
  +  integer, parameter :: dist_fmtSIGMA_NORM  = 37 ! Normalised longitudinal relative position
  +  integer, parameter :: dist_fmtDT_NORM     = 38 ! Normalised time delay
  +  integer, parameter :: dist_fmtE_NORM      = 39 ! Normalised particle energy
  +  integer, parameter :: dist_fmtP_NORM      = 40 ! Normalised particle momentum
  +  integer, parameter :: dist_fmtDEE0_NORM   = 41 ! Normalised relative particle energy (to reference particle)
  +  integer, parameter :: dist_fmtDPP0_NORM   = 42 ! Normalised relative particle momentum (to reference particle)
  +
  +  ! Ion Columns
  +  integer, parameter :: dist_fmtMASS        = 51 ! Particle mass
  +  integer, parameter :: dist_fmtCHARGE      = 52 ! Particle Charge
  +  integer, parameter :: dist_fmtIonA        = 53 ! Ion atomic number
  +  integer, parameter :: dist_fmtIonZ        = 54 ! Ion atomic charge
  +  integer, parameter :: dist_fmtPDGID       = 55 ! Particle PDG ID
  +
   contains
   
   ! ================================================================================================ !
  
positive.code:   logical,          intent(inout) :: iErr
  
    character(len=:), allocatable   :: lnSplit(:)
    integer nSplit
    logical spErr
  
    call chr_split(inLine, lnSplit, nSplit, spErr)
    if(spErr) then
  
negative.code: 
    select case(lnSplit(1))
  
    case("FORMAT")
      if(nSplit < 2) then
        write(lerr,"(a,i0)") "DIST> ERROR FORMAT takes at least 1 argument, got ",nSplit-1
        write(lerr,"(a)")    "DIST>       FORMAT [list of columns]"
        iErr = .true.
        return
      end if
      do i=2,nSplit
        call dist_setColumnFormat(lnSplit(i),cErr)
        if(cErr) then
          iErr = .true.
          return
        end if
      end do
  
    case("READ")
      if(nSplit < 2) then
        write(lerr,"(a,i0)") "DIST> ERROR READ takes 1 argument, got ",nSplit-1
        write(lerr,"(a)")    "DIST>       READ filename"
        iErr = .true.
        return
      end if
  