DeltaE / Canada-U.S.-ElecTrade

The Role of U.S.-Canada Electricity Trade in North American Decarbonization Pathways
2 stars 0 forks source link

Create new OperationalLife.py file #117

Open Kiel-SFU opened 2 years ago

Kiel-SFU commented 2 years ago

Currently, ResidualCapacity.py generates ResidualCapacity.csv and OperationalLife.csv. This is because variables created when making OperationalLife.csv are needed to make ResidualCapacity.csv. We could have ResidualCapacity.py rely upon a new OperationalLife.py file that does its work separately.

For example, the data from the variable opLife are used in both the Operational Life and Residual Capacity parts of ResidualCapacity.py. https://github.com/DeltaE/Canada-U.S.-ElecTrade/blob/3873057f2135adea61c5c2f56621f084233067ca/scripts/ResidualCapacity.py#L39-L44

trevorb1 commented 2 years ago

Good idea! We will also need to make sure that ResidualCapacity.py is dependent on OperationalLife.py in the snakefile

trevorb1 commented 2 years ago

For reference on what we should break into the new operational_life.py file...

https://github.com/DeltaE/Canada-U.S.-ElecTrade/blob/c8af7e64fb1d8f70ad382e66536a674784c94682/scripts/ResidualCapacity.py#L31-L83