NREL-reV 0.8.9__py3-none-any.whl → 0.9.2__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -391,7 +391,7 @@ class SupplyCurveExtent:
391
391
  }
392
392
  )
393
393
 
394
- self._points.index.name = SupplyCurveField.GID # sc_point_gid
394
+ self._points.index.name = "gid" # sc_point_gid
395
395
 
396
396
  return self._points
397
397
 
@@ -51,9 +51,9 @@ class AbstractSupplyCurvePoint(ABC):
51
51
 
52
52
  self._gid = gid
53
53
  self._resolution = resolution
54
- self._rows, self._cols = self._parse_slices(
55
- gid, resolution, exclusion_shape
56
- )
54
+ self._rows = self._cols = self._sc_row_ind = self._sc_col_ind = None
55
+ self._parse_sc_row_col_ind(resolution, exclusion_shape)
56
+ self._parse_slices(resolution, exclusion_shape)
57
57
 
58
58
  @staticmethod
59
59
  def _ordered_unique(seq):
@@ -74,32 +74,33 @@ class AbstractSupplyCurvePoint(ABC):
74
74
 
75
75
  return [x for x in seq if not (x in seen or seen.add(x))]
76
76
 
77
- def _parse_slices(self, gid, resolution, exclusion_shape):
78
- """Parse inputs for the definition of this SC point.
77
+ def _parse_sc_row_col_ind(self, resolution, exclusion_shape):
78
+ """Parse SC row and column index.
79
79
 
80
80
  Parameters
81
81
  ----------
82
- gid : int | None
83
- gid for supply curve point to analyze.
84
82
  resolution : int | None
85
83
  SC resolution, must be input in combination with gid.
86
84
  exclusion_shape : tuple
87
- Shape of the exclusions extent (rows, cols). Inputing this will
88
- speed things up considerably.
89
-
90
- Returns
91
- -------
92
- rows : slice
93
- Row slice to index the high-res layer (exclusions) for the gid in
94
- the agg layer (supply curve).
95
- cols : slice
96
- Col slice to index the high-res layer (exclusions) for the gid in
97
- the agg layer (supply curve).
85
+ Shape of the exclusions extent (rows, cols).
98
86
  """
87
+ n_sc_cols = int(np.ceil(exclusion_shape[1] / resolution))
88
+
89
+ self._sc_row_ind = self._gid // n_sc_cols
90
+ self._sc_col_ind = self._gid % n_sc_cols
99
91
 
100
- rows, cols = self.get_agg_slices(gid, exclusion_shape, resolution)
92
+ def _parse_slices(self, resolution, exclusion_shape):
93
+ """Parse row and column resource/generation grid slices.
101
94
 
102
- return rows, cols
95
+ Parameters
96
+ ----------
97
+ resolution : int | None
98
+ SC resolution, must be input in combination with gid.
99
+ exclusion_shape : tuple
100
+ Shape of the exclusions extent (rows, cols).
101
+ """
102
+ inds = self.get_agg_slices(self._gid, exclusion_shape, resolution)
103
+ self._rows, self._cols = inds
103
104
 
104
105
  @property
105
106
  def gid(self):
@@ -117,6 +118,16 @@ class AbstractSupplyCurvePoint(ABC):
117
118
  """
118
119
  return self._gid
119
120
 
121
+ @property
122
+ def sc_row_ind(self):
123
+ """int: Supply curve row index"""
124
+ return self._sc_row_ind
125
+
126
+ @property
127
+ def sc_col_ind(self):
128
+ """int: Supply curve column index"""
129
+ return self._sc_col_ind
130
+
120
131
  @property
121
132
  def resolution(self):
122
133
  """Get the supply curve grid aggregation resolution"""
@@ -1467,7 +1478,11 @@ class GenerationSupplyCurvePoint(AggregationSupplyCurvePoint):
1467
1478
  (resource) "gid" and "power_density columns".
1468
1479
  cf_dset : str | np.ndarray
1469
1480
  Dataset name from gen containing capacity factor mean values.
1470
- Can be pre-extracted generation output data in np.ndarray.
1481
+ This name is used to infer AC capacity factor dataset for
1482
+ solar runs (i.e. the AC vsersion of "cf_mean-means" would
1483
+ be inferred to be "cf_mean_ac-means"). This input can also
1484
+ be pre-extracted generation output data in np.ndarray, in
1485
+ which case all DC solar outputs are set to `None`.
1471
1486
  lcoe_dset : str | np.ndarray
1472
1487
  Dataset name from gen containing LCOE mean values.
1473
1488
  Can be pre-extracted generation output data in np.ndarray.
@@ -1489,7 +1504,7 @@ class GenerationSupplyCurvePoint(AggregationSupplyCurvePoint):
1489
1504
  recalc_lcoe : bool
1490
1505
  Flag to re-calculate the LCOE from the multi-year mean capacity
1491
1506
  factor and annual energy production data. This requires several
1492
- datasets to be aggregated in the h5_dsets input: system_capacity,
1507
+ datasets to be aggregated in the gen input: system_capacity,
1493
1508
  fixed_charge_rate, capital_cost, fixed_operating_cost,
1494
1509
  and variable_operating_cost.
1495
1510
  apply_exclusions : bool
@@ -1510,6 +1525,8 @@ class GenerationSupplyCurvePoint(AggregationSupplyCurvePoint):
1510
1525
  self._power_density = self._power_density_ac = power_density
1511
1526
  self._friction_layer = friction_layer
1512
1527
  self._recalc_lcoe = recalc_lcoe
1528
+ self._ssc = None
1529
+ self._slk = {}
1513
1530
 
1514
1531
  super().__init__(
1515
1532
  gid,
@@ -1684,6 +1701,30 @@ class GenerationSupplyCurvePoint(AggregationSupplyCurvePoint):
1684
1701
 
1685
1702
  return self._gen_data
1686
1703
 
1704
+ @property
1705
+ def gen_ac_data(self):
1706
+ """Get the generation ac capacity factor data array.
1707
+
1708
+ This output is only not `None` for solar runs where `cf_dset`
1709
+ was specified as a string.
1710
+
1711
+ Returns
1712
+ -------
1713
+ gen_ac_data : np.ndarray | None
1714
+ Multi-year-mean ac capacity factor data array for all sites
1715
+ in the generation data output file or `None` if none
1716
+ detected.
1717
+ """
1718
+
1719
+ if isinstance(self._cf_dset, np.ndarray):
1720
+ return None
1721
+
1722
+ ac_cf_dset = _infer_cf_dset_ac(self._cf_dset)
1723
+ if ac_cf_dset in self.gen.datasets:
1724
+ return self.gen[ac_cf_dset]
1725
+
1726
+ return None
1727
+
1687
1728
  @property
1688
1729
  def lcoe_data(self):
1689
1730
  """Get the LCOE data array.
@@ -1710,6 +1751,11 @@ class GenerationSupplyCurvePoint(AggregationSupplyCurvePoint):
1710
1751
  factor is weighted by the exclusions (usually 0 or 1, but 0.5
1711
1752
  exclusions will weight appropriately).
1712
1753
 
1754
+ This value represents DC capacity factor for solar and AC
1755
+ capacity factor for all other technologies. This is the capacity
1756
+ factor that should be used for all cost calculations for ALL
1757
+ technologies (to align with SAM).
1758
+
1713
1759
  Returns
1714
1760
  -------
1715
1761
  mean_cf : float | None
@@ -1721,6 +1767,45 @@ class GenerationSupplyCurvePoint(AggregationSupplyCurvePoint):
1721
1767
 
1722
1768
  return mean_cf
1723
1769
 
1770
+ @property
1771
+ def mean_cf_ac(self):
1772
+ """Get the mean AC capacity factor for the non-excluded data.
1773
+
1774
+ This output is only not `None` for solar runs.
1775
+
1776
+ Capacity factor is weighted by the exclusions (usually 0 or 1,
1777
+ but 0.5 exclusions will weight appropriately).
1778
+
1779
+ Returns
1780
+ -------
1781
+ mean_cf_ac : float | None
1782
+ Mean capacity factor value for the non-excluded data.
1783
+ """
1784
+ mean_cf_ac = None
1785
+ if self.gen_ac_data is not None:
1786
+ mean_cf_ac = self.exclusion_weighted_mean(self.gen_ac_data)
1787
+
1788
+ return mean_cf_ac
1789
+
1790
+ @property
1791
+ def mean_cf_dc(self):
1792
+ """Get the mean DC capacity factor for the non-excluded data.
1793
+
1794
+ This output is only not `None` for solar runs.
1795
+
1796
+ Capacity factor is weighted by the exclusions (usually 0 or 1,
1797
+ but 0.5 exclusions will weight appropriately).
1798
+
1799
+ Returns
1800
+ -------
1801
+ mean_cf_dc : float | None
1802
+ Mean capacity factor value for the non-excluded data.
1803
+ """
1804
+ if self.mean_cf_ac is not None:
1805
+ return self.mean_cf
1806
+
1807
+ return None
1808
+
1724
1809
  @property
1725
1810
  def mean_lcoe(self):
1726
1811
  """Get the mean LCOE for the non-excluded data.
@@ -1738,18 +1823,12 @@ class GenerationSupplyCurvePoint(AggregationSupplyCurvePoint):
1738
1823
  # year CF, but the output should be identical to the original LCOE and
1739
1824
  # so is not consequential).
1740
1825
  if self._recalc_lcoe:
1741
- required = (
1742
- "fixed_charge_rate",
1743
- "capital_cost",
1744
- "fixed_operating_cost",
1745
- "variable_operating_cost",
1746
- "system_capacity",
1747
- )
1748
- if self.mean_h5_dsets_data is not None and all(
1749
- k in self.mean_h5_dsets_data for k in required
1750
- ):
1826
+ required = ("fixed_charge_rate", "capital_cost",
1827
+ "fixed_operating_cost", "variable_operating_cost",
1828
+ "system_capacity")
1829
+ if all(self._sam_lcoe_kwargs.get(k) is not None for k in required):
1751
1830
  aep = (
1752
- self.mean_h5_dsets_data["system_capacity"]
1831
+ self._sam_lcoe_kwargs["system_capacity"]
1753
1832
  * self.mean_cf
1754
1833
  * 8760
1755
1834
  )
@@ -1757,11 +1836,11 @@ class GenerationSupplyCurvePoint(AggregationSupplyCurvePoint):
1757
1836
  # `system_capacity`, so no need to scale `capital_cost`
1758
1837
  # or `fixed_operating_cost` by anything
1759
1838
  mean_lcoe = lcoe_fcr(
1760
- self.mean_h5_dsets_data["fixed_charge_rate"],
1761
- self.mean_h5_dsets_data["capital_cost"],
1762
- self.mean_h5_dsets_data["fixed_operating_cost"],
1839
+ self._sam_lcoe_kwargs["fixed_charge_rate"],
1840
+ self._sam_lcoe_kwargs["capital_cost"],
1841
+ self._sam_lcoe_kwargs["fixed_operating_cost"],
1763
1842
  aep,
1764
- self.mean_h5_dsets_data["variable_operating_cost"],
1843
+ self._sam_lcoe_kwargs["variable_operating_cost"],
1765
1844
  )
1766
1845
 
1767
1846
  # alternative if lcoe was not able to be re-calculated from
@@ -1943,6 +2022,11 @@ class GenerationSupplyCurvePoint(AggregationSupplyCurvePoint):
1943
2022
  """Get the estimated capacity in MW of the supply curve point in the
1944
2023
  current resource class with the applied exclusions.
1945
2024
 
2025
+ This value represents DC capacity for solar and AC capacity for
2026
+ all other technologies. This is the capacity that should be used
2027
+ for all cost calculations for ALL technologies (to align with
2028
+ SAM).
2029
+
1946
2030
  Returns
1947
2031
  -------
1948
2032
  capacity : float
@@ -1961,7 +2045,7 @@ class GenerationSupplyCurvePoint(AggregationSupplyCurvePoint):
1961
2045
  """Get the AC estimated capacity in MW of the supply curve point in the
1962
2046
  current resource class with the applied exclusions.
1963
2047
 
1964
- This values is provided only for solar inputs that have
2048
+ This value is provided only for solar inputs that have
1965
2049
  the "dc_ac_ratio" dataset in the generation file. If these
1966
2050
  conditions are not met, this value is `None`.
1967
2051
 
@@ -1979,59 +2063,26 @@ class GenerationSupplyCurvePoint(AggregationSupplyCurvePoint):
1979
2063
  return self.area * self.power_density_ac
1980
2064
 
1981
2065
  @property
1982
- def sc_point_capital_cost(self):
1983
- """Get the capital cost for the entire SC point.
1984
-
1985
- This method scales the capital cost based on the included-area
1986
- capacity. The calculation requires 'capital_cost' and
1987
- 'system_capacity' in the generation file and passed through as
1988
- `h5_dsets`, otherwise it returns `None`.
1989
-
1990
- Returns
1991
- -------
1992
- sc_point_capital_cost : float | None
1993
- Total supply curve point capital cost ($).
1994
- """
1995
- if self.mean_h5_dsets_data is None:
1996
- return None
1997
-
1998
- required = ("capital_cost", "system_capacity")
1999
- if not all(k in self.mean_h5_dsets_data for k in required):
2000
- return None
2066
+ def capacity_dc(self):
2067
+ """Get the DC estimated capacity in MW of the supply curve point
2068
+ in the current resource class with the applied exclusions.
2001
2069
 
2002
- cap_cost_per_mw = (
2003
- self.mean_h5_dsets_data["capital_cost"]
2004
- / self.mean_h5_dsets_data["system_capacity"]
2005
- )
2006
- return cap_cost_per_mw * self.capacity
2007
-
2008
- @property
2009
- def sc_point_fixed_operating_cost(self):
2010
- """Get the fixed operating cost for the entire SC point.
2011
-
2012
- This method scales the fixed operating cost based on the
2013
- included-area capacity. The calculation requires
2014
- 'fixed_operating_cost' and 'system_capacity' in the generation
2015
- file and passed through as `h5_dsets`, otherwise it returns
2016
- `None`.
2070
+ This value is provided only for solar inputs that have
2071
+ the "dc_ac_ratio" dataset in the generation file. If these
2072
+ conditions are not met, this value is `None`.
2017
2073
 
2018
2074
  Returns
2019
2075
  -------
2020
- sc_point_fixed_operating_cost : float | None
2021
- Total supply curve point fixed operating cost ($).
2076
+ capacity : float | None
2077
+ Estimated AC capacity in MW of the supply curve point in the
2078
+ current resource class with the applied exclusions. Only not
2079
+ `None` for solar runs with "dc_ac_ratio" dataset in the
2080
+ generation file
2022
2081
  """
2023
- if self.mean_h5_dsets_data is None:
2024
- return None
2025
-
2026
- required = ("fixed_operating_cost", "system_capacity")
2027
- if not all(k in self.mean_h5_dsets_data for k in required):
2082
+ if self.power_density_ac is None:
2028
2083
  return None
2029
2084
 
2030
- fixed_cost_per_mw = (
2031
- self.mean_h5_dsets_data["fixed_operating_cost"]
2032
- / self.mean_h5_dsets_data["system_capacity"]
2033
- )
2034
- return fixed_cost_per_mw * self.capacity
2085
+ return self.area * self.power_density
2035
2086
 
2036
2087
  @property
2037
2088
  def sc_point_annual_energy(self):
@@ -2051,25 +2102,6 @@ class GenerationSupplyCurvePoint(AggregationSupplyCurvePoint):
2051
2102
 
2052
2103
  return self.mean_cf * self.capacity * 8760
2053
2104
 
2054
- @property
2055
- def sc_point_annual_energy_ac(self):
2056
- """Get the total AC annual energy (MWh) for the entire SC point.
2057
-
2058
- This value is computed using the AC capacity of the supply curve
2059
- point as well as the mean capacity factor. If either the mean
2060
- capacity factor or the AC capacity value is `None`, this value
2061
- will also be `None`.
2062
-
2063
- Returns
2064
- -------
2065
- sc_point_annual_energy_ac : float | None
2066
- Total AC annual energy (MWh) for the entire SC point.
2067
- """
2068
- if self.mean_cf is None or self.capacity_ac is None:
2069
- return None
2070
-
2071
- return self.mean_cf * self.capacity_ac * 8760
2072
-
2073
2105
  @property
2074
2106
  def h5_dsets_data(self):
2075
2107
  """Get any additional/supplemental h5 dataset data to summarize.
@@ -2104,6 +2136,72 @@ class GenerationSupplyCurvePoint(AggregationSupplyCurvePoint):
2104
2136
 
2105
2137
  return _h5_dsets_data
2106
2138
 
2139
+ @property
2140
+ def regional_multiplier(self):
2141
+ """float: Mean regional capital cost multiplier, defaults to 1."""
2142
+ if "capital_cost_multiplier" not in self.gen.datasets:
2143
+ return 1
2144
+
2145
+ multipliers = self.gen["capital_cost_multiplier"]
2146
+ return self.exclusion_weighted_mean(multipliers)
2147
+
2148
+ @property
2149
+ def fixed_charge_rate(self):
2150
+ """float: Mean fixed_charge_rate, defaults to 0."""
2151
+ if "fixed_charge_rate" not in self.gen.datasets:
2152
+ return 0
2153
+
2154
+ return self.exclusion_weighted_mean(self.gen["fixed_charge_rate"])
2155
+
2156
+ @property
2157
+ def _sam_system_capacity(self):
2158
+ """float: Mean SAM generation system capacity input, defaults to 0. """
2159
+ if self._ssc is not None:
2160
+ return self._ssc
2161
+
2162
+ self._ssc = 0
2163
+ if "system_capacity" in self.gen.datasets:
2164
+ self._ssc = self.exclusion_weighted_mean(
2165
+ self.gen["system_capacity"]
2166
+ )
2167
+
2168
+ return self._ssc
2169
+
2170
+ @property
2171
+ def _sam_lcoe_kwargs(self):
2172
+ """dict: Mean LCOE inputs, as passed to SAM during generation."""
2173
+ if self._slk:
2174
+ return self._slk
2175
+
2176
+ self._slk = {"capital_cost": None, "fixed_operating_cost": None,
2177
+ "variable_operating_cost": None,
2178
+ "fixed_charge_rate": None, "system_capacity": None}
2179
+
2180
+ for dset in self._slk:
2181
+ if dset in self.gen.datasets:
2182
+ self._slk[dset] = self.exclusion_weighted_mean(
2183
+ self.gen[dset]
2184
+ )
2185
+
2186
+ return self._slk
2187
+
2188
+ def _compute_cost_per_ac_mw(self, dset):
2189
+ """Compute a cost per AC MW for a given input. """
2190
+ if self._sam_system_capacity <= 0:
2191
+ return None
2192
+
2193
+ if dset not in self.gen.datasets:
2194
+ return None
2195
+
2196
+ sam_cost = self.exclusion_weighted_mean(self.gen[dset])
2197
+ sam_cost_per_mw = sam_cost / self._sam_system_capacity
2198
+ sc_point_cost = sam_cost_per_mw * self.capacity
2199
+
2200
+ ac_cap = (self.capacity
2201
+ if self.capacity_ac is None
2202
+ else self.capacity_ac)
2203
+ return sc_point_cost / ac_cap
2204
+
2107
2205
  @property
2108
2206
  def mean_h5_dsets_data(self):
2109
2207
  """Get the mean supplemental h5 datasets data (optional)
@@ -2194,39 +2292,55 @@ class GenerationSupplyCurvePoint(AggregationSupplyCurvePoint):
2194
2292
  ARGS = {
2195
2293
  SupplyCurveField.LATITUDE: self.latitude,
2196
2294
  SupplyCurveField.LONGITUDE: self.longitude,
2197
- SupplyCurveField.TIMEZONE: self.timezone,
2198
2295
  SupplyCurveField.COUNTRY: self.country,
2199
2296
  SupplyCurveField.STATE: self.state,
2200
2297
  SupplyCurveField.COUNTY: self.county,
2201
2298
  SupplyCurveField.ELEVATION: self.elevation,
2299
+ SupplyCurveField.TIMEZONE: self.timezone,
2300
+ SupplyCurveField.SC_POINT_GID: self.sc_point_gid,
2301
+ SupplyCurveField.SC_ROW_IND: self.sc_row_ind,
2302
+ SupplyCurveField.SC_COL_IND: self.sc_col_ind,
2202
2303
  SupplyCurveField.RES_GIDS: self.res_gid_set,
2203
2304
  SupplyCurveField.GEN_GIDS: self.gen_gid_set,
2204
2305
  SupplyCurveField.GID_COUNTS: self.gid_counts,
2205
2306
  SupplyCurveField.N_GIDS: self.n_gids,
2206
- SupplyCurveField.MEAN_CF: self.mean_cf,
2307
+ SupplyCurveField.OFFSHORE: self.offshore,
2308
+ SupplyCurveField.MEAN_CF_AC: (
2309
+ self.mean_cf if self.mean_cf_ac is None else self.mean_cf_ac
2310
+ ),
2311
+ SupplyCurveField.MEAN_CF_DC: self.mean_cf_dc,
2207
2312
  SupplyCurveField.MEAN_LCOE: self.mean_lcoe,
2208
2313
  SupplyCurveField.MEAN_RES: self.mean_res,
2209
- SupplyCurveField.CAPACITY: self.capacity,
2210
2314
  SupplyCurveField.AREA_SQ_KM: self.area,
2211
- }
2212
-
2213
- extra_atts = {
2214
- SupplyCurveField.CAPACITY_AC: self.capacity_ac,
2215
- SupplyCurveField.OFFSHORE: self.offshore,
2216
- SupplyCurveField.SC_POINT_CAPITAL_COST: self.sc_point_capital_cost,
2217
- SupplyCurveField.SC_POINT_FIXED_OPERATING_COST: (
2218
- self.sc_point_fixed_operating_cost
2315
+ SupplyCurveField.CAPACITY_AC_MW: (
2316
+ self.capacity if self.capacity_ac is None else self.capacity_ac
2219
2317
  ),
2220
- SupplyCurveField.SC_POINT_ANNUAL_ENERGY: (
2318
+ SupplyCurveField.CAPACITY_DC_MW: self.capacity_dc,
2319
+ SupplyCurveField.EOS_MULT: 1, # added later
2320
+ SupplyCurveField.REG_MULT: self.regional_multiplier,
2321
+ SupplyCurveField.SC_POINT_ANNUAL_ENERGY_MW: (
2221
2322
  self.sc_point_annual_energy
2222
2323
  ),
2223
- SupplyCurveField.SC_POINT_ANNUAL_ENERGY_AC: (
2224
- self.sc_point_annual_energy_ac
2324
+ SupplyCurveField.COST_SITE_OCC_USD_PER_AC_MW: (
2325
+ self._compute_cost_per_ac_mw("capital_cost")
2326
+ ),
2327
+ SupplyCurveField.COST_BASE_OCC_USD_PER_AC_MW: (
2328
+ self._compute_cost_per_ac_mw("base_capital_cost")
2329
+ ),
2330
+ SupplyCurveField.COST_SITE_FOC_USD_PER_AC_MW: (
2331
+ self._compute_cost_per_ac_mw("fixed_operating_cost")
2332
+ ),
2333
+ SupplyCurveField.COST_BASE_FOC_USD_PER_AC_MW: (
2334
+ self._compute_cost_per_ac_mw("base_fixed_operating_cost")
2335
+ ),
2336
+ SupplyCurveField.COST_SITE_VOC_USD_PER_AC_MW: (
2337
+ self._compute_cost_per_ac_mw("variable_operating_cost")
2225
2338
  ),
2339
+ SupplyCurveField.COST_BASE_VOC_USD_PER_AC_MW: (
2340
+ self._compute_cost_per_ac_mw("base_variable_operating_cost")
2341
+ ),
2342
+ SupplyCurveField.FIXED_CHARGE_RATE: self.fixed_charge_rate,
2226
2343
  }
2227
- for attr, value in extra_atts.items():
2228
- if value is not None:
2229
- ARGS[attr] = value
2230
2344
 
2231
2345
  if self._friction_layer is not None:
2232
2346
  ARGS[SupplyCurveField.MEAN_FRICTION] = self.mean_friction
@@ -2276,17 +2390,12 @@ class GenerationSupplyCurvePoint(AggregationSupplyCurvePoint):
2276
2390
  eos = EconomiesOfScale(cap_cost_scale, summary)
2277
2391
  summary[SupplyCurveField.RAW_LCOE] = eos.raw_lcoe
2278
2392
  summary[SupplyCurveField.MEAN_LCOE] = eos.scaled_lcoe
2279
- summary[SupplyCurveField.CAPITAL_COST_SCALAR] = eos.capital_cost_scalar
2280
- summary[SupplyCurveField.SCALED_CAPITAL_COST] = eos.scaled_capital_cost
2281
- if SupplyCurveField.SC_POINT_CAPITAL_COST in summary:
2282
- scaled_costs = (
2283
- summary[SupplyCurveField.SC_POINT_CAPITAL_COST]
2284
- * eos.capital_cost_scalar
2285
- )
2286
- summary[SupplyCurveField.SCALED_SC_POINT_CAPITAL_COST] = (
2287
- scaled_costs
2393
+ summary[SupplyCurveField.EOS_MULT] = eos.capital_cost_scalar
2394
+ cost = summary[SupplyCurveField.COST_SITE_OCC_USD_PER_AC_MW]
2395
+ if cost is not None:
2396
+ summary[SupplyCurveField.COST_SITE_OCC_USD_PER_AC_MW] = (
2397
+ cost * summary[SupplyCurveField.EOS_MULT]
2288
2398
  )
2289
-
2290
2399
  return summary
2291
2400
 
2292
2401
  @classmethod
@@ -2392,7 +2501,7 @@ class GenerationSupplyCurvePoint(AggregationSupplyCurvePoint):
2392
2501
  recalc_lcoe : bool
2393
2502
  Flag to re-calculate the LCOE from the multi-year mean capacity
2394
2503
  factor and annual energy production data. This requires several
2395
- datasets to be aggregated in the h5_dsets input: system_capacity,
2504
+ datasets to be aggregated in the gen input: system_capacity,
2396
2505
  fixed_charge_rate, capital_cost, fixed_operating_cost,
2397
2506
  and variable_operating_cost.
2398
2507
 
@@ -2429,4 +2538,18 @@ class GenerationSupplyCurvePoint(AggregationSupplyCurvePoint):
2429
2538
  if cap_cost_scale is not None:
2430
2539
  summary = point.economies_of_scale(cap_cost_scale, summary)
2431
2540
 
2541
+ for arg, val in summary.items():
2542
+ if val is None:
2543
+ summary[arg] = np.nan
2544
+
2432
2545
  return summary
2546
+
2547
+
2548
+ def _infer_cf_dset_ac(cf_dset):
2549
+ """Infer AC dataset name from input. """
2550
+ parts = cf_dset.split("-")
2551
+ if len(parts) == 1:
2552
+ return f"{cf_dset}_ac"
2553
+
2554
+ cf_name = "-".join(parts[:-1])
2555
+ return f"{cf_name}_ac-{parts[-1]}"