NREL-reV 0.9.4__py3-none-any.whl → 0.9.6__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.
- {NREL_reV-0.9.4.dist-info → NREL_reV-0.9.6.dist-info}/METADATA +1 -1
- {NREL_reV-0.9.4.dist-info → NREL_reV-0.9.6.dist-info}/RECORD +13 -13
- reV/SAM/SAM.py +5 -0
- reV/SAM/generation.py +4 -63
- reV/bespoke/bespoke.py +61 -17
- reV/handlers/multi_year.py +5 -4
- reV/supply_curve/points.py +4 -4
- reV/utilities/__init__.py +2 -2
- reV/version.py +1 -1
- {NREL_reV-0.9.4.dist-info → NREL_reV-0.9.6.dist-info}/LICENSE +0 -0
- {NREL_reV-0.9.4.dist-info → NREL_reV-0.9.6.dist-info}/WHEEL +0 -0
- {NREL_reV-0.9.4.dist-info → NREL_reV-0.9.6.dist-info}/entry_points.txt +0 -0
- {NREL_reV-0.9.4.dist-info → NREL_reV-0.9.6.dist-info}/top_level.txt +0 -0
@@ -1,11 +1,11 @@
|
|
1
1
|
reV/__init__.py,sha256=tXTpWu_qVo3uotfSw_TJ-gNbidGaIPPfUTwBlpCMJ-g,856
|
2
2
|
reV/cli.py,sha256=jfGGOr6QlLz8ghA7vBgx5-VgNsy4bBQo5DdHk42-q9A,1601
|
3
|
-
reV/version.py,sha256=
|
4
|
-
reV/SAM/SAM.py,sha256=
|
3
|
+
reV/version.py,sha256=KF4QzcLGqzm27juljTNM1yxsem90POzBTRbnNXt30no,50
|
4
|
+
reV/SAM/SAM.py,sha256=1xuxs2gb1wsgbBkhj3mdQVDuSWbp5T5Bh7kLRl69pkg,32258
|
5
5
|
reV/SAM/__init__.py,sha256=LJqoncyKDY5ZP5WA4kboh561bce11F9Ge645Izah0EY,240
|
6
6
|
reV/SAM/defaults.py,sha256=2zqT_mfrVtbvU7Pe6H4anNtiVkIyQbuJcGIOARzEsbM,7193
|
7
7
|
reV/SAM/econ.py,sha256=dFhtUXp5eozSsPyk0XXji0HGexKJnxoct8cwE1ApHVg,20704
|
8
|
-
reV/SAM/generation.py,sha256=
|
8
|
+
reV/SAM/generation.py,sha256=vUM2DUHCsKh_FBzuUKtFsq_oUXxm47c-oP33KvfA7Ow,86524
|
9
9
|
reV/SAM/version_checker.py,sha256=q-eXsmSB08A5hSelNH7uAe_bqPpqjsxaiS3OBjXBs-0,3997
|
10
10
|
reV/SAM/windbos.py,sha256=fnq1uxtSl-vtJth0gTlHkCSsmvDbRROCo9RGdqA7hK4,7504
|
11
11
|
reV/SAM/defaults/USA AZ Phoenix Sky Harbor Intl Ap (TMY3).csv,sha256=8QorTX0ACjgPgNV7kLSpTHOqfY4E17gkkpKB-qseiFk,406896
|
@@ -14,7 +14,7 @@ reV/SAM/defaults/US_Wave.csv,sha256=wvn9vGl9ZGKVHbCyq4muhMI6x1-nAaQfDS3hC4ftwBA,
|
|
14
14
|
reV/SAM/defaults/geothermal.json,sha256=ivxnpxkfBrEl1MwLKXClLJfTfvF5UrbN87wpC_BFLck,2598
|
15
15
|
reV/SAM/defaults/i_pvwattsv5.json,sha256=pZpNlK5MiowZmNwY7i9XRWp9G8pPLirwdBWCMVJVuKE,312
|
16
16
|
reV/bespoke/__init__.py,sha256=vpXbyBUrUsTgK8UP_LafMjLiDg2CRG9WZLHPsOJoxek,109
|
17
|
-
reV/bespoke/bespoke.py,sha256=
|
17
|
+
reV/bespoke/bespoke.py,sha256=LNPxdu_TK6GrgiGmtQJt0IE6TaAsXv22RYit0daravg,113475
|
18
18
|
reV/bespoke/cli_bespoke.py,sha256=nZc6rJlfxH2IXUz9bym4EO-C1k6VvulgweWoRrMg_cE,3028
|
19
19
|
reV/bespoke/gradient_free.py,sha256=URWV1yiO2jyWk3_GOpfpLV_wlgJhXXGmTUwCB3WTV0Y,12015
|
20
20
|
reV/bespoke/pack_turbs.py,sha256=l4btC2dPZkLvDgAAGVhAYgAZDbvwimGYRdrQDq0xT68,3740
|
@@ -51,7 +51,7 @@ reV/handlers/__init__.py,sha256=N7KfWbXfHLizMpoUw6yo0egbyq3jb9QL4YouBLUf4mI,130
|
|
51
51
|
reV/handlers/cli_collect.py,sha256=QRjhuJ1lV4BwGoguu0m4etrNRPMXGIZlijNyYsb7_5U,799
|
52
52
|
reV/handlers/cli_multi_year.py,sha256=xMAQ70lVUMAPM10EkZwc_FreQLjnzQ9VmKl48MS1SO0,660
|
53
53
|
reV/handlers/exclusions.py,sha256=_s-LHbjHAAHSIM6tFXCoJlLKcv0FBxbm6JAmuE_X_-I,12266
|
54
|
-
reV/handlers/multi_year.py,sha256=
|
54
|
+
reV/handlers/multi_year.py,sha256=nLskop2crDnRfd0DwnFw6SZZBqgiJbf9BABtr7u4j7w,30789
|
55
55
|
reV/handlers/outputs.py,sha256=VbSPFwA0ZH-oWUCCtef7zGyPbWXKY07ilPzpZIOMmuc,6034
|
56
56
|
reV/handlers/transmission.py,sha256=JzpmiweCez7vzGSutO21XIbG9czY_H6ysg_R7z290w0,25610
|
57
57
|
reV/hybrids/__init__.py,sha256=oBrJSt9WeBlER7GVd-NEJgVqFlasl0WuyHJRMgLgpAY,133
|
@@ -79,19 +79,19 @@ reV/supply_curve/cli_supply_curve.py,sha256=e-XrHQIe4OqWTL6u-TUAyHrw7Alk7vkXQ2Ho
|
|
79
79
|
reV/supply_curve/competitive_wind_farms.py,sha256=eOjM72-4oWtsqxB7Wh2gnB2zVAt4LY3iPE_DqWdXbQ4,15795
|
80
80
|
reV/supply_curve/exclusions.py,sha256=4-ZxTO5Vlu03vie0V_74uvdajQfCuC8FE96Pg8I4U_c,42950
|
81
81
|
reV/supply_curve/extent.py,sha256=a31po753hXSxQ8lfcCvpE8hoKc4bY7MmYq0NO0jtdqA,17414
|
82
|
-
reV/supply_curve/points.py,sha256=
|
82
|
+
reV/supply_curve/points.py,sha256=Wk95hMQtsSqjz-rkQrKKoedzI1LWU--_N5KjhPVPRik,86126
|
83
83
|
reV/supply_curve/sc_aggregation.py,sha256=R_h3xXKum4JTYMuq2us0rWhW0t2wm-G9Wj2on1d8FeY,61604
|
84
84
|
reV/supply_curve/supply_curve.py,sha256=igbloCkvYQwaH4zjbrYO17J7TtCTX5dKkk-TnlGJJeY,69931
|
85
85
|
reV/supply_curve/tech_mapping.py,sha256=nfqPIj9o1pllX3aRC1Hi2KGXYJOYy68Vbvr_1asNmFk,18573
|
86
|
-
reV/utilities/__init__.py,sha256=
|
86
|
+
reV/utilities/__init__.py,sha256=xmF0CVqjZ_KY__MxW_3BGWlWr4MWWRgPk38j4qbn76A,10536
|
87
87
|
reV/utilities/cli_functions.py,sha256=1_T_sXz0Ct8lW-vOk3mMRcpD6NYsc9cGI7dEujIi9z4,3864
|
88
88
|
reV/utilities/curtailment.py,sha256=fu48Lje-iyd2Awfe-6jFebvgcKSeJ3daNNTqjFI2GvM,4963
|
89
89
|
reV/utilities/exceptions.py,sha256=f7sRGsbFLpmL6Caq_H1cD4GfVhnLMyvYUsLPA1UVDDE,3974
|
90
90
|
reV/utilities/pytest_utils.py,sha256=T22NFEGxPOc9wRwgy0Pt2cHvw3Vam9cKwUj4AkzI7bU,3244
|
91
91
|
reV/utilities/slots.py,sha256=xsw-JuUVZ0YeoCNuwP_HxGNxFMA4xRs1tuImXHIJqaU,2618
|
92
|
-
NREL_reV-0.9.
|
93
|
-
NREL_reV-0.9.
|
94
|
-
NREL_reV-0.9.
|
95
|
-
NREL_reV-0.9.
|
96
|
-
NREL_reV-0.9.
|
97
|
-
NREL_reV-0.9.
|
92
|
+
NREL_reV-0.9.6.dist-info/LICENSE,sha256=hDwoTANtan2ZpufBlXm5C3W_PJ-mCqItvlcobgjxL7k,1526
|
93
|
+
NREL_reV-0.9.6.dist-info/METADATA,sha256=TQcTyDvHLg4eaG9P931K6OUt0nAVQaEqYv8rM6yJHjY,10279
|
94
|
+
NREL_reV-0.9.6.dist-info/WHEEL,sha256=eOLhNAGa2EW3wWl_TU484h7q1UNgy0JXjjoqKoxAAQc,92
|
95
|
+
NREL_reV-0.9.6.dist-info/entry_points.txt,sha256=KGtPEOQRZMSqKXjjv5jt_T4e4HQN0fHiaGdAWwTtuW4,617
|
96
|
+
NREL_reV-0.9.6.dist-info/top_level.txt,sha256=S6YF2ZYgXUB6n28SY0K2H8YB9tMJdXQ9CyQbo6VC89M,4
|
97
|
+
NREL_reV-0.9.6.dist-info/RECORD,,
|
reV/SAM/SAM.py
CHANGED
@@ -927,6 +927,9 @@ class RevPySam(Sam):
|
|
927
927
|
|
928
928
|
def _add_cost_defaults(sam_inputs):
|
929
929
|
"""Add default values for required cost outputs if they are missing. """
|
930
|
+
if sam_inputs.get("__already_added_cost_defaults"):
|
931
|
+
return
|
932
|
+
|
930
933
|
sam_inputs.setdefault("fixed_charge_rate", None)
|
931
934
|
|
932
935
|
reg_mult = sam_inputs.setdefault("capital_cost_multiplier", 1)
|
@@ -943,6 +946,8 @@ def _add_cost_defaults(sam_inputs):
|
|
943
946
|
else:
|
944
947
|
sam_inputs["capital_cost"] = None
|
945
948
|
|
949
|
+
sam_inputs["__already_added_cost_defaults"] = True
|
950
|
+
|
946
951
|
|
947
952
|
def _add_sys_capacity(sam_inputs):
|
948
953
|
"""Add system capacity SAM input if it is missing. """
|
reV/SAM/generation.py
CHANGED
@@ -1546,23 +1546,6 @@ class Geothermal(AbstractSamGenerationFromWeatherFile):
|
|
1546
1546
|
- ``conversion_type`` : Integer flag representing the conversion
|
1547
1547
|
plant type. Either Binary (0) or Flash (1). Only values of 0
|
1548
1548
|
or 1 allowed.
|
1549
|
-
- ``design_temp`` : EGS plant design temperature (in C). Only
|
1550
|
-
affects EGS runs. This value may be adjusted internally by
|
1551
|
-
``reV`` under the following conditions:
|
1552
|
-
|
1553
|
-
- The design temperature is larger than the resource
|
1554
|
-
temperature
|
1555
|
-
- The design temperature is lower than the resource
|
1556
|
-
temperature by a factor of ``MAX_RT_TO_EGS_RATIO``
|
1557
|
-
|
1558
|
-
If either of these conditions are true, the ``design_temp`` is
|
1559
|
-
adjusted to match the resource temperature input in order to
|
1560
|
-
avoid SAM errors.
|
1561
|
-
- ``set_EGS_PDT_to_RT`` : Boolean flag to set EGS design
|
1562
|
-
temperature to match the resource temperature input. If this
|
1563
|
-
is ``True``, the ``design_temp`` input is ignored. This helps
|
1564
|
-
avoid SAM/GETEM errors when the plant design temperature is
|
1565
|
-
too high/low compared to the resource temperature.
|
1566
1549
|
- ``geotherm.cost.inj_prod_well_ratio`` : Fraction representing
|
1567
1550
|
the injection to production well ratio (0-1). SAM GUI defaults
|
1568
1551
|
to 0.5 for this value, but it is recommended to set this to
|
@@ -1632,10 +1615,6 @@ class Geothermal(AbstractSamGenerationFromWeatherFile):
|
|
1632
1615
|
|
1633
1616
|
"""
|
1634
1617
|
|
1635
|
-
# Per Matt Prilliman on 2/22/24, it's unclear where this ratio originates,
|
1636
|
-
# but SAM errors out if it's exceeded.
|
1637
|
-
MAX_RT_TO_EGS_RATIO = 1.134324
|
1638
|
-
"""Max value of ``resource_temperature``/``EGS_plan_design_temperature``"""
|
1639
1618
|
MODULE = "geothermal"
|
1640
1619
|
PYSAM = PySamGeothermal
|
1641
1620
|
PYSAM_WEATHER_TAG = "file_name"
|
@@ -1738,52 +1717,14 @@ class Geothermal(AbstractSamGenerationFromWeatherFile):
|
|
1738
1717
|
self.sam_sys_inputs["resource_temp"] = val
|
1739
1718
|
|
1740
1719
|
def _set_egs_plant_design_temperature(self):
|
1741
|
-
"""Set the EGS plant temp to match resource
|
1720
|
+
"""Set the EGS plant temp to match resource (avoids cf > 1)"""
|
1742
1721
|
if self.sam_sys_inputs.get("resource_type") != 1:
|
1743
1722
|
return # Not EGS run
|
1744
1723
|
|
1745
|
-
set_egs_pdt_to_rt = self.sam_sys_inputs.get("set_EGS_PDT_to_RT", False)
|
1746
|
-
egs_plant_design_temp = self.sam_sys_inputs.get("design_temp", 0)
|
1747
1724
|
resource_temp = self.sam_sys_inputs["resource_temp"]
|
1748
|
-
|
1749
|
-
|
1750
|
-
|
1751
|
-
"Setting EGS plant design temperature ({}C) to match "
|
1752
|
-
"resource temperature ({}C)".format(
|
1753
|
-
egs_plant_design_temp, resource_temp
|
1754
|
-
)
|
1755
|
-
)
|
1756
|
-
logger.info(msg)
|
1757
|
-
self.sam_sys_inputs["design_temp"] = resource_temp
|
1758
|
-
return
|
1759
|
-
|
1760
|
-
if egs_plant_design_temp > resource_temp:
|
1761
|
-
msg = (
|
1762
|
-
"EGS plant design temperature ({}C) exceeds resource "
|
1763
|
-
"temperature ({}C). Lowering EGS plant design temperature "
|
1764
|
-
"to match resource temperature".format(
|
1765
|
-
egs_plant_design_temp, resource_temp
|
1766
|
-
)
|
1767
|
-
)
|
1768
|
-
logger.warning(msg)
|
1769
|
-
warn(msg)
|
1770
|
-
self.sam_sys_inputs["design_temp"] = resource_temp
|
1771
|
-
return
|
1772
|
-
|
1773
|
-
if resource_temp / egs_plant_design_temp > self.MAX_RT_TO_EGS_RATIO:
|
1774
|
-
msg = (
|
1775
|
-
"EGS plant design temperature ({}C) is lower than resource "
|
1776
|
-
"temperature ({}C) by more than a factor of {}. Increasing "
|
1777
|
-
"EGS plant design temperature to match resource "
|
1778
|
-
"temperature".format(
|
1779
|
-
egs_plant_design_temp,
|
1780
|
-
resource_temp,
|
1781
|
-
self.MAX_RT_TO_EGS_RATIO,
|
1782
|
-
)
|
1783
|
-
)
|
1784
|
-
logger.warning(msg)
|
1785
|
-
warn(msg)
|
1786
|
-
self.sam_sys_inputs["design_temp"] = resource_temp
|
1725
|
+
logger.debug("Setting EGS plant design temperature to match "
|
1726
|
+
"resource temperature ({}C)".format(resource_temp))
|
1727
|
+
self.sam_sys_inputs["design_temp"] = resource_temp
|
1787
1728
|
|
1788
1729
|
def _set_nameplate_to_match_resource_potential(self, resource):
|
1789
1730
|
"""Set the nameplate capacity to match the resource potential."""
|
reV/bespoke/bespoke.py
CHANGED
@@ -54,7 +54,8 @@ class BespokeMultiPlantData:
|
|
54
54
|
reads to a single HDF5 file.
|
55
55
|
"""
|
56
56
|
|
57
|
-
def __init__(self, res_fpath, sc_gid_to_hh, sc_gid_to_res_gid
|
57
|
+
def __init__(self, res_fpath, sc_gid_to_hh, sc_gid_to_res_gid,
|
58
|
+
pre_load_humidity=False):
|
58
59
|
"""Initialize BespokeMultiPlantData
|
59
60
|
|
60
61
|
Parameters
|
@@ -75,6 +76,9 @@ class BespokeMultiPlantData:
|
|
75
76
|
GID values. Resource GID values should correspond to GID
|
76
77
|
values in the HDF5 file, so any GID map must be applied
|
77
78
|
before initializing :class`BespokeMultiPlantData`.
|
79
|
+
pre_load_humidity : optional, default=False
|
80
|
+
Option to pre-load relative humidity data (useful for icing
|
81
|
+
runs). If ``False``, relative humidities are not loaded.
|
78
82
|
"""
|
79
83
|
self.res_fpath = res_fpath
|
80
84
|
self.sc_gid_to_hh = sc_gid_to_hh
|
@@ -84,6 +88,8 @@ class BespokeMultiPlantData:
|
|
84
88
|
self._wind_speeds = None
|
85
89
|
self._temps = None
|
86
90
|
self._pressures = None
|
91
|
+
self._relative_humidities = None
|
92
|
+
self._pre_load_humidity = pre_load_humidity
|
87
93
|
self._time_index = None
|
88
94
|
self._pre_load_data()
|
89
95
|
|
@@ -117,6 +123,11 @@ class BespokeMultiPlantData:
|
|
117
123
|
for hh, gids in self.hh_to_res_gids.items()
|
118
124
|
}
|
119
125
|
self._time_index = res.time_index
|
126
|
+
if self._pre_load_humidity:
|
127
|
+
self._relative_humidities = {
|
128
|
+
hh: res["relativehumidity_2m", :, gids]
|
129
|
+
for hh, gids in self.hh_to_res_gids.items()
|
130
|
+
}
|
120
131
|
|
121
132
|
logger.debug(
|
122
133
|
f"Data took {(time.time() - start_time) / 60:.2f} " f"min to load"
|
@@ -139,6 +150,9 @@ class BespokeMultiPlantData:
|
|
139
150
|
hh = self.sc_gid_to_hh[sc_gid]
|
140
151
|
sc_point_res_gids = sorted(self.sc_gid_to_res_gid[sc_gid])
|
141
152
|
data_inds = np.searchsorted(self.hh_to_res_gids[hh], sc_point_res_gids)
|
153
|
+
|
154
|
+
rh = (None if not self._pre_load_humidity
|
155
|
+
else self._relative_humidities[hh][:, data_inds])
|
142
156
|
return BespokeSinglePlantData(
|
143
157
|
sc_point_res_gids,
|
144
158
|
self._wind_dirs[hh][:, data_inds],
|
@@ -146,6 +160,7 @@ class BespokeMultiPlantData:
|
|
146
160
|
self._temps[hh][:, data_inds],
|
147
161
|
self._pressures[hh][:, data_inds],
|
148
162
|
self._time_index,
|
163
|
+
rh,
|
149
164
|
)
|
150
165
|
|
151
166
|
|
@@ -158,7 +173,8 @@ class BespokeSinglePlantData:
|
|
158
173
|
"""
|
159
174
|
|
160
175
|
def __init__(
|
161
|
-
self, data_inds, wind_dirs, wind_speeds, temps, pressures, time_index
|
176
|
+
self, data_inds, wind_dirs, wind_speeds, temps, pressures, time_index,
|
177
|
+
relative_humidities=None,
|
162
178
|
):
|
163
179
|
"""Initialize BespokeSinglePlantData
|
164
180
|
|
@@ -169,22 +185,41 @@ class BespokeSinglePlantData:
|
|
169
185
|
the second dimension of `wind_dirs`, `wind_speeds`, `temps`,
|
170
186
|
and `pressures`. The GID value of data_inds[0] should
|
171
187
|
correspond to the `wind_dirs[:, 0]` data, etc.
|
172
|
-
wind_dirs
|
173
|
-
Array of wind directions
|
188
|
+
wind_dirs : 2D np.array
|
189
|
+
Array of wind directions. Dimensions should be correspond to
|
190
|
+
[time, location]. See documentation for `data_inds` for
|
191
|
+
required spatial mapping of GID values.
|
192
|
+
wind_speeds : 2D np.array
|
193
|
+
Array of wind speeds. Dimensions should be correspond to
|
194
|
+
[time, location]. See documentation for `data_inds` for
|
195
|
+
required spatial mapping of GID values.
|
196
|
+
temps : 2D np.array
|
197
|
+
Array oftemperatures. Dimensions should be correspond to
|
198
|
+
[time, location]. See documentation for `data_inds` for
|
199
|
+
required spatial mapping of GID values.
|
200
|
+
pressures : 2D np.array
|
201
|
+
Array of pressures. Dimensions should be correspond to
|
174
202
|
pressures, respectively. Dimensions should be correspond to
|
175
203
|
[time, location]. See documentation for `data_inds` for
|
176
204
|
required spatial mapping of GID values.
|
177
205
|
time_index : 1D np.array
|
178
206
|
Time index array corresponding to the temporal dimension of
|
179
207
|
the 2D data. Will be exposed directly to user.
|
180
|
-
|
208
|
+
relative_humidities : 2D np.array, optional
|
209
|
+
Array of relative humidities. Dimensions should be
|
210
|
+
correspond to [time, location]. See documentation for
|
211
|
+
`data_inds` for required spatial mapping of GID values.
|
212
|
+
If ``None``, relative_humidities cannot be queried.
|
181
213
|
"""
|
214
|
+
|
182
215
|
self.data_inds = data_inds
|
183
216
|
self.wind_dirs = wind_dirs
|
184
217
|
self.wind_speeds = wind_speeds
|
185
218
|
self.temps = temps
|
186
219
|
self.pressures = pressures
|
187
220
|
self.time_index = time_index
|
221
|
+
self.relative_humidities = relative_humidities
|
222
|
+
self._humidities_exist = relative_humidities is not None
|
188
223
|
|
189
224
|
def __getitem__(self, key):
|
190
225
|
dset_name, t_idx, gids = key
|
@@ -197,6 +232,8 @@ class BespokeSinglePlantData:
|
|
197
232
|
return self.temps[t_idx, data_inds]
|
198
233
|
if "pressure" in dset_name:
|
199
234
|
return self.pressures[t_idx, data_inds]
|
235
|
+
if self._humidities_exist and "relativehumidity" in dset_name:
|
236
|
+
return self.relative_humidities[t_idx, data_inds]
|
200
237
|
msg = f"Unknown dataset name: {dset_name!r}"
|
201
238
|
logger.error(msg)
|
202
239
|
raise ValueError(msg)
|
@@ -711,6 +748,7 @@ class BespokeSinglePlant:
|
|
711
748
|
weights[i] = self.sc_point.include_mask_flat[mask].sum()
|
712
749
|
|
713
750
|
weights /= weights.sum()
|
751
|
+
data = data.astype(np.float32)
|
714
752
|
data *= weights
|
715
753
|
data = np.sum(data, axis=1)
|
716
754
|
|
@@ -896,15 +934,18 @@ class BespokeSinglePlant:
|
|
896
934
|
if np.nanmax(pres) > 1000:
|
897
935
|
pres *= 9.86923e-6
|
898
936
|
|
899
|
-
|
900
|
-
|
901
|
-
|
902
|
-
|
903
|
-
|
904
|
-
|
905
|
-
|
906
|
-
|
907
|
-
|
937
|
+
data = {
|
938
|
+
"temperature": temp,
|
939
|
+
"pressure": pres,
|
940
|
+
"windspeed": ws,
|
941
|
+
"winddirection": wd,
|
942
|
+
}
|
943
|
+
|
944
|
+
if self.sam_sys_inputs.get("en_icing_cutoff"):
|
945
|
+
rh = self.get_weighted_res_ts("relativehumidity_2m")
|
946
|
+
data["relativehumidity"] = rh
|
947
|
+
|
948
|
+
self._res_df = pd.DataFrame(data, index=ti)
|
908
949
|
|
909
950
|
if "time_index_step" in self.original_sam_sys_inputs:
|
910
951
|
ti_step = self.original_sam_sys_inputs["time_index_step"]
|
@@ -1241,7 +1282,7 @@ class BespokeSinglePlant:
|
|
1241
1282
|
self._meta[SupplyCurveField.MEAN_CF_DC] = np.nan
|
1242
1283
|
self._meta[SupplyCurveField.MEAN_CF_AC] = np.nan
|
1243
1284
|
self._meta[SupplyCurveField.MEAN_LCOE] = np.nan
|
1244
|
-
self._meta[SupplyCurveField.
|
1285
|
+
self._meta[SupplyCurveField.SC_POINT_ANNUAL_ENERGY_MWH] = np.nan
|
1245
1286
|
# copy dataset outputs to meta data for supply curve table summary
|
1246
1287
|
if "cf_mean-means" in self.outputs:
|
1247
1288
|
self._meta.loc[:, SupplyCurveField.MEAN_CF_AC] = self.outputs[
|
@@ -1253,7 +1294,7 @@ class BespokeSinglePlant:
|
|
1253
1294
|
]
|
1254
1295
|
self.recalc_lcoe()
|
1255
1296
|
if "annual_energy-means" in self.outputs:
|
1256
|
-
self._meta[SupplyCurveField.
|
1297
|
+
self._meta[SupplyCurveField.SC_POINT_ANNUAL_ENERGY_MWH] = (
|
1257
1298
|
self.outputs["annual_energy-means"] / 1000
|
1258
1299
|
)
|
1259
1300
|
|
@@ -2156,7 +2197,10 @@ class BespokeWindPlants(BaseAggregation):
|
|
2156
2197
|
|
2157
2198
|
logger.info("Pre-loading resource data for Bespoke run... ")
|
2158
2199
|
self._pre_loaded_data = BespokeMultiPlantData(
|
2159
|
-
self._res_fpath,
|
2200
|
+
self._res_fpath,
|
2201
|
+
sc_gid_to_hh,
|
2202
|
+
sc_gid_to_res_gid,
|
2203
|
+
pre_load_humidity=self._project_points.sam_config_obj.icing,
|
2160
2204
|
)
|
2161
2205
|
|
2162
2206
|
def _hh_for_sc_gid(self, sc_gid):
|
reV/handlers/multi_year.py
CHANGED
@@ -96,14 +96,15 @@ class MultiYearGroup:
|
|
96
96
|
pass_through_dsets : list
|
97
97
|
List of pass through datasets.
|
98
98
|
"""
|
99
|
+
with Resource(self.source_files[0]) as res:
|
100
|
+
all_dsets = res.datasets
|
101
|
+
|
99
102
|
if isinstance(dsets, str) and dsets == 'PIPELINE':
|
100
|
-
|
101
|
-
with Resource(files[0]) as res:
|
102
|
-
dsets = res.datasets
|
103
|
+
dsets = all_dsets
|
103
104
|
|
104
105
|
if "lcoe_fcr" in dsets:
|
105
106
|
for dset in LCOE_REQUIRED_OUTPUTS:
|
106
|
-
if dset not in pass_through_dsets and dset in
|
107
|
+
if dset not in pass_through_dsets and dset in all_dsets:
|
107
108
|
pass_through_dsets.append(dset)
|
108
109
|
|
109
110
|
if "dc_ac_ratio" in dsets:
|
reV/supply_curve/points.py
CHANGED
@@ -2154,7 +2154,7 @@ class GenerationSupplyCurvePoint(AggregationSupplyCurvePoint):
|
|
2154
2154
|
return self.exclusion_weighted_mean(self.gen["fixed_charge_rate"])
|
2155
2155
|
|
2156
2156
|
@property
|
2157
|
-
def
|
2157
|
+
def _sam_system_capacity_kw(self):
|
2158
2158
|
"""float: Mean SAM generation system capacity input, defaults to 0. """
|
2159
2159
|
if self._ssc is not None:
|
2160
2160
|
return self._ssc
|
@@ -2187,14 +2187,14 @@ class GenerationSupplyCurvePoint(AggregationSupplyCurvePoint):
|
|
2187
2187
|
|
2188
2188
|
def _compute_cost_per_ac_mw(self, dset):
|
2189
2189
|
"""Compute a cost per AC MW for a given input. """
|
2190
|
-
if self.
|
2190
|
+
if self._sam_system_capacity_kw <= 0:
|
2191
2191
|
return None
|
2192
2192
|
|
2193
2193
|
if dset not in self.gen.datasets:
|
2194
2194
|
return None
|
2195
2195
|
|
2196
2196
|
sam_cost = self.exclusion_weighted_mean(self.gen[dset])
|
2197
|
-
sam_cost_per_mw = sam_cost / self.
|
2197
|
+
sam_cost_per_mw = sam_cost / (self._sam_system_capacity_kw / 1000)
|
2198
2198
|
sc_point_cost = sam_cost_per_mw * self.capacity
|
2199
2199
|
|
2200
2200
|
ac_cap = (self.capacity
|
@@ -2318,7 +2318,7 @@ class GenerationSupplyCurvePoint(AggregationSupplyCurvePoint):
|
|
2318
2318
|
SupplyCurveField.CAPACITY_DC_MW: self.capacity_dc,
|
2319
2319
|
SupplyCurveField.EOS_MULT: 1, # added later
|
2320
2320
|
SupplyCurveField.REG_MULT: self.regional_multiplier,
|
2321
|
-
SupplyCurveField.
|
2321
|
+
SupplyCurveField.SC_POINT_ANNUAL_ENERGY_MWH: (
|
2322
2322
|
self.sc_point_annual_energy
|
2323
2323
|
),
|
2324
2324
|
SupplyCurveField.COST_SITE_OCC_USD_PER_AC_MW: (
|
reV/utilities/__init__.py
CHANGED
@@ -148,7 +148,7 @@ class SupplyCurveField(FieldEnum):
|
|
148
148
|
RAW_LCOE = "lcoe_raw_usd_per_mwh"
|
149
149
|
EOS_MULT = "multiplier_cc_eos"
|
150
150
|
REG_MULT = "multiplier_cc_regional"
|
151
|
-
|
151
|
+
SC_POINT_ANNUAL_ENERGY_MWH = "annual_energy_site_mwh"
|
152
152
|
COST_BASE_OCC_USD_PER_AC_MW = "cost_base_occ_usd_per_ac_mw"
|
153
153
|
COST_SITE_OCC_USD_PER_AC_MW = "cost_site_occ_usd_per_ac_mw"
|
154
154
|
COST_BASE_FOC_USD_PER_AC_MW = "cost_base_foc_usd_per_ac_mw"
|
@@ -248,7 +248,7 @@ class _LegacySCAliases(Enum):
|
|
248
248
|
N_PARALLEL_TRANS = "n_parallel_trans"
|
249
249
|
EOS_MULT = "eos_mult", "capital_cost_multiplier"
|
250
250
|
REG_MULT = "reg_mult"
|
251
|
-
|
251
|
+
SC_POINT_ANNUAL_ENERGY_MWH = "sc_point_annual_energy"
|
252
252
|
POI_LAT = "poi_lat"
|
253
253
|
POI_LON = "poi_lon"
|
254
254
|
REINFORCEMENT_POI_LAT = "reinforcement_poi_lat"
|
reV/version.py
CHANGED
File without changes
|
File without changes
|
File without changes
|
File without changes
|