Skip to content

Conversation

@juliasloan25
Copy link
Member

@juliasloan25 juliasloan25 commented Jun 24, 2025

Purpose

Use a TripolarGrid instead of a capped lat/lon grid when constructing an Oceananigans simulation.

closes #1382

Note: Oceananigans.Fields.interpolate doesn't work for the TripolarGrid. We use this to remap Oceananigans fields from the OC grid to the ClimaCore field, so we can't switch to TripolarGrid until Oceananigans has a method that can regrid the TripolarGrid. This should be added in CliMA/ClimaOcean.jl#463 - required Oceananigans v0.99.2

To-do

  • construct TripolarGrid instead of LatitudeLongitudeGrid

Notes

  • TripolarGrid constructs a OrthogonalSphericalShellGrid, which also uses lat/lon, so we can still use the same ClimaCore remapper
  • exchanged fields are T, S, LHF, SHF, u, v - only u and v are vectors, and these are already rotated onto the grid in set_from_extrinsic_vectors!

@juliasloan25 juliasloan25 force-pushed the js/tripolar branch 2 times, most recently from c04aad4 to 9194823 Compare June 25, 2025 17:04
@glwagner
Copy link
Member

@juliasloan25 how do I run the coupled simulation ? Is there a way to run it outside the caltech cluster (eg on a GPU system we have at MIT)?

@juliasloan25 juliasloan25 force-pushed the js/tripolar branch 2 times, most recently from 05c6433 to 845571c Compare July 7, 2025 22:25
@juliasloan25 juliasloan25 changed the title construct TripolarGrid use TripolarGrid for Oceananigans sim Jul 30, 2025
@juliasloan25
Copy link
Member Author

@juliasloan25 how do I run the coupled simulation ? Is there a way to run it outside the caltech cluster (eg on a GPU system we have at MIT)?

Sorry I just saw this - I get a lot of Github notifications so they get missed often. We have a docs page on running the coupled simulation. It shows how to run interactively or from the command line. You should be able to run it locally or on a different cluster, and it'll pick up the device to run on automatically (i.e. if a GPU is available it will run on GPU). Let me know if there are problems.

@juliasloan25 juliasloan25 force-pushed the js/tripolar branch 2 times, most recently from 022d2e7 to c452c22 Compare September 9, 2025 23:41

# Before version 0.96.22, the NetCDFWriter was broken on GPU
if arch isa OC.CPU || pkgversion(OC) >= v"0.96.22"
# TODO: Add more diagnostics, make them dependent on simulation duration, take
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tracked in this issue now instead of a TODO: #1478

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

use TripolarGrid with OceananigansSimulation

4 participants