Fix unicode error due to dash before sawdust

A quick fix to https://github.com/PyPSA/pypsa-eur-sec/issues/79
This commit is contained in:
martavp 2020-12-30 12:14:08 +01:00
parent c623b82b39
commit 6a7b1d5450
2 changed files with 8 additions and 2 deletions

View File

@ -69,7 +69,7 @@ biomass:
year: 2030 year: 2030
scenario: "Med" scenario: "Med"
classes: classes:
solid biomass: ['Primary agricultural residues', 'Forestry energy residue', 'Secondary forestry residues', 'Secondary Forestry residues sawdust', 'Forestry residues from landscape care biomass', 'Municipal waste'] solid biomass: ['Primary agricultural residues', 'Forestry energy residue', 'Secondary forestry residues', 'Secondary Forestry residues sawdust', 'Forestry residues from landscape care biomass', 'Municipal waste']
not included: ['Bioethanol sugar beet biomass', 'Rapeseeds for biodiesel', 'sunflower and soya for Biodiesel', 'Starchy crops biomass', 'Grassy crops biomass', 'Willow biomass', 'Poplar biomass potential', 'Roundwood fuelwood', 'Roundwood Chips & Pellets'] not included: ['Bioethanol sugar beet biomass', 'Rapeseeds for biodiesel', 'sunflower and soya for Biodiesel', 'Starchy crops biomass', 'Grassy crops biomass', 'Willow biomass', 'Poplar biomass potential', 'Roundwood fuelwood', 'Roundwood Chips & Pellets']
biogas: ['Manure biomass potential', 'Sludge biomass'] biogas: ['Manure biomass potential', 'Sludge biomass']

View File

@ -1,3 +1,4 @@
# coding: utf-8
import pandas as pd import pandas as pd
@ -57,7 +58,12 @@ if __name__ == "__main__":
snakemake.input['jrc_potentials'] = "data/biomass/JRC Biomass Potentials.xlsx" snakemake.input['jrc_potentials'] = "data/biomass/JRC Biomass Potentials.xlsx"
snakemake.output = Dict() snakemake.output = Dict()
snakemake.output['biomass_potentials'] = 'data/biomass_potentials.csv' snakemake.output['biomass_potentials'] = 'data/biomass_potentials.csv'
snakemake.output['biomass_potentials_all']='resources/biomass_potentials_all.csv'
with open('config.yaml', encoding='utf8') as f: with open('config.yaml', encoding='utf8') as f:
snakemake.config = yaml.safe_load(f) snakemake.config = yaml.safe_load(f)
if 'Secondary Forestry residues sawdust' in snakemake.config['biomass']['classes']['solid biomass']:
snakemake.config['biomass']['classes']['solid biomass'].remove('Secondary Forestry residues sawdust')
snakemake.config['biomass']['classes']['solid biomass'].append('Secondary Forestry residues sawdust')
build_biomass_potentials() build_biomass_potentials()