iris icon indicating copy to clipboard operation
iris copied to clipboard

rotated pole data plots incorrectly for a grid_north_pole_longitude = 0

Open nhsavage opened this issue 1 year ago • 0 comments

🐛 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:

  1. load the file at /data/users/fris/rpole_0_issue/failing.nc
  2. plot data with pcolormesh
  3. appears over New Zeland when the data is in fact for Africa
  4. edit the file so that grid_north_pole_longitude=180 /data/users/fris/rpole_0_issue/ok.nc
  5. 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:

  1. ncview of failing.nc image
  2. iris quckplot.pcolormesh for failing,nc image
  3. iris quckplot.pcolormesh for ok.nc image

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()

nhsavage avatar Sep 22 '22 07:09 nhsavage