Prepare pressure data for geopositioning
Source:R/geopressure_map_preprocess.R
geopressure_map_preprocess.Rd
Performs the follow pre-processing for the pressure data.frame:
Remove discarded and flight pressure measurements.
Group pressure measurements by stationary period and elevation level.
Smooth and downscale pressure to a 1 hour resolution to match ERA5 data.
This function is used within geopressure_map_mismatch()
but can be useful to check the
pressure data sent to the GeoPressureAPI.
Examples
withr::with_dir(system.file("extdata", package = "GeoPressureR"), {
tag <- tag_create("18LX", quiet = TRUE) |> tag_label(quiet = TRUE)
})
pressure_processed <- geopressure_map_preprocess(tag)
str(pressure_processed)
#> 'data.frame': 311 obs. of 6 variables:
#> $ date : POSIXct, format: "2017-07-27 00:00:00" "2017-07-27 01:00:00" ...
#> $ value : num 989 990 989 990 990 ...
#> $ label : chr "" "" "" "" ...
#> $ stap_id : num 1 1 1 1 1 1 1 1 1 1 ...
#> $ stapelev : chr "1|0" "1|0" "1|0" "1|0" ...
#> $ date_ireg: POSIXct, format: "2017-07-27 00:00:00" "2017-07-27 01:00:00" ...