-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Updates to install requirements.txt and multiple files for NASA POWER API integration #27
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think to keep the lat/lon of the tests at the old Texas location, we could modify the locations dictionary in hybrid/sites/locations.py
to include (35.2018863, -101.945027, 1099), and for the tests, do a combination of the flatirons_site's boundary data with this Texas location:
from hybrid.sites import SiteInfo, flatirons_site, locations
...
@pytest.fixture
def site():
# reuse flatirons boundary but set to a different lat/lon
flatirons_site['lat'] = locations[3][0]
flatirons_site['lon'] = locations[3][1]
return SiteInfo(flatirons_site)
I reposted this code in test_dispatch.py's comments to situate it in context. But it would apply to test_hybrid.py and test_layout.py
…d some approx statements
…rocessing of wind data moved to PySAM ResourceTools.py
…__init__ argument rather than hardcoded in WindResource instantiation (wind_turbine_hub_ht=80)
…//github.com/NREL/HOPP/blob/d49cbd48b9ffb2145cd1b29e2370136fd01b4c37/hybrid, allows users to specify both height of wind resource data returned and the actual turbine hub height used in SAM calculations. Including hub_height in tech dictionary for examples/simulate_hybrid.py
examples/simulate_hybrid.py
Outdated
}} | ||
|
||
# Get resource | ||
lat = flatirons_site['lat'] | ||
lon = flatirons_site['lon'] | ||
prices_file = examples_dir.parent / "resource_files" / "grid" / "pricing-data-2015-IronMtn-002_factors.csv" | ||
site = SiteInfo(flatirons_site, grid_resource_file=prices_file) | ||
site = SiteInfo(flatirons_site, grid_resource_file=prices_file, api='nrel', vegtype='vegtype_8', hub_height=80) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it may be better to rename vegtype
to nasa_vegtype
to be explicit. Also, in this example, we are using the NREL api so vegtype isn't required, so it may be confusing to specify it explicitly here as opposed to leaving it blank.
hybrid/resource/resource.py
Outdated
start_date: string | ||
Start date for NASA POWER API call | ||
end_date: string | ||
End date for NASA POWER API call |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you think of nasa_start_date
and nasa_end_date
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, since it looks like the start and end dates are fixed, they shouldn't be listed in the Parameters section here.
hybrid/sites/amarillo_site.py
Outdated
[708.140000000014, 0.0]] | ||
}, | ||
'urdb_label': "5ca4d1175457a39b23b3d45e" | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See comment on flatirons_site.py
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is ready to be merged now, but we need to wait for release of PySAM 3.0.2 and of updating HOPP to use 3.0.2
@dguittet thank you for tackling this while I was away. Please let me know if anything further is needed on my end. |
closing for now, feel free to reopen if I made a mistake |
use owned parameters for aep in power_source.simulate_financials over…
PR updating requirements.txt and requirements-dev.txt with >= logic for versions of PySAM and numpy, resolves errors when installing HOPP with a developer version of PySAM.
PR updating multiple files to accommodate global solar and wind resource data from the NASA POWER Temporal Hourly API (https://power.larc.nasa.gov/docs/services/api/temporal/hourly/). Includes updated test_resource_download.py with two additional NASA resource files.
Example API call for solar data:
url = https://power.larc.nasa.gov/api/temporal/hourly/point?start=20120101&end=20121231&latitude=33.617773&longitude=-114.588261&community=RE¶meters=T2M&format=sam&user=TEST
Example API call for wind data:
url = https://power.larc.nasa.gov/api/temporal/hourly/point?start=20120101&end=20121231&latitude=33.617773&longitude=-114.588261&community=RE¶meters=T2M&format=srw&wind-surface=vegtype_4&wind-elevation=80&site-elevation=80
NOTE:
Dependent on PySAM PRs: NREL/pysam#114 and NREL/pysam#115
Solar resource file returned by NASA POWER API contains more fields / data points than NSRDB resource file. No post processing of the file was added in case future use cases may utilize extra data provided. All post processing of solar data dictionary for use by SAM and HOPP occurs within PySAM's ResourceTools.py.
Wind resource file: NASA POWER cannot return all 4 data points needed (temp, press, wind speed, and direction) at any user specified hub height. NASA can only provide adjusted wind speed and adjusted pressure at a user specified hub height. NASA POWER does provide the following data points:
No post processing of the file was added.
All post processing of wind data dictionary for use by SAM and HOPP occurs within PySAM's ResourceTools.py.