Skip to content
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

Matplotlib Sample Outdated? #10318

Closed
wxprofessor opened this issue Jan 25, 2018 · 2 comments

Comments

Projects
None yet
3 participants
@wxprofessor
Copy link

commented Jan 25, 2018

Bug report

Bug summary

The Matplotlib Sample: "Plot Precip With Filled Contours"
https://matplotlib.org/basemap/users/examples.html

code source: https://matplotlib.org/basemap/users/figures/plotprecip.py

seems to be dated... I say "seems" because this is my first week of python! :)

Code for reproduction
The variables as specified in your code do not seem to exist:
latcorners = nc.variables['lat'][:]
loncorners = -nc.variables['lon'][:]
lon_0 = -nc.variables['true_lon'].getValue()
lat_0 = nc.variables['true_lat'].getValue()

I'm guessing because that data is from 2006 and something has changed since then :)

I have been failing with new data located here:
http://water.weather.gov/precip/downloads/2018/01/24/nws_precip_1day_20180124_conus.nc

surely there is a way for matplotlib to cull the information needed from the file? if not I figure I'll do the long math..

use your code located here
code source: https://matplotlib.org/basemap/users/figures/plotprecip.py

but also notice that not only are the lat lon variables present, your variable:
prcpvar = nc.variables['amountofprecip']

will need to be adjusted to prcpvar = nc.variables['observation']

and the units are now inches instead of mm.

happy python....ing? :)

cheers,

--patrick

# Paste your code here
#
#

Actual outcome

# If applicable, paste the console output here
#
#

Expected outcome

Matplotlib version

  • Operating system:
  • Matplotlib version:
  • Matplotlib backend (print(matplotlib.get_backend())):
  • Python version:
  • Jupyter version (if applicable):
  • Other libraries:
@jklymak

This comment has been minimized.

Copy link
Contributor

commented Jan 25, 2018

Can you report on the basemap repo? Note you may not get much satisfaction as basemap is being phased out.

@jklymak jklymak closed this Jan 25, 2018

@QuLogic

This comment has been minimized.

Copy link
Member

commented Jan 25, 2018

The basemap repo is here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.