read_gfile_func.m
USAGE: [gdata,ireadok] = read_gfile_func(filename,nfcoil,nesum,old_efit)
[gdata,ireadok] = read_gfile_func(mds_string, ...); NEW MDS+ OPTION
PURPOSE: Read efit ASCII g-eqdsk file w/ flag iecurr=2 set
INPUTS: <default>
filename = gfile filename [Ex: '/u/leuer/efit/diiid/s87977/g087977.02620']
nfcoil = number of F-coils <18 for DIII-D>
nesum = number of E-coils <6 for DIII-D>
old_efit= For iecurr=2 several different flavors of efit output
exists. <Optional, default=0> For old versions of efit
(e.g. NSTX) use old_efit=1 since it uses older efit version.
NEW MDS READ OPTION: If directory of filename not found then looks in mds
mds_string= string: Server.tree.shot.time [ex: 'D3D.EFIT01.g131498.02600']
OUTPUTS:
gdata = data structure containing EFIT G-file variables
ireadok = flag to report good read of gfile (0=bad, 1=good)
RESTRICTIONS:
gfile must be produced by EFIT run with flag iecurr=2 in order to
write current density distribution on plasma grid & coil currents.
(NEW versions of EFIT use iplcout=2 instead of iecurr)
Dependencies