[Matplotlib-users] Need clarification on shiftgrid and addcylic
pmhobson at gmail.com
Wed Jun 22 10:45:22 EDT 2016
Can you show your imports? Where did shiftgrid come from?
On Tue, Jun 21, 2016 at 4:51 AM, ashwinD12 . <winash12 at gmail.com> wrote:
> 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.
> My dataset is between latitude 5 N to 40 N and 65 E and 100 E.
> I am trying to plot geopotential height from NCEP reanalysis data. Here is
> my code -
> level = 5
> time = 0
> meters_per_grid = 277830
> d = Dataset("hgt_500_2014_12_5_00Z.nc")
> hgt = d.get_variables_by_attributes(axis="hgt")
> lon = d.get_variables_by_attributes(axis="lon")
> lat =d.get_variables_by_attributes(axis="lat")
> hgt = hgt[::-1]
> hgt, lon = shiftgrid(180, hgt, lon, start = False
> Why do I get an IndexError: index out of range on shiftgrid call ?
> Matplotlib-users mailing list
> Matplotlib-users at python.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Matplotlib-users