If you mean, "how can you measure flow rate in a partially filled (water) pipe?", there are commercial packages that combine ultrasonic level measurement with a velocity measurement
or a magnetic flow meter for velocity and an integrated capacitive level measurement:
Google
measure flow in partially filled pipe with ultrasonic level
As far as I know, there are special testers. I was once present at such tests, but couldn't get close due to security measures. High pressure in the tube, it could work.