pik-piam / mrremind

The mrremind packages contains data preprocessing for the REMIND model.
GNU Lesser General Public License v3.0
4 stars 40 forks source link

refactor reading in UNFCCC data #478

Closed fbenke-pik closed 4 months ago

fbenke-pik commented 4 months ago

This PR simplifies logic in convertUNFCCC by using madrat functions and unifies handling of 0s vs NAs in calcUNFCCC: all countries in regions "EUR", "REF", "NEU", "CAZ" are set to 0s if they have NAs so regional aggregation yields results.

Before, this was limited only to data read in from the source, now it also includes data calculated on top of read in data.

This fixes the problem that Emi|CO2|Industrial Processes and Emi|CO2|Energy|Demand|Industry are available for EU27 and CAZ, but Emi|CO2|Industry is not.