NREL-reV 0.12.2__py3-none-any.whl → 0.13.0__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: NREL-reV
3
- Version: 0.12.2
3
+ Version: 0.13.0
4
4
  Summary: National Renewable Energy Laboratory's (NREL's) Renewable Energy Potential(V) Model: reV
5
5
  Author-email: Galen Maclaurin <galen.maclaurin@nrel.gov>
6
6
  Maintainer-email: Grant Buster <gbuster@nrel.gov>, Paul Pinchuk <ppinchuk@nrel.gov>
@@ -15,18 +15,20 @@ Classifier: Natural Language :: English
15
15
  Classifier: Programming Language :: Python :: 3.9
16
16
  Classifier: Programming Language :: Python :: 3.10
17
17
  Classifier: Programming Language :: Python :: 3.11
18
+ Classifier: Programming Language :: Python :: 3.12
19
+ Classifier: Programming Language :: Python :: 3.13
18
20
  Requires-Python: >=3.9
19
21
  Description-Content-Type: text/x-rst
20
22
  License-File: LICENSE
21
- Requires-Dist: NREL-gaps<0.8,>=0.7.0
22
- Requires-Dist: NREL-NRWAL<1,>=0.0.7
23
- Requires-Dist: NREL-PySAM<7,~=6.0.1
24
- Requires-Dist: NREL-rex<0.3,>=0.2.99
25
- Requires-Dist: numpy~=1.24.4
26
- Requires-Dist: packaging<25,>=20.3
27
- Requires-Dist: plotly<6,>=4.7.1
28
- Requires-Dist: plotting<0.0.8,>=0.0.6
29
- Requires-Dist: shapely<2
23
+ Requires-Dist: NREL-gaps<0.9,>=0.8.0
24
+ Requires-Dist: NREL-NRWAL<0.1,>=0.0.11
25
+ Requires-Dist: NREL-PySAM~=6.0.1
26
+ Requires-Dist: NREL-rex<0.4,>=0.3.1
27
+ Requires-Dist: numpy<3,>=2.0.2
28
+ Requires-Dist: packaging<25,>=24.2
29
+ Requires-Dist: plotly<7,>=6.0.1
30
+ Requires-Dist: plotting<0.1,>=0.0.7
31
+ Requires-Dist: shapely<3,>=2.0.7
30
32
  Provides-Extra: test
31
33
  Requires-Dist: pytest<9,>=8.3.3; extra == "test"
32
34
  Provides-Extra: dev
@@ -146,7 +148,7 @@ as your package/environment manager.
146
148
  Option 1: Install from PIP (recommended for analysts):
147
149
 
148
150
  1. Create a new environment:
149
- ``conda create --name rev python=3.9``
151
+ ``conda create --name rev python=3.11``
150
152
 
151
153
  2. Activate directory:
152
154
  ``conda activate rev``
@@ -1,7 +1,7 @@
1
- nrel_rev-0.12.2.dist-info/licenses/LICENSE,sha256=hDwoTANtan2ZpufBlXm5C3W_PJ-mCqItvlcobgjxL7k,1526
1
+ nrel_rev-0.13.0.dist-info/licenses/LICENSE,sha256=hDwoTANtan2ZpufBlXm5C3W_PJ-mCqItvlcobgjxL7k,1526
2
2
  reV/__init__.py,sha256=tXTpWu_qVo3uotfSw_TJ-gNbidGaIPPfUTwBlpCMJ-g,856
3
3
  reV/cli.py,sha256=jfGGOr6QlLz8ghA7vBgx5-VgNsy4bBQo5DdHk42-q9A,1601
4
- reV/version.py,sha256=zfErvyRqxhvVqUlNnaIzFqGx8VY8fEvhVf5NB_ieQNI,51
4
+ reV/version.py,sha256=hIUvlRrRzHirY4NJU-6xMqe2V_yRaRSnk6a9V3HAi6s,51
5
5
  reV/SAM/SAM.py,sha256=3NK9rRaJzqH6wz7CU_5XguKCRhmoilOpDdFFsFgOaxQ,33163
