Internal function for splitting precipitation field provided by Ogimet and converting string to numerical value

precip_split(precip, pattern = "/12")

Arguments

precip

vector of characters with precipitation field from Ogimet

pattern

6h-12h-24h precipitation pattern to obtain written as: "/6h", "/12h" , "/24h" (see examples)

Examples

df <- ogimet_hourly(station = 12330)
#> [1] 12330 #> 2019 07 #> 2019 06 #> 2019 05
precip_split(df$Precmm, pattern = "/12") # to get 12h precipitation amounts
#> Error in precip_split(df$Precmm, pattern = "/12"): could not find function "precip_split"