Wind shear describes the change in wind speed as it gets closer to the ground. Experiments by the Danish Wind Industry Association (The world leaders in wind power technology) have developed a mathematical function that gives an estimated wind speed at any height given a measured mean wind speed at a known height and a description of ground roughness.
We calculate wind shear based on this calculation supplied by The Danish Wind Industry Association.
v = vref ln(z/z0)/ln(zref/z0)
v = wind speed at height z above ground level.
vref = reference speed, i.e. a wind speed we already know at height zref. ln(...) is the natural logarithm function.
z = height above ground level for the desired velocity, v.
z0 = roughness length in the current wind direction.