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

Add support for unit-aware xarray #37

Open
jacobbieker opened this issue Sep 1, 2022 · 0 comments
Open

Add support for unit-aware xarray #37

jacobbieker opened this issue Sep 1, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@jacobbieker
Copy link
Member

jacobbieker commented Sep 1, 2022

https://xarray.dev/blog/introducing-pint-xarray

Detailed Description

The pint package can now add units to Xarray arrays, and explicitly track the units through operations, etc. This could potentially simplify and unify some of our variable names while enforcing the units we want, and stopping us from mixing up units.

Context

Having consistent units is why we add all the suffixes of wp or mwp etc. and this could be a fix for keeping track of that in a smoother way, e.g. having both GSP and PV system power in the variable power with the units keeping track if its in megawatts or just watts

Possible Implementation

There is one currently lacking thing, in that indexes don't directly support units, just have to access them and select on them using .pint.sel()

@jacobbieker jacobbieker added the enhancement New feature or request label Sep 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant