JGCRI / gcamdata

The GCAM data system
https://jgcri.github.io/gcamdata/
Other
43 stars 26 forks source link

Add supply=demand test and similar sanity checks? #1087

Open bpbond opened 5 years ago

bpbond commented 5 years ago

In #1086 @ssmithClimate suggests:

Perhaps add some tests for calibration consistency? Could we test if global supplies and demands are equal for some specified global goods?

I.e. we could perform some (more) basic sanity checks.

pkyle commented 5 years ago

Ha, easier said than done! GCAM does this, but replicating the steps to conduct it in R would be quite a beast, at least I'd expect. Or maybe just a warm-up exercise for @pralitp ? The basic challenge is that while supplies are usually directly read in for all primary energy and ag solved markets (not biomass tho), getting the demands of these markets would require walking backwards through the whole energy/ag systems, with all of the input-output coefficients (or efficiencies) of every technology, considering secondary outputs, technologies with multiple inputs, technologies whose calibration is implied by their IO coefficients and surrounding sectors...fun times!

bpbond commented 5 years ago

Pass :) Are there simpler sanity checks that we could do?

ssmithClimate commented 5 years ago

there could be. Perhaps we wont need to track every last secondary Output to know if supplies and demands are off by an order of magnitude.

This also gets a little bit to how we track flows in gcamdata. As we add links between sectors, perhaps we need a more centralized way of tracking these things?