-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove dependency of Oceananigans on OrthogonalSphericalShellGrids #47
base: main
Are you sure you want to change the base?
Conversation
This doesn't work though. If Oceananigans development breaks |
What you need to have is some basic The problem with the current implementation is that the only real non-trivial To solve this problem you need to first come up with a non-trivial basic implementation of an Then when you come to this package you need to focus on specific tests for the TripolarGrid and not put tests here that belong in Oceanangians. These considerations are generic and apply to designing any "extension package" to some base code. You can take a look at the biogeochemistry tests for some inspiration. We have implemented a few basic bgc models for the purpose of testing, which ensures that dependent packages like OceanBioME and ClimaOceanBiogeochemistry can rely on the biogeochemistry interface. |
# purely zonal flow in the extrensic frame (v ≈ 0) | ||
@test all(on_architecture(CPU(), interior(vₑ)) .≈ 0.5) | ||
@test all(on_architecture(CPU(), interior(uₑ)) .≈ 0.5) | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All of these tests belong in Oceananigans. Also, they are not specific to the TripolarGrid.
@info " Testing the conversion of a vector between the Intrinsic and Extrinsic reference frame" | ||
grid = TripolarGrid(size = (20, 20, 1), z = (0, 1)) | ||
|
||
test_vector_rotation(grid) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It'd be nice to somehow grab the implementation from Oceananigans, but I'm not sure how to do that if the codes live in different repos as we have designed this code.
In theory, we have the |
For sure, the only problem is that it does not support periodic boundaries. Previously, I proposed developing a lat lon grid that was rotated or shifted relative to the geographic coordinate system. Perhaps with a rotated lat-lon grid + cubed sphere panel, one has something that could be used for testing. Another possibility is to save down the metrics for a very coarse tripolar grid and use that. |
We have now a circular dependency on Oceananigans that makes it a bit difficult to develop (xref CliMA/Oceananigans.jl#3841).
If we migrate the TripolarGrid tests here, we can remove them in Oceanigans and development can proceed more smoothly.
This PR adds the tests we had in Oceananigans here if we decide to follow this route.