Skip to content
This repository has been archived by the owner on Sep 27, 2023. It is now read-only.

Fix nsrdb weather #1168

Merged
merged 3 commits into from
May 13, 2022
Merged
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
4 changes: 2 additions & 2 deletions tools/nsrdb_weather.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@
* [https://nsrdb.nrel.gov/data-sets/api-instructions.html]
"""

import sys, os, json, requests, pandas, numpy, datetime
import sys, os, json, requests, pandas, numpy, datetime, math

leap = True
interval = 60
Expand Down Expand Up @@ -293,7 +293,7 @@ def heat_index(T,RH):
+ 0.00085282*T*RH*RH \
- 0.00000199*T*T*RH*RH
if RH < 13 and T < 112:
return HI - ((13-RH)/4)*sqrt((17-fabs(T-95.))/17)
return HI - ((13-RH)/4)*math.sqrt((17-math.fabs(T-95.))/17)
elif RH > 85 and T < 87:
return HI + ((RH-85)/10) * ((87-T)/5)
else:
Expand Down