-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathheatindexcomp.py
More file actions
23 lines (18 loc) · 822 Bytes
/
heatindexcomp.py
File metadata and controls
23 lines (18 loc) · 822 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
from mysci.readdata import read_data
from mysci.printdata import print_comparison
from mysci.computation import compute_heatindex
# Column naems and column indices to read
columns = {'date':0, 'time':1, 'tempout':2, 'humout':5, 'heatindex':13}
# Datatypes for each column
types = {'tempout': float, 'humout':float, 'heatindex':float}
# Read data
data = read_data(columns, types=types)
# Running function to compute heatindex
heatindex = []
for temp, humout in zip(data['tempout'],data['humout']):
heatindex.append(compute_heatindex(temp, humout))
print_comparison('Heatindex', data['date'], data['time'], data['heatindex'],
heatindex)
# DEBUG
#for windchill_data, windchill_comp in zip(data['windchill'],windchill):
# print(f'{windchill_data:.5f} {windchill_comp:.5f} {windchill_data-windchill_comp:.5f}')