6
6
  reV/SAM/__init__.py,sha256=LJqoncyKDY5ZP5WA4kboh561bce11F9Ge645Izah0EY,240
7
7
  reV/SAM/defaults.py,sha256=JQMJomX7wsbMzxKjx_IMnA_9QFsV2yWCyl_JToDVSJo,6703
@@ -16,11 +16,11 @@ reV/SAM/defaults/WY Southern-Flat Lands.srw,sha256=oSlFI7nnycW7SMnTXEXBXYkoh8rhV
16
16
  reV/SAM/defaults/geothermal.json,sha256=gnlxOBxxkbDDacIw6B9yP9iRkfmwj0WTWs8Zb71ytCo,7119
17
17
  reV/SAM/defaults/i_pvwattsv5.json,sha256=sF8rSe1bcqsKLXchvRxlp25dXOVe_q7rPJTf_vWR20Y,312
18
18
  reV/bespoke/__init__.py,sha256=vpXbyBUrUsTgK8UP_LafMjLiDg2CRG9WZLHPsOJoxek,109
19
- reV/bespoke/bespoke.py,sha256=uWuYkWYiI5N50AM4yoAoLwd5CT4CE3sgBJjL_PROnmM,112503
19
+ reV/bespoke/bespoke.py,sha256=2konhn_hV0YXd_h2cbBYbGPUb9oafKY0SvQhBzmOMBE,112661
20
20
  reV/bespoke/cli_bespoke.py,sha256=b6Xu0GKpXqPX3qVJ6-z0FrO97uCsH_1dVOa4r6IvesQ,2911
21
21
  reV/bespoke/gradient_free.py,sha256=URWV1yiO2jyWk3_GOpfpLV_wlgJhXXGmTUwCB3WTV0Y,12015
22
22
  reV/bespoke/pack_turbs.py,sha256=Dcd9F8obF8LPztzeycB5kxa5hXKSCiz3jC1WeAFUx28,3508
23
- reV/bespoke/place_turbines.py,sha256=3l8EUfXd2aeTGjHP8OlllgmaCW_I9gKJIQ9EGlWni_Y,25412
23
+ reV/bespoke/place_turbines.py,sha256=NfAs0OMaXPmwHnz9sTAtntWjvwGwSE8SCQ8fGlGzNoQ,25543
24
24
  reV/config/__init__.py,sha256=oqFNU4JESU_fPxFmPyQNFAXLDAdzmTlPuabXTe3Rf2Y,92
25
25
  reV/config/base_analysis_config.py,sha256=NvA3g5zQz8mIrV8ZSENLq0XBZGXa6RTGkwpZ76TVZj8,5615
26
26
  reV/config/base_config.py,sha256=a748VQ3CRs9RVi5sSEPcaWOyH6R3t5tssaFqZntHyaE,10075
@@ -72,7 +72,7 @@ reV/qa_qc/qa_qc.py,sha256=2ah8Oiz0vOVrezQgGRIHdB-YD34r2mUdzt3f7KyQpxo,17044
72
72
  reV/qa_qc/summary.py,sha256=QzfQ0Fd1-Une56XZiGZ8YMl3ir25XNYMyfm-PMB4dZo,31279
73
73
  reV/rep_profiles/__init__.py,sha256=v6YZk7tGLpw5gnSckjOn22xazTnv10siCFfWQl9H_fQ,114
74
74
  reV/rep_profiles/cli_rep_profiles.py,sha256=i3fRolT7HTzTQePXpNLDyxwgpRa7FEfHO1mOqiSufK4,4613
75
- reV/rep_profiles/rep_profiles.py,sha256=oqmtU9FbUlKurkglmZLyDBNH8VRKv8fgdSuvtYWLm04,48271
75
+ reV/rep_profiles/rep_profiles.py,sha256=dJ2jcklbelYYNS3IUXIYHg8E0poXLOWrwdqeBBnqYIE,48271
76
76
  reV/supply_curve/__init__.py,sha256=dbf0cO0qmt1VhV8dnDddztrcpnwua9T2HBhM6tLKaP8,274
