Skip to content

Speeding up Dynamics and removing internal heat flux when h < hc#89

Merged
simone-silvestri merged 37 commits intomainfrom
ss/omip-branch-2
Sep 3, 2025
Merged

Speeding up Dynamics and removing internal heat flux when h < hc#89
simone-silvestri merged 37 commits intomainfrom
ss/omip-branch-2

Conversation

@simone-silvestri
Copy link
Copy Markdown
Collaborator

@simone-silvestri simone-silvestri commented Aug 8, 2025

Branch used for the OMIP simulations in ClimaOcean. No need to merge. Just to document what is being done.
When the OMIP is stable and running we can start decomposing the bits and pieces of this branch into different PRs.

Speeding up (quite considerably) SeaIceDynamics

This branch deals with the efficient execution of the sea ice dynamics in split form. Many small kernels need to be launched, so this PR ensures that:

  1. kernels are fused as much as possible (no individual mask_immersed_field_xy! for example, but zeroing out the velocity in peripheral regions directly in the kernels)
  2. All the arguments passed to the kernels are converted once before the substepping
  3. We save configured kernels so that we do not have to pay the cost of kernel configuration at every substep

To achieve this, the auxiliaries of a particular rheology are divided into auxiliaries.fields and auxiliaries.kernels for the ElastoViscoPlasticRheology where auxiliaries.kernels hold the preconfigured kernels to compute viscosity and stresses.

Note!!! this branch requires CliMA/Oceananigans.jl#4706 to be efficient and work properly, since we are passing converted arguments to the fill_halo_regions! function, which is not possible prior to 4706, that refactors how fill halos work by saving down preconfigured kernels.

No internal heat flux if the ice is not consolidated

This PR also removes the internal heat flux if the sea ice is unconsolidated to avoid very large internal heat flux values. This was already done for all top boundary conditions except for a PrescribedTemperature top boundary condition which is the one we use in ClimaOcean.jl

@simone-silvestri simone-silvestri changed the title Ss/omip branch 2 OMIP branch Aug 8, 2025
@navidcy navidcy self-requested a review August 21, 2025 18:59
Copy link
Copy Markdown
Member

@navidcy navidcy left a comment

Choose a reason for hiding this comment

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

@simone-silvestri could you update the PR title/first post to reflect the changes done here? Happy to merge otherwise!

@navidcy navidcy marked this pull request as ready for review August 21, 2025 18:59
@simone-silvestri
Copy link
Copy Markdown
Collaborator Author

@simone-silvestri could you update the PR title/first post to reflect the changes done here? Happy to merge otherwise!

Added a description, we need to wait for CliMA/Oceananigans.jl#4706 though before merging this one.

@simone-silvestri simone-silvestri changed the title OMIP branch Speeding up Dynamics and removing internal heat flux when h < hc Aug 26, 2025
@simone-silvestri
Copy link
Copy Markdown
Collaborator Author

I think this should be ready to merge once a new version of Oceananigans is released.

@navidcy
Copy link
Copy Markdown
Member

navidcy commented Sep 3, 2025

If it requires Oceananigans v0.98 then we should edit the compat requirements

@simone-silvestri simone-silvestri merged commit 3ebb64e into main Sep 3, 2025
6 checks passed
@simone-silvestri simone-silvestri deleted the ss/omip-branch-2 branch September 3, 2025 12: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