View source: R/graph_add_wind.R
graph_add_wind | R Documentation |
graph
Reads the NetCDF files downloaded and interpolate the average windspeed experienced by the bird on each possible edge, as well as the corresponding airspeed.
In addition, the graph can be further pruned based on a threshold of airspeed thr_as
.
See section 2.2.4 in Nussbaumer (2023b) for more technical details and the GeoPressureManual for an illustration on how to use it.
graph_add_wind(
graph,
pressure,
rounding_interval = 60,
interp_spatial_linear = FALSE,
file = function(stap_id)
glue::glue("./data/wind/{graph$param$id}/{graph$param$id}_{stap_id}.nc"),
thr_as = Inf,
quiet = FALSE
)
graph |
a GeoPressureR graph object. |
pressure |
pressure measurement of the associated |
rounding_interval |
temporal resolution on which to query the variable (min). Default is to match ERA5 native resolution (1hr). |
interp_spatial_linear |
logical to interpolate the variable linearly over space, if |
file |
absolute or relative path of the ERA5 wind data file to be downloaded. Function taking as single argument the stationary period identifier. |
thr_as |
threshold of airspeed (km/h). |
quiet |
logical to hide messages about the progress |
a graph
object with windspeed and airspeed as ws
and as
respectively.
Nussbaumer, Raphaël, Mathieu Gravey, Martins Briedis, Felix Liechti, and Daniel Sheldon. 2023. Reconstructing bird trajectories from pressure and wind data using a highly optimized hidden Markov model. Methods in Ecology and Evolution, 14, 1118–1129 https://doi.org/10.1111/2041-210X.14082.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.