Closed lfaucheux closed 4 years ago
hi @lfaucheux, this will probably save you a few headaches https://github.com/openscm/openscm-units (the notebook is a good starting point https://github.com/openscm/openscm-units/blob/master/notebooks/introduction.ipynb). Not all the GWPs are included but you should be able to add new ones without too much trouble in https://github.com/openscm/openscm-units/blob/master/src/openscm_units/data/metric_conversions.csv
We simply define everything in terms of CO2, and then use contexts to control how the conversion works. It means you don't have the timescale in the name (i.e. the units are 'Mt CO2/yr', not 'Mt CO2 GWP50 / yr') but it seems to do the trick and avoids requiring all these new units and conversions (and Pint makes sure you can't accidentally convert between e.g. CO2 and N2O if you haven't explicitly specified the unit context to use).
@lfaucheux can we close this issue?
@znicholls I'll be back to you in a few days about that. Thanks for your attention.
@znicholls you can close it if you like. Thx again for taking time.
Sorry for necroposting, but I was also looking for this and I suspect people that are not familiar with GitHub or development in general may miss this. Would you be OK with adding a ref to openscm-units somewhere in the doc? Maybe in the Defining units section or in the FAQ? (maybe tagging @hgrecco about that)
If it's fine with you, I can make a PR
@jules-ch was working on the new docs. Maybe we can put all packages using Pint in the same place.
Pint is really amazing. 3 Questions:
I am not physicist and I would like to implement (static) Global Warming Potentials. It all starts with radiative forcings, dimensionalized as W/m², i.e. an intensity, which already exists in the default registry,
Question 1
Does
[intensity]
have a given name when it is precisely instantiated aswatt / meter ** 2
?Then it looks like we first have to imply the notion of absolute GWP (AGWP). Note that there is a time-horizon non-linear determinant behind any AGWP value. I made a python package some years ago to compute those things continuously. Yet, it seems that dealing with precomputed constants is the rule when dealing with GWPs, mainly for the sake of convenience. Let's thus adopt the culture: the most common used i) time horizons in the litterature are 5, 10, 20, 30, 50, 100 years and ii) ghgs are CO2 (of course), CH4 and N2O. The point is that the following constants are very likely -- I am not physicist -- to be true only for
kilogram
s since the idea behind warming potential is precisely about timing of emissions <=> clearly not a linear-in-mass phenomenon.Question 2
Does
[intensity] / kg
have a given name ?In conjunction with of the notion of timing/temporality,
[temporality]
, let's call it[absolute_global_warming_potential]
for now. And only specify things for 100- and 50-year horizons for the sake of clarity,Finally, our (relative-to-CO2) GWPs
Question 3
Any suggestion that makes more sense i) regarding Pint's conventions as such and ii) ontologically speaking ?