trend removal changes in sharp_flux_velocity.c