-
Notifications
You must be signed in to change notification settings - Fork 283
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
default expected coordinates used for plotting should be the dimension coordinates #468
Comments
Perhaps I'm missing the point here ... but your gist asks for a plot of grid_lat vs grid_lon and that's exactly what I see.
PR #465 just concerns changing the str() representation of a Cube....!? |
I am referring to the coordinates chosen if not specified i.e. not providing the coords keyword. Since we can read data in where there will be no grid mapping on the auxiliary coordinates (as it is currently with CF compliant NetCDF files), we should not choose the auxiliary coordinates when the dimension coordinates are present. To add to this argument, the data will likely to have been created on a grid defined by the dimension coordinates, therefore this is the safest default option in any case. I meant #463, I have updated the description - thanks @rhattersley |
Thank you. (FWIW, it would be even clearer without the trailing
OK, so I tried to re-create this using upstream/master and the problem doesn't occur, so I guess what you're trying to say is that the problem only occurs if you're using the code from #463. But #463 introduces the problem and isn't finished yet .. so it should be resolved there, no? I don't see why it needs a separate issue. |
Current behaviour does not allow plotting where more than one coordinate is mapped to a dimension (due to the coords keyword not being passed through) so I'm not sure what you mean by the problem not occuring? If these coordinates were passed through (as @esc24 has fixed under #465), the coordinates plotted would be the latitude and longitude coordinates even though they are the auxiliary coordinates due to the current logic within the code, see: Since I propose changing the behaviour of plotting and it being outside the scope the #463 PR, I have created this issue. |
On upstream/master your gist results in an error and no plot:
So by definition upstream/master cannot be using the wrong coordinates ... it's using neither! ;-) #463 may not have changed the specific routine you reference, but the mapping code didn't call that code before. Anyway ... what really matters is: @esc24 - are you happy to sort out the mapping so the default map coordinates are the dimension coordinates where possible? |
That's fine. Both @cpelley and I hoped the default no specified coords behaviour could be modified in a separate PR. It seems that the use of |
Currently iris can override the dimension coordinates for plotting if a multidimensional auxiliary coordinate exists:
plot.py: _get_plot_defn
This has unexpected behaviour if for example we have dimension coordinates (1D coordinates) of grid_latitude and grid_longitude and the multidimensional auxiliary longitude and latitude are plotted in their stead. This is unexpected behaviour.
see gist:
https://gist.github.com/cpelley/90e14b4333d2a893e3ad
REQUIRES MERGING OF PR #463 BEFORE THIS CAN BE DONE
The text was updated successfully, but these errors were encountered: