mrghg / py12box_invert

MIT License
3 stars 0 forks source link

Units are hardwired #8

Open mrghg opened 3 years ago

mrghg commented 3 years ago

In the lifetime uncertainty function, we implicitly assume emissions are in Gg/yr, and divide the burden by 1e9. Need to check that this still holds if emissions are in Tg/yr.

Should store the units of the data and model somewhere, and take care of box model unit conversion, as needed.

lukewestern commented 3 years ago

It would make most sense to me to read the units from the emissions file to ensure there are no i/o units conflicts, and convert these to Gg when reading in, for ease. This is just because the box model currently requires Gg as an input.

Then in somewhere like process_outputs() you could covert back to the input units, although this would then be different from e.g. mod_posterior, which would be in Gg.

But this makes me think, is there any harm in keeping all units in Gg? I.e., just make it that all inputs/outputs are in Gg?

lukewestern commented 1 year ago

Adding to this that the output currently only prints units as Gg/yr even if in Tg/yr