mescal.modify_inventory ======================= .. py:module:: mescal.modify_inventory Functions --------- .. autoapisummary:: mescal.modify_inventory.adapt_rest_of_the_world_activity_based_on_other_activity mescal.modify_inventory.add_carbon_capture_to_plant mescal.modify_inventory.add_carbon_dioxide_flow mescal.modify_inventory.change_dac_biogenic_carbon_flow mescal.modify_inventory.change_direct_carbon_emissions_by_factor mescal.modify_inventory.change_flow_amount mescal.modify_inventory.change_fossil_carbon_flows_of_biofuels mescal.modify_inventory.remove_quebec_flow_in_global_heat_market Module Contents --------------- .. py:function:: adapt_rest_of_the_world_activity_based_on_other_activity(db_name: str, activity_name: str, product_name: str, reference_activity_location: str) -> None Change one RoW activity by copying and adapting the same activity in another location :param db_name: name of the LCI database :param activity_name: name of the activity to be changed :param product_name: name of the reference product of the activity to be changed :param reference_activity_location: location of the activity to be used as reference :return: None (changes are saved in the database) .. py:function:: add_carbon_capture_to_plant(activity_database_name: str, premise_database_name: str, plant_type: str, activity_name: str = None, activity_code: str = None, capture_ratio: float = 0.95, change_activity_name: bool = False) -> None Add a carbon capture process to a technology, and modifies its direct carbon dioxide emissions :param activity_database_name: name of the LCI database in which the activity to modify is located :param premise_database_name: name of the premise LCI database where the carbon capture processes are located :param activity_name: name of the activity to be changed (to use only if the name of the activity is unique in the database) :param plant_type: type of the activity to be changed. Can be 'cement', 'hydrogen', 'municipal solid waste', 'synthetic natural gas', 'wood', 'hard coal', 'lignite', or 'natural gas'. :param activity_code: code of the activity to be changed :param capture_ratio: carbon capture ratio, i.e., direct carbon dioxide emissions reduction rate :param change_activity_name: if True, the activity name is changed to include 'with CCS' :return: None (changes are saved in the database) .. py:function:: add_carbon_dioxide_flow(db_name: str, amount: float, activity_name: str = None, activity_code: str = None, biosphere_db_name: str = None, co2_flow_type: str = 'fossil') -> None Add a carbon dioxide flow to an activity :param db_name: name of the LCI database :param activity_name: name of the activity to be changed (to use only if the name of the activity is unique in the database) :param activity_code: code of the activity to be changed :param amount: amount of the carbon dioxide flow :param biosphere_db_name: name of the biosphere database. Default is 'biosphere3'. :param co2_flow_type: type of carbon dioxide flow to add. Can be 'fossil', 'non-fossil', 'from soil or biomass stock', 'in air', or 'non-fossil, resource correction'. Default is 'fossil'. :return: None (changes are saved in the database) .. py:function:: change_dac_biogenic_carbon_flow(db_name: str, activity_name: str = None, activity_code: str = None, biosphere_db_name: str = None) -> None Change the biogenic carbon flow of premise DAC technologies to a fossil carbon flow :param db_name: name of the LCI database :param activity_name: name of the activity to be changed (to use only if the name of the activity is unique in the database) :param activity_code: code of the activity to be changed :param biosphere_db_name: name of the biosphere database. Default is 'biosphere3'. :return: None (changes are saved in the database) .. py:function:: change_direct_carbon_emissions_by_factor(db_name: str, activity_name: str = None, activity_code: str = None, factor: float = 1) -> None Change the direct emissions of an activity by a factor :param db_name: name of the LCI database :param activity_name: name of the activity to be changed (to use only if the name of the activity is unique in the database) :param activity_code: code of the activity to be changed :param factor: factor by which the direct emissions are multiplied :return: None (changes are saved in the database) .. py:function:: change_flow_amount(db_name: str, flow_code: str, flow_type: str = 'biosphere', new_value: float = 0.0, activity_code: str = None, activity_name: str = None) -> None Change the amount of a biosphere or technosphere flow in an activity :param db_name: name of the LCI database :param flow_code: code of the flow to be adjusted :param flow_type: type of the flow to be adjusted. Can be 'biosphere' or 'technosphere'. :param new_value: new amount of the flow :param activity_code: code of the activity into which the flow must be adjusted :param activity_name: name of the activity into which the flow must be adjusted :return: None (changes are saved in the database) .. py:function:: change_fossil_carbon_flows_of_biofuels(db_name: str, activity_name: str = None, activity_code: str = None, biogenic_ratio: float = 1, biosphere_db_name: str = None) -> None :param db_name: name of the LCI database :param activity_name: name of the activity to be changed (to use only if the name of the activity is unique in the database) :param activity_code: code of the activity to be changed :param biogenic_ratio: fraction of biogenic carbon in the biofuel. Default is 1 (100% biogenic). :param biosphere_db_name: name of the biosphere database. Default is 'biosphere3'. :return: None (changes are saved in the database) .. py:function:: remove_quebec_flow_in_global_heat_market(db_name: str, activity_name: str = None, activity_code: str = None) -> None Remove the Quebec heat flow in the global heat market activity :param db_name: name of the LCI database :param activity_name: name of the activity to be changed (to use only if the name of the activity is unique in the database) :param activity_code: code of the activity to be changed :return: None (changes are saved in the database)