Skip to content
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

Enable tracking of REopt.jl runs with PV and Wind from api.data.gov #428

Merged
merged 2 commits into from
Aug 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/core/production_factor.jl
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ function get_production_factor(wind::Wind, latitude::Real, longitude::Real, time
resource = []
try
@info "Querying Wind Toolkit for resource data ..."
r = HTTP.get(url; retries=5)
r = HTTP.get(url, ["User-Agent" => "REopt.jl"]; retries=5)
if r.status != 200
throw(@error("Bad response from Wind Toolkit: $(response["errors"])"))
end
Expand Down
2 changes: 1 addition & 1 deletion src/core/utils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,7 @@ function call_pvwatts_api(latitude::Real, longitude::Real; tilt=latitude, azimut

try
@info "Querying PVWatts for production factor and ambient air temperature... "
r = HTTP.get(url, keepalive=true, readtimeout=10)
r = HTTP.get(url, ["User-Agent" => "REopt.jl"]; keepalive=true, readtimeout=10)
response = JSON.parse(String(r.body))
if r.status != 200
throw(@error("Bad response from PVWatts: $(response["errors"])"))
Expand Down
Loading