Skip to content

use TripolarGrid and ConservativeRegridding for CMIP#1840

Open
juliasloan25 wants to merge 2 commits intomainfrom
js/tripolar-conservative-march2026
Open

use TripolarGrid and ConservativeRegridding for CMIP#1840
juliasloan25 wants to merge 2 commits intomainfrom
js/tripolar-conservative-march2026

Conversation

@juliasloan25
Copy link
Copy Markdown
Member

@juliasloan25 juliasloan25 commented Mar 27, 2026

Purpose

new version of #1724

includes the following fixes:

  • don't apply SIC mask extra times for heat and salinity fluxes (merged into main, 26 March)
  • zero out salinity flux at the start of a timestep

To-do

Content


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

@juliasloan25 juliasloan25 force-pushed the js/tripolar-conservative-march2026 branch 2 times, most recently from 301bbc3 to bb56a5e Compare March 27, 2026 05:15
Comment on lines +19 to +40
function OC.Fields.set_to_array!(
u::OC.Field{LX, <:OC.Grids.Center, LZ, O, <:TGRF},
a,
) where {LX, LZ, O}
a = OC.Architectures.on_architecture(OC.Architectures.CPU(), a)
a = resize_to_facefolded(a)
a = OC.Architectures.on_architecture(OC.Architectures.architecture(u), a)

try
copyto!(OC.interior(u), a)
catch err
if err isa DimensionMismatch
Nx, Ny, Nz = size(u)
u .= reshape(a, Nx, Ny, Nz)

msg = string("Reshaped ", summary(a), " to set! its data to ", '\n', summary(u))
@warn msg
else
throw(err)
end
end

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.

From oceananigans 0.106.3 this is not required anymore

@juliasloan25 juliasloan25 force-pushed the js/tripolar-conservative-march2026 branch from bb56a5e to 4b5b196 Compare March 27, 2026 22:20
@juliasloan25 juliasloan25 force-pushed the js/tripolar-conservative-march2026 branch from 4b5b196 to 5cc77a9 Compare April 1, 2026 20:02
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