CliMA / CliMA/ClimaAnalysis.jl
Resampling and interpolating
- Dominant language
- Julia
- Stars
- 12
- Forks
- 5
- Avg merge
- 6d 17h
- Merged PRs (30d)
- 3
Description
When making the interpolation, ClimaAnalysis uses something along the lines of `Intp.interpolate(dims_tuple, data, Intp.Gridded(Intp.Linear()))`. This causes issues with resampling along the longitude dimension as the boundary condition is `Intp.Periodic()` as oppose to `Intp.Periodic(OnCell())`. This means that anything beyond the last point in longitude dimension is effectively ignored and the value of the first point in the longitude dimension is used.
The solution is not as simple as using `Intp.Periodic(OnCell())` instead of `Intp.Periodic()` in that part of the code because the grid is not necessarily uniform if there are more than 2 dimensions. For example, you might want to resample with longitude, latitude, and time as dimensions. It is unclear to me how to approach this issue.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by locating the resampling path that calls Intp.interpolate with Intp.Gridded(Intp.Linear()) and review how Intp.Periodic() and Intp.Periodic(OnCell()) handle longitude boundaries. Determine an approach that preserves correct longitude resampling while supporting multidimensional, potentially nonuniform grids; done means the boundary behavior is correct for the reported cases.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- julia
- Domain
- data
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100