quad_utils_mod regional grids that cross 0 longitude.
Nobody has claimed this yet.
- Dominant language
- Fortran
- Stars
- 263
- Forks
- 182
- Avg merge
- 11d 12h
- Merged PRs (30d)
- 7
Description
☠️ skeleton.
quad_utils_mod for regional grids that cross 0 longitude I do not think is correct.
For lon -10 to 10 (350, 10]
max_lon = 350, min_lon = 10
h%ii%min_lon = minval(h%ii%lons_2d)
h%ii%max_lon = maxval(h%ii%lons_2d)
h%ii%lon_width = h%ii%max_lon - h%ii%min_lon
lon_width = 350 - 10 = 340 rather than 20 ( -10 to 10 )
spans_lon_zero is being used as equivalent to cyclic which it is not.
spans_lon_zero is being used to find the pole (even if there is no pole), then fail boxes that go through the "pole" (not a pole).
Which is then used to fail if "point is in one of the U boxes that go through the pole".
Note I think there is some confusion in the code with u & t grids looks like used to deal with both. I think T (scalar) interpolation is being skipped at the pole in the above code. I will probably put this in as a separate issue since it affects global as well as regional grids.
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 in models/utilities/quad_utils_mod.f90 at lines 753-812, then inspect the point-in-box logic around lines 1432-1438. Reproduce the longitude-width calculation for a regional grid spanning -10 to 10 and trace how spans_lon_zero affects pole handling. Done means crossing zero longitude is treated as a narrow regional span without incorrectly applying pole or cyclic-grid behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- fortran
- Domain
- data
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100