Downloading the measurements of the vertical profile of atmosphere (also known as sounding data). Data can be retrieved using TEMP and BUFR sounding formatting.
sounding_wyoming(
wmo_id,
yy,
mm,
dd,
hh,
min = 0,
bufr = FALSE,
allow_failure = TRUE
)
http://weather.uwyo.edu/upperair/sounding.html
international WMO station code (World Meteorological Organization ID); For Polish stations: Leba - 12120, Legionowo - 12374, Wrocław- 12425
year - single number
month - single number denoting month
day - single number denoting day
hour - single number denoting initial hour of sounding; for most stations this measurement is done twice a day (i.e. at 12 and 00 UTC), sporadically 4 times a day
minute - single number denoting initial minute of sounding; applies only to BUFR soundings.
BUFR or TEMP sounding to be decoded. By default TEMP is used. For BUFR soundings use bufr = TRUE
logical - whether to proceed or stop on failure. By default set to TRUE (i.e. don't stop on error). For debugging purposes change to FALSE
Returns two lists with values described at: weather.uwyo.edu ; The first list contains:
PRES - Pressure (hPa)
HGHT - Height (metres)
TEMP - Temperature (C)
DWPT - Dew point (C)
RELH - Relative humidity (%)
MIXR - Mixing ratio (g/kg)
DRCT - Wind direction (deg)
SKNT - Wind speed (knots)
THTA = (K)
THTE = (K)
THTV = (K)
The second list contains metadata and calculated thermodynamic / atmospheric instability indices (for TEMP soundings only)
A list of 2 data.frames where first data frame represents parameters of upper parts o with columns describing the meteorogical parameters (e.g. temperature, air pressure) where each row represent a measurement, depending on the height. Second data.frame presents a description of the conditions under which the sounding was carried out.
# \donttest{
##############################################################################
# download data for Station 45004 starting 1120Z 11 Jul 2021; Kowloon, HONG KONG, CHINA
# using TEMP and BUFR sounding formats
##############################################################################
TEMP = sounding_wyoming(wmo_id = 45004, yy = 2021, mm = 07, dd = 17,
hh = 12, min = 00)
#> HTTP response code said error [weather.uwyo.edu]: The requested URL returned error: 503
#> Service not working or wmo_id or date not correct. Check url:
#> http://weather.uwyo.edu/cgi-bin/sounding?TYPE=TEXT%3ALIST&YEAR=2021&MONTH=07&FROM=1712&TO=1712&STNM=45004
head(TEMP[[1]])
#> NULL
BUFR = sounding_wyoming(wmo_id = 45004, yy = 2021, mm = 07, dd = 17,
hh = 12, min = 00, bufr = TRUE)
#> /tmp/Rtmp95w7yv/file17d024f99bf4
head(BUFR[[1]])
#> PRES HGHT TEMP DWPT RELH MIXR DRCT SKNT THTA THTE THTV
#> 1 1000.0 50 NA NA NA NA NA NA NA NA NA
#> 2 998.2 66 27.7 23.7 79 18.85 27 0.4 301.0 356.7 304.4
#> 3 996.1 84 27.7 23.8 79 19.00 120 4.7 301.2 357.4 304.6
#> 4 995.1 93 27.7 23.8 79 18.96 120 5.6 301.3 357.4 304.7
#> 5 993.9 104 27.6 23.6 79 18.76 120 6.0 301.3 356.8 304.7
#> 6 992.7 115 27.5 23.5 79 18.69 120 6.4 301.3 356.6 304.6
##############################################################################
### example with a random date to download sounding from LEBA, PL station: ###
##############################################################################
profile = sounding_wyoming(wmo_id = 12120,
yy = sample(2000:2019,1),
mm = sample(1:12,1),
dd = sample(1:20,1),
hh = 0)
#> HTTP response code said error [weather.uwyo.edu]: The requested URL returned error: 503
#> Service not working or wmo_id or date not correct. Check url:
#> http://weather.uwyo.edu/cgi-bin/sounding?TYPE=TEXT%3ALIST&YEAR=2012&MONTH=07&FROM=1200&TO=1200&STNM=12120
# plot(profile[[1]]$HGHT, profile[[1]]$PRES, type = 'l')
# }