Skip to content

Commit

Permalink
Merge pull request #158 from nismod/p3_weather_final
Browse files Browse the repository at this point in the history
updated for model runs and plotting
  • Loading branch information
eggimasv committed Feb 21, 2019
2 parents 66339e2 + 8dc9f8f commit 7e65cd8
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 12 deletions.
2 changes: 2 additions & 0 deletions docs/documentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -556,6 +556,8 @@ To calculate regional daily hourly load heating profiles, hourly temperature dat
- The station ID can be retreived [here](http://badc.nerc.ac.uk/cgi-bin/midas_stations/search_by_name.cgi.py?name=&minyear=&maxyear=)
- Metadatda of raw data can be found [here](http://artefacts.ceda.ac.uk/badc_datadocs/ukmo-midas/WH_Table.html)

Alternatively, daily minimum and maximum temperature data can be downloaded from the [ weather@home dataset](https://catalogue.ceda.ac.uk/uuid/0cea8d7aca57427fae92241348ae9b03).

### 4.5 Census data
Employment statistics from the census (Office for National Statistics 2011)
are used to disaggregate industry related energy demands for different end uses and sectors.
Expand Down
11 changes: 3 additions & 8 deletions energy_demand/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
----
Always execute from root folder and pass the path to the .ini file as argument:
Example:
Examples
python energy_demand/energy_demand/main.py C:/Users/cenv0553/ed/energy_demand/local_run_config_file.ini test_run
python energy_demand/energy_demand/main.py C:/Users/cenv0553/ed/energy_demand/local_run_config_file.ini h_max NF1 h_max
"""
Expand Down Expand Up @@ -94,8 +94,6 @@ def energy_demand_model(

data = {}
sim_yrs = [2015, 2020, 2025, 2030, 2035, 2040, 2045, 2050]
sim_yrs = [2015, 2050]


if len(sys.argv) > 3: #user defined arguments are provide
print("Arguments taken from comand line")
Expand All @@ -122,14 +120,11 @@ def energy_demand_model(
path_weather_data = "/soge-home/staff/cenv0553/_weather_realisation"
else:
path_weather_data = "C:/Users/cenv0553/ED/data/scenarios"
#path_weather_data = "//linux-filestore.ouce.ox.ac.uk/mistral/nismod/data/energy_demand/J-MARIUS_data/_weather_realisation"
#path_ = 'L:\_weather_realisation'
#path_weather_data = "/soge-home/staff/cenv0553/_weather_realisation"

if name_config_path == 'h_max' or name_config_path == 'l_max' or name_config_path in ['test_run', 'h_max_0', 'h_max_10', 'h_max_0_only', 'h_max_10_only']:
local_scenario = 'pop-b_econ-c_fuel-c' #high
local_scenario = 'pop-b_econ-c_fuel-c'
elif name_config_path == 'h_min' or name_config_path == 'l_min' or name_config_path in ['h_min_zero', 'h_min_5dm', 'h_min_10dm']:
local_scenario = 'pop-f_econ-c_fuel-c' #low
local_scenario = 'pop-f_econ-c_fuel-c'

# --- Paths
path_strategy_vars = os.path.join(config['DATA_PATHS']['path_strategy_vars'], name_config_path)
Expand Down
4 changes: 2 additions & 2 deletions energy_demand/plotting/fig_3_plot_over_time.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,8 +223,8 @@ def scenario_over_time(
#two_std_line_neg.plot.line(color=color, linestyle='--', linewidth=0.1, label='_nolegend_')

# plot min and maximum values
plt.plot(sim_yrs_smoothed, min_values, color=color, linestyle='--', linewidth=0.1, label='_nolegend_')
plt.plot(sim_yrs_smoothed, max_values, color=color, linestyle='--', linewidth=0.1, label='_nolegend_')
plt.plot(sim_yrs_smoothed, min_values, color=color, linestyle='--', linewidth=0.3, label='_nolegend_')
plt.plot(sim_yrs_smoothed, max_values, color=color, linestyle='--', linewidth=0.3, label='_nolegend_')

plt.fill_between(
sim_yrs_smoothed,
Expand Down
2 changes: 1 addition & 1 deletion energy_demand/result_processing/p3_weather_plots.py
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ def main(
# Plot national sum over time per fueltype and scenario
# ------------------------------
try:
crit_smooth_line = False
crit_smooth_line = True
seperate_legend = True
print("... plotting national sum of fueltype over time ")
fig_3_plot_over_time.fueltypes_over_time(
Expand Down
1 change: 0 additions & 1 deletion energy_demand/result_processing/p3_weather_results.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@

# Scenario definitions
all_scenarios = ['h_max']#, 'h_min', 'l_max', 'l_min']
all_scenarios = ['l_min']
fueltypes = ['electricity', 'gas', 'hydrogen']
folder_types = ['mean', 'pos_two_sigma', 'neg_two_sigma']
simulation_yrs = range(2015, 2051, 5)
Expand Down

0 comments on commit 7e65cd8

Please sign in to comment.