module xstraln_r8types
 
  ! data types
  ! *** edit "real" version & run xs_convert.csh to gen "real*8" version!
 
  type :: r8_fxfields
 
     integer :: init      !  initialization flag
 
     REAL*8, dimension(:,:,:), allocatable :: r  ! R(phi,theta,rho)
     REAL*8, dimension(:,:,:), allocatable :: z  ! Z(phi,theta,rho)
 
     ! (phi,theta,rho) -> (phi,R,Z) "forward map"
 
  end type r8_fxfields
 
  type :: r8_rzfields
 
     integer :: init      !  initialization flag
 
     REAL*8, dimension(:,:,:), allocatable :: rho    ! rho(phi,R,Z)
     REAL*8, dimension(:,:,:), allocatable :: theta  ! theta(phi,R,Z)
     REAL*8, dimension(:,:,:), allocatable :: dlim   ! dlim(phi,R,Z)
     REAL*8, dimension(:,:,:), allocatable :: dbdy   ! dbdy(phi,R,Z)
     REAL*8, dimension(:,:,:), allocatable :: modb   ! modb(phi,R,Z)
     REAL*8, dimension(:,:,:), allocatable :: binv   ! binv(phi,R,Z)
     REAL*8, dimension(:,:,:), allocatable :: br     ! br(phi,R,Z)
     REAL*8, dimension(:,:,:), allocatable :: bz     ! bz(phi,R,Z)
     REAL*8, dimension(:,:,:), allocatable :: bphi   ! bphi(phi,R,Z)
 
     ! (phi,R,Z) -> (phi,rho,theta) "inverse map"
 
     ! dlim -- distance to nearest limiter (m)
     ! dbdy -- distance to plasma bdy (m)
     ! modb -- mod(B)  (T)
     ! binv -- 1/mod(B) (T^-1)
 
     ! br,bz,bphi -- components of B (T)
 
  end type r8_rzfields
 
end module xstraln_r8types
