Comments (8)
can now use the convert_units
preprocessor step
from esmvalcore.
Related to #505
from esmvalcore.
I don't think we can close this, convert_units
(hopefully) doesn't convert units from mol m-3
to mol m -2
.
from esmvalcore.
why not? It's a valid CF unit, the cube doesn't care if it's cows / vultures
as long as they are CF units, it's CMOR that will be barking at you, but you're on your own there
from esmvalcore.
>>> from cf_units import Unit
>>> a = Unit('kg m-3')
>>> b = Unit('kg m-2')
>>> a.convert(1, b)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/miniconda3/envs/mlr/lib/python3.7/site-packages/cf_units/__init__.py", line 1907, in convert
(self, other))
ValueError: Unable to convert from 'Unit('kg m-3')' to 'Unit('kg m-2')'.
>>>
from esmvalcore.
ValueError: Unable to convert from 'Unit('mol m-3')' to 'Unit('mol m-2')'.
from esmvalcore.
We shouldn't be using iris convert
here, that isn't what happenning here. Iris convert is for stuff like Celsius to Kelvin, not Celsius to heat. The convert function should not be able to change the dimensions of the units.
The issue here is that the depth_integration
preprocessor changes the units, dimensions and the dataset standard name. It's a very simple calculation, but non-trivial to resolve it, as the output may not necessarily exist in the CMOR tables.
For instance, you may want to know the water column total oxygen, in mmol per meter squared. I bet that field doesn't exists a standard variable.
from esmvalcore.
@ledm That should no longer be a problem, because we moved the cmor check to right after the data is loaded in #743, so there is no CMOR check anymore after the depth_integration
function is applied.
from esmvalcore.
Related Issues (20)
- `pkg_resources` is deprecated
- Dataset problem: GISS-E2-1-G/ssp126/r1i1p5f1/Omon/tos/gn has wrong units HOT 3
- High value for 'branch_time_in_parent' attribute crashes CMOR check
- Preprocess datasets in fixed order HOT 3
- Version selection does not work if some files are not available for a particular version HOT 4
- Preprocessor to convert calendar and "fill-in" the data HOT 12
- Make `tier` key optional in recipes for OBS/OBS6 data
- Update `_config_validators` to validate specified config file
- `extract_levels` preprocessor realizes source levels HOT 4
- Dataset problem: In ERA5 evspsbl and evspsblpot have the opposite sign compared to CMOR
- Remove automatic setting of `use_src_mask` in regrid
- `extract_levels` is not lazy when using altitude - pressure levels conversion
- Rename `esmvaltool_commands` entry points group name
- CESM2/CESM2-WACCM 'fix_metadata' Error HOT 1
- Rethinking `fix_file` HOT 6
- New `conda-lock=2.1.0` fails to build lockfile due to old conda/mamba
- Improve "Making a release" documentation
- [Github Actions] Monitor tests action stopped running
- [Github Actions] old conda and mamba versions HOT 6
- Invalid ESGF query for CERES-EBAF datasets HOT 12
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 esmvalcore.