Reads the NetCDF files and extract the variable requested along each flight defined by the edges.
Time: linear interpolation using the resolution requested with
rounding_interval
Space: nearest neighbour interpolation by default or bi-linear with
pracma::interp2
ifinterp_spatial_linear=TRUE
Pressure/altitude: linear interpolation using the exact
pressure
values
Arguments
- tag_graph
either a
tag
or agraph
GeoPressureR object.- edge_s
a index of the source node of the edge. Either a vector with 3D index or a matrix of 3 columns, one for each dimension.
- edge_t
a index of the target node of the edge. Either a vector with 3D index or a matrix of 3 columns, one for each dimension.
- pressure
pressure measurement of the associated
tag
data used to estimate the pressure level (i.e., altitude) of the bird during the flights. This data.frame needs to containdate
as POSIXt andvalue
in hPa.- variable
list of the variables to extract from the ERA5 pressure level using the
shortName
notation:"u"
,"v"
,"t"
,"cc"
,"r"
,"w"
,"ciwc"
,"clwc"
,"q"
,"cswc"
,"d"
,"z"
,"o3"
,"pv"
,'vo"
.- 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
FALSE
takes the nearest neighbour. ERA5 native resolution is 0.25°- return_averaged_variable
logical to return the variable for each timestep or average for the entire flight.
- file
absolute or relative path of the ERA5 wind data file to be downloaded. Function taking as single argument the stationary period identifier.
- quiet
logical to hide messages about the progress
Value
A data.frame with columns:
stap_s
id of the source/origin stationary periodstap_t
id of the target/destination stationary periods
node id of the source (same as/similar toedge_s
)t
node id of the target (same as/similar toedge_t
)lat_s
latitude of the sourcelat_t
latitude of the targetlon_s
longitude of the sourcelon_t
longitude of the targetstart
start datetime of the flightend
end datetime of the flightduration
flight durationn
number of flightdistance
distance of the flightbearing
bearing of the flightgs
groundspeedws
windspeed (ifgraph
provided)