Skip to content

v3.7.0

Choose a tag to compare

@Rafnuss Rafnuss released this 05 Nov 09:25
7121797

GeoPressureR v3.7.0

Main

  • Default altitude retrieval to ERA5 "single-levels" in pressurepath_create(), pressurepath_create_api(), pressurepath_create_arco(), geopressure_timeseries() and geopressure_timeseries_arco(), based on the altitude validation findings. "land" and "both" remain supported, but computing "altitude" with them now gives a deprecation warning. Scripts relying on the previous defaults should specify their dataset explicitly to preserve their results.
  • Default pressure maps to ERA5 "single-levels" in geopressure_map() and geopressure_map_mismatch(). Explicit dataset overrides remain supported without deprecation warnings. tag_set_map() now defaults to scale = 4 (0.25°) and warns for higher values, which interpolate ERA5 single-levels data (#166).
  • Default pressure-path altitude to virtual temperature, matching GeoPressureAPI PR #32, based on the altitude validation. altitude_formula = "virtual" uses ERA5 2 m dewpoint to account for humidity and the temperature lapse rate of the GPT3 empirical troposphere model (Landskron & Böhm 2018), whose 1° grid is downloaded once from TU Wien and cached. On held-out radiosonde stations, bird-weighted altitude bias improves from −11.9 m to −3.2 m and mean absolute error from 16.4 m to 13.1 m. GeoPressureAPI still computes "virtual" with the lapse rate varying with season and latitude of PR #32 until it adopts GPT3. Use altitude_formula = "standard" in pressurepath_create() or its backend shortcuts to reproduce the previous formula. The pressure-path change requires coordinated deployment with GeoPressureAPI PR #32.
  • Use virtual altitude by default for time series too in geopressure_timeseries() and its API/ARCO shortcuts. Both backends honour altitude_formula = "virtual" or "standard" and era5_dataset = "single-levels" (default) or "land". Fix the seasonal lapse rate when one latitude is used for multiple dates. The API time-series change and shared Python altitude implementation are included in GeoPressureAPI PR #32, justified by the altitude validation.
  • Fix ARCO altitude using the elevation of the wrong longitude in pressurepath_create() and geopressure_timeseries(). Recent GDAL reads the ECMWF geopotential and land-sea mask grids already on −180…180, so forcing a 0…360 extent and rotating them shifted both by 180°: altitude used the surface elevation of the antipodal longitude (often ~0 m ocean), giving strongly negative ground and flight altitudes over high terrain (e.g. −1150 m instead of ~470 m in Valais). Pressure paths computed with source = "arco" should be recomputed.
  • Read path2elevation() ground elevation from precomputed Copernicus GLO-90 statistics instead of GeoPressureAPI. The minimum, 10th–90th percentiles and maximum of the 90 m DEM within each cell of the tag_set_map() grids (scale 1, 2, 4, 5, 10) are built reproducibly by data-raw/ground_elevation.R, published as the ground-elevation-v1 release and downloaded once per scale (0.4–33 MB). Arguments, defaults and output columns are unchanged. Percentiles now describe the real terrain within a cell (the API layers were smoothed, with valley floors up to ~1000 m too high, GeoPressureAPI#33), percentile also accepts 0 (minimum) and 100 (maximum), lon/lat are the centres of the cells read, and a call takes ~0.05 s instead of 2–10 s.

Minor

  • Validate path2elevation() percentiles locally before reading the precomputed terrain grid. Supported values are 0, 10, ..., 100; unsupported values fail with an actionable error.

  • Clarify path2elevation() computation and returned columns: document Copernicus DEM percentiles, elevation grid resolution versus sampling distance, missing positions and DEM values, and distance-based fractional stap_id. Add an example mapping median ground elevation onto a pressure path and computing altitude above ground level, assuming constant speed along each flight segment.

  • Add offline virtual-altitude regression tests for numerical parity, seasons and hemispheres, standard-formula reproducibility, API parameters, dewpoint retrieval and output structure. Replace the map-default test's rlang::abort() with cli::cli_abort().

  • Report why geopressure_map_mismatch() failed. When GeoPressureAPI returns no url for a stapelev, report the reason returned by Earth Engine instead of assuming ERA5 data are unavailable. A total failure still aborts and a partial failure still warns, naming the failing stapelev and the server's explanation.

  • Match every measurement to its nearest ERA5 hour on the ARCO backends of pressurepath_create() and geopressure_timeseries(), including the first. Measurements before the first full hour previously used the next hour, matching a GeoPressureAPI bug fixed in GeoPressureAPI#31.

Full Changelog: v3.6.8...v3.7.0