Powerplants (#94)
* add nice carrier names to n.carriers * closes #48 * update environment
This commit is contained in:
parent
7141ce9e5c
commit
0ea5a5c28f
@ -46,4 +46,4 @@ dependencies:
|
||||
- git+https://github.com/PyPSA/glaes.git#egg=glaes
|
||||
- git+https://github.com/PyPSA/geokit.git#egg=geokit
|
||||
- cdsapi
|
||||
- powerplantmatching
|
||||
- powerplantmatching>=0.4.2
|
||||
|
@ -577,6 +577,11 @@ def add_emission_prices(n, emission_prices=None, exclude_co2=False):
|
||||
n.generators['marginal_cost'] += n.generators.carrier.map(ep)
|
||||
n.storage_units['marginal_cost'] += n.storage_units.carrier.map(ep)
|
||||
|
||||
def add_nice_carrier_names(n):
|
||||
nice_names = pd.Series(snakemake.config['plotting']['nice_names'])
|
||||
n.carriers['nice_names'] = nice_names[n.carriers.index]
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
# Detect running outside of snakemake and mock snakemake for testing
|
||||
if 'snakemake' not in globals():
|
||||
@ -615,5 +620,6 @@ if __name__ == "__main__":
|
||||
attach_storage(n, costs)
|
||||
|
||||
estimate_renewable_capacities(n)
|
||||
add_nice_carrier_names(n)
|
||||
|
||||
n.export_to_netcdf(snakemake.output[0])
|
||||
|
@ -103,6 +103,7 @@ if __name__ == "__main__":
|
||||
countries = n.buses.country.unique()
|
||||
|
||||
ppl = (pm.powerplants(from_url=True)
|
||||
.powerplant.fill_missing_decommyears()
|
||||
.powerplant.convert_country_to_alpha2()
|
||||
.query('Fueltype not in ["Solar", "Wind"] and Country in @countries')
|
||||
.replace({'Technology': {'Steam Turbine': 'OCGT'}})
|
||||
|
Loading…
Reference in New Issue
Block a user