Skip to content

Commit ecbeb35

Browse files
committed
Small change to allow lists in enduse column
1 parent f9ad220 commit ecbeb35

2 files changed

Lines changed: 13 additions & 9 deletions

File tree

docs/user-guide/add-solar.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@
325325
"source": [
326326
"We can now see that there is `solarPV` capacity in the power sector. That's great and means it worked! \n",
327327
"\n",
328-
"We can see that `solarPV` has a higher uptake than `gasCCGT`, and has almost entirely replaced `windturbine` in of the sector, which is likely due to the lower `cap_par` (capital cost) which makes it more favourable for investment. We can investigate this by changing the `cap_par` value for `solarPV`, which we will do in the next section."
328+
"We can see that `solarPV` has a higher uptake than `gasCCGT`, and has entirely replaced `windturbine` in of the sector, which is likely due to the lower `cap_par` (capital cost) which makes it more favourable for investment. We can investigate this by changing the `cap_par` value for `solarPV`, which we will do in the next section."
329329
]
330330
},
331331
{

src/muse/outputs/mca.py

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -437,11 +437,13 @@ def sector_lcoe(
437437
for agent in agents:
438438
agent_market = market.sel(year=agent.year).copy()
439439
agent_market["consumption"] = agent_market.consumption * agent.quantity
440-
included = [
441-
i
442-
for i in agent_market["commodity"].values
443-
if i in technologies.enduse.values
440+
enduses = [
441+
i.strip()
442+
for entry in technologies.enduse.values
443+
for i in entry.split(",")
444444
]
445+
# temporary hack to allow comma separated list in input file
446+
included = [i for i in agent_market["commodity"].values if i in enduses]
445447
excluded = [
446448
i for i in agent_market["commodity"].values if i not in included
447449
]
@@ -520,11 +522,13 @@ def sector_eac(
520522
for agent in agents:
521523
agent_market = market.sel(year=agent.year).copy()
522524
agent_market["consumption"] = agent_market.consumption * agent.quantity
523-
included = [
524-
i
525-
for i in agent_market["commodity"].values
526-
if i in technologies.enduse.values
525+
enduses = [
526+
i.strip()
527+
for entry in technologies.enduse.values
528+
for i in entry.split(",")
527529
]
530+
# temporary hack to allow comma separated list in input file
531+
included = [i for i in agent_market["commodity"].values if i in enduses]
528532
excluded = [
529533
i for i in agent_market["commodity"].values if i not in included
530534
]

0 commit comments

Comments
 (0)