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

Add boundary conditions to the default fields in PrescribedAtmosphere #387

Closed

Conversation

simone-silvestri
Copy link
Collaborator

closes #386

Copy link

codecov bot commented Mar 9, 2025

Codecov Report

Attention: Patch coverage is 0% with 14 lines in your changes missing coverage. Please review.

Project coverage is 0.00%. Comparing base (3819723) to head (8f489fc).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
src/OceanSeaIceModels/PrescribedAtmospheres.jl 0.00% 14 Missing ⚠️
Additional details and impacted files
@@          Coverage Diff          @@
##            main    #387   +/-   ##
=====================================
  Coverage   0.00%   0.00%           
=====================================
  Files         38      38           
  Lines       2317    2322    +5     
=====================================
- Misses      2317    2322    +5     

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

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

return (; rain, snow)
end

function default_atmosphere_pressure(grid, times)
pa = FieldTimeSeries{Center, Center, Nothing}(grid, times)
bcs = FieldBoundaryConditions(grid, (Center, Center, Nothing))
pa = FieldTimeSeries{Center, Center, Nothing}(grid, times; boundary_conditions=bcs)
Copy link
Member

Choose a reason for hiding this comment

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

Why don't these boundary conditions get added already? This seems like a change that belongs in Oceananigans. What's the motivation for doing this here? You will have to do this every time you make a FieldTimeSeries right, isn't it a bit much?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Copy link
Collaborator

Choose a reason for hiding this comment

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

I guess even if we do, we'd probably don't add defaults that have a Nothing z-location

Copy link
Collaborator

Choose a reason for hiding this comment

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

@simone-silvestri just for clarification: is this only needed for FieldTimeSeries that are restricted on the surface? Or you are saying that we need to include boundary conditions in the constructors of FieldTimeSeries when we plan to interpolate those time series; this happens to be one example of such case you stumbled upon?

Copy link
Member

Choose a reason for hiding this comment

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

right, just a one line change in oceananigans needed, as opposed to ~20 lines here

Copy link
Member

Choose a reason for hiding this comment

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

no @navidcy all thats needed is the default

boundary_conditions = FieldBoundaryConditions(grid, loc)

thats the pattern @simone-silvestri uses verbatim

Copy link
Member

Choose a reason for hiding this comment

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

i'll do it

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.

Missing BCs in the default PrescribedAtmosphere fields
3 participants