You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
A solution to this if the longitudes are from 0 to 359 degrees is to copy the first slice of the array along the longitude dimension and concatenate it at 360 degrees.
Although, a better way is to implement interpolation that can handle this case.
Another thing that crosses my mind is that if you are resampling from 0 to 360 degrees (e.g. [0.0, 1.0, ..., 359.0]) to -180 to 180 degrees, then at least half of the globe will be off by a degree.
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 isIntp.Periodic()
as oppose toIntp.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 ofIntp.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.The text was updated successfully, but these errors were encountered: