Don't fix uniform ratios e.g. of 0.3:0.7 primary:secondary for steel
and aluminium, but convert the necessary amount of existing primary in
each country so that the overall ratio applies at European level.
This stops sudden swings from primary to secondary in countries
dominated by primary production.
Remove non-existing biomass from chemicals and cement, since these
need higher temperatures than achievable with residues and waste.
Increase biomass in pulp and paper (since already used extensively
here and T < 500), and replace methane with biomass in food, beverages
and tobacco, since temperatures needed are low (T < 500).
This allows us to control the substitution of natural gas for hydrogen
in NH3 production.
Remaining basic chemicals are olefins, BTX and chlorine.
For 2015 NH3 production, we use the USGS data source.
This was handled before in industry_sector_ratios.csv which was
confusing.
Now industry_sector_ratios.csv represents the genuine energy
consumption per tonne of material for each industrial route
(MWh/tMaterial).
An new file is created with ktMaterial/a in
industrial_production_per_country_tomorrow.csv which contains changes
to the fraction of primary/secondary routes compared to today's
production in industrial_production_per_country.csv.
This is less confusing I think.
Rather than taking a mean of the clustered connection costs.
Apply cost update also for overnight scenarios based on planning year.
Add land costs for onshore wind.
- add_brownfield.py: Have to make sure that for each CHP there is both
a heat and electric link, but they have different p_nom for each
CHP, so have to make sure we don't remove one without the other.
- solve_network.py: Make sure extra_functionality constraints for CHP
power-heat feasibility graph also work for non-extendable CHPs.
This simplifies the structure of add_brownfield.py dramatically.
Some other changes need to be make elsewhere because of name
changes (e.g. battery constraints in solve_network.py).
In order to calculate connection costs, average values for underground_fraction and average_distance are calculated for all the buses in the initial network mapped to the clustered network.
This reinstates old behaviour for both myopic and overnight foresight
settings.
Also account for the fact that the planning_horizon is now integer in
config.yaml rather than a string.
Previously they were distributed only by country to the first node in
the country.
Now conventional power plants are assigned to the correct node using
the bus map from PyPSA-Eur.
Wind and solar are distributed in each country by capacity factor.
The code has been refactored and a bug was fixed whereby total
capacities of wind and solar in each country were not correct.
Now the years in the config.yaml for myopic are integers not strings.
In prepare_costs, you need the min_count=1 in the sum so that it
generates NaNs for missing data (rather than 0) so that NaNs can be
subsituted by .fillna in the next line. Otherwise many values
(discount rates and efficiencies for solar, wind) are set to zero.
Also added carriers, storage and generators for coal, nuclear and
oil. (This needs to be organized better soon so that the carriers are
defined in config.yaml.)