-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
The Oceananigans Tripolar to LatitudeLongitudeGrid test fails on main with a DimensionMismatch error.
It looks like after CliMA/Oceananigans.jl#5094, fields constructed on the TripolarGrid have one fewer row in the latitude direction (179 instead of 180). This gives a DimensionMismatch when we try to regrid because the regridder is constructed with the extra latitude row (so it has dims 360x180).
When the last PR was merged into ConservativeRegridding (2 weeks ago) we were using the fork from that Oceananigans PR and the tests passed, so something must have changed on that branch in the last 2 weeks that changed the dimensions.
MRE
using ConservativeRegridding
using Oceananigans
dst_grid = LatitudeLongitudeGrid(size=(360, 180, 1), longitude=(0, 360), latitude=(-90, 90), z=(0, 1))
src_grid = TripolarGrid(size=(360, 180, 1), fold_topology = RightFaceFolded)
dst = CenterField(dst_grid) # 360×180×1 Field{Center, Center, Center} on LatitudeLongitudeGrid
src = CenterField(src_grid) # 360×179×1 Field{Center, Center, Center} on OrthogonalSphericalShellGrid
regridder = ConservativeRegridding.Regridder(dst, src)
# investigate the dimension mismatch
length(regridder.src_areas) == length(vec(src)) # false
length(regridder.src_areas) # 360 * 180 = 64800
length(vec(src)) # 360 * 179 = 64440Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels