Open ethanplunkett opened 1 year ago
How would flux estimates work for species where many tracks cross the ocean? For some bird species, ocean crossings and/or non-straight-line migration trajectories are the norm, so being able to calculate fluxes across our grid seems tricky at best.
I suggest having a parameter that allows the circle radius (around the center point of the cell) to be different from the grid cell size and then dividing by the length and time units so the measurement has units
birds / km / hr
This matches with the standard "migration traffic rate (MTR)" used in radar analysis. This will help decouple the measurement from the grid dimensions and give a measurement that can be thought of as a pointwise measurement of traffic near a location.
It's dependent on the assumption that migration between stops is linear so will be less accurate when that assumption isn't met but I still think it would be useful.
Good point @slager that birds cross cells that aren't active in our model, output should probably be for all cells in the extent not just active cells, so the logical array"s third dimension would be nrow(bf) x ncol(bf). For efficiency it could be trimmed down to the subset of cells that are crossed with a mask made just for that purpose.
@dsheldon that seems reasonable but requires a total population estimate to convert between density and number of birds. We don't currently have that in the species information.
We can keep the numerator in units of fraction of the population, then let users convert if they want to hazard a guess at the total population. This is consistent with radar work, where the density is proportional to the number of birds through difficult-to-estimate constants.
Figure out how to summarize direction too. Perhaps in directional bins, perhaps as a mean and SD.
Use great circle distances and spherical coordinates.
@dsheldon Do you think we should count arriving birds, departing birds, and birds passing overhead? I see arguments for:
As I've implemented it the user can input points or if they don't all cells in the BirdFlow raster extent that are active OR fall between active cells are used as the points. Thus with the defaults behavior the points fall on the center of BirdFlow cells. When the user submits arbitrary points (say radar station locations) then it is less clear what (1) and (2) mean, but we could look up the cells that the points fall within and exclude them in the betweenness array.
For now I'm proceeding with (3) but it's easy to change.
Preliminary non-directional flux (maybe "net migration" is a better term for this?):
For American Woodcock based on BirdFlowModels::amewoo
Regarding your previous question: I support counting birds that arrive or depart in addition to passing over, as they would appear airborne in the circle of specified radius.
I would not count birds that start and end in a cell that intersects with the circle, as the mostly likely situation is that those birds are not migrating.
Note #176 includes non-directional flux only.
is_between()
on a toy example
Currently all our modelling is based on stopping locations. However, with big movements many birds may pass over cells without stopping. To answer the question how many birds pass through a cell (or approximation of one) in a given week we would sum the density of not just the birds that stop or start from that cell but also any birds that, in that week's movement, pass through the cell.
To approximate this we'd first build a n x n x n array where n is
n_active()
the first dimension is the starting location index, the second dimension is the ending location index, and the third dimensions is touched locations. Cell values would beTRUE
if the location indicated by the third dimension is on the path between the first and second dimension. "Touching" would be defined here as the cell center being within 1/2 the cell width of the line. This is equivalent to drawing a circle within each square cell that touches the four sides and seeing if the line touches or crosses through that circle.We could then, for any given timestep, determine the total density that enters, leaves, or passes through each cell: the bird flux.
We could also calculate a density weighted average vector for all the birds that pass through the cell. I think we'd want to include stationary birds in this calculation too.