A method for removing water build-up in a hydrocarbon storage tank, wherein the water build-up creates an oil-water interface in the hydrocarbon storage tank, the method comprising the steps of: generating a first input data stream and a second input data stream using an oil-water interface sensor located in the hydrocarbon storage tank, the oil-water interface sensor comprising: a first probe, the first probe located at a bottom portion of the hydrocarbon storage tank, the first probe generating the first input data stream; and a second probe, the second probe located in the hydrocarbon storage tank above the first probe, the second probe generating the second input data stream; processing the first input data stream and the second input data stream to determine a vertical displacement of the oil-water interface; comparing the vertical displacement of the oil-water interface against a first predetermined value; generating an output data stream responsive to the comparing step, wherein the output data stream includes instructions to maintain a controllable valve either in an open position or in a closed position; communicating the output data stream to the controllable valve such that the controllable valve is maintained either in the open position or in the closed position; wherein the controllable valve is fluidly connected to a drain line, the drain line fluidly connected to the bottom portion of the hydrocarbon storage tank; and monitoring integrity of the controllable valve using an analytics sensor, wherein the analytics sensor is a sound velocity sensor located on a vertical section of the drain line, the sound velocity sensor measuring the sound velocity of a transmitted sound wave travelling across the drain line, wherein the water build-up is removed via the drain line as the controllable valve is maintained in the open position. generating a first input data stream and a second input data stream using an oil-water interface sensor located in the hydrocarbon storage tank, the oil-water interface sensor comprising: a first probe, the first probe located at a bottom portion of the hydrocarbon storage tank, the first probe generating the first input data stream; and a second probe, the second probe located in the hydrocarbon storage tank above the first probe, the second probe generating the second input data stream; a first probe, the first probe located at a bottom portion of the hydrocarbon storage tank, the first probe generating the first input data stream; and a second probe, the second probe located in the hydrocarbon storage tank above the first probe, the second probe generating the second input data stream; processing the first input data stream and the second input data stream to determine a vertical displacement of the oil-water interface; comparing the vertical displacement of the oil-water interface against a first predetermined value; generating an output data stream responsive to the comparing step, wherein the output data stream includes instructions to maintain a controllable valve either in an open position or in a closed position; communicating the output data stream to the controllable valve such that the controllable valve is maintained either in the open position or in the closed position; wherein the controllable valve is fluidly connected to a drain line, the drain line fluidly connected to the bottom portion of the hydrocarbon storage tank; and monitoring integrity of the controllable valve using an analytics sensor, wherein the analytics sensor is a sound velocity sensor located on a vertical section of the drain line, the sound velocity sensor measuring the sound velocity of a transmitted sound wave travelling across the drain line, wherein the water build-up is removed via the drain line as the controllable valve is maintained in the open position.