ioos / ioos/xarray-subset-grid
Make sure we can subset global models across the dateline and prime meridian
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 9
- Forks
- 11
- Avg merge
- 3d 7h
- Merged PRs (30d)
- 4
Description
What should we add?
Global models are a challenge because of that darn round earth.
So if the model uses 0-360 coordinates for longitude, then a region that crosses the prime meridian will be discontiguous, e.g.:
-10 -- 10 degrees in -180--180, is 0--10 and 350--360 -- so the code needs to detect this, and grab the two chunks and put them together.
Similarly for crossing the dateline, though all the global models I know of use 0--360 coords.
A few considerations:
-
When you go from one longitude to another, there's the question of which direction to go -- I think we should assume (and enforce) that a subset bounds is less than half-way around around the earth.
-
what coordinate system to return the results in?
- if there's a bounds that includes the prime meridian, the it should be -180--180
- if there's a bounds that includes the date line, it should be 0--360
- maybe it should always be in the coordinate system that the bounds were provided in? (is that always clear??)
-
I only have use-cases for global rectangular grid models -- so at least for now, that's all we need to support.
Reference
No response
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
The issue names no files, tests, or entry points. Start by locating the existing global rectangular-grid subsetting implementation and its tests, then clarify the longitude-boundary and output-coordinate decisions before implementing support for regions crossing the prime meridian or dateline.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- numpy, python
- Domain
- data
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100