The magnitude of the horizontal velocity vector, sqrt(u^2 + v^2). Reproduces
the uv covariate of Ross et al. (2023).
Details
Their uv_grad is the spatial derivative of that speed field, not of the
velocity components, so it is two steps:
The order matters. Differentiating u and v separately and combining
afterwards gives a different quantity: speed is a non-linear function of the
components, so the gradient of the speed is not the speed of the gradients.
References
Ross C, Runge J, Roberts J, Brady D, Tupper B, Record N (2023). Estimating North Atlantic right whale prey based on Calanus finmarchicus thresholds. Marine Ecology Progress Series 703, 1-16. doi:10.3354/meps14204
Examples
if (FALSE) { # \dontrun{
# UO and VO are the defaults, so a dictionary fetch needs no column names
env <- current_speed(env) |> horizontal_gradient("speed")
# If the fetch used Copernicus codes instead
env <- current_speed(env, u = "uo", v = "vo")
} # }