Ocean thermal energy is harnessed using the:
temperature difference at different levels in the ocean
Ocean thermal energy uses the temperature difference between cooler deep and warmer surface water to run a heat engine and do useful work. This work is converted into electricity and stored for various uses.