This is similar to How is ocean heat content measured?, but here I'm thinking about the total content rather than fluxes in the content between land and ocean.
Equations for calculating the thermodynamic variables of sea water, humid air and other substances are set forth in the Numerical implementation and oceanographic application of the thermodynamic potentials of liquid water, water vapour, ice, seawater and humid air – Part 1: Background and equations by R. Feistel, D. G. Wright,†, D. R. Jackett, K. Miyagawa, J. H. Reissmann, W. Wagner, U. Overhoff, C. Guder ,A. Feistel, and G. M. Marion. Enthalpy of sea water is discussed in section 4.3.
One would need temperature, pressure and salinity information for each point in the ocean, and integrate specific enthalpy over the entire volume of the ocean.
Potential enthalpy is the better variable. TEOS-10 functions render the main work as doing the in situ measurements. Fortunately, a great amount of that has already been done (In Search of Ocean Heat).
One converts practical salinity or conductivity into Absolute Salinity, converts temperature into Conservative Temperature, and height (-depth) into Pressure.
Then the TEOS-10 functions can be used with those variables to calculate the requisite forms of enthalpy (specific enthalpy, dynamic enthalpy, potential enthalpy).