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

Propagate DataArray and Dataset level attributes in coarsening functions and regrid_vertical #513

Merged
merged 7 commits into from
Jul 29, 2020

Conversation

spencerkclark
Copy link
Member

@spencerkclark spencerkclark commented Jul 29, 2020

This PR adds code to ensure that DataArray and Dataset level attributes are always propagated to the output objects through the coarsening functions as well as regrid_vertical.

Copy link
Contributor

@nbren12 nbren12 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall this is a great idea, and solves a long-standing difficulty with using these routines. Thanks.

I have a couple concerns about the implementation though. I'm happy to discuss if you don't fully agree with my comments.

external/vcm/vcm/cubedsphere/coarsen.py Outdated Show resolved Hide resolved
external/vcm/vcm/cubedsphere/coarsen.py Outdated Show resolved Hide resolved
Copy link
Contributor

@oliverwm1 oliverwm1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this Spencer! I wonder whether we want to set the default behavior to true (despite this being a "breaking" change). Certainly that is the behavior I almost always want.

external/vcm/vcm/cubedsphere/coarsen.py Show resolved Hide resolved
@spencerkclark spencerkclark changed the title Add keep_attrs argument to coarsening functions Propagate DataArray and Dataset level attributes in coarsening functions and regrid_vertical Jul 29, 2020
spencerkclark added a commit that referenced this pull request Jul 29, 2020
Copy link
Contributor

@nbren12 nbren12 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Looks great!

@spencerkclark spencerkclark merged commit 1025f7c into master Jul 29, 2020
@spencerkclark spencerkclark deleted the coarsen-keep-attrs branch July 29, 2020 20:46
@spencerkclark spencerkclark mentioned this pull request Mar 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants