Skip to content

Commit

Permalink
Apparent Temperature Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
cloneofghosts authored Oct 27, 2024
1 parent 6961454 commit 73dd042
Showing 1 changed file with 4 additions and 13 deletions.
17 changes: 4 additions & 13 deletions responseECS_LMDB2.py
Original file line number Diff line number Diff line change
Expand Up @@ -1949,19 +1949,10 @@ def PW_Forecast(

# Apparent Temperature, Radiative temperature formula
# https: // github.com / breezy - weather / breezy - weather / discussions / 1085
# AT = Ta + 0.33 × rh / 100 × 6.105 × exp(17.27 × Ta / (237.7 + Ta)) − 0.70 × ws − 4.00

InterPcurrent[5] = (
(InterPhour[:, 5] - 273.15)
+ 0.33
* InterPhour[:, 8]
* 6.105
* np.exp(
17.27 * (InterPhour[:, 5] - 273.15) / (237.7 + (InterPhour[:, 5] - 273.15))
)
- 0.70 * (InterPhour[:, 10] / windUnit)
- 4.00
) + 273.15
# AT = Ta + 0.33 × (rh / 100 × 6.105 × exp(17.27 × Ta / (237.7 + Ta))) − 0.70 × ws − 4.00

e = InterPhour[:, 8] * 6.105 * np.exp(17.27 * (InterPhour[:, 5] - 273.15) / (237.7 + (InterPhour[:, 5] - 273.15)))
InterPcurrent[5] = ((InterPhour[:, 5] - 273.15) + 0.33 * e - 0.70 * (InterPhour[:, 10] / windUnit) - 4.00 ) + 273.15

### Feels Like Temperature
AppTemperatureHour = np.full((len(hour_array_grib), 2), np.nan)
Expand Down

0 comments on commit 73dd042

Please sign in to comment.