77
77
  reV/supply_curve/aggregation.py,sha256=dnnuDG9BEGEgY17uA8nSF3s6L6Q6Lxe94aS7AIKSlm0,40471
78
78
  reV/supply_curve/cli_sc_aggregation.py,sha256=qGfJyZjg4tFARG2dl-wAlHv9KjEp2u4wg1Boxz18Gf0,3347
@@ -80,19 +80,19 @@ reV/supply_curve/cli_supply_curve.py,sha256=e-XrHQIe4OqWTL6u-TUAyHrw7Alk7vkXQ2Ho
80
80
  reV/supply_curve/competitive_wind_farms.py,sha256=eOjM72-4oWtsqxB7Wh2gnB2zVAt4LY3iPE_DqWdXbQ4,15795
81
81
  reV/supply_curve/exclusions.py,sha256=4-ZxTO5Vlu03vie0V_74uvdajQfCuC8FE96Pg8I4U_c,42950
82
82
  reV/supply_curve/extent.py,sha256=a31po753hXSxQ8lfcCvpE8hoKc4bY7MmYq0NO0jtdqA,17414
83
- reV/supply_curve/points.py,sha256=K9f9s0V_mhwvw33M0Zo0NzfVVRmpZuheKJGnejyf648,88473
83
+ reV/supply_curve/points.py,sha256=k_OrtRF4G_BYl4wky-AolCOBgOAktN4_ZCV1LLYyZl8,88549
84
84
  reV/supply_curve/sc_aggregation.py,sha256=SokYyLXdjQwgvdmgiWhLSSTssnkX6ZdCSwO0WzC8SYw,63911
85
- reV/supply_curve/supply_curve.py,sha256=igbloCkvYQwaH4zjbrYO17J7TtCTX5dKkk-TnlGJJeY,69931
86
- reV/supply_curve/tech_mapping.py,sha256=nfqPIj9o1pllX3aRC1Hi2KGXYJOYy68Vbvr_1asNmFk,18573
85
+ reV/supply_curve/supply_curve.py,sha256=9zhAA_9XSxE18j1Z9FuC71Wr3I0VuakfR5mt1_gHYuU,69931
86
+ reV/supply_curve/tech_mapping.py,sha256=rsCyv6YBIbHwCXOrYdaVbuKjphi24QsjaWA7F8m8KCY,18567
87
87
  reV/utilities/__init__.py,sha256=Z77DeuW_HtMFr7ssywUEgOLikWkDTtbaEdEWiSxwO4Y,10592
88
88
  reV/utilities/_clean_readme.py,sha256=IFI9wGPX5nnLTNVLJzH8IOHq9unQlAlHRu4Namib0LA,709
89
89
  reV/utilities/cli_functions.py,sha256=1_T_sXz0Ct8lW-vOk3mMRcpD6NYsc9cGI7dEujIi9z4,3864
90
90
  reV/utilities/curtailment.py,sha256=As902-2aLGnCiVEutYfAFIOwuV--_rCQhxGNOY9RB-4,5241
91
91
  reV/utilities/exceptions.py,sha256=f7sRGsbFLpmL6Caq_H1cD4GfVhnLMyvYUsLPA1UVDDE,3974
92
- reV/utilities/pytest_utils.py,sha256=T22NFEGxPOc9wRwgy0Pt2cHvw3Vam9cKwUj4AkzI7bU,3244
92
+ reV/utilities/pytest_utils.py,sha256=spCw9yQ8KEYOkQZpCi9IEmaWIvIqHqbUPDXXNQJJ68U,3241
93
93
  reV/utilities/slots.py,sha256=xsw-JuUVZ0YeoCNuwP_HxGNxFMA4xRs1tuImXHIJqaU,2618
