def update_pollutant_emissions(self, ds): """ Update pollutant emissions based on GAINS data. :return: """ # Update biosphere exchanges according to GAINS emission values for exc in ws.biosphere( ds, ws.either( *[ws.contains("name", x) for x in self.emissions_map])): iam_emission_label = self.emissions_map[exc["name"]] try: iam_emission = self.iam_data.cement_emissions.loc[dict( region=ds["location"], pollutant=iam_emission_label)].values.item(0) except KeyError: # TODO: fix this. # GAINS does not have a 'World' region, hence we use Europe as a temporary fix iam_emission = self.iam_data.cement_emissions.loc[dict( region=self.geo.iam_to_GAINS_region("World"), pollutant=iam_emission_label)].values.item(0) if exc["amount"] == 0: wurst.rescale_exchange(exc, iam_emission / 1, remove_uncertainty=True) else: wurst.rescale_exchange(exc, iam_emission / exc["amount"]) return ds
def change_biogenic_co2_name(self): """ CO2 capture through biomass growth is represented with `Carbon dioxide, in air`. However, such flow does not have a CF in the IPCC method. This becomes an issue when biommas is used together with CCS. Hence, we change th flow name to `Carbon dioxide, to soil or biomass stock`, for which the IPPCC has a CF of -1. :return: """ for ds in self.db: for exc in ws.biosphere( ds, ws.equals("name", "Carbon dioxide, in air")): exc["name"] = "Carbon dioxide, to soil or biomass stock" exc["categories"] = ("soil", ) for exc in ws.biosphere( ds, ws.equals("name", "Carbon dioxide, non-fossil")): exc["name"] = "Carbon dioxide, from soil or biomass stock" exc["categories"] = ("air", )
def add_negative_CO2_flows_for_biomass_CCS(self): """ Rescale the amount of all exchanges of carbon dioxide, non-fossil by a factor -9 (.9/-.1), to account for sequestered CO2. All CO2 capture and storage in the Carma datasets is assumed to be 90% efficient. Thus, we can simply find out what the new CO2 emission is and then we know how much gets stored in the ground. It's very important that we ONLY do this for biomass CCS plants, as only they will have negative emissions! Modifies in place (does not return anything). """ for ds in ws.get_many(self.db, ws.contains('name', 'storage'), ws.equals('database', 'Carma CCS')): for exc in ws.biosphere(ds, ws.equals('name', 'Carbon dioxide, non-fossil')): wurst.rescale_exchange(exc, (0.9 / -0.1), remove_uncertainty=True)