matplotlib / matplotlib/basemap
Matplotlib Example
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 817
- Forks
- 395
- PR merge metrics
- No merged PRs in 30d
Description
Hello! ... I reported the following issue in the Matplotlib repo... and they said to bring it to your attention:
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.
Here is the issue I submitted to matplotlib:
https://github.com/matplotlib/matplotlib/issues/10318
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with basemap/users/figures/plotprecip.py and compare its variables with the newer NetCDF file linked in the issue. Check the referenced Matplotlib issue for context, then update the sample so its data fields and units match the supported source and verify that the example runs.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- data-visualization, documentation
- Issue type
- Documentation
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100