94
- nrel_rev-0.12.2.dist-info/METADATA,sha256=1x4NB6NRj-AhydnW05KvJ4NHKGABHxzJStt_Fji8Bh8,10911
95
- nrel_rev-0.12.2.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
96
- nrel_rev-0.12.2.dist-info/entry_points.txt,sha256=4IfJtZm2iMJwrbC8J0Or7VjZWnFpvCaHYVpvSWfIwDA,616
97
- nrel_rev-0.12.2.dist-info/top_level.txt,sha256=S6YF2ZYgXUB6n28SY0K2H8YB9tMJdXQ9CyQbo6VC89M,4
98
- nrel_rev-0.12.2.dist-info/RECORD,,
94
+ nrel_rev-0.13.0.dist-info/METADATA,sha256=XfYD0aNmttfLYLma2YZm9fCFZDaOVaTvVtAywz-xB3g,11021
95
+ nrel_rev-0.13.0.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
96
+ nrel_rev-0.13.0.dist-info/entry_points.txt,sha256=4IfJtZm2iMJwrbC8J0Or7VjZWnFpvCaHYVpvSWfIwDA,616
97
+ nrel_rev-0.13.0.dist-info/top_level.txt,sha256=S6YF2ZYgXUB6n28SY0K2H8YB9tMJdXQ9CyQbo6VC89M,4
98
+ nrel_rev-0.13.0.dist-info/RECORD,,
reV/bespoke/bespoke.py CHANGED
@@ -280,8 +280,8 @@ class BespokeSinglePlant:
280
280
  Variables available are:
281
281
 
282
282
  - ``n_turbines``: the number of turbines
283
- - ``system_capacity``: wind plant capacity
284
- - ``aep``: annual energy production
283
+ - ``system_capacity``: wind plant capacity (kW)
284
+ - ``aep``: annual energy production (kWh)
285
285
  - ``avg_sl_dist_to_center_m``: Average straight-line
286
286
  distance to the supply curve point center from all
287
287
  turbine locations (in m). Useful for computing plant
@@ -290,20 +290,22 @@ class BespokeSinglePlant:
290
290
  distance to the medoid of all turbine locations
291
291
  (in m). Useful for computing plant BOS costs.
292
292
  - ``nn_conn_dist_m``: Total BOS connection distance
293
- using nearest-neighbor connections. This variable is
294
- only available for the
293
+ using nearest-neighbor connections (in m). This
294
+ variable is only available for the
295
295
  ``balance_of_system_cost_function`` equation.
296
296
  - ``fixed_charge_rate``: user input fixed_charge_rate if
297
297
  included as part of the sam system config.
298
- - ``capital_cost``: plant capital cost as evaluated
298
+ - ``capital_cost``: plant capital cost ($) as evaluated
299
299
  by `capital_cost_function`
300
300
  - ``fixed_operating_cost``: plant fixed annual operating
301
- cost as evaluated by `fixed_operating_cost_function`
301
+ cost ($/year) as evaluated by
302
+ `fixed_operating_cost_function`
302
303
  - ``variable_operating_cost``: plant variable annual
303
- operating cost as evaluated by
304
+ operating cost ($/kWh) as evaluated by
304
305
  `variable_operating_cost_function`
305
306
  - ``balance_of_system_cost``: plant balance of system
306
- cost as evaluated by `balance_of_system_cost_function`
307
+ cost ($) as evaluated by
308
+ `balance_of_system_cost_function`
307
309
  - ``self.wind_plant``: the SAM wind plant object,
308
310
  through which all SAM variables can be accessed
309
311
 
@@ -1567,8 +1569,8 @@ class BespokeWindPlants(BaseAggregation):
1567
1569
  for computation are:
1568
1570
 
1569
1571
  - ``n_turbines``: the number of turbines
1570
- - ``system_capacity``: wind plant capacity
1571
- - ``aep``: annual energy production
1572
+ - ``system_capacity``: wind plant capacity (kW)
1573
+ - ``aep``: annual energy production (kWh)
1572
1574
  - ``avg_sl_dist_to_center_m``: Average straight-line
1573
1575
  distance to the supply curve point center from all
1574
1576
  turbine locations (in m). Useful for computing plant
