Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/pp/minor_updates' into tw/bespok…
Browse files Browse the repository at this point in the history
…e_icing
  • Loading branch information
ppinchuk committed Jun 18, 2024
2 parents 2b5255c + 885b0ef commit a698b3c
Show file tree
Hide file tree
Showing 6 changed files with 55 additions and 33 deletions.
14 changes: 7 additions & 7 deletions reV/bespoke/bespoke.py
Original file line number Diff line number Diff line change
Expand Up @@ -1269,10 +1269,10 @@ def run_wind_plant_ts(self):
self._outputs.update(means)

self._meta[SupplyCurveField.MEAN_RES] = self.res_df["windspeed"].mean()
self._meta[SupplyCurveField.MEAN_CF_DC] = None
self._meta[SupplyCurveField.MEAN_CF_AC] = None
self._meta[SupplyCurveField.MEAN_LCOE] = None
self._meta[SupplyCurveField.SC_POINT_ANNUAL_ENERGY_MW] = None
self._meta[SupplyCurveField.MEAN_CF_DC] = np.nan
self._meta[SupplyCurveField.MEAN_CF_AC] = np.nan
self._meta[SupplyCurveField.MEAN_LCOE] = np.nan
self._meta[SupplyCurveField.SC_POINT_ANNUAL_ENERGY_MW] = np.nan
# copy dataset outputs to meta data for supply curve table summary
if "cf_mean-means" in self.outputs:
self._meta.loc[:, SupplyCurveField.MEAN_CF_AC] = self.outputs[
Expand Down Expand Up @@ -1379,7 +1379,7 @@ def run_plant_optimization(self):
# convert SAM system capacity in kW to reV supply curve cap in MW
capacity_ac_mw = system_capacity_kw / 1e3
self._meta[SupplyCurveField.CAPACITY_AC_MW] = capacity_ac_mw
self._meta[SupplyCurveField.CAPACITY_DC_MW] = None
self._meta[SupplyCurveField.CAPACITY_DC_MW] = np.nan

# add required ReEDS multipliers to meta
baseline_cost = self.plant_optimizer.capital_cost_per_kw(
Expand Down Expand Up @@ -1624,7 +1624,7 @@ def __init__(self, excl_fpath, res_fpath, tm_dset, objective_function,
multiple sites can be specified to evaluate ``reV`` at
multiple specific locations. A string pointing to a project
points CSV file may also be specified. Typically, the CSV
contains two columns:
contains the following columns:
- ``gid``: Integer specifying the supply curve GID of
each site.
Expand All @@ -1641,7 +1641,7 @@ def __init__(self, excl_fpath, res_fpath, tm_dset, objective_function,
site-specific capital cost value for each location). Columns
that do not correspond to a config key may also be included,
but they will be ignored. The CSV file input can also have
these extra columns:
these extra, optional columns:
- ``capital_cost_multiplier``
- ``fixed_operating_cost_multiplier``
Expand Down
33 changes: 22 additions & 11 deletions reV/econ/econ.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,25 +76,36 @@ def __init__(self, project_points, sam_files, cf_file, site_data=None,
(or slice) representing the GIDs of multiple sites can be
specified to evaluate reV at multiple specific locations.
A string pointing to a project points CSV file may also be
specified. Typically, the CSV contains two columns:
specified. Typically, the CSV contains the following
columns:
- ``gid``: Integer specifying the GID of each site.
- ``gid``: Integer specifying the generation GID of each
site.
- ``config``: Key in the `sam_files` input dictionary
(see below) corresponding to the SAM configuration to
use for each particular site. This value can also be
``None`` (or left out completely) if you specify only
a single SAM configuration file as the `sam_files`
input.
The CSV file may also contain site-specific inputs by
- ``capital_cost_multiplier``: This is an *optional*
multiplier input that, if included, will be used to
regionally scale the ``capital_cost`` input in the SAM
config. If you include this column in your CSV, you
*do not* need to specify ``capital_cost``, unless you
would like that value to vary regionally and
independently of the multiplier (i.e. the multiplier
will still be applied on top of the ``capital_cost``
input).
The CSV file may also contain other site-specific inputs by
including a column named after a config keyword (e.g. a
column called ``capital_cost`` may be included to specify a
site-specific capital cost value for each location). Columns
that do not correspond to a config key may also be included,
but they will be ignored. A DataFrame following the same
guidelines as the CSV input (or a dictionary that can be
used to initialize such a DataFrame) may be used for this
input as well.
column called ``wind_turbine_rotor_diameter`` may be
included to specify a site-specific turbine diameter for
each location). Columns that do not correspond to a config
key may also be included, but they will be ignored. A
DataFrame following the same guidelines as the CSV input
(or a dictionary that can be used to initialize such a
DataFrame) may be used for this input as well.
sam_files : dict | str
A dictionary mapping SAM input configuration ID(s) to SAM
configuration(s). Keys are the SAM config ID(s) which
Expand Down
29 changes: 19 additions & 10 deletions reV/generation/generation.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ def __init__(
multiple sites can be specified to evaluate reV at multiple
specific locations. A string pointing to a project points
CSV file may also be specified. Typically, the CSV contains
two columns:
the following columns:
- ``gid``: Integer specifying the generation GID of each
site.
Expand All @@ -181,16 +181,25 @@ def __init__(
``None`` (or left out completely) if you specify only
a single SAM configuration file as the `sam_files`
input.
The CSV file may also contain site-specific inputs by
- ``capital_cost_multiplier``: This is an *optional*
multiplier input that, if included, will be used to
regionally scale the ``capital_cost`` input in the SAM
config. If you include this column in your CSV, you
*do not* need to specify ``capital_cost``, unless you
would like that value to vary regionally and
independently of the multiplier (i.e. the multiplier
will still be applied on top of the ``capital_cost``
input).
The CSV file may also contain other site-specific inputs by
including a column named after a config keyword (e.g. a
column called ``capital_cost`` may be included to specify a
site-specific capital cost value for each location). Columns
that do not correspond to a config key may also be included,
but they will be ignored. A DataFrame following the same
guidelines as the CSV input (or a dictionary that can be
used to initialize such a DataFrame) may be used for this
input as well.
column called ``wind_turbine_rotor_diameter`` may be
included to specify a site-specific turbine diameter for
each location). Columns that do not correspond to a config
key may also be included, but they will be ignored. A
DataFrame following the same guidelines as the CSV input
(or a dictionary that can be used to initialize such a
DataFrame) may be used for this input as well.
.. Note:: By default, the generation GID of each site is
assumed to match the resource GID to be evaluated for that
Expand Down
5 changes: 4 additions & 1 deletion reV/supply_curve/points.py
Original file line number Diff line number Diff line change
Expand Up @@ -2356,7 +2356,10 @@ def point_summary(self, args=None):
summary = {}
for arg in args:
if arg in ARGS:
summary[arg] = ARGS[arg]
val = ARGS[arg]
if val is None:
val = np.nan
summary[arg] = val
else:
warn(
'Cannot find "{}" as an available SC self summary '
Expand Down
5 changes: 2 additions & 3 deletions reV/supply_curve/supply_curve.py
Original file line number Diff line number Diff line change
Expand Up @@ -1116,8 +1116,7 @@ def add_sum_cols(table, sum_cols):

return table

# pylint: disable=C901
def _full_sort(
def _full_sort( # noqa: C901
self,
trans_table,
trans_costs=None,
Expand Down Expand Up @@ -1289,7 +1288,7 @@ def _adjust_output_columns(self, columns, consider_friction):

for col in _REQUIRED_OUTPUT_COLS:
if col not in self._trans_table:
self._trans_table[col] = None
self._trans_table[col] = np.nan
if col not in columns:
columns.append(col)

Expand Down
2 changes: 1 addition & 1 deletion reV/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
reV Version number
"""

__version__ = "0.9.0"
__version__ = "0.9.1"

0 comments on commit a698b3c

Please sign in to comment.