-
Notifications
You must be signed in to change notification settings - Fork 54
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
Processor-averaged budgets #106
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…prep for separate samptend for both terms
…er, including using the second order advection routine from advec_2nd.f90 for vertical advection, which is done with the second order scheme anyway
…rder advection routines from advec_2nd do the vertical advection
…vertical advection
…izontal and vertical advection, which is stored separately in samptend
…to close (for thl and qt) on the block scale, and add back up to the domain average
…block - works with an xr.open_mfdataset
…redundant as they just reuse functions from other split advection schemes. Still gives identical results as far as I can tell
…r budget is set to be computed. Now need to make leibniz optional to separate the averaged fields from the leibniz terms (which we are unlikely to want on the block-scale anyway)
…ting to public subroutine
…tendencies add up perfectly to the total ones (for a simple test case)
Did a quick BOMEX on this branch, 2nd order advection runs fine on GPU. |
Nice, @CasparJungbacker, thanks for checking so quickly! In the best-case scenario, I've then only upset your syncing/waiting (I'm pretty sure I have), or more obscure advection schemes :) |
fjansson
approved these changes
Aug 19, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In this branch we're implementing an evaluation of budgets of momenta and scalars (already present in
modsamptend
) on a processor-averaged basis, by extending the sampling routines (modsampling, modsampdata and mostly modsamptend). We want this to do patch-averaged budgets, assuming a processor block coarse grains to a reasonably sized mesoscale patch. Using processor blocks allows us to reuse a lot of processor-averaging code already present.To make this work, I've made the following changes:
ltenddec
) of the advection terms for scalar budgets into terms we want to be able to separate (from what I can tell, these add up almost exactly to the exactly evaluated advection terms):samptend.*.*.xxx.nc
, analogous tofielddump.*.*.xxx.nc
), which we can merge after a simulation should we wantwritestat_nc
, and treat it asxm
/ym
, just like we treat finite volumes on the grid scaleThis PR runs as expected for shallow convection in a large domain on Fugaku.
Potential, non-tested impacts and future improvements:
ql
, and other variables we want at the block scale, like (cumulative) cloud fraction or ice