@@ -1577,20 +1579,22 @@ class BespokeWindPlants(BaseAggregation):
1577
1579
  distance to the medoid of all turbine locations
1578
1580
  (in m). Useful for computing plant BOS costs.
1579
1581
  - ``nn_conn_dist_m``: Total BOS connection distance
1580
- using nearest-neighbor connections. This variable is
1581
- only available for the
1582
+ using nearest-neighbor connections (in m). This
1583
+ variable is only available for the
1582
1584
  ``balance_of_system_cost_function`` equation.
1583
1585
  - ``fixed_charge_rate``: user input fixed_charge_rate if
1584
1586
  included as part of the sam system config.
1585
- - ``capital_cost``: plant capital cost as evaluated
1587
+ - ``capital_cost``: plant capital cost ($) as evaluated
1586
1588
  by `capital_cost_function`
1587
1589
  - ``fixed_operating_cost``: plant fixed annual operating
1588
- cost as evaluated by `fixed_operating_cost_function`
1590
+ cost ($/year) as evaluated by
1591
+ `fixed_operating_cost_function`
1589
1592
  - ``variable_operating_cost``: plant variable annual
1590
- operating cost as evaluated by
1593
+ operating cost ($/kWh) as evaluated by
1591
1594
  `variable_operating_cost_function`
1592
1595
  - ``balance_of_system_cost``: plant balance of system
1593
- cost as evaluated by `balance_of_system_cost_function`
1596
+ cost ($) as evaluated by
1597
+ `balance_of_system_cost_function`
1594
1598
  - ``self.wind_plant``: the SAM wind plant object,
1595
1599
  through which all SAM variables can be accessed
1596
1600
 
@@ -3,6 +3,8 @@
3
3
  """
4
4
  place turbines for bespoke wind plants
5
5
  """
6
+ from functools import wraps
7
+
6
8
  import numpy as np
7
9
  from shapely.geometry import MultiPoint, MultiPolygon, Point, Polygon
8
10
 
@@ -31,11 +33,13 @@ def none_until_optimized(func):
31
33
  optimized.
32
34
  """
33
35
 
36
+ @wraps(func)
34
37
  def _func(pt):
35
38
  """Wrapper to return `None` if `PlaceTurbines` is not optimized"""
36
39
  if pt.optimized_design_variables is None:
37
- return
40
+ return None
38
41
  return func(pt)
42
+
39
43
  return _func
40
44
 
41
45
 
@@ -64,8 +68,8 @@ class PlaceTurbines:
64
68
  optimization. Variables available are:
65
69
 
66
70
  - ``n_turbines``: the number of turbines
67
- - ``system_capacity``: wind plant capacity
68
- - ``aep``: annual energy production
71
+ - ``system_capacity``: wind plant capacity (kW)
72
+ - ``aep``: annual energy production (kWh)
69
73
  - ``avg_sl_dist_to_center_m``: Average straight-line
70
74
  distance to the supply curve point center from all
71
75
  turbine locations (in m). Useful for computing plant
@@ -74,20 +78,22 @@ class PlaceTurbines:
74
78
  distance to the medoid of all turbine locations
75
79
  (in m). Useful for computing plant BOS costs.
76
80
  - ``nn_conn_dist_m``: Total BOS connection distance
77
- using nearest-neighbor connections. This variable is
78
- only available for the
81
+ using nearest-neighbor connections (in m). This
82
+ variable is only available for the
79
83
  ``balance_of_system_cost_function`` equation.
80
84
  - ``fixed_charge_rate``: user input fixed_charge_rate if
81
85
  included as part of the sam system config.
82
- - ``capital_cost``: plant capital cost as evaluated
86
+ - ``capital_cost``: plant capital cost ($) as evaluated
83
87
  by `capital_cost_function`
84
88
  - ``fixed_operating_cost``: plant fixed annual operating
85
- cost as evaluated by `fixed_operating_cost_function`
89
+ cost ($/year) as evaluated by
90
+ `fixed_operating_cost_function`
86
91
  - ``variable_operating_cost``: plant variable annual
87
- operating cost as evaluated by
92
+ operating cost ($/kWh) as evaluated by
88
93
  `variable_operating_cost_function`
89
94
  - ``balance_of_system_cost``: plant balance of system
90
- cost as evaluated by `balance_of_system_cost_function`
95
+ cost ($) as evaluated by
96
+ `balance_of_system_cost_function`
91
97
  - ``self.wind_plant``: the SAM wind plant object,
92
98
  through which all SAM variables can be accessed
93
99
 
@@ -111,7 +111,7 @@ class RepresentativeMethods:
111
111
  i : int
112
112
  Location of the Nth min value in arr.
113
113
  """
