Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into pp/bespoke_bos_cost
Browse files Browse the repository at this point in the history
  • Loading branch information
ppinchuk committed May 30, 2024
2 parents 7d70257 + 081d70e commit bf49842
Show file tree
Hide file tree
Showing 77 changed files with 11,162 additions and 6,909 deletions.
18 changes: 10 additions & 8 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,28 +8,30 @@

---------

.. image:: https://github.com/NREL/reV/workflows/Documentation/badge.svg
|Docs| |Tests| |Linter| |PythonV| |Pypi| |Codecov| |Zenodo| |Binder|

.. |Docs| image:: https://github.com/NREL/reV/workflows/Documentation/badge.svg
:target: https://nrel.github.io/reV/

.. image:: https://github.com/NREL/reV/workflows/Pytests/badge.svg
.. |Tests| image:: https://github.com/NREL/reV/workflows/Pytests/badge.svg
:target: https://github.com/NREL/reV/actions?query=workflow%3A%22Pytests%22

.. image:: https://github.com/NREL/reV/workflows/Lint%20Code%20Base/badge.svg
.. |Linter| image:: https://github.com/NREL/reV/workflows/Lint%20Code%20Base/badge.svg
:target: https://github.com/NREL/reV/actions?query=workflow%3A%22Lint+Code+Base%22

.. image:: https://img.shields.io/pypi/pyversions/NREL-reV.svg
.. |PythonV| image:: https://img.shields.io/pypi/pyversions/NREL-reV.svg
:target: https://pypi.org/project/NREL-reV/

.. image:: https://badge.fury.io/py/NREL-reV.svg
.. |Pypi| image:: https://badge.fury.io/py/NREL-reV.svg
:target: https://badge.fury.io/py/NREL-reV

.. image:: https://codecov.io/gh/nrel/reV/branch/main/graph/badge.svg?token=U4ZU9F0K0Z
.. |Codecov| image:: https://codecov.io/gh/nrel/reV/branch/main/graph/badge.svg?token=U4ZU9F0K0Z
:target: https://codecov.io/gh/nrel/reV

.. image:: https://zenodo.org/badge/201343076.svg
.. |Zenodo| image:: https://zenodo.org/badge/201343076.svg
:target: https://zenodo.org/badge/latestdoi/201343076

.. image:: https://mybinder.org/badge_logo.svg
.. |Binder| image:: https://mybinder.org/badge_logo.svg
:target: https://mybinder.org/v2/gh/nrel/reV/HEAD

|
Expand Down
5 changes: 2 additions & 3 deletions examples/aws_pcluster/make_project_points.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
"""
from rex import Resource


if __name__ == '__main__':
fp = '/nrel/nsrdb/v3/nsrdb_2019.h5'
fp = '/nrel/wtk/conus/wtk_conus_2007.h5'
Expand All @@ -22,7 +21,7 @@

print(meta[mask])
pp = meta[mask]
pp['gid'] = pp.index.values
pp["gid"] = pp.index.values
pp['config'] = 'def'
pp = pp[['gid', 'config']]
pp = pp[["gid", 'config']]
pp.to_csv('./points_front_range.csv', index=False)
25 changes: 15 additions & 10 deletions examples/bespoke_wind_plants/single_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,23 @@
"""
An example single run to get bespoke wind plant layout
"""
import numpy as np
import matplotlib.pyplot as plt
from reV.bespoke.bespoke import BespokeSinglePlant
from reV.bespoke.plotting_functions import plot_poly, plot_turbines,\
plot_windrose
from reV import TESTDATADIR
from reV.supply_curve.tech_mapping import TechMapping

import json
import os
import shutil
import tempfile

import matplotlib.pyplot as plt
import numpy as np

from reV import TESTDATADIR
from reV.bespoke.bespoke import BespokeSinglePlant
from reV.bespoke.plotting_functions import (
plot_poly,
plot_turbines,
plot_windrose,
)
from reV.supply_curve.tech_mapping import TechMapping

SAM = os.path.join(TESTDATADIR, 'SAM/i_windpower.json')
EXCL = os.path.join(TESTDATADIR, 'ri_exclusions/ri_exclusions.h5')
RES = os.path.join(TESTDATADIR, 'wtk/ri_100_wtk_{}.h5')
Expand All @@ -29,7 +33,7 @@
'ri_reeds_regions': {'inclusion_range': (None, 400),
'exclude_nodata': False}}

with open(SAM, 'r') as f:
with open(SAM) as f:
SAM_SYS_INPUTS = json.load(f)

SAM_SYS_INPUTS['wind_farm_wake_model'] = 2
Expand All @@ -56,7 +60,8 @@
1E5 * 0.1 + (1 - 0.1))"""
objective_function = "cost / aep"

output_request = ('system_capacity', 'cf_mean', 'cf_profile')
output_request = ('system_capacity', 'cf_mean',
'cf_profile')
gid = 33
with tempfile.TemporaryDirectory() as td:
excl_fp = os.path.join(td, 'ri_exclusions.h5')
Expand Down
5 changes: 3 additions & 2 deletions examples/marine_energy/plot_lcoe.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,17 @@
Simple plot script for wave LCOE
"""
import os
import pandas as pd

import matplotlib.pyplot as plt
import pandas as pd

fps = ['./atlantic_rm5/atlantic_rm5_agg.csv',
'./pacific_rm5/pacific_rm5_agg.csv',
]

for fp in fps:
df = pd.read_csv(fp)
a = plt.scatter(df.longitude, df.latitude, c=df['mean_lcoe'],
a = plt.scatter(df.longitude, df.latitude, c=df["mean_lcoe"],
s=0.5, vmin=0, vmax=1500)
plt.colorbar(a, label='lcoe_fcr ($/MWh)')
tag = os.path.basename(fp).replace('_agg.csv', '')
Expand Down
Loading

0 comments on commit bf49842

Please sign in to comment.