Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
finozzifa committed Sep 19, 2024
2 parents 5468643 + 17659b0 commit 43b5940
Show file tree
Hide file tree
Showing 8 changed files with 68 additions and 33 deletions.
49 changes: 21 additions & 28 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -170,13 +170,6 @@ The documentation is available here: [documentation](https://pypsa-earth.readthe
<sub><b>Fabian Hofmann</b></sub>
</a>
</td>
<td align="center">
<a href="https://github.com/hazemful">
<img src="https://avatars.githubusercontent.com/u/26235356?v=4" width="100;" alt="hazemful"/>
<br />
<sub><b>Null</b></sub>
</a>
</td>
<td align="center">
<a href="https://github.com/fneum">
<img src="https://avatars.githubusercontent.com/u/29101152?v=4" width="100;" alt="fneum"/>
Expand Down Expand Up @@ -204,15 +197,15 @@ The documentation is available here: [documentation](https://pypsa-earth.readthe
<br />
<sub><b>Justus Ilemobayo</b></sub>
</a>
</td></tr>
<tr>
</td>
<td align="center">
<a href="https://github.com/mnm-matin">
<img src="https://avatars.githubusercontent.com/u/45293386?v=4" width="100;" alt="mnm-matin"/>
<br />
<sub><b>Mnm-matin</b></sub>
</a>
</td>
</td></tr>
<tr>
<td align="center">
<a href="https://github.com/martacki">
<img src="https://avatars.githubusercontent.com/u/53824825?v=4" width="100;" alt="martacki"/>
Expand Down Expand Up @@ -247,15 +240,15 @@ The documentation is available here: [documentation](https://pypsa-earth.readthe
<br />
<sub><b>Koen Van Greevenbroek</b></sub>
</a>
</td></tr>
<tr>
</td>
<td align="center">
<a href="https://github.com/hazemakhalek">
<img src="https://avatars.githubusercontent.com/u/87850910?v=4" width="100;" alt="hazemakhalek"/>
<br />
<sub><b>Hazem</b></sub>
</a>
</td>
</td></tr>
<tr>
<td align="center">
<a href="https://github.com/energyLS">
<img src="https://avatars.githubusercontent.com/u/89515385?v=4" width="100;" alt="energyLS"/>
Expand Down Expand Up @@ -290,15 +283,15 @@ The documentation is available here: [documentation](https://pypsa-earth.readthe
<br />
<sub><b>Emmanuel Bolarinwa</b></sub>
</a>
</td></tr>
<tr>
</td>
<td align="center">
<a href="https://github.com/Tomkourou">
<img src="https://avatars.githubusercontent.com/u/5240283?v=4" width="100;" alt="Tomkourou"/>
<br />
<sub><b>Thomas Kouroughli</b></sub>
</a>
</td>
</td></tr>
<tr>
<td align="center">
<a href="https://github.com/GridGrapher">
<img src="https://avatars.githubusercontent.com/u/127969728?v=4" width="100;" alt="GridGrapher"/>
Expand Down Expand Up @@ -333,15 +326,15 @@ The documentation is available here: [documentation](https://pypsa-earth.readthe
<br />
<sub><b>Ekaterina-Vo</b></sub>
</a>
</td></tr>
<tr>
</td>
<td align="center">
<a href="https://github.com/finozzifa">
<img src="https://avatars.githubusercontent.com/u/167071962?v=4" width="100;" alt="finozzifa"/>
<br />
<sub><b>Finozzifa</b></sub>
</a>
</td>
</td></tr>
<tr>
<td align="center">
<a href="https://github.com/cpschau">
<img src="https://avatars.githubusercontent.com/u/124347782?v=4" width="100;" alt="cpschau"/>
Expand Down Expand Up @@ -376,15 +369,15 @@ The documentation is available here: [documentation](https://pypsa-earth.readthe
<br />
<sub><b>Carlos Fernandez</b></sub>
</a>
</td></tr>
<tr>
</td>
<td align="center">
<a href="https://github.com/stephenjlee">
<img src="https://avatars.githubusercontent.com/u/11340470?v=4" width="100;" alt="stephenjlee"/>
<br />
<sub><b>Stephen J Lee</b></sub>
</a>
</td>
</td></tr>
<tr>
<td align="center">
<a href="https://github.com/rsparks3">
<img src="https://avatars.githubusercontent.com/u/30065966?v=4" width="100;" alt="rsparks3"/>
Expand Down Expand Up @@ -419,15 +412,15 @@ The documentation is available here: [documentation](https://pypsa-earth.readthe
<br />
<sub><b>Siddharth Krishna</b></sub>
</a>
</td></tr>
<tr>
</td>
<td align="center">
<a href="https://github.com/pitmonticone">
<img src="https://avatars.githubusercontent.com/u/38562595?v=4" width="100;" alt="pitmonticone"/>
<br />
<sub><b>Pietro Monticone</b></sub>
</a>
</td>
</td></tr>
<tr>
<td align="center">
<a href="https://github.com/Netotse">
<img src="https://avatars.githubusercontent.com/u/89367243?v=4" width="100;" alt="Netotse"/>
Expand Down Expand Up @@ -462,15 +455,15 @@ The documentation is available here: [documentation](https://pypsa-earth.readthe
<br />
<sub><b>HanaElattar</b></sub>
</a>
</td></tr>
<tr>
</td>
<td align="center">
<a href="https://github.com/EmreYorat">
<img src="https://avatars.githubusercontent.com/u/93644024?v=4" width="100;" alt="EmreYorat"/>
<br />
<sub><b>EmreYorat</b></sub>
</a>
</td>
</td></tr>
<tr>
<td align="center">
<a href="https://github.com/AndreCNF">
<img src="https://avatars.githubusercontent.com/u/19359510?v=4" width="100;" alt="AndreCNF"/>
Expand Down
12 changes: 12 additions & 0 deletions config.default.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,18 @@ costs:
battery inverter: 0.
emission_prices: # in currency per tonne emission, only used with the option Ep
co2: 0.
# investment: # EUR/MW
# CCGT: 830000
# FOM: # %/year
# CCGT: 3.35
# VOM: # EUR/MWh
# CCGT: 4.2
# fuel: # EUR/MWh
# gas: 10.1
# lifetime: # years
# CCGT: 25.0
# efficiency: # per unit
# CCGT: 0.58


monte_carlo:
Expand Down
12 changes: 12 additions & 0 deletions config.tutorial.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,18 @@ costs:
battery inverter: 0.
emission_prices: # in currency per tonne emission, only used with the option Ep
co2: 0.
# investment: # EUR/MW
# CCGT: 830000
# FOM: # %/year
# CCGT: 3.35
# VOM: # EUR/MWh
# CCGT: 4.2
# fuel: # EUR/MWh
# gas: 10.1
# lifetime: # years
# CCGT: 25.0
# efficiency: # per unit
# CCGT: 0.58


monte_carlo:
Expand Down
6 changes: 6 additions & 0 deletions doc/configtables/costs.csv
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,9 @@ fill_values,--,float,"Default values if not specified for a technology in ``reso
marginal_cost,EUR/MWh,"Keys should be in the 'technology' column of ``resources/costs.csv``. Values can be any float.","For the given technologies, assumptions about their marginal operating costs are set to the corresponding value. Optional; overwrites cost assumptions from ``resources/costs.csv``."
emission_prices,,,"Specify exogenous prices for emission types listed in ``network.carriers`` to marginal costs."
-- co2,EUR/t,float,"Exogenous price of carbon-dioxide added to the marginal costs of fossil-fuelled generators according to their carbon intensity. Added through the keyword ``Ep`` in the ``{opts}`` wildcard only in the rule :mod:`prepare_network``."
investment,EUR/MW,"Keys should be in the 'technology' column of ``resources/costs.csv``. Values can be any float.","For the given technologies, provided values overwrites cost assumptions from ``resources/costs.csv``."
FOM,%/year,"Keys should be in the 'technology' column of ``resources/costs.csv``. Values can be any float.","For the given technologies, provided values overwrites Fixed Operations & Maintenance (FOM) assumptions from ``resources/costs.csv``."
VOM,EUR/MWh,"Keys should be in the 'technology' column of ``resources/costs.csv``. Values can be any float.","For the given technologies, provided values overwrites Variable Operations & Maintenance (VOM) assumptions from ``resources/costs.csv``."
fuel,EUR/MWh,"Keys should be in the 'technology' column of ``resources/costs.csv``. Values can be any float.","For the given technology, provided values overwrites fuel price assumptions from ``resources/costs.csv``."
lifetime,years,"Keys should be in the 'technology' column of ``resources/costs.csv``. Values can be any float.","For the given technology, provided values overwrites technology lifetime assumptions from ``resources/costs.csv``."
efficiency,--,"Keys should be in the 'technology' column of ``resources/costs.csv``. Values can be any float.","For the given technology, provided values overwrites efficiency assumptions from ``resources/costs.csv``."
2 changes: 1 addition & 1 deletion doc/configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,7 @@ Specifies the cost assumptions of the technologies considered. Cost information
.. literalinclude:: ../config.default.yaml
:language: yaml
:start-after: Costs Configuration
:end-at: co2:
:end-at: CCGT: 0.58

.. csv-table::
:header-rows: 1
Expand Down
2 changes: 2 additions & 0 deletions doc/release_notes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,10 @@ E.g. if a new rule becomes available describe how to use it `snakemake -j1 run_t

* Remove unused `countries_codes` argument from `load_GDP` function in `build_shapes.py` script, which was not being called as intended with positional arguments `PR #1069 <https://github.com/pypsa-meets-earth/pypsa-earth/pull/1069>`__
* Fixed problematic float parsing (`_parse_float`) in `clean_osm_data.py` to make sure all OSM lines are correctly accounted for `PR #1089 <https://github.com/pypsa-meets-earth/pypsa-earth/pull/1089>`__
* Add functionality to modify the cost assumptions using config files `PR #1097 <https://github.com/pypsa-meets-earth/pypsa-earth/pull/1097>`__

* Fix minor bug for advanced csp implementation `PR #1076 <https://github.com/pypsa-meets-earth/pypsa-earth/pull/1076>`__
* Fix minor bug in `build_powerplants.py` where the gas technology assignment incorrectly introduced NaN values for all powerplant technologies. `PR #1102 <https://github.com/pypsa-meets-earth/pypsa-earth/pull/1102>`__


PyPSA-Earth 0.4.0
Expand Down
12 changes: 12 additions & 0 deletions scripts/add_electricity.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,15 @@ def load_costs(tech_costs, config, elec_config, Nyears=1):

costs = costs.value.unstack().fillna(config["fill_values"])

for attr in ("investment", "lifetime", "FOM", "VOM", "efficiency", "fuel"):
overwrites = config.get(attr)
if overwrites is not None:
overwrites = pd.Series(overwrites)
costs.loc[overwrites.index, attr] = overwrites
logger.info(
f"Overwriting {attr} of {overwrites.index} to {overwrites.values}"
)

costs["capital_cost"] = (
(
calculate_annuity(costs["lifetime"], costs["discount rate"])
Expand Down Expand Up @@ -209,6 +218,9 @@ def costs_for_storage(store, link1, link2=None, max_hours=1.0):
if overwrites is not None:
overwrites = pd.Series(overwrites)
costs.loc[overwrites.index, attr] = overwrites
logger.info(
f"Overwriting {attr} of {overwrites.index} to {overwrites.values}"
)

return costs

Expand Down
6 changes: 2 additions & 4 deletions scripts/build_powerplants.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,10 +206,8 @@ def replace_natural_gas_technology(df: pd.DataFrame):
unique_tech_with_ng = df.loc[fueltype, "Technology"].unique()
unknown_techs = np.setdiff1d(unique_tech_with_ng, ["CCGT", "OCGT"])
if len(unknown_techs) > 0:
df.Technology.where(
fueltype,
df["Technology"].map({t: "CCGT" for t in unknown_techs}),
inplace=True,
df.loc[fueltype, "Technology"] = df.loc[fueltype, "Technology"].replace(
{t: "CCGT" for t in unknown_techs}
)
df["Fueltype"] = np.where(fueltype, df["Technology"], df["Fueltype"])
return df
Expand Down

0 comments on commit 43b5940

Please sign in to comment.