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.
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
Refactor 654 zonal mean xy #752
Refactor 654 zonal mean xy #752
Changes from 5 commits
46a10ed
db652ac
d91fb53
ecacd2e
546c76e
3749b2e
d110348
b6485ec
d49d92e
51ccccb
27dc5da
0227cd8
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
Large diffs are not rendered by default.
Large diffs are not rendered by 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.
RE: Issue 1 in #752 (comment)
The changes in
cosp_bin_sum()
now fix the missing outputs for the remaining variables:ISCCPCOSP-CLDTOT_TAU1.3_9.4_ISCCP
,ISCCPCOSP-CLDTOT_TAU1.3_ISCCP
,MODISCOSP-CLDHGH/TOT_TAU1.3_9.4_MODIS
,MODISCOSP-CLDHGH/TOT_TAU1.3_MODIS
Root Cause
prs_range
can be in descending order (e.g.,(90000.0, 9000.0)
)cond
) to not match any of the data values when subsetting with.where()
>=90000.0 and <=9000.0
which is incorrect>= 9000 and <= 90000
numpy
error is thrown withdrop=True
(drop allnan
values that don't match):ValueError: Cannot apply_along_axis when any iteration dimensions are 0
Solution
Sort
prs_range
andtau_range
before subsettingSide-note
The CDMS2 version of sub-setting a variable is pretty confusing. Notice below how
prs_low
andprs_high
are used to subset, butprs_low
is actually the larger value with my example,(90000.0, 9000.0)
I think CDMS2 swaps both values around and subsets to include all values within the range. It uses the correct sub-setting condition,
>= 9000 and <= 90000
.e3sm_diags/e3sm_diags/derivations/acme.py
Lines 488 to 490 in 434ab8c