Skip to contents

Performs the follow pre-processing for the pressure data.frame:

  1. Remove discarded and flight pressure measurements.

  2. Group pressure measurements by stationary period and elevation level.

  3. 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.

Usage

geopressure_map_preprocess(tag, compute_known = FALSE)

Arguments

tag

a GeoPressureR tag object

compute_known

logical defining if the map(s) for known stationary period should be estimated based on twilight or hard defined by the known location stap$known_l**

Value

Pressure data.frame without flight and discarded values, on a 1 hour resolution.

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" ...