I wrote a Python script in Blender which creates a blocky version of an object with an ocean modifier, so you need to have this object added and animated by yourself.
It should work like this:
An ocean mesh is created by using the original ocean object's mesh, applying all modifiers.
Another mesh is created, all of the polygons facing to the top may be moved.
For each frame from start to end:
A shape key is added to the mesh.
The shape key data is being filled with rounded positions from the ocean.
Keyframes are inserted to make the shape key only influence the mesh at the current frame.
Use the system console to see at which frame it is working at the moment.
But every time I run the script, Blender crashes at a different frame.
The last message (right before the windows close) is this:
Here's my script: BlockyOcean.py