-
Notifications
You must be signed in to change notification settings - Fork 3
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
Enable DSS for Slab Models #387
Conversation
177aa94
to
23b68ff
Compare
23b68ff
to
16efed3
Compare
for key in propertynames(Y) | ||
field = getproperty(Y, key) | ||
buffer = get_dss_buffer(axes(field), p) | ||
ClimaCore.Spaces.weighted_dss!(field, buffer) |
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.
LGTM
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.
If we are calling weighted_dss
internally, I would recommend prefixing weighted
to this specialized function name!
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.
Is there a reason we are passing argument t
if we are not using it inside the function?
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.
Sounds good, thanks (see comment above)
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.
If we are actually calling weighted_dss
function inside, can we also clarify this in the calling function name! (e.g. weighted_dss_slab!
or so. We currently support both pure dss
and weighted_dss
(which combines the effect of M^-1 x dss
)in ClimaCore.jl
and it would be good to disambiguate!
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.
Sounds good, changed to weighted_dss_slab!
and merging. Thank you both!
16efed3
to
5048d43
Compare
As discussed, since the primary objective of this PR is to add the dss buffer, I am ok with renaming the function and addressing the unused third argument issue a bit later since it is entangled with Generally speaking, the application of DSS is a part of the RHS /tendency function computation! However, it seems to be isolated and treated differently than usual, which is probably the reason this ambiguity arises in the Time Stepper here! |
5048d43
to
20f5fe7
Compare
That's how I understand it too. Here it is called as a callback - I guess some models (and their tendencies) could be pointwise and be independent of ClimaCore. The coupler could then use the ClimaCore Field objects to apply the models spatially, so in this case we'd definitely need a callback. In the slab ocean / Bucket cases, maybe either method works (as long as it's ok for the dss to be applied only once and after the stepping, rather during each substep)? |
bors r+ |
Build succeeded! The publicly hosted instance of bors-ng is deprecated and will go away soon. If you want to self-host your own instance, instructions are here. If you want to switch to GitHub's built-in merge queue, visit their help page. |
Purpose
Closes #381 (see for details and QA assessment)