@@ -24,8 +24,8 @@ def factory(cls, name: str, settings: Any) -> PresetSector:
2424 from muse .commodities import CommodityUsage
2525 from muse .readers import (
2626 read_attribute_table ,
27- read_csv_outputs ,
2827 read_macro_drivers ,
28+ read_presets ,
2929 read_regression_parameters ,
3030 read_timeslice_shares ,
3131 read_timeslices ,
@@ -40,7 +40,7 @@ def factory(cls, name: str, settings: Any) -> PresetSector:
4040 getattr (sector_conf , "timeslice_levels" , None )
4141 ).timeslice
4242 if getattr (sector_conf , "consumption_path" , None ) is not None :
43- consumption = read_csv_outputs (sector_conf .consumption_path )
43+ consumption = read_presets (sector_conf .consumption_path )
4444 presets ["consumption" ] = consumption .assign_coords (timeslice = timeslice )
4545 elif getattr (sector_conf , "demand_path" , None ) is not None :
4646 presets ["consumption" ] = read_attribute_table (sector_conf .demand_path )
@@ -89,7 +89,7 @@ def factory(cls, name: str, settings: Any) -> PresetSector:
8989 )
9090
9191 if getattr (sector_conf , "supply_path" , None ) is not None :
92- supply = read_csv_outputs (sector_conf .supply_path )
92+ supply = read_presets (sector_conf .supply_path )
9393 supply .coords ["timeslice" ] = presets .timeslice
9494 presets ["supply" ] = supply
9595
@@ -99,9 +99,9 @@ def factory(cls, name: str, settings: Any) -> PresetSector:
9999 getattr (sector_conf , "lcoe_path" , None ) is not None and "supply" in presets
100100 ):
101101 costs = (
102- read_csv_outputs (
102+ read_presets (
103103 sector_conf .lcoe_path ,
104- indices = ("RegionName" , "ProcessName" ),
104+ indices = ("RegionName" ,),
105105 columns = "timeslices" ,
106106 )
107107 * presets ["supply" ]
@@ -131,9 +131,6 @@ def factory(cls, name: str, settings: Any) -> PresetSector:
131131 [CommodityUsage .PRODUCT if u else CommodityUsage .OTHER for u in comm_usage ],
132132 )
133133 presets = presets .set_coords ("comm_usage" )
134- if "process" in presets .dims :
135- presets = presets .sum ("process" )
136-
137134 interpolation_mode = getattr (sector_conf , "interpolation_mode" , "linear" )
138135 return cls (presets , interpolation_mode = interpolation_mode , name = name )
139136
0 commit comments