Download rawinsonde measurement from sounding database of the University of Wyoming in a form convenient to use with thundeR package. In case of problems with downloading the chosen dataset the url is checked 5 times in 5-second intervals.
get_sounding(wmo_id, yy, mm, dd, hh, metadata = FALSE)
http://weather.uwyo.edu/upperair/sounding.html
international WMO station code (e.g. 11035 for Vienna)
year - single number (e.g. 2010)
month - single number (e.g. 5)
day - single number (e.g. 23)
hour - single number (e.g. 0)
- logical, whether to return metadata of downloaded sounding; default FALSE
Returns two lists with values described at: weather.uwyo.edu ; The first list contains:
pressure - pressure [hPa]
altitude - altitude [meters]
temp - temperature [degree Celsius]
dpt - dew point temperature [degree Celsius]
wd - wind direction [azimuth in degrees]
ws - wind speed [knots]
If metadata = TRUE then retrieved data is wrapped into a second list containing available metadata
# \donttest{
# download rawinsonde profile from Leba station (WMO ID: 12120) for 20 August 2010 1200 UTC:
profile = get_sounding(wmo_id = 12120,
yy = 2010,
mm = 8,
dd = 20,
hh = 12)
#> /tmp/RtmppvlOAU/file19cc677ecfe9
head(profile)
#> pressure altitude temp dpt wd ws
#> 1 1021 6 19.8 13.8 265 12
#> 2 1020 14 18.4 11.4 265 12
#> 3 1000 183 16.6 11.6 265 14
#> 4 962 512 13.6 9.2 265 16
#> 5 955 573 13.6 4.6 265 16
#> 6 925 841 11.2 3.2 265 17
# }