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.
- {NREL_reV-0.8.9.dist-info → NREL_reV-0.9.2.dist-info}/METADATA +2 -1
- {NREL_reV-0.8.9.dist-info → NREL_reV-0.9.2.dist-info}/RECORD +34 -34
- reV/SAM/SAM.py +38 -0
- reV/SAM/generation.py +43 -10
- reV/bespoke/bespoke.py +304 -245
- reV/bespoke/cli_bespoke.py +2 -0
- reV/bespoke/place_turbines.py +181 -37
- reV/config/output_request.py +2 -1
- reV/config/project_points.py +1 -3
- reV/econ/econ.py +24 -13
- reV/econ/economies_of_scale.py +54 -35
- reV/generation/base.py +22 -2
- reV/generation/generation.py +50 -23
- reV/generation/output_attributes/lcoe_fcr_inputs.json +38 -3
- reV/handlers/__init__.py +0 -1
- reV/handlers/multi_year.py +45 -17
- reV/handlers/transmission.py +44 -27
- reV/hybrids/hybrid_methods.py +16 -14
- reV/hybrids/hybrids.py +10 -10
- reV/nrwal/nrwal.py +1 -1
- reV/qa_qc/qa_qc.py +1 -1
- reV/qa_qc/summary.py +4 -4
- reV/rep_profiles/rep_profiles.py +1 -1
- reV/supply_curve/exclusions.py +1 -1
- reV/supply_curve/extent.py +1 -1
- reV/supply_curve/points.py +254 -131
- reV/supply_curve/sc_aggregation.py +13 -45
- reV/supply_curve/supply_curve.py +200 -141
- reV/utilities/__init__.py +114 -39
- reV/version.py +1 -1
- {NREL_reV-0.8.9.dist-info → NREL_reV-0.9.2.dist-info}/LICENSE +0 -0
- {NREL_reV-0.8.9.dist-info → NREL_reV-0.9.2.dist-info}/WHEEL +0 -0
- {NREL_reV-0.8.9.dist-info → NREL_reV-0.9.2.dist-info}/entry_points.txt +0 -0
- {NREL_reV-0.8.9.dist-info → NREL_reV-0.9.2.dist-info}/top_level.txt +0 -0
@@ -28,7 +28,7 @@ from reV.supply_curve.aggregation import (
|
|
28
28
|
from reV.supply_curve.exclusions import FrictionMask
|
29
29
|
from reV.supply_curve.extent import SupplyCurveExtent
|
30
30
|
from reV.supply_curve.points import GenerationSupplyCurvePoint
|
31
|
-
from reV.utilities import SupplyCurveField, log_versions
|
31
|
+
from reV.utilities import ResourceMetaField, SupplyCurveField, log_versions
|
32
32
|
from reV.utilities.exceptions import (
|
33
33
|
EmptySupplyCurvePointError,
|
34
34
|
FileInputError,
|
@@ -170,14 +170,14 @@ class SupplyCurveAggFileHandler(AbstractAggFileHandler):
|
|
170
170
|
|
171
171
|
if self._pdf.endswith(".csv"):
|
172
172
|
self._power_density = pd.read_csv(self._pdf)
|
173
|
-
if (
|
173
|
+
if (ResourceMetaField.GID in self._power_density
|
174
174
|
and 'power_density' in self._power_density):
|
175
175
|
self._power_density = \
|
176
|
-
self._power_density.set_index(
|
176
|
+
self._power_density.set_index(ResourceMetaField.GID)
|
177
177
|
else:
|
178
178
|
msg = ('Variable power density file must include "{}" '
|
179
179
|
'and "power_density" columns, but received: {}'
|
180
|
-
.format(
|
180
|
+
.format(ResourceMetaField.GID,
|
181
181
|
self._power_density.columns.values))
|
182
182
|
logger.error(msg)
|
183
183
|
raise FileInputError(msg)
|
@@ -712,13 +712,6 @@ class SupplyCurveAggregation(BaseAggregation):
|
|
712
712
|
|
713
713
|
logger.debug("Resource class bins: {}".format(self._res_class_bins))
|
714
714
|
|
715
|
-
if self._cap_cost_scale is not None:
|
716
|
-
if self._h5_dsets is None:
|
717
|
-
self._h5_dsets = []
|
718
|
-
|
719
|
-
self._h5_dsets += list(BaseGen.LCOE_ARGS)
|
720
|
-
self._h5_dsets = list(set(self._h5_dsets))
|
721
|
-
|
722
715
|
if self._power_density is None:
|
723
716
|
msg = (
|
724
717
|
"Supply curve aggregation power density not specified. "
|
@@ -784,7 +777,7 @@ class SupplyCurveAggregation(BaseAggregation):
|
|
784
777
|
|
785
778
|
@staticmethod
|
786
779
|
def _get_res_gen_lcoe_data(
|
787
|
-
gen, res_class_dset, res_class_bins,
|
780
|
+
gen, res_class_dset, res_class_bins, lcoe_dset
|
788
781
|
):
|
789
782
|
"""Extract the basic resource / generation / lcoe data to be used in
|
790
783
|
the aggregation process.
|
@@ -800,8 +793,6 @@ class SupplyCurveAggregation(BaseAggregation):
|
|
800
793
|
res_class_bins : list | None
|
801
794
|
List of two-entry lists dictating the resource class bins.
|
802
795
|
None if no resource classes.
|
803
|
-
cf_dset : str
|
804
|
-
Dataset name from f_gen containing capacity factor mean values.
|
805
796
|
lcoe_dset : str
|
806
797
|
Dataset name from f_gen containing LCOE mean values.
|
807
798
|
|
@@ -811,16 +802,14 @@ class SupplyCurveAggregation(BaseAggregation):
|
|
811
802
|
Extracted resource data from res_class_dset
|
812
803
|
res_class_bins : list
|
813
804
|
List of resouce class bin ranges.
|
814
|
-
cf_data : np.ndarray | None
|
815
|
-
Capacity factor data extracted from cf_dset in gen
|
816
805
|
lcoe_data : np.ndarray | None
|
817
806
|
LCOE data extracted from lcoe_dset in gen
|
818
807
|
"""
|
819
808
|
|
820
|
-
dset_list = (res_class_dset,
|
809
|
+
dset_list = (res_class_dset, lcoe_dset)
|
821
810
|
gen_dsets = [] if gen is None else gen.datasets
|
822
|
-
labels = ("res_class_dset", "
|
823
|
-
temp = [None, None
|
811
|
+
labels = ("res_class_dset", "lcoe_dset")
|
812
|
+
temp = [None, None]
|
824
813
|
|
825
814
|
if isinstance(gen, Resource):
|
826
815
|
source_fps = [gen.h5_file]
|
@@ -847,12 +836,12 @@ class SupplyCurveAggregation(BaseAggregation):
|
|
847
836
|
logger.warning(w)
|
848
837
|
warn(w, OutputWarning)
|
849
838
|
|
850
|
-
res_data,
|
839
|
+
res_data, lcoe_data = temp
|
851
840
|
|
852
841
|
if res_class_dset is None or res_class_bins is None:
|
853
842
|
res_class_bins = [None]
|
854
843
|
|
855
|
-
return res_data, res_class_bins,
|
844
|
+
return res_data, res_class_bins, lcoe_data
|
856
845
|
|
857
846
|
@staticmethod
|
858
847
|
def _get_extra_dsets(gen, h5_dsets):
|
@@ -886,7 +875,6 @@ class SupplyCurveAggregation(BaseAggregation):
|
|
886
875
|
'system_capacity')
|
887
876
|
missing_lcoe_source = [k for k in lcoe_recalc_req
|
888
877
|
if k not in gen_dsets]
|
889
|
-
missing_lcoe_request = []
|
890
878
|
|
891
879
|
if isinstance(gen, Resource):
|
892
880
|
source_fps = [gen.h5_file]
|
@@ -901,9 +889,6 @@ class SupplyCurveAggregation(BaseAggregation):
|
|
901
889
|
|
902
890
|
h5_dsets_data = None
|
903
891
|
if h5_dsets is not None:
|
904
|
-
missing_lcoe_request = [
|
905
|
-
k for k in lcoe_recalc_req if k not in h5_dsets
|
906
|
-
]
|
907
892
|
|
908
893
|
if not isinstance(h5_dsets, (list, tuple)):
|
909
894
|
e = (
|
@@ -937,17 +922,6 @@ class SupplyCurveAggregation(BaseAggregation):
|
|
937
922
|
logger.warning(msg)
|
938
923
|
warn(msg, InputWarning)
|
939
924
|
|
940
|
-
if any(missing_lcoe_request):
|
941
|
-
msg = (
|
942
|
-
"It is strongly advised that you include the following "
|
943
|
-
"datasets in the h5_dsets request in order to re-calculate "
|
944
|
-
"the LCOE from the multi-year mean CF and AEP: {}".format(
|
945
|
-
missing_lcoe_request
|
946
|
-
)
|
947
|
-
)
|
948
|
-
logger.warning(msg)
|
949
|
-
warn(msg, InputWarning)
|
950
|
-
|
951
925
|
return h5_dsets_data
|
952
926
|
|
953
927
|
@classmethod
|
@@ -1079,7 +1053,6 @@ class SupplyCurveAggregation(BaseAggregation):
|
|
1079
1053
|
summary = []
|
1080
1054
|
|
1081
1055
|
with SupplyCurveExtent(excl_fpath, resolution=resolution) as sc:
|
1082
|
-
points = sc.points
|
1083
1056
|
exclusion_shape = sc.exclusions.shape
|
1084
1057
|
if gids is None:
|
1085
1058
|
gids = sc.valid_sc_points(tm_dset)
|
@@ -1110,9 +1083,9 @@ class SupplyCurveAggregation(BaseAggregation):
|
|
1110
1083
|
excl_fpath, gen_fpath, **file_kwargs
|
1111
1084
|
) as fh:
|
1112
1085
|
temp = cls._get_res_gen_lcoe_data(
|
1113
|
-
fh.gen, res_class_dset, res_class_bins,
|
1086
|
+
fh.gen, res_class_dset, res_class_bins, lcoe_dset
|
1114
1087
|
)
|
1115
|
-
res_data, res_class_bins,
|
1088
|
+
res_data, res_class_bins, lcoe_data = temp
|
1116
1089
|
h5_dsets_data = cls._get_extra_dsets(fh.gen, h5_dsets)
|
1117
1090
|
|
1118
1091
|
n_finished = 0
|
@@ -1131,7 +1104,7 @@ class SupplyCurveAggregation(BaseAggregation):
|
|
1131
1104
|
gen_index,
|
1132
1105
|
res_class_dset=res_data,
|
1133
1106
|
res_class_bin=res_bin,
|
1134
|
-
cf_dset=
|
1107
|
+
cf_dset=cf_dset,
|
1135
1108
|
lcoe_dset=lcoe_data,
|
1136
1109
|
h5_dsets=h5_dsets_data,
|
1137
1110
|
data_layers=fh.data_layers,
|
@@ -1151,11 +1124,6 @@ class SupplyCurveAggregation(BaseAggregation):
|
|
1151
1124
|
except EmptySupplyCurvePointError:
|
1152
1125
|
logger.debug("SC point {} is empty".format(gid))
|
1153
1126
|
else:
|
1154
|
-
pointsum[SupplyCurveField.SC_POINT_GID] = gid
|
1155
|
-
pointsum[SupplyCurveField.SC_ROW_IND] = \
|
1156
|
-
points.loc[gid, 'row_ind']
|
1157
|
-
pointsum[SupplyCurveField.SC_COL_IND] = \
|
1158
|
-
points.loc[gid, 'col_ind']
|
1159
1127
|
pointsum['res_class'] = ri
|
1160
1128
|
|
1161
1129
|
summary.append(pointsum)
|