Skip to content

Conversation

@glwagner
Copy link
Collaborator

This builds off #72

@NoraLoose
Copy link
Collaborator

I'm a bit confused — when testing tracer conservation on the global tripolar grid (even without Reactant and using double precision), I’m seeing a relative error of around 10^{-4}. This is the same order of magnitude we previously observed when using ZCoordinate(). However, with ZStar(), we previously saw very small relative errors of around 10^{-13} when testing with the LatitudeLongitudeGrid.

Screenshot 2025-03-31 at 3 48 35 PM

After running simulations/ocean_climate_simulation.numerics.jl, I double-checked that my test actually uses the z-star vertical coordinate, via:

simulation.model.ocean.model.vertical_coordinate

which returns

Oceananigans.Models.HydrostaticFreeSurfaceModels.ZStar()

Question: Is there something specific about the tripolar grid that prevents ZStar() from working properly?

@glwagner @simone-silvestri

@NoraLoose
Copy link
Collaborator

I'm using the free surface defined in src/ocean_climate_model.jl, i.e.,

free_surface = ClimaOcean.OceanSimulations.default_free_surface(grid, fixed_Δt=Δt)

Maybe something is going wrong there?

When I check

simulation.model.ocean.model.free_surface

this returns

SplitExplicitFreeSurface substepping with FixedSubstepNumber(0)

I'm also tagging @navidcy.

@glwagner
Copy link
Collaborator Author

maybe try to use this:

model = baroclinic_instability_model(arch, resolution=8, Δt=60, Nz=10)

@NoraLoose
Copy link
Collaborator

@glwagner you mean we should maybe move away from the data-full ocean climate simulation and back to the baroclinic instability simulation for our numerics tests?

@NoraLoose
Copy link
Collaborator

@glwagner you mean we should maybe move away from the data-full ocean climate simulation and back to the baroclinic instability simulation for our numerics tests?

I guess we should continue that work in #16 rather than in this PR.

@simone-silvestri
Copy link
Collaborator

Question: Is there something specific about the tripolar grid that prevents ZStar() from working properly?

Not that I know. However, we do not test zstar with a tripolar grid, so something might have broken. Just to know if we broke it recently or never worked, @NoraLoose the tests you did with clima ocean some time ago were with the tripolar grid or the latitude longitude grid?

@NoraLoose
Copy link
Collaborator

Not that I know. However, we do not test zstar with a tripolar grid, so something might have broken. Just to know if we broke it recently or never worked, @NoraLoose the tests you did with clima ocean some time ago were with the tripolar grid or the latitude longitude grid?

@simone-silvestri This PR is the first time I’m testing ZStar() with a tripolar grid. Before this, I’ve always used a latitude-longitude grid. No clue if it’s never worked with a tripolar grid or if something broke recently—sorry!

@NoraLoose
Copy link
Collaborator

NoraLoose commented Apr 4, 2025

Not that I know. However, we do not test zstar with a tripolar grid, so something might have broken. Just to know if we broke it recently or never worked, @NoraLoose the tests you did with clima ocean some time ago were with the tripolar grid or the latitude longitude grid?

@simone-silvestri, I think the underlying issue is that z-star does currently not work with the SplitExplicitFreeSurface. I'm running these tests locally, and many—possibly all—tests using SplitExplicitFreeSurface, even on RectilinearGrid or LatitudeLongitudeGrid, are failing. (They pass with ImplicitFreeSurface and ExplicitFreeSurface.) I'll open an issue on Oceananigans.jl soon.

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.

6 participants