Skip to content

Commit

Permalink
some cleaning
Browse files Browse the repository at this point in the history
  • Loading branch information
Sven Eggimann committed Dec 18, 2018
1 parent d2a37ea commit bb786ce
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 14 deletions.
2 changes: 0 additions & 2 deletions energy_demand/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,6 @@ def energy_demand_model(
print("weather_realisation: " + str(weather_realisation))

# Local path configurations
#path_weather_data = "X:/nismod/data/energy_demand/J-MARIUS_data/_weather_realisation"
path_weather_data = "C:/Users/cenv0553/ED/data/scenarios"
#path_weather_data = "/soge-home/staff/cenv0553/_weather_realisation"

Expand Down Expand Up @@ -311,7 +310,6 @@ def energy_demand_model(
load_parquet=False,
load_csv=True)

#print(station_id_253)
# Plot map with weather station
'''if config['CRITERIA']['cluster_calc'] != True:
data_loader.create_weather_station_map(
Expand Down
23 changes: 11 additions & 12 deletions energy_demand/scripts/init_scripts.py
Original file line number Diff line number Diff line change
Expand Up @@ -667,16 +667,15 @@ def sig_param_calc_incl_fuel_switch(
sig_param_tech[switch_yr] = {}

# -------------------------
# Get starting year of narrative story
# Get starting year of narrative
# -------------------------
# NEW TODO TODO
if switch_yr_cnt == 0:
switch_yr_start = base_yr
s_tech_last_narrative_step = s_tech_by_p #NEW
s_tech_last_narrative_step = s_tech_by_p

else: # If more than one switch_yr, then take previous year
switch_yr_start = switch_yrs[switch_yr_cnt - 1]
s_tech_last_narrative_step = s_tech_switched_p[any_region][switch_yr_start] #NEW
s_tech_last_narrative_step = s_tech_switched_p[any_region][switch_yr_start]

# ------------------------------------------
# Service switch
Expand All @@ -692,7 +691,7 @@ def sig_param_calc_incl_fuel_switch(
# Calculate sigmoid diffusion parameters
l_values_sig = s_generate_sigmoid.get_l_values(
technologies=technologies,
technologies_to_consider=s_tech_last_narrative_step.keys(), #s_tech_by_p.keys(),
technologies_to_consider=s_tech_last_narrative_step.keys(),
regions=regions)
elif crit_fuel_switch:
s_tech_switched_p = defaultdict(dict)
Expand All @@ -717,7 +716,7 @@ def sig_param_calc_incl_fuel_switch(
enduse_fuel_switches,
technologies,
s_fueltype_by_p,
s_tech_last_narrative_step, #s_tech_by_p,
s_tech_last_narrative_step,
fuel_tech_p_by,
'actual_switch')

Expand All @@ -726,9 +725,9 @@ def sig_param_calc_incl_fuel_switch(
s_tech_switched_p_values_all_regs,
enduse_fuel_switches,
technologies,
s_tech_last_narrative_step.keys(), #s_tech_by_p.keys(),
s_tech_last_narrative_step.keys(),
s_fueltype_by_p,
s_tech_last_narrative_step, #s_tech_by_p,
s_tech_last_narrative_step,
fuel_tech_p_by)

for region in regions:
Expand All @@ -745,7 +744,7 @@ def sig_param_calc_incl_fuel_switch(
enduse_fuel_switches,
technologies,
s_fueltype_by_p,
s_tech_last_narrative_step, #s_tech_by_p,
s_tech_last_narrative_step,
fuel_tech_p_by,
'actual_switch')

Expand All @@ -754,9 +753,9 @@ def sig_param_calc_incl_fuel_switch(
s_tech_switched_p[region][switch_yr],
enduse_fuel_switches,
technologies,
s_tech_last_narrative_step.keys(), #s_tech_by_p.keys(),
s_tech_last_narrative_step.keys(),
s_fueltype_by_p,
s_tech_last_narrative_step, #s_tech_by_p,
s_tech_last_narrative_step,
fuel_tech_p_by)

s_tech_switched_p = dict(s_tech_switched_p)
Expand All @@ -773,7 +772,7 @@ def sig_param_calc_incl_fuel_switch(
switch_yr_start,
technologies,
l_values_sig[any_region],
s_tech_last_narrative_step, #s_tech_by_p,
s_tech_last_narrative_step,
s_tech_switched_p[any_region][switch_yr])

for region in regions:
Expand Down

0 comments on commit bb786ce

Please sign in to comment.