Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

free_surface default for a DistributedGrid #232

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

simone-silvestri
Copy link
Collaborator

No description provided.

Copy link

codecov bot commented Nov 10, 2024

Codecov Report

Attention: Patch coverage is 0% with 1 line in your changes missing coverage. Please review.

Project coverage is 0.00%. Comparing base (9c4942e) to head (7d4ce1d).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/OceanSimulations/OceanSimulations.jl 0.00% 1 Missing ⚠️
Additional details and impacted files
@@          Coverage Diff          @@
##            main    #232   +/-   ##
=====================================
  Coverage   0.00%   0.00%           
=====================================
  Files         32      32           
  Lines       1843    1843           
=====================================
  Misses      1843    1843           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@@ -44,7 +45,7 @@ default_free_surface(grid) = SplitExplicitFreeSurface(grid; cfl=0.7)

# 70 substeps is a safe rule of thumb for an ocean at 1/4 - 1/10th of a degree
# TODO: pass the cfl and a given Δt to calculate the number of substeps?
default_free_surface(grid::TripolarGrid) = SplitExplicitFreeSurface(grid; substeps = 70)
default_free_surface(grid::Union{TripolarGrid, DistributedGrid}) = SplitExplicitFreeSurface(grid; substeps = 70)
Copy link
Member

Choose a reason for hiding this comment

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

Why not just make this always the default?

Note that this doesn't cover ImmersedBoundaryGrid but it needs to (which is done on #230)

All these changes need tests I think.

Copy link
Member

Choose a reason for hiding this comment

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

Another comment is: a better design for this function would pass in a minimum expected time-step. Then, it could be leveraged by users who find that the default doesn't work for them (but who may not be able to automatically guess how many substeps they need --- which depends on the depth of the ocean, gravitational acceleration, the grid spacing, and the minimum expected time-step.

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.

3 participants