How is heat energy in the ocean measured (since it’s not temperature)?

Heat is the energy content of a system, measured in Joules; Watts = Joules per second. This measures the total molecular motion / vibration in a system
Temperature is measured in degrees (Fahrenheit, Centigrade, Kelvin). This measures the average molecular motion in a system.

An example that illustrates the difference:  If the following were both filled with water at 100°F, which would contain the most energy?

   

Since the bucket contains more molecules at the appropriate level of motion for 100°F, it contains more (heat) energy.

If you want to know more about how ocean energy is measured, check this link.