I have two raster stack files ur
and vr
with u and v component of wind speed respectively.
How can I calculate average wind speed and direction in each grid cell ?
I know I can calculate wind direction using following equation
windir<-calc(atan2(vwind, uwind) * 360/2/pi) + 180
and average wind using
winav<- ((mean.u^2 + mean.v^2)^0.5)
My problem is how can I implement these equations on each grid cells of ur
and vr
I referred to this question and other links however still stocked in this calculation.