D3DEnergetic / FIDASIM

A Neutral Beam and Fast-ion Diagnostic Modeling Suite
http://d3denergetic.github.io/FIDASIM/
Other
29 stars 19 forks source link

read_geqdsk generating nan values #244

Open LawsonMcCoy opened 3 years ago

LawsonMcCoy commented 3 years ago

When I was running read_geqdsk to process a gfile that has been successfully processed by other means, I get an error that nan is being passed into scipy.intropolate.interp1d on line 91 efit.utils. This was done through python.

Code used: import fidasim.utils as futils

grid = futils.rz_grid(100, 240, 140, -100, 100, 200) gfile = '/fusion/projects/xpsi/energetic_particles/lindan/PAS/175244Z03/g175244.02000' fields, flux, bitpsign = futils.read_geqdsk(g

Traceback (most recent call last): File "/home/mccoyl/OMFIT_FIDASIM/OMFIT-source/omfit/omfit_classes/OMFITx.py", line 4576, in manage_user_errors tmp = command(kw) File "/home/mccoyl/OMFIT_FIDASIM/OMFIT-source/omfit/utils_tk.py", line 1181, in GlobLoc_tk return py.run(_relLoc=self.namespace, _OMFITscriptsDict=False, _OMFITconsoleDict=True, noGUI=None) File "/home/mccoyl/OMFIT_FIDASIM/OMFIT-source/omfit/omfit_classes/omfit_python.py", line 1097, in run result = self.run(kw) File "/home/mccoyl/OMFIT_FIDASIM/OMFIT-source/omfit/omfit_classes/omfit_python.py", line 946, in run self, userDict=kw, inputDict=_relLoc, persistentDict=OMFITconsoleDict, runDict={}, prerun=prerun, postrun=postrun File "/home/mccoyl/OMFIT_FIDASIM/OMFIT-source/omfit/omfit_classes/omfit_python.py", line 129, in f_locked return f(*args, kw) File "/home/mccoyl/OMFIT_FIDASIM/OMFIT-source/omfit/omfit_classes/omfit_python.py", line 374, in execGlobLoc exec(compile(execString, filename, "exec"), GlobLoc) File "/tmp/mccoyl/OMFIT/OMFIT_2021-07-09_10_23_24_420398/project/OMFIT command box #3", line 5, in fields, flux, bitpsign = futils.read_geqdsk(gfile, grid) File "/fusion/projects/codes/fidasim/v2.0/lib/python/fidasim/utils.py", line 718, in read_geqdsk rhogrid=efit.rho_rz(g,r_pts,z_pts,norm=True).reshape(dims) File "/fusion/projects/codes/fidasim/v2.0/lib/python/efit/utils.py", line 91, in rho_rz rho_itp = scipy.interpolate.interp1d(psi,rho,'cubic',fill_value=(np.min(rho),np.nan),bounds_error=False) File "/home/mccoyl/OMFIT_FIDASIM/OMFIT-source/omfit/externalImports.py", line 583, in init self, x, y, kind=kind, axis=axis, copy=copy, bounds_error=bounds_error, fill_value=fill_value, assume_sorted=assume_sorted, kw File "/fusion/projects/codes/atom/omfit_v3.x/atom/miniconda3_3.2021.26.1/lib/python3.7/site-packages/scipy/interpolate/interpolate.py", line 544, in init raise ValueError("x array is all-nan") ValueError: x array is all-nan