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 depth slicing with non-ocean cells #948

Merged
merged 2 commits into from
Jan 27, 2023

Conversation

xylar
Copy link
Collaborator

@xylar xylar commented Jan 18, 2023

Previously, when there were cells with maxLevelCell = 0, this caused a failure because there was no valid depth coordinate for that cell and therefore no closest depth index could be found.

This fix simply skips cells that are not in the ocean and masks them out.

This merge also fixes an issue with rolling averages that was discovered in the same run. Rolling averages should drop NaN values only if all values at a given time point are NaN, not if any are (the default behavior). This was presumably not noticed previously because we performed rolling averages on fields without any NaN values.

@xylar xylar added the bug label Jan 18, 2023
@xylar xylar self-assigned this Jan 18, 2023
@xylar
Copy link
Collaborator Author

xylar commented Jan 18, 2023

@maltrud, this is the fix for the issue you uncovered. After I have merged this, I will share my config file and some instructions on how to build your own conda environment for using the develop branch so you can run your analysis. Unfortunately, the fix won't be in E3SM-Unified for another 5 months or so.

Previously, when there were cells with `maxLevelCell = 0`, this
caused a failure because there was no valid depth coordinate
for that cell and therefore no closest depth index could be found.

This fix simply skips cells that are not in the ocean and masks
them out.
@xylar xylar force-pushed the fix_depth_slicing_with_nonocean_cells branch from 149f8ea to 3116204 Compare January 18, 2023 22:00
We only want to drop times were all values are NaN, not when *any*
value is NaN (e.g. below the bathymetry in a vertical average).
@xylar
Copy link
Collaborator Author

xylar commented Jan 27, 2023

Testing

I reran the analysis of a run on the SO12to60E2r5 mesh. All analysis that had failed with the develop branch was successful with this branch. See:
https://web.lcrc.anl.gov/public/e3sm/diagnostic_output/ac.xasay-davis/analysis/GMPAS-JRA_SO12to60E2r5_hybridGM_anvil01_fix/yrs50-59/

I also ran the test suite. All analysis completed successfully and can be seen here:
https://web.lcrc.anl.gov/public/e3sm/diagnostic_output/ac.xasay-davis/analysis_testing/chrysalis/fix_depth_slicing_with_nonocean_cells/

@xylar xylar merged commit 61984e6 into MPAS-Dev:develop Jan 27, 2023
@xylar xylar deleted the fix_depth_slicing_with_nonocean_cells branch March 1, 2023 12:02
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