I have this NetCDF file (about 130 kb size). I want to get for each day (layer) the wind direction (in meteorological or geographical directions) at every cell.
library(raster) u <- brick("uv_comp.nc", varname = "u10") v <- brick("uv_comp.nc", varname = "v10") dirs <- atan2(v[], u[]) / (2*3.14159265) + (0.5 * 360) # for the first layer
However, I am not very sure that this method is the correct one. Can anyone confirm, please?