Skip to content

Commit d81d058

Browse files
updated api to developer.nlr.gov
1 parent 1e04657 commit d81d058

5 files changed

Lines changed: 7 additions & 7 deletions

File tree

CHANGELOG.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@ Update the following inputs from the previous --> new values:
329329
- Warning to user if data is not from NSRDB or if data is more than 200 miles away
330330
- In `results/heating_cooling_load.jl`, added new fields **process_heat_thermal_load_series_mmbtu_per_hour**, **process_heat_boiler_fuel_load_series_mmbtu_per_hour**, **annual_calculated_process_heat_thermal_load_mmbtu**, and **annual_calculated_process_heat_boiler_fuel_load_mmbtu** to HeatingLoad results, with sum heating loads now including process heat
331331
### Changed
332-
- Change the way we determine which dataset to utilize in the PVWatts API call. Previously, we utilized defined lat-long bounds to determine if "nsrdb" or "intl" data should be used in PVWatts call. Now, we call the Solar Dataset Query API (v2) (https://developer.nrel.gov/docs/solar/data-query/v2/) to determine the dataset to use, and include "tmy3" as an option, as this is currently the best-available data for many locations in Alaska.
332+
- Change the way we determine which dataset to utilize in the PVWatts API call. Previously, we utilized defined lat-long bounds to determine if "nsrdb" or "intl" data should be used in PVWatts call. Now, we call the Solar Dataset Query API (v2) (https://developer.nlr.gov/docs/solar/data-query/v2/) to determine the dataset to use, and include "tmy3" as an option, as this is currently the best-available data for many locations in Alaska.
333333
- Refactored **dvThermalProduction** to be separated in **dvCoolingProduction** and **dvHeatingProduction** with **dvHeatingProduction** now indexed on `p.heating_loads`
334334
- Refactored heating load balance constraints so that a separate flow balance is reconciled for each heating load in `p.heating_loads`
335335
- Renamed **dvThermalProductionYIntercept** to **dvHeatingProductionYIntercept**
@@ -562,7 +562,7 @@ Update the following inputs from the previous --> new values:
562562
### Changed
563563
- Consolidated PVWatts API calls to 1 call (previously 3 separate calls existed). API call occurs in `src/core/utils.jl/call_pvwatts_api()`. This function is called for PV in `src/core/production_factor.jl/get_production_factor(PV)` and for GHP in `src/core/scenario.jl`. If GHP and PV are evaluated together, the GHP PVWatts call for ambient temperature is also used to assign the pv.production_factor_series in Scenario.jl so that the PVWatts API does not get called again downstream in `get_production_factor(PV)`.
564564
- In `src/core/utils.jl/call_pvwatts_api()`, updated NSRDB bounds used in PVWatts query (now includes southern New Zealand)
565-
- Updated PV Watts version from v6 to v8. PVWatts V8 updates the weather data to 2020 TMY data from the NREL NSRDB for locations covered by the database. (The NSRDB weather data used in PVWatts V6 is from around 2015.) See other differences at https://developer.nrel.gov/docs/solar/pvwatts/.
565+
- Updated PV Watts version from v6 to v8. PVWatts V8 updates the weather data to 2020 TMY data from the NREL NSRDB for locations covered by the database. (The NSRDB weather data used in PVWatts V6 is from around 2015.) See other differences at https://developer.nlr.gov/docs/solar/pvwatts/.
566566
- Made PV struct mutable: This allows for assigning pv.production_factor_series when calling PVWatts for GHP, to avoid a extra PVWatts calls later.
567567
- Changed unit test expected values due to update to PVWatts v8, which slightly changed expected PV production factors.
568568
- Changed **fuel_avail_gal** default to 1e9 for on-grid scenarios (same as off-grid)

docs/src/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ REopt evaluations for all system types except GHP (see below) can be performed u
1111
```
1212

1313
### Add NREL developer API key for PV, CST, and Wind
14-
If you don't have an NREL developer network API key, [sign up here on https://developer.nrel.gov to get one (free)](https://developer.nrel.gov/signup); this is required to load PV and Wind resource profiles from PVWatts and the Wind Toolkit APIs from within REopt.jl.
14+
If you don't have an NREL developer network API key, [sign up here on https://developer.nlr.gov to get one (free)](https://developer.nlr.gov/signup); this is required to load PV and Wind resource profiles from PVWatts and the Wind Toolkit APIs from within REopt.jl.
1515
Assign your API key to the expected environment variable:
1616
```julia
1717
ENV["NREL_DEVELOPER_API_KEY"]="your API key"

src/core/cst_ssc.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ function get_weatherdata(lat::Float64,lon::Float64,debug::Bool)
173173
check_api_key()
174174
check_api_email()
175175
attributes_tmy_updated = "ghi,dhi,dni,wind_speed,wind_direction,air_temperature,surface_pressure,dew_point" #for tmy
176-
url = string("http://developer.nrel.gov/api/nsrdb/v2/solar/nsrdb-GOES-tmy-v4-0-0-download.csv?api_key=",ENV["NREL_DEVELOPER_API_KEY"],
176+
url = string("http://developer.nlr.gov/api/nsrdb/v2/solar/nsrdb-GOES-tmy-v4-0-0-download.csv?api_key=",ENV["NREL_DEVELOPER_API_KEY"],
177177
"&wkt=POINT(",lon,"%20",lat,")&attributes=",attributes_tmy_updated,
178178
"&names=tmy&utc=false&leap_day=true&interval=60&email=",ENV["NREL_DEVELOPER_EMAIL"])
179179
r = HTTP.request("GET", url)

src/core/production_factor.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ function get_production_factor(wind::Wind, latitude::Real, longitude::Real, time
102102
# TODO validate against API with different hub heights (not in windtoolkit_hub_heights)
103103

104104
for height in heights_for_sam
105-
url = string("https://developer.nrel.gov/api/wind-toolkit/v2/wind/wtk-srw-download",
105+
url = string("https://developer.nlr.gov/api/wind-toolkit/v2/wind/wtk-srw-download",
106106
"?api_key=", ENV["NREL_DEVELOPER_API_KEY"],
107107
"&lat=", latitude , "&lon=", longitude,
108108
"&hubheight=", Int(height), "&year=", 2012

src/core/utils.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,7 @@ function call_solar_dataset_api(latitude::Real, longitude::Real, radius::Int)
394394
throw(@error("Invalid coordinates: longitude of $longitude must be between -180 and 180 degrees."))
395395
end
396396

397-
url = string("https://developer.nrel.gov/api/solar/data_query/v2.json", "?api_key=", ENV["NREL_DEVELOPER_API_KEY"],
397+
url = string("https://developer.nlr.gov/api/solar/data_query/v2.json", "?api_key=", ENV["NREL_DEVELOPER_API_KEY"],
398398
"&lat=", latitude , "&lon=", longitude, "&radius=", radius, "&all=", 0
399399
)
400400
try
@@ -465,7 +465,7 @@ function call_pvwatts_api(latitude::Real, longitude::Real; tilt=latitude, azimut
465465
# Determine resource dataset to use for this location
466466
dataset, dist_meters, datasource = call_solar_dataset_api(latitude, longitude, radius)
467467

468-
url = string("https://developer.nrel.gov/api/pvwatts/v8.json", "?api_key=", ENV["NREL_DEVELOPER_API_KEY"],
468+
url = string("https://developer.nlr.gov/api/pvwatts/v8.json", "?api_key=", ENV["NREL_DEVELOPER_API_KEY"],
469469
"&lat=", latitude , "&lon=", longitude, "&tilt=", tilt,
470470
"&system_capacity=1", "&azimuth=", azimuth, "&module_type=", module_type,
471471
"&array_type=", array_type, "&losses=", losses, "&dc_ac_ratio=", dc_ac_ratio,

0 commit comments

Comments
 (0)