iris
iris copied to clipboard
rotated pole data plots incorrectly for a grid_north_pole_longitude = 0
🐛 Bug Report
Rotated pole data with grid_north_pole_longitude=0 and a grid_north_pole_latitude=90 do not plot correctly
How To Reproduce
Steps to reproduce the behaviour:
- load the file at /data/users/fris/rpole_0_issue/failing.nc
- plot data with pcolormesh
- appears over New Zeland when the data is in fact for Africa
- edit the file so that grid_north_pole_longitude=180 /data/users/fris/rpole_0_issue/ok.nc
- plot data again - appears in the correct location
Expected behaviour
I would expect that as the north pole latitude is 90N the pole longitude should be irrelevant. ncview get this correct
Screenshots
3 plots:
- ncview of failing.nc
- iris quckplot.pcolormesh for failing,nc
- iris quckplot.pcolormesh for ok.nc
Environment
- VDI
- reprducable for iris 2.4.0 and 3.2.1 (default/current)
Additional context
Click to expand this section...
import iris
import iris.quickplot as qplt
import matplotlib.pyplot as plt
for file in ['failing.nc', 'ok.nc']:
data = iris.load_cube(file)
qplt.pcolormesh(data[0,...],cmap='Blues')
plt.gca().coastlines()
plt.title(file)
plt.show()