USEPA / ElectricityLCI

Creative Commons Zero v1.0 Universal
25 stars 11 forks source link

Incorrect output flow for "at grid; consumption mix" #238

Open dt-woods opened 7 months ago

dt-woods commented 7 months ago

The output from "at grid; consumption mix" processes is 120 V, but should be Electricity, AC, 2300-7650 V.

A little digging revealed:

  1. In run_net_trade() in init​​.py, "consumption mix" refers to "at grid" whilst "distribution mix" refers to "at user"; this distinction becomes important later on
  2. The former calls write_consumption_mix_to_dict(), which refers to eia_io_trading.py's olca_schema_consumption_mix() method.
  3. The olca_schema_consumption_mix() method utilizes process_dictionary_writer.py's exchange_table_creation_ref_cons() method.
  4. The exchange_table_creation_ref_cons() method uses the electricity_at_user_flow reference (from globals.py); note the disconnect between consumption mix and at user!

It appears the correct method to link with consumption mix is "exchange_table_creation_ref" in process_dictionary_writer.py.

dt-woods commented 5 months ago

First step: find out where olca_schema_consumption_mix is called. It be being applied to both "at user" and "at grid."

ssamkl commented 5 months ago

Solved by changing exchange_table_creation_ref_cons() to exchange_table_creation_ref() in eia_io_trading as stated above