Issues with contour plot of rotated pole data on native grid
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 21
- Forks
- 11
- Avg merge
- 7h 11m
- Merged PRs (30d)
- 1
Description
Grenville provided me with a datafile, which I can't upload here, but it's small. I'll send it to you via slack.
The surface altitude should be easily plotted using the standard methods, but it creates garbage.
Either the data is not reporting the coordinates correctly, or cf-plot can't quite cope with this situation.
Platform: macOS-14.7.3-arm64-arm-64bit
HDF5 library: 1.14.4
netcdf library: 4.9.2
udunits2 library: /Users/bnl28/mambaforge/envs/madpy/bin/../lib/libudunits2.dylib
esmpy/ESMF: not available
Python: 3.11.11 /Users/bnl28/mambaforge/envs/madpy/bin/python3.11
dask: 2024.8.0 /Users/bnl28/mambaforge/envs/madpy/lib/python3.11/site-packages/dask/__init__.py
netCDF4: 1.7.2 /Users/bnl28/mambaforge/envs/madpy/lib/python3.11/site-packages/netCDF4/__init__.py
psutil: 6.1.1 /Users/bnl28/mambaforge/envs/madpy/lib/python3.11/site-packages/psutil/__init__.py
packaging: 24.2 /Users/bnl28/mambaforge/envs/madpy/lib/python3.11/site-packages/packaging/__init__.py
numpy: 1.26.2 /Users/bnl28/mambaforge/envs/madpy/lib/python3.11/site-packages/numpy/__init__.py
scipy: 1.15.1 /Users/bnl28/mambaforge/envs/madpy/lib/python3.11/site-packages/scipy/__init__.py
matplotlib: 3.10.0 /Users/bnl28/mambaforge/envs/madpy/lib/python3.11/site-packages/matplotlib/__init__.py
cftime: 1.6.4 /Users/bnl28/mambaforge/envs/madpy/lib/python3.11/site-packages/cftime/__init__.py
cfunits: 3.3.7 /Users/bnl28/mambaforge/envs/madpy/lib/python3.11/site-packages/cfunits/__init__.py
cfplot: 3.3.0 /Users/bnl28/mambaforge/envs/madpy/lib/python3.11/site-packages/cfplot/__init__.py
cfdm: 1.11.1.0 /Users/bnl28/mambaforge/envs/madpy/lib/python3.11/site-packages/cfdm/__init__.py
cf: 3.16.2 /Users/bnl28/mambaforge/envs/madpy/lib/python3.11/site-packages/cf/__init__.py
MWE:
import cf
import cfplot as cfp
f = cf.read('nzlam.orog')
ff = f[5]
cfp.mapset(proj='rotated')
cfp.con(ff)
with or without the mapset it's garbage.
Contributor guide
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
Obtain the small datafile via Slack, then reproduce the MWE using cf.read('nzlam.orog'), selecting f[5] and calling cfp.con() with and without cfp.mapset(proj='rotated'). Compare the native-grid coordinates and contour output to determine whether the data coordinates or cf-plot handling are responsible; done means the surface altitude plots correctly.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- data-visualization
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100