Comments (4)
I think pint-xarray is perfect for doing that. I wonder if anyone here has more experience with pint. E.g. is there a way to convert any unit into the SI unit? I have so far only encountered cases with cm
as depth unit, but I am wondering if there is a way to do this generally. If not we can add that logic (e.g. provide a mappint dict, but let pint handle the actual conversion).
from xmip.
cc @TomNicholas
from xmip.
Once you import the correct libraries (in this order)
import pint
import cf_xarray.units
import pint_xarray
you should be able to add units via da.pint.quantify()
and convert them via da.pint.to()
from xmip.
If the units you need aren't present in the registry then they should probably be added in cf-xarray (though you can modify locally too).
from xmip.
Related Issues (20)
- Failing with xgcm v0.7.0
- Conda version HOT 2
- Concatenate experiments with different calendars HOT 6
- Enable string input for `match_variables` argument in `match_metrics`
- Upstream dev CI failing during mamba stage HOT 2
- Tutorial intake failure HOT 10
- Merging datasets with overlapping but non identical coordinates HOT 4
- Calculating unprovided grid metrics from CMIP output? HOT 6
- combine_staggered_grid error with CESM2 HOT 8
- Opt-in for cloud tests
- Add pint-xarray as dependency HOT 1
- pint-xarray degrades performance significantly HOT 2
- Preprocessing Performance
- Request to change license to Apache-2 HOT 8
- Refine options for handling of mismatches in metric dimensions
- Installation docs mention xgcm HOT 1
- The stripe emerged after masking the ERSSTv5 SST data HOT 12
- Using `interpolate_grid_label()` to regrid data HOT 4
- Trimming grid halo as part of the preprocessing HOT 1
- Drop Python 3.7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from xmip.