-
Notifications
You must be signed in to change notification settings - Fork 15
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
Add boundary conditions to the default fields in PrescribedAtmosphere
#387
Conversation
Codecov ReportAttention: Patch coverage is
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. 🚀 New features to boost your workflow:
|
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) |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we change the default here?
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i'll do it
closes #386