anchor.diff:        call dist_echoDist
       end if
     end if
  +
  +  call dealloc(dist_partCol1, "dist_partCol1")
  +  call dealloc(dist_partCol2, "dist_partCol2")
  +  call dealloc(dist_partCol3, "dist_partCol3")
  +  call dealloc(dist_partCol4, "dist_partCol4")
  +  call dealloc(dist_partCol5, "dist_partCol5")
  +  call dealloc(dist_partCol6, "dist_partCol6")
   
   end subroutine dist_generateDist
   
  
positive.code: 
    use crcoall
    use mod_common
    use mod_common_main
    use physical_constants
    use numerical_constants
  
    integer i, j
  
    do i=1,dist_nColumns
      select case(dist_colFormat(i))
      case(dist_fmtPX)
        yv1(1:napx) = (yv1(1:napx)/ejfv(1:napx))*c1e3
      case(dist_fmtPY)
        yv2(1:napx) = (yv2(1:napx)/ejfv(1:napx))*c1e3
      case(dist_fmtPXP0)
        yv1(1:napx) = ((yv1(1:napx)*e0f)/ejfv(1:napx))*c1e3
      case(dist_fmtPYP0)
        yv2(1:napx) = ((yv2(1:napx)*e0f)/ejfv(1:napx))*c1e3
      case(dist_fmtDT)
        sigmv(1:napx) = -(e0f/e0)*(sigmv(1:napx)*clight)
      case(dist_fmtDEE0)
        ejv(1:napx) = (one + ejv(1:napx))*e0
      end select
    end do
  
    if(dist_norm4D .and. dist_norm6D) then
      write(lerr,"(a)") "DIST> ERROR Cannot use both 4D_NORM and 6D_NORM at the same time"
      call prror
    end if
  
    if(dist_norm4D) then
      ! Normalise 4D
      continue
    end if
  
    if(dist_norm6D) then
      ! Normalise 6D
      continue
    end if
  
  
negative.code:   case(dist_fmtParentID)
      call chr_cast(inVal, parentID(partNo), sErr)
  
    !  Horizontal Coordinates
    ! ========================
  
    case(dist_fmtX, dist_fmtXN, dist_fmtJX)
      call chr_cast(inVal, dist_partCol1(partNo), sErr)
      dist_partCol1(partNo) = dist_partCol1(partNo) * dist_colScale(colNo)
  
    case(dist_fmtPX, dist_fmtXP, dist_fmtPXP0, dist_fmtPXN, dist_fmtPhiX)
      call chr_cast(inVal, dist_partCol2(partNo), sErr)
      dist_partCol2(partNo) = dist_partCol2(partNo) * dist_colScale(colNo)
  
    !  Vertical Coordinates
    ! ========================
  
    case(dist_fmtY, dist_fmtYN, dist_fmtJY)
      call chr_cast(inVal, dist_partCol3(partNo), sErr)
      dist_partCol3(partNo) = dist_partCol3(partNo) * dist_colScale(colNo)
  
    case(dist_fmtPY, dist_fmtYP, dist_fmtPYP0, dist_fmtPYN, dist_fmtPhiY)
      call chr_cast(inVal, dist_partCol4(partNo), sErr)
      dist_partCol4(partNo) = dist_partCol4(partNo) * dist_colScale(colNo)
  
    !  Longitudinal Coordinates
    ! ==========================
  
    case(dist_fmtSIGMA, dist_fmtZETA, dist_fmtDT, dist_fmtZN, dist_fmtJZ)
      call chr_cast(inVal, dist_partCol5(partNo), sErr)
      dist_partCol5(partNo) = dist_partCol5(partNo) * dist_colScale(colNo)
  
    case(dist_fmtE, dist_fmtDEE0, dist_fmtPT)
      call chr_cast(inVal, dist_partCol6(partNo), sErr)
      dist_partCol6(partNo) = dist_partCol6(partNo) * dist_colScale(colNo)
      dist_updtEFrom = 1
  
    case(dist_fmtP)
      call chr_cast(inVal, dist_partCol6(partNo), sErr)
      dist_partCol6(partNo) = dist_partCol6(partNo) * dist_colScale(colNo)
      dist_updtEFrom = 2
  
    case(dist_fmtDPP0, dist_fmtPZN, dist_fmtPhiZ)
      call chr_cast(inVal, dist_partCol6(partNo), sErr)
      dist_partCol6(partNo) = dist_partCol6(partNo) * dist_colScale(colNo)
      dist_updtEFrom = 3
  
    !  Ion Columns
  