diff options
author | Jonas Gunz <himself@jonasgunz.de> | 2023-07-31 18:11:45 +0200 |
---|---|---|
committer | Jonas Gunz <himself@jonasgunz.de> | 2023-07-31 18:11:45 +0200 |
commit | 002d189b2d16a32f9d8b9b0858c3e21417b77170 (patch) | |
tree | 633739dbe67e6455b42bcf4029ce4c48181b8706 | |
parent | 6882197f35fe5310c7f78f54435c989c85a4d898 (diff) | |
download | meteo_toolbox-002d189b2d16a32f9d8b9b0858c3e21417b77170.tar.gz |
fix skewt double p values
-rwxr-xr-x | skewt.py | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -23,9 +23,9 @@ TIME='23:00:00' URL=f'http://weather.uwyo.edu/cgi-bin/bufrraob.py?datetime={DATE}%20{TIME}&id={STATION}&type=TEXT:CSV' print(URL) -#result = requests.get(URL) -#RAW_DATA_LINES=result.content.decode('UTF-8').splitlines() -RAW_DATA_LINES= open('data.csv').readlines() +result = requests.get(URL) +RAW_DATA_LINES=result.content.decode('UTF-8').splitlines() +#RAW_DATA_LINES= open('data.csv').readlines() p = [] T = [] @@ -40,6 +40,9 @@ for row in csvreader: # skip any line with empty values continue + if float(row[3]) in p: # Skip double p entries + continue + p.append(float(row[3])) T.append(float(row[5])) Td.append(float(row[6])) |