Updating ResourceTools.py and tests for NASA POWER data #114
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PR updating the ResourceTools.py and test_ResourceTools.py 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/. Including 2 NASA POWER resource files for testing in pysam/tests/ directory.
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
Working within the scope of HOPP, global solar and wind resource data outside of the US boundaries was unavailable through NSRDB and the WindToolkit. Integrating NASA POWER API as a lower resolution alternative to enable modeling of locations outside of the US for the ECO LDRD.
NOTE:
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.
Wind resource file: NASA POWER cannot return all 4 data points needed (temp, press, wind speed, and direction) at any user specified hub height. They 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 for use by SAM and HOPP occurs within HOPP's wind_resource.py to use 2 m Temp, 50 m wind direction, and the adjusted speed and pressure at the user specified hub height in calculations. However it overwrites the 'heights' values for these data points to the user specified hub height to ensure SAM calculations do not fail if the user specified hub height is greater than 10 m apart from the data points in the resource file returned by NASA POWER API.
With the exception of line 86-91 all post processing of the data dictionaries returned by ResourceTools.py for use by PySAM/SAM/SSC was coded into HOPP's wind_resource.py and solar_resouce.py in PR (NREL/HOPP#27).