geopressure_map_preprocess: Prepare pressure data for 'geopressure_map()'

View source: R/geopressure_map_preprocess.R

geopressure_map_preprocessR Documentation

Prepare pressure data for geopressure_map()

Description

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)

# Plotting pressure displays the raw data (in grey) with the processed data from
# `geopressure_map_preprocess` (as coloured line)
plot_tag_pressure(tag, quiet = TRUE)


Rafnuss/GeoPressureR documentation built on April 17, 2025, 12:58 p.m.