diff --git a/config.default.yaml b/config.default.yaml index c1172bd1..8cf2af31 100644 --- a/config.default.yaml +++ b/config.default.yaml @@ -1,4 +1,4 @@ -version: 0.6.0 +version: 0.7.0 logging_level: INFO @@ -510,6 +510,7 @@ plotting: natural gas: '#e05b09' CCGT: '#a85522' CCGT marginal: '#a85522' + allam: '#B98F76' gas for industry co2 to atmosphere: '#692e0a' gas for industry co2 to stored: '#8a3400' gas for industry: '#853403' diff --git a/doc/conf.py b/doc/conf.py index de9908be..1f6c24f2 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -71,9 +71,9 @@ author = u'2019-2021 Tom Brown (KIT, TUB), Marta Victoria (Aarhus University), L # built documents. # # The short X.Y version. -version = u'0.6' +version = u'0.7' # The full version, including alpha/beta/rc tags. -release = u'0.6.0' +release = u'0.7.0' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/doc/release_notes.rst b/doc/release_notes.rst index 4700f27b..717836bb 100644 --- a/doc/release_notes.rst +++ b/doc/release_notes.rst @@ -8,6 +8,11 @@ Future release .. note:: This unreleased version currently may require the master branches of PyPSA, PyPSA-Eur, and the technology-data repository. +* new feature + +PyPSA-Eur-Sec 0.7.0 (16th February 2023) +======================================== + This release includes the addition of the European gas transmission network and incorporates retrofitting options to hydrogen. diff --git a/scripts/add_existing_baseyear.py b/scripts/add_existing_baseyear.py index 8e274d62..74b26211 100644 --- a/scripts/add_existing_baseyear.py +++ b/scripts/add_existing_baseyear.py @@ -178,7 +178,7 @@ def add_power_capacities_installed_before_baseyear(n, grouping_years, costs, bas busmap = pd.read_csv(snakemake.input.busmap, index_col=0).squeeze() inv_busmap = {} - for k, v in busmap.iteritems(): + for k, v in busmap.items(): inv_busmap[v] = inv_busmap.get(v, []) + [k] clustermaps = busmap_s.map(busmap) diff --git a/scripts/build_population_layouts.py b/scripts/build_population_layouts.py index fa5c7d28..ba64e10f 100644 --- a/scripts/build_population_layouts.py +++ b/scripts/build_population_layouts.py @@ -40,7 +40,7 @@ if __name__ == '__main__': reference = ["RS", "BA"] average = urban_fraction[reference].mean() fill_values = pd.Series({ct: average for ct in missing}) - urban_fraction = urban_fraction.append(fill_values) + urban_fraction = pd.concat([urban_fraction, fill_values]) # population in each grid cell pop_cells = pd.Series(I.dot(nuts3['pop'])) diff --git a/scripts/build_transport_demand.py b/scripts/build_transport_demand.py index a5aabc31..0045b882 100644 --- a/scripts/build_transport_demand.py +++ b/scripts/build_transport_demand.py @@ -28,8 +28,8 @@ def build_transport_demand(traffic_fn, airtemp_fn, nodes, nodal_transport_data): ## Get overall demand curve for all vehicles traffic = pd.read_csv( - traffic_fn, skiprows=2, usecols=["count"], squeeze=True - ) + traffic_fn, skiprows=2, usecols=["count"] + ).squeeze("columns") transport_shape = generate_periodic_profiles( dt_index=snapshots, @@ -118,7 +118,7 @@ def bev_availability_profile(fn, snapshots, nodes, options): Derive plugged-in availability for passenger electric vehicles. """ - traffic = pd.read_csv(fn, skiprows=2, usecols=["count"], squeeze=True) + traffic = pd.read_csv(fn, skiprows=2, usecols=["count"]).squeeze("columns") avail_max = options["bev_avail_max"] avail_mean = options["bev_avail_mean"] diff --git a/scripts/prepare_sector_network.py b/scripts/prepare_sector_network.py index d369df16..d0264c7d 100644 --- a/scripts/prepare_sector_network.py +++ b/scripts/prepare_sector_network.py @@ -527,6 +527,8 @@ def add_co2_tracking(n, options): e_nom_max = pd.read_csv(snakemake.input.sequestration_potential, index_col=0).squeeze() e_nom_max = e_nom_max.reindex(spatial.co2.locations).fillna(0.).clip(upper=upper_limit).mul(1e6) / annualiser # t e_nom_max = e_nom_max.rename(index=lambda x: x + " co2 stored") + else: + e_nom_max = np.inf n.madd("Store", spatial.co2.nodes, @@ -759,8 +761,8 @@ def add_ammonia(n, costs): carrier="Haber-Bosch", efficiency=1 / (cf_industry["MWh_elec_per_tNH3_electrolysis"] / cf_industry["MWh_NH3_per_tNH3"]), # output: MW_NH3 per MW_elec efficiency2=-cf_industry["MWh_H2_per_tNH3_electrolysis"] / cf_industry["MWh_elec_per_tNH3_electrolysis"], # input: MW_H2 per MW_elec - capital_cost=costs.at["Haber-Bosch synthesis", "fixed"], - lifetime=costs.at["Haber-Bosch synthesis", 'lifetime'] + capital_cost=costs.at["Haber-Bosch", "fixed"], + lifetime=costs.at["Haber-Bosch", 'lifetime'] ) n.madd("Link", @@ -2905,6 +2907,9 @@ if __name__ == "__main__": if "B" in opts: add_biomass(n, costs) + if options['ammonia']: + add_ammonia(n, costs) + if "I" in opts: add_industry(n, costs) @@ -2917,9 +2922,6 @@ if __name__ == "__main__": if options['dac']: add_dac(n, costs) - if options['ammonia']: - add_ammonia(n, costs) - if "decentral" in opts: decentral(n)