Skip to content
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

Fix region masking in observations #884

Merged
merged 2 commits into from
Aug 16, 2022
Merged

Conversation

xylar
Copy link
Collaborator

@xylar xylar commented Aug 16, 2022

It appears a recent change in xarray or dask has broken the way MPAS-Analysis currently handles region masking on lon/lat grids (i.e. for observations). A seemingly inconsistent multi-index called nCells is generated when going from the 2D lon/lat space to a 1D "unraveled" coordinate. The easiest way to handle this seems to just be to drop the nCells multi-index from both the mask and the data set to be masked.

xylar added 2 commits August 16, 2022 12:47
The `nCells` multi-index produced by xarray's `stack()` method
seems to cause trouble between mask arrays and datasets.  This
may be a change in dask or in xarray itself.  The solution seems
to be simply to drop the multi-index.
@xylar xylar self-assigned this Aug 16, 2022
@xylar xylar added the bug label Aug 16, 2022
@xylar
Copy link
Collaborator Author

xylar commented Aug 16, 2022

Testing

The results of the regression suite on Anvil are here:
https://web.lcrc.anl.gov/public/e3sm/diagnostic_output/ac.xylar/analysis_testing/anvil/fix_region_masking/

All analysis was produced successfully, whereas regional TS diagrams and time series were not completing before this fix.

@xylar xylar merged commit a29eeed into MPAS-Dev:develop Aug 16, 2022
@xylar xylar deleted the fix_region_masking branch August 16, 2022 12:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant