added BL detection code to ML turbulence