All custom functions are ignored
This is a show-stopper. I'm impressed myself that my tests don't cover this.
Here's a MWE:
# given
spat_df = pd.DataFrame([[0, 1, 2, 0], [0, 0, 0, 0], [0, 0, 0, 0], [50, 50, 50, 90]],
index=_spat_rownames, columns=['u_p0', 'v_p0', 'w_p0', 'u_p1'])
wsp_func = lambda y, z, **kwargs: 4 # constant wind speed
u_theory = np.array([4, 0, 0, 4])
# when
wsp_vals = gen_turb(spat_df, wsp_func=wsp_func, u_ref=10).mean()
# then
np.testing.assert_allclose(u_theory, wsp_vals)