Skip to content

Commit

Permalink
Tweaks for fixing AWS deployments
Browse files Browse the repository at this point in the history
  • Loading branch information
Dmitry Duplyakin committed Feb 12, 2024
1 parent f3847e8 commit e23dff1
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
5 changes: 5 additions & 0 deletions proto.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,12 @@
#cors = CORS(app)

outputs_dir = "outputs"
if not os.path.exists(outputs_dir):
os.mkdir(outputs_dir)

templates_dir = "templates"
if not os.path.exists("%s/served" % templates_dir):
os.mkdir("%s/served" % templates_dir)

def plot_monthly_avg(atmospheric_df, ws_column="ws", datetime_column="datetime",
title="Windspeed monthly averages",
Expand Down
2 changes: 1 addition & 1 deletion templates/by_address.html
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,7 @@
//document.getElementById("fetching_msg").innerHTML = "http://localhost:5000/" + endpoint + "?height=" + hub_height + "m&" + latlon + "&year=" + years;

document.getElementById("fetching_msg").innerHTML = "";
window.location.href = "http://localhost:5000/" + endpoint + "?height=" + hub_height + "m&" + latlon + "&year=" + years;
window.location.href = "https://dw-tap.nrel.gov:5000/" + endpoint + "?height=" + hub_height + "m&" + latlon + "&year=" + years;
}
}
);
Expand Down
10 changes: 5 additions & 5 deletions templates/info.html
Original file line number Diff line number Diff line change
Expand Up @@ -216,27 +216,27 @@ <h3>TAP API provides public access to the following capabilities:</h3>
</tr>
<tr>
<td><strong>Plot with monthly average wind speeds</strong></td>
<td><a href="http://dw-tap.nrel.gov:5000/monthly?height=65.00m&lat=39.743&lon=-105.147&year=2012" target="_blank">http://dw-tap.nrel.gov/monthly?height=65.00m&lat=39.743&lon=-105.147</a></td>
<td><a href="https://dw-tap.nrel.gov:5000/monthly?height=65.00m&lat=39.743&lon=-105.147&year=2012" target="_blank">https://dw-tap.nrel.gov/monthly?height=65.00m&lat=39.743&lon=-105.147</a></td>
<td>Aggregate to monthly averages and show one or several years of model data.</td>
</tr>
<tr>
<td><strong>12x24 (hourly x monthly) summary with average wind speeds</strong></td>
<td><a href="http://dw-tap.nrel.gov:5000/12x24?height=65.00m&lat=39.743&lon=-105.147&year=2012" target="_blank">http://dw-tap.nrel.gov/12x24?height=65.00m&lat=39.743&lon=-105.147</a></td>
<td><a href="https://dw-tap.nrel.gov:5000/12x24?height=65.00m&lat=39.743&lon=-105.147&year=2012" target="_blank">https://dw-tap.nrel.gov/12x24?height=65.00m&lat=39.743&lon=-105.147</a></td>
<td>This summary allows seeing diurnal and seasonal patterns in wind data.</td>
</tr>
<tr>
<td><strong>Wind data for a given address</strong></td>
<td><a href="http://dw-tap.nrel.gov:5000/by_address">http://dw-tap.nrel.gov/by_address</a></td>
<td><a href="https://dw-tap.nrel.gov:5000/by_address">http://dw-tap.nrel.gov/by_address</a></td>
<td width="350px">After providing an address and the desired hub height, you will be able to see wind data for that location and height. You can also choose the output format.</td>
</tr>
<tr>
<td><strong>Raw time series</strong></td>
<td><a href="http://dw-tap.nrel.gov:5000/ts?height=65.00m&lat=39.743&lon=-105.147&year=2012" target="_blank" rel="noopener noreferrer">http://dw-tap.nrel.gov/ts?height=65.00m&lat=39.743&lon=-105.147</a></td>
<td><a href="https://dw-tap.nrel.gov:5000/ts?height=65.00m&lat=39.743&lon=-105.147&year=2012" target="_blank" rel="noopener noreferrer">https://dw-tap.nrel.gov/ts?height=65.00m&lat=39.743&lon=-105.147</a></td>
<td width="350px">Less user-friendly interface that allows external computational tools, dashboards, etc. access TAP's wind data.</td>
</tr>
<tr>
<td><strong>Bias-corrected wind speeds<sup>(NEW)</sup></strong></td>
<td><a href="http://dw-tap.nrel.gov:5000/bc?height=65.00m&lat=39.743&lon=-105.147&year=2012" target="_blank" rel="noopener noreferrer">http://dw-tap.nrel.gov/bc?height=35.00m&lat=41.2&lon=-93.18&year=2011</a></td>
<td><a href="https://dw-tap.nrel.gov:5000/bc?height=65.00m&lat=39.743&lon=-105.147&year=2012" target="_blank" rel="noopener noreferrer">https://dw-tap.nrel.gov/bc?height=35.00m&lat=41.2&lon=-93.18&year=2011</a></td>
<td width="350px">Apply bias correction using observational data and show monthly average wind speeds, with and without bias correction.</td>
</tr>
</table>
Expand Down

0 comments on commit e23dff1

Please sign in to comment.