Open byersiiasa opened 2 months ago
Thanks for this! Agreed that it would be better to have files read as inputs instead of hard-coded when possible, so this is on my TODO list.
Also reading, wasn't clear to me why UKESM file is used for the population..
# merge with UKESM1-0-LL population data so that all gcms use the same population data
Yes so to clarify, when we moved to running multiple GCMs there was a bug in the code that led to there being different population values across GCMs (which I don't think should be the case), which in turn led to strange energy intensities. At that time, due to time constraints, my tempfix was to just use the UKESM "population" data (which I don't think is really the UKESM's population data, but rather the SSP population data that got merged with the UKESM CHILLED run) across all GCMs in one of the more downstream calculations/aggregations.
Not a good practice though -- would be better if I can track down what was causing that issue to begin with upstream and fix it there.
https://github.com/iiasa/message-ix-buildings/blob/6cde97dc75f962e8f61b08dccd11d7b870e7f4c3/message_ix_buildings/chilled/analysis/aggregate.py#L102-L104
As I understand, this reads in a file and maps the REGION_GEA column with the countries. This function could be more versatile if the region mapping could be provided as an argument to the function, either as a filename or a df
@measrainsey
Also reading, wasn't clear to me why UKESM file is used for the population..
# merge with UKESM1-0-LL population data so that all gcms use the same population data
https://github.com/iiasa/message-ix-buildings/blob/6cde97dc75f962e8f61b08dccd11d7b870e7f4c3/message_ix_buildings/chilled/analysis/aggregate.py#L178