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 .metpy.units checking .data for units and loading data into memory #1832

Merged
merged 3 commits into from Apr 27, 2021
Merged

Fix .metpy.units checking .data for units and loading data into memory #1832

merged 3 commits into from Apr 27, 2021

Conversation

dcamron
Copy link
Member

@dcamron dcamron commented Apr 26, 2021

Description Of Changes

  • Removes check_axis check in no gridmapping fallback in parse_cf (unnecessary via Remove misleading fallback to lat/lon CRS when only 2D lat/lon present #1651)
  • Points .metpy.units to xarray.Variable._data instead of .data in checking for quantity with units to avoid loading data into memory
  • Test to see if .metpy.units touches .data. If there are any thoughts on more thorough tests for this situation let me know

Checklist

@dcamron dcamron added this to the 1.0.1 milestone Apr 26, 2021
Copy link
Collaborator

@jthielen jthielen left a comment

Choose a reason for hiding this comment

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

Looks good to me! I say we either leave #1748 open to track progress on the more permanent fix (once there is a public API for the type check) or open a new issue...just don't want to have it forgotten in a closed issue.

@dopplershift dopplershift merged commit 36281bd into Unidata:main Apr 27, 2021
@dopplershift
Copy link
Member

#1835 can track our use of ._data.

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.

parse_cf loads all data into memory when grid_mapping is missing since .metpy.units checks .data
3 participants