114
- return arr.argsort()[: (n + 1)][-1]
114
+ return int(arr.argsort()[: (n + 1)][-1])
115
115
 
116
116
  @staticmethod
117
117
  def meanoid(profiles, weights=None):
@@ -384,8 +384,8 @@ class RegionRepProfile:
384
384
  }
385
385
  )
386
386
  df = df.sort_values(self.RES_GID_COL)
387
- self._gen_gids = df[self.GEN_GID_COL].values
388
- self._res_gids = df[self.RES_GID_COL].values
387
+ self._gen_gids = df[self.GEN_GID_COL].to_list()
388
+ self._res_gids = df[self.RES_GID_COL].to_list()
389
389
  if self._weight is not None:
390
390
  self._weights = df["weights"].values
391
391
  else:
@@ -395,7 +395,7 @@ class RegionRepProfile:
395
395
  meta = res.meta
396
396
 
397
397
  assert ResourceMetaField.GID in meta
398
- source_res_gids = meta[ResourceMetaField.GID].values
398
+ source_res_gids = meta[ResourceMetaField.GID].to_list()
399
399
  msg = ('Resource gids from "gid" column in meta data from "{}" '
400
400
  'must be sorted! reV generation should always be run with '
401
401
  'sequential project points.'.format(self._gen_fpath))
@@ -503,7 +503,7 @@ class RegionRepProfile:
503
503
  n_profiles=self._n_profiles,
504
504
  )
505
505
 
506
- @ property
506
+ @property
507
507
  def rep_profiles(self):
508
508
  """Get the representative profiles of this region."""
509
509
  if self._profiles is None:
@@ -511,7 +511,7 @@ class RegionRepProfile:
511
511
 
512
512
  return self._profiles
513
513
 
514
- @ property
514
+ @property
515
515
  def i_reps(self):
516
516
  """Get the representative profile index(es) of this region."""
517
517
  if self._i_reps is None:
@@ -519,7 +519,7 @@ class RegionRepProfile:
519
519
 
520
520
  return self._i_reps
521
521
 
522
- @ property
522
+ @property
523
523
  def rep_gen_gids(self):
524
524
  """Get the representative profile gen gids of this region."""
525
525
  gids = self._gen_gids
@@ -530,7 +530,7 @@ class RegionRepProfile:
530
530
 
531
531
  return rep_gids
532
532
 
533
- @ property
533
+ @property
534
534
  def rep_res_gids(self):
535
535
  """Get the representative profile resource gids of this region."""
536
536
  gids = self._res_gids
@@ -541,7 +541,7 @@ class RegionRepProfile:
541
541
 
542
542
  return rep_gids
543
543
 
