Closed mattzett closed 2 years ago
Somehow this works when you call plotcurv and produces sensible output but not when you all it from some base program:
https://github.com/gemini3d/pygemini-scripts/blob/main/gridoutput/examplemag3D.py
I.e. this works:
# these plotting functions will internally grid data
print("Plotting...")
plotcurv3D(xg, dat[parm], cfg, lalt=128, llon=128, llat=128, coord="geographic")
But this produces nans:
malti, mloni, mlati, parmmi = model2magcoords(xg, dat[parm], lalt, llon, llat)
Yet all the former does is call the latter function in exactly the same manner!!!
Actually this same issue is totally wrecking all the plotting features; they are just return NaN now... so this is a big problem.
Okay any dipole simulation is going to fail to plot run now, e.g. try the cusp3D cases from gemCI if you need to reproduce this.
The offending commit is this one: https://github.com/gemini3d/pygemini/commit/2047e9110a1a79ce55e4f179a8ed4b1c4ff30a45 although I'm sure I checked this one before. I'm guessing there is some interaction with a rebase that happened that caused this to error out.
@scivision I'm totally stumped by this and it's a total showstopper no plotting works. Is this some issue with typing and xarray? Take any curvilinear simulation and try to plot it and you'll get a bunch of nans.
Okay I had an incorrect gridding/interpolation call buried in the geomag gridding; an issue of too many similarly named functions.
For some reason this is just returning nans now all of the sudden with this warning:
Is this some weird typing issue xarray vs. np.array?