brightwind-dev / brightwind

Python library containing wind analysis functions
MIT License
46 stars 15 forks source link

[load_GSOD] Getting GSOD data #182

Open ShaneBrightWind opened 4 years ago

ShaneBrightWind commented 4 years ago

To get GSOD data, use the GSOD kmz file to find the station of interest. Using this click on get data. You will be redirected to a webpage, where you can put in the time period you want. Fill this in, and you will get a link to a text file. Copy this link and use the following code to create a dataframe of daily average windspeeds in m/s.

from datetime import datetime GS1 = pd.read_csv('https://www1.ncdc.noaa.gov/pub/orders/CDO7431147970474.txt') GS1['TMP'] = GS1[' YEARMODA'].apply(lambda x: pd.to_datetime(str(x), format='%Y%m%d')) GSOD = GS1[['TMP',' WDSP']] GSOD[' WDSP'] = GSOD[' WDSP'] * 0.514444 GSOD = GSOD.set_index('TMP')

stephenholleran commented 4 years ago

Where on the web can the kmz be downloaded from?

ShaneBrightWind commented 4 years ago

Not sure where it can be found online, but we have it downloaded here. Might take a while to dig out the original.