<div dir="ltr">Can you show  your imports? Where did shiftgrid come from?</div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jun 21, 2016 at 4:51 AM, ashwinD12 . <span dir="ltr"><<a href="mailto:winash12@gmail.com" target="_blank">winash12@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div><div>Hello,<br></div>          I am just starting to 
learn how to plot NCEP reanalysis data using Python3 and matplotlib and 
basemap. I have some clarifications on how to go about doing it.<br><br></div>My dataset is between latitude 5 N to 40 N and 65 E and 100 E. <br></div>I am trying to plot geopotential height from NCEP reanalysis data. Here is my code - <br><br></div><code><br><div>level = 5<br>time = 0<br><br>meters_per_grid = 277830<br><br>d = Dataset("hgt_500_2014_12_5_00Z.nc")<br>hgt =  d.get_variables_by_attributes(axis="hgt") <br>lon =  d.get_variables_by_attributes(axis="lon")<br>lat =d.get_variables_by_attributes(axis="lat")  <br>hgt = hgt[::-1]<br>hgt, lon = shiftgrid(180, hgt, lon, start = False<br></div><div></code><br><br></div><div>Why do I get an IndexError: index out of range on shiftgrid call ?<br><br></div><div>BR,<br></div>Ashwin. </div>
<br>_______________________________________________<br>
Matplotlib-users mailing list<br>
<a href="mailto:Matplotlib-users@python.org">Matplotlib-users@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/matplotlib-users" rel="noreferrer" target="_blank">https://mail.python.org/mailman/listinfo/matplotlib-users</a><br>
<br></blockquote></div><br></div>