Skip to content

use TripolarGrid, ConservativeRegridding#1679

Closed
juliasloan25 wants to merge 38 commits intomainfrom
js/tripolar-conservative-jan2026
Closed

use TripolarGrid, ConservativeRegridding#1679
juliasloan25 wants to merge 38 commits intomainfrom
js/tripolar-conservative-jan2026

Conversation

@juliasloan25
Copy link
Copy Markdown
Member

@juliasloan25 juliasloan25 commented Jan 22, 2026

Purpose

New version of #1593 to use ConservativeRegridding with the TripolarGrid

Content

  • extend Interfacer.remap! for Oceananigans fields using CR.jl
  • remove interpolate! calls
  • add a function construct_remappers to make the remapper object and allocate scratch space
  • switch to TripolarGrid + JLD2 diagnostics

  • I have read and checked the items on the review checklist.

Comment thread experiments/ClimaEarth/components/ocean/remapping.jl Outdated
@juliasloan25 juliasloan25 force-pushed the js/tripolar-conservative-jan2026 branch from 26815d5 to c4d1688 Compare January 22, 2026 18:48
@juliasloan25 juliasloan25 force-pushed the js/tripolar-conservative-jan2026 branch 2 times, most recently from 0135836 to b1db80e Compare January 27, 2026 18:44
@juliasloan25 juliasloan25 force-pushed the js/tripolar-conservative-jan2026 branch from 3d752c0 to accc24a Compare January 28, 2026 00:52
Comment thread experiments/ClimaEarth/components/ocean/oceananigans.jl
Comment thread experiments/ClimaEarth/components/ocean/oceananigans.jl
Comment thread experiments/ClimaEarth/components/ocean/oceananigans.jl Outdated
Comment thread experiments/ClimaEarth/components/ocean/oceananigans.jl
Comment thread experiments/ClimaEarth/components/ocean/oceananigans.jl
@juliasloan25 juliasloan25 force-pushed the js/tripolar-conservative-jan2026 branch from 6ba52ad to e495d4f Compare January 30, 2026 00:43
@juliasloan25 juliasloan25 force-pushed the js/tripolar-conservative-jan2026 branch from 520376c to 9ecd8ee Compare February 5, 2026 00:25
tracer_advection = OC.WENO(order = 5)
horizontal_viscosity = OC.HorizontalScalarBiharmonicDiffusivity(ν = 1e11)
# Use Float32 for the vertical mixing parameters to avoid parameter memory limits
vertical_mixing = OC.CATKEVerticalDiffusivity(Float32)
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

try removing this

Comment on lines +143 to +150
@info "Using simpler ocean setup; to be used for software testing only."
free_surface = OC.SplitExplicitFreeSurface(grid; substeps = 70)
momentum_advection = OC.VectorInvariant()
tracer_advection = OC.WENO(order = 5)
horizontal_viscosity = OC.HorizontalScalarBiharmonicDiffusivity(ν = 1e11)

# Create ocean simulation
free_surface = OC.SplitExplicitFreeSurface(grid; substeps = 70)
momentum_advection = OC.VectorInvariant()
tracer_advection = OC.WENO(order = 5)
horizontal_viscosity = OC.HorizontalScalarBiharmonicDiffusivity(ν = 1e11)
# Use Float32 for the vertical mixing parameters to avoid parameter memory limits
vertical_mixing = OC.CATKEVerticalDiffusivity(Float32)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
@info "Using simpler ocean setup; to be used for software testing only."
free_surface = OC.SplitExplicitFreeSurface(grid; substeps = 70)
momentum_advection = OC.VectorInvariant()
tracer_advection = OC.WENO(order = 5)
horizontal_viscosity = OC.HorizontalScalarBiharmonicDiffusivity= 1e11)
# Create ocean simulation
free_surface = OC.SplitExplicitFreeSurface(grid; substeps = 70)
momentum_advection = OC.VectorInvariant()
tracer_advection = OC.WENO(order = 5)
horizontal_viscosity = OC.HorizontalScalarBiharmonicDiffusivity= 1e11)
# Use Float32 for the vertical mixing parameters to avoid parameter memory limits
vertical_mixing = OC.CATKEVerticalDiffusivity(Float32)
@info "Using simpler ocean setup; to be used for software testing only."
free_surface = OC.SplitExplicitFreeSurface(grid; substeps = 70)
momentum_advection = OC.VectorInvariant()
tracer_advection = OC.WENO(order = 5)
horizontal_viscosity = OC.HorizontalScalarBiharmonicDiffusivity= 1e11)
# Use Float32 for the vertical mixing parameters to avoid parameter memory limits
vertical_mixing = OC.ConvectiveAdjustmentVerticalDiffusivity(background_κz = 1e-5, convective_κz = 0.1, background_νz = 1e-4, convective_νz = 0.1)

Comment on lines +336 to +337
Interfacer.remap!(sim.remapping.scratch_field_oc1, F_turb_ρτxz, sim.remapping) # zonal momentum flux
Interfacer.remap!(sim.remapping.scratch_field_oc2, F_turb_ρτyz, sim.remapping) # meridional momentum flux
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

bug (fixed in new branch)

Suggested change
Interfacer.remap!(sim.remapping.scratch_field_oc1, F_turb_ρτxz, sim.remapping) # zonal momentum flux
Interfacer.remap!(sim.remapping.scratch_field_oc2, F_turb_ρτyz, sim.remapping) # meridional momentum flux
Interfacer.remap!(sim.remapping.scratch_field_oc1, F_turb_ρτxz_uv, sim.remapping) # zonal momentum flux
Interfacer.remap!(sim.remapping.scratch_field_oc2, F_turb_ρτyz_uv, sim.remapping) # meridional momentum flux

Comment on lines +390 to +391
Interfacer.remap!(sim.remapping.scratch_field_oc1, F_turb_ρτxz, sim.remapping) # zonal momentum flux
Interfacer.remap!(sim.remapping.scratch_field_oc2, F_turb_ρτyz, sim.remapping) # meridional momentum flux
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

bug (fixed in new branch)

Suggested change
Interfacer.remap!(sim.remapping.scratch_field_oc1, F_turb_ρτxz, sim.remapping) # zonal momentum flux
Interfacer.remap!(sim.remapping.scratch_field_oc2, F_turb_ρτyz, sim.remapping) # meridional momentum flux
Interfacer.remap!(sim.remapping.scratch_field_oc1, F_turb_ρτxz_uv, sim.remapping) # zonal momentum flux
Interfacer.remap!(sim.remapping.scratch_field_oc2, F_turb_ρτyz_uv, sim.remapping) # meridional momentum flux

@juliasloan25
Copy link
Copy Markdown
Member Author

closing in favor of #1724

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.

2 participants