Skip to content

Commit

Permalink
fix udc powerplant fuels
Browse files Browse the repository at this point in the history
  • Loading branch information
trevorb1 committed Oct 7, 2024
1 parent ea6f89a commit a85e95b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -137,25 +137,16 @@ def set_user_defined_capacity(tech_capacity, op_life_dict, df_tech_set,
'MODE_OF_OPERATION',
'YEAR']
)
# IAR in modes 1 and 2 are primary electricity commodity ('ELC*01') in
# node_from and node_to, respectively.
# OAR is the inverse of the above
df_iar_custom.loc[df_iar_custom['MODE_OF_OPERATION']==1,
'FUEL'] = ('ELC' +
df_iar_custom['TECHNOLOGY'].str[3:8] +
'01')
df_iar_custom.loc[df_iar_custom['MODE_OF_OPERATION']==2,
'FUEL'] = ('ELC' +
df_iar_custom['TECHNOLOGY'].str[8:13] +
'01')
df_oar_custom.loc[df_iar_custom['MODE_OF_OPERATION']==1,
'FUEL'] = ('ELC' +
df_oar_custom['TECHNOLOGY'].str[8:13] +
'01')
df_oar_custom.loc[df_iar_custom['MODE_OF_OPERATION']==2,
'FUEL'] = ('ELC' +
df_oar_custom['TECHNOLOGY'].str[3:8] +
'01')

df_iar_custom.loc[df_iar_custom['MODE_OF_OPERATION']==1,'FUEL'] = (
df_iar_custom['TECHNOLOGY'].str[3:9])
df_iar_custom.loc[df_iar_custom['MODE_OF_OPERATION']==2,'FUEL'] = (
df_iar_custom['TECHNOLOGY'].str[3:6] + "INT")
df_oar_custom.loc[df_oar_custom['MODE_OF_OPERATION']==1,'FUEL'] = (
'ELC' + df_oar_custom['TECHNOLOGY'].str[6:11] + '01')
df_oar_custom.loc[df_oar_custom['MODE_OF_OPERATION']==2,'FUEL'] = (
'ELC' + df_oar_custom['TECHNOLOGY'].str[6:11] + '01')

df_iar_custom['VALUE'] = DF_IAR_CUSTOM_VAL
df_oar_custom['VALUE'] = DF_OAR_CUSTOM_VAL
df_iar_custom['REGION'] = region_name
Expand Down
2 changes: 1 addition & 1 deletion workflow/snakefile
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ rule generate_input_data:
message:
"Generating input CSV data..."
input:
csv_files = expand('results/{scenario}/data/{csv}', scenario=config['scenario'], csv=OTOOLE_PARAMS),
csv_files = expand('results/{scenario}/data/{csv}.csv', scenario=config['scenario'], csv=OTOOLE_PARAMS),

rule make_dag:
message:
Expand Down

0 comments on commit a85e95b

Please sign in to comment.