Skip to content

Use Veros as another Ocean component in NumericalEarth.jl#1

Merged
simone-silvestri merged 444 commits intomainfrom
ss/adapt-veros
Feb 24, 2026
Merged

Use Veros as another Ocean component in NumericalEarth.jl#1
simone-silvestri merged 444 commits intomainfrom
ss/adapt-veros

Conversation

@simone-silvestri
Copy link
Copy Markdown
Member

Literally just a copy of CliMA/ClimaOcean.jl#602 in this new fork, to see what happens to CI.

@simone-silvestri
Copy link
Copy Markdown
Member Author

Perfect, CI restarted, now we need to figure out the Issue's issue.

@codecov
Copy link
Copy Markdown

codecov bot commented Jan 23, 2026

Welcome to Codecov 🎉

Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests.

ℹ️ You can also turn on project coverage checks and project coverage reporting on Pull Request comment

Thanks for integrating Codecov - We've got you covered ☂️

@simone-silvestri
Copy link
Copy Markdown
Member Author

simone-silvestri commented Feb 15, 2026

This is ready to merge @glwagner @navidcy (I will ensure tests pass before merging)

npx.sqrt(
(0.5 * (vs.surface_taux[1:-1, 1:-1] + vs.surface_taux[:-2, 1:-1]) / settings.rho_0) ** 2
+ (0.5 * (vs.surface_tauy[1:-1, 1:-1] + vs.surface_tauy[1:-1, :-2]) / settings.rho_0) ** 2
) ** 1.5,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

what's this?

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.

Veros uses TKE as a prognostic variable for which it defines a boundary condition based on the wind stress.
This particular setup we are using has a ocean.set_forcing method we need to overload.
At the moment, the easiest way to do it, to avoid writing a long python setup and to avoid changing the flux computation to introduce extra tracers (which is something I would like to do in another PR) is to overload it from within python with the same method of the setup
https://github.com/team-ocean/veros/blob/f90669d73b2dec8ab8b04d5a7dc574f69510b6e8/veros/setups/global_4deg/global_4deg.py#L227-L274
pruning the extra computation of wind stress and heat flux.

I would like to change this by actually writing the veros setup in the example in python rather than having this fix, and add extra tracers to the flux computation, but I think we can do it in another PR

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.

It would actually be interesting to write a GPU veros script and run it in the examples

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

veros should do this internally. That's what we do with CATKE.

Copy link
Copy Markdown
Member

@glwagner glwagner left a comment

Choose a reason for hiding this comment

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

excited for this

there are a lot of lines of code. if it can be made more concise, we will be thankful in the future.

there are also some notation irregularities

@simone-silvestri simone-silvestri merged commit 3caa662 into main Feb 24, 2026
30 of 31 checks passed
@simone-silvestri simone-silvestri deleted the ss/adapt-veros branch February 24, 2026 07:04
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