-
Notifications
You must be signed in to change notification settings - Fork 434
EAMxx: add zonal average diagnostic and update IO for custom CMP-like tag names #7261
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
Merged
Merged
Changes from 1 commit
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
abba547
introduce zonal average diagnostic with unit test for EAMxx
cjvogl 5895598
added FieldLayout::prepend_dim, along with utility private function F…
cjvogl 3f06d4f
made use of FieldLayout::prepend_dim functionality in zonal average d…
cjvogl e6af439
added EAMxx zonal average diagnostic to scorpio and added to test hom…
cjvogl 2d55ab7
switched from using KOKKOS_LAMBDA for reductions in EAMxx zonal avera…
cjvogl 23a74df
EAMxx: public methods in ZonalAvgDiag, fix tests
mahf708 055a241
EAMxx: add docs for zonal avg diag
mahf708 ad24954
EAMxx: force users to specify lat bins
mahf708 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
This file contains hidden or 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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.
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.
any last-minute thoughts about the naming here? I am not sure how I feel about "with X bins"
Maybe X_zonal_avg_in_Y_lats?
Also, we don't make the "lat" available and instead we rely on users to figure it out. Tha'ts ok, but we should likely add a helper string in the output ... lemme know what you think and I will address it (here or later)
Edit: I think it may make sense to rename "binN" to "latN" and then we can endow this dim with its actual values (the index is there automatically). But can do later, not necessarily now...
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 would vote for "bandN" or "zoneN". "latN" seems to suggest a single latitude value.
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.
On a different note: why is
_with_
part of the captured group? I don't think using a default number of bins is a great idea, since ppl may forget to set that. I'd rather error out right away, and have users fix the diag name to specify the number of bins.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 you want to do a "default" zonal decomp, maybe we should use more "meaningful" (and not uniform) bounds, to get something like 2x polar zones, 2x temperate zones, and 1-2 tropical zones?
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 just followed the description of the PR. I am fine with forcing a no-default and erroring out. So, let's see what @cjvogl prefers and we can tweak it.
can you elaborate?
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.
Well, doing 180 bins as default seems very arbitrary, and also maybe too little of a size for bin 1 and 180... I was thinking maybe something like
They are still somewhat arbitrary, but probably more linked to relevant regions of analysis?
Uh oh!
There was an error while loading. Please reload this page.
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.
It's often the case people tend to look at zonal means like designed here, e.g., e3sm_diags zonal plots and zonal-annual plots. The default of 180 (one-lat-deg spacing) is pretty reasonable if we want to keep a default. However, I am fine with getting rid of the defaults, and forcing users to specify one.
What you're listing (polar, mid-lat, subtrop, trop, etc.) is a derivative of the more general zonal average stuff, but it is more tightly related to horiz avg. I would consider adding those regions as special cases of horiz_avg instead of 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.
The motivation behind bin is that one can think of a zonal average as a histogram, and thus a name like "bin" could be reused if someone wants to have a histogram in a different dimension than along latitude. As a concrete example, we intend to introduce a diagnostic where one can output a histogram in the vertical direction to reduce the output size from a high resolution run.
The one-lat-deg spacing was the original idea, but I was not beholden to it (or any default).
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.
That makes sense. But the [-90,-89) band (e.g.) will have much fewer cols than the [-1,0) band, so is the histogram meaningful there? But that's beyond the scope, i am ok with bin as a name. I will integrate this as soon as testing is done.