544
- @ classmethod
544
+ @classmethod
545
545
  def get_region_rep_profile(cls, gen_fpath, rev_summary,
546
546
  cf_dset='cf_profile',
547
547
  rep_method='meanoid',
@@ -677,7 +677,7 @@ class RepProfilesBase(ABC):
677
677
  self._rep_method = rep_method
678
678
  self._err_method = err_method
679
679
 
680
- @ staticmethod
680
+ @staticmethod
681
681
  def _parse_rev_summary(rev_summary):
682
682
  """Extract, parse, and check the rev summary table.
683
683
 
@@ -714,7 +714,7 @@ class RepProfilesBase(ABC):
714
714
 
715
715
  return rev_summary
716
716
 
717
- @ staticmethod
717
+ @staticmethod
718
718
  def _check_req_cols(df, cols):
719
719
  """Check a dataframe for required columns.
720
720
 
@@ -738,7 +738,7 @@ class RepProfilesBase(ABC):
738
738
  logger.error(e)
739
739
  raise KeyError(e)
740
740
 
741
- @ staticmethod
741
+ @staticmethod
742
742
  def _check_rev_gen(gen_fpath, cf_dset, rev_summary):
743
743
  """Check rev gen file for requisite datasets.
744
744
 
@@ -791,7 +791,7 @@ class RepProfilesBase(ABC):
791
791
  for k in range(self._n_profiles)
792
792
  }
793
793
 
794
- @ property
794
+ @property
795
795
  def time_index(self):
796
796
  """Get the time index for the rep profiles.
797
797
 
@@ -811,7 +811,7 @@ class RepProfilesBase(ABC):
811
811
 
812
812
  return self._time_index
813
813
 
814
- @ property
814
+ @property
815
815
  def meta(self):
816
816
  """Meta data for the representative profiles.
817
817
 
@@ -823,7 +823,7 @@ class RepProfilesBase(ABC):
823
823
  """
824
824
  return self._meta
825
825
 
826
- @ property
826
+ @property
827
827
  def profiles(self):
828
828
  """Get the arrays of representative CF profiles corresponding to meta.
829
829
 
@@ -934,15 +934,15 @@ class RepProfilesBase(ABC):
934
934
  )
935
935
  self._write_h5_out(fout, save_rev_summary=save_rev_summary)
936
936
 
937
- @ abstractmethod
937
+ @abstractmethod
938
938
  def _run_serial(self):
939
939
  """Abstract method for serial run method."""
940
940
 
941
- @ abstractmethod
941
+ @abstractmethod
942
942
  def _run_parallel(self):
943
943
  """Abstract method for parallel run method."""
944
944
 
945
- @ abstractmethod
945
+ @abstractmethod
946
946
  def run(self):
947
947
  """Abstract method for generic run method."""
948
948
 
@@ -56,13 +56,13 @@ class AbstractSupplyCurvePoint(ABC):
56
56
  self._parse_slices(resolution, exclusion_shape)
57
57
 
58
58
  @staticmethod
59
- def _ordered_unique(seq):
59
+ def _ordered_unique_from_np(seq):
60
60
  """Get a list of unique values in the same order as the input sequence.
61
61
 
62
62
  Parameters
63
63
  ----------
64
- seq : list | tuple
65
- Sequence of values.
64
+ seq : np.array
65
+ Numpy array containing a sequence of values.
66
66
 
67
67
  Returns
68
68
  -------
@@ -72,7 +72,7 @@ class AbstractSupplyCurvePoint(ABC):
72
72
 
73
73
  seen = set()
74
74
 
75
- return [x for x in seq if not (x in seen or seen.add(x))]
75
+ return [x for x in seq.tolist() if not (x in seen or seen.add(x))]
76
76
 
77
77
  def _parse_sc_row_col_ind(self, resolution, exclusion_shape):
78
78
  """Parse SC row and column index.
@@ -558,7 +558,7 @@ class SupplyCurvePoint(AbstractSupplyCurvePoint):
558
558
  List of h5 gids.
559
559
  """
560
560
  if self._h5_gid_set is None:
561
- self._h5_gid_set = self._ordered_unique(self._h5_gids)
561
+ self._h5_gid_set = self._ordered_unique_from_np(self._h5_gids)
562
562
  if -1 in self._h5_gid_set:
563
563
  self._h5_gid_set.remove(-1)
564
564
 
@@ -1306,7 +1306,7 @@ class AggregationSupplyCurvePoint(SupplyCurvePoint):
1306
1306
  gid_counts : list
1307
1307
  """
1308
1308
  gid_counts = [
1309
- self.include_mask_flat[(self._h5_gids == gid)].sum()
1309
+ float(self.include_mask_flat[(self._h5_gids == gid)].sum())
1310
1310
  for gid in self.h5_gid_set
1311
1311
  ]
1312
1312
 
@@ -1657,7 +1657,7 @@ class GenerationSupplyCurvePoint(AggregationSupplyCurvePoint):
1657
1657
  List of resource gids.
1658
1658
  """
1659
1659
  if self._res_gid_set is None:
1660
- self._res_gid_set = self._ordered_unique(self._res_gids)
1660
+ self._res_gid_set = self._ordered_unique_from_np(self._res_gids)
1661
1661
  if -1 in self._res_gid_set:
1662
1662
  self._res_gid_set.remove(-1)
1663
1663
 
@@ -1673,7 +1673,7 @@ class GenerationSupplyCurvePoint(AggregationSupplyCurvePoint):
1673
1673
  List of generation gids.
1674
1674
  """
1675
1675
  if self._gen_gid_set is None:
1676
- self._gen_gid_set = self._ordered_unique(self._gen_gids)
1676
+ self._gen_gid_set = self._ordered_unique_from_np(self._gen_gids)
1677
1677
  if -1 in self._gen_gid_set:
1678
1678
  self._gen_gid_set.remove(-1)
1679
1679
 
@@ -1702,7 +1702,7 @@ class GenerationSupplyCurvePoint(AggregationSupplyCurvePoint):
1702
1702
  List of exclusion pixels in each resource/generation gid.
1703
1703
  """
1704
1704
  gid_counts = [
1705
- self.include_mask_flat[(self._res_gids == gid)].sum()
1705
+ float(self.include_mask_flat[(self._res_gids == gid)].sum())
1706
1706
  for gid in self.res_gid_set
1707
1707
  ]
1708
1708
 
@@ -507,8 +507,8 @@ class SupplyCurve:
507
507
  Table mapping supply curve points to transmission features
508
508
  (should already be merged with SC points).
509
509
  """
510
- sc_gids = set(sc_points[SupplyCurveField.SC_GID].unique())
511
- trans_sc_gids = set(trans_table[SupplyCurveField.SC_GID].unique())
510
+ sc_gids = set(sc_points[SupplyCurveField.SC_GID].tolist())
511
+ trans_sc_gids = set(trans_table[SupplyCurveField.SC_GID].tolist())
512
512
  missing = sorted(list(sc_gids - trans_sc_gids))
513
513
  if any(missing):
514
514
  msg = (
@@ -62,7 +62,7 @@ class TechMapping:
62
62
  self._sc_resolution = sc.resolution
63
63
  self._gids = np.array(list(range(len(sc))), dtype=np.uint32)
64
64
  self._excl_shape = sc.exclusions.shape
65
- self._n_excl = np.product(self._excl_shape)
65
+ self._n_excl = np.prod(self._excl_shape)
66
66
  self._sc_row_indices = sc.row_indices
67
67
  self._sc_col_indices = sc.col_indices
68
68
  self._excl_row_slices = sc.excl_row_slices
@@ -137,7 +137,7 @@ class TechMapping:
137
137
  iarr : ndarray
138
138
  2D array of 1D index values for the flattened h5 excl extent
139
139
  """
140
- iarr = np.arange(np.product(shape), dtype=np.uint32)
140
+ iarr = np.arange(np.prod(shape), dtype=np.uint32)
141
141
 
142
142
  return iarr.reshape(shape)
143
143
 
@@ -80,7 +80,7 @@ def make_fake_h5_chunks(td, features, shuffle=False):
80
80
  lat = np.linspace(90, 0, 50)
81
81
  lon = np.linspace(-180, 0, 50)
82
82
  lon, lat = np.meshgrid(lon, lat)
83
- gids = np.arange(np.product(lat.shape))
83
+ gids = np.arange(np.prod(lat.shape))
84
84
  if shuffle:
85
85
  np.random.shuffle(gids)
86
86
  gids = gids.reshape(shape[:-1])
reV/version.py CHANGED
@@ -2,4 +2,4 @@
2
2
  reV Version number
3
3
  """
4
4
 
5
- __version__ = "0.12.2"
5
+ __version__ = "0.13.0"