read_corsica_flat_files.m
USAGE: equil_data = read_corsica_flat_files(dirname)
PURPOSE: Read flat files made with create_corsica_flat_files.m (or .bas)
INPUTS: dirname, the directory with all the flat files, such as:
sys_dims.flat psi.flat cc.flat crj.flat, etc...
OUTPUTS: Standard toksys equilibrium structure:
cpasma: 'Plasma current [A]'
jphi: 'Current density on grid [MA/m^2]'
psizr: 'Total flux on grid [Wb]'
pres: 'Pressure at flux values [Pa]'
pprime: 'pprime at flux values [Pa/(Wb/rad)]'
fpol: 'fpol at flux values'
fprime: 'fprime at flux values'
ffprim: 'ffprim at flux values'
qpsi: 'q at flux values'
bzero: 'Vacuum toroidal field at rzero [T]'
rzero: 'Reference point for bzero [m]'
rmaxis: 'R of magnetic axis [m]'
zmaxis: 'Z of magnetic axis [m]'
psimag: 'Flux at magnetic axis [Wb]'
psibry: 'Flux at boundary [Wb]'
rcur: 'R of current centroid [m]'
zcur: 'Z of current centroid [m]'
nbbbs: 'Number of boundary points = length(rbbbs)'
rbbbs: 'R of boundary points [m]'
zbbbs: 'Z of boundary points [m]'
xlim: 'R of limiter [m]'
ylim: 'Z of limiter [m]'
rxps: 'R of X points [m]'
zxps: 'Z of X points [m]'
psixps: 'Flux at X points [Wb]'
cc: 'PF coil currents in MA-turns'
dr: 'Radial distance between grid points [m]'
dz: 'Vertical distance between grid points [m]'
rg: 'Radial coordinates of grid points [m]'
zg: 'Vertical coordinates of grid points [m]'
RESTRICTIONS:
METHOD: Reads flat files generated by create_corsica_flat_files.m
This function converts units and saves to efit variable names
Dependencies