NREL / reV

Renewable Energy Potential (reV) Model
https://nrel.github.io/reV/
BSD 3-Clause "New" or "Revised" License
107 stars 24 forks source link

Unable to run reV on Anaconda Windows 64 bit #276

Closed djxvillain closed 3 years ago

djxvillain commented 3 years ago

Bug Description A clear and concise description of what the bug is.

I have followed the instructions here to install reV. I then followed the instructions here to setup HSDS with my own API key. I am trying to run this example, but I receive the error:

ConfigError: Invalid SAM config C:\Users\dgormley\Anaconda3\envs\rev\lib\site-packages\tests\data\SAM/naris_pv_1axis_inv13.json: C:\Users\dgormley\Anaconda3\envs\rev\lib\site-packages\tests\data\SAM/naris_pv_1axis_inv13.json does not exist

I followed the instructions to the best of my knowledge and didn't have any issues. My goal is to be able to analyze a scenario similar to pywatts for a final project. I tried all of yesterday to get this to work, but with no luck.

# Your code here

import os
from reV import TESTDATADIR
from reV.config.project_points import ProjectPoints
from reV.generation.generation import Gen

regions = {'Rhode Island': 'state'}

res_file = '/nrel/nsrdb/v3/nsrdb_2012.h5'  # HSDS 'file' path
sam_file = os.path.join(TESTDATADIR, 'SAM/naris_pv_1axis_inv13.json')

pp = ProjectPoints.regions(regions, res_file, sam_file)
gen = Gen.reV_run(tech='pvwattsv5', points=pp, sam_files=sam_file,
                  res_file=res_file, max_workers=1, fout=None,
                  output_request=('cf_mean', 'cf_profile'))
print(gen.out['cf_mean'])

Expected behavior A clear and concise description of what you expected to happen.

I would expect the pywatts example to produce the example out.

System (please complete the following information):

Windows 64 bit Anaconda

grantbuster commented 3 years ago

The sam config in the TESTDATADIR doesn't get copied into your install directory if you're not doing a pip install -e .

The actual sam config file is here: https://github.com/NREL/reV/blob/master/tests/data/SAM/naris_pv_1axis_inv13.json

Best option is to download that file onto your computer, point the sam_file input arg in the example to where the file actually is, and try running again.

Let me know how it goes!

djxvillain commented 3 years ago

The sam config in the TESTDATADIR doesn't get copied into your install directory if you're not doing a pip install -e .

The actual sam config file is here: https://github.com/NREL/reV/blob/master/tests/data/SAM/naris_pv_1axis_inv13.json

Best option is to download that file onto your computer, point the sam_file input arg in the example to where the file actually is, and try running again.

Let me know how it goes!

It worked! Thank you for your quick response!