
Check the pressure error of a pressurepath per elevation level
Source: R/plot_pressurepath.R
pressurepath_check.RdReturn one row per stationary period and elevation level (stapelev) with the numbers behind
plot_pressurepath(type = "histogram"): the error between tag pressure and the normalised ERA5
surface pressure (pressure_tag - surface_pressure_norm), its empirical standard deviation
compared with the sd used for the pressure map, its offset and its outliers.
It also works on the output of geopressure_timeseries() for one stationary period, which gives
the fit of the pressure at a single position.
Discarded points are excluded from the error; flights are not summarised.
Usage
pressurepath_check(
pressurepath,
sd = attr(pressurepath, "sd"),
warning_std_thr = 3
)Arguments
- pressurepath
a GeoPressureR
pressurepathdata.frame (seepressurepath_create()) or the output ofgeopressure_timeseries()withpressure.- sd
standard deviation of the pressure error (hPa), one value or one per stationary period. Default is the
sdused bygeopressure_map(), or 1 if not available.- warning_std_thr
Threshold of outlier, coefficient of the z-score
Value
A data.frame with one row per stapelev:
stapelev:"{stap_id}|{elevation level}".stap_id.n: number of points used,n_discard: number of discarded points.error_sd: empirical standard deviation of the error (hPa).error_offset: mean ERA5 surface pressure minus mean tag pressure (hPa).sd: standard deviation used for the pressure map (hPa).sd_exceeded:error_sd > sd.n_outlier: number of points with|error| >= warning_std_thr * sd.error_max: largest absolute error (hPa).
See also
Other pressurepath:
geopressure_timeseries(),
plot_pressurepath(),
pressurepath_create(),
pressurepath_variable_available()
Examples
withr::with_dir(system.file("extdata", package = "GeoPressureR"), {
pressurepath <- load_interim("18LX", var = "pressurepath_most_likely")
})
pressurepath_check(pressurepath)
#> stapelev stap_id n n_discard error_sd error_offset sd sd_exceeded n_outlier
#> 1 1|0 1 424 0 0.45 -8.98 1 FALSE 0
#> 2 2|0 2 40 0 0.42 -12.39 1 FALSE 0
#> 3 3|0 3 27 6 0.57 9.38 1 FALSE 0
#> 4 4|0 4 32 0 0.48 60.21 1 FALSE 0
#> 5 5|0 5 95 0 0.42 -2.37 1 FALSE 0
#> error_max
#> 1 1.2062264
#> 2 0.9682285
#> 3 0.9529745
#> 4 1.0598633
#> 5 1.0467632