if the water is a matrix you can detect the height and therefore place the character around the height of the matrix.
you want the player to be sunken the water a little so an offset of the character with 10% sticking out of the water would suffice.
the next part would involve a bobbing sequence which could be acheived with a sin or cos adjustment to this offset variable from the given matrix height.
the last aspect is when you want to swim down so you would have an inverted jump code that makes you float back to the top after swimming down which is an adjustment of the offset variable.
If no-one gives your an answer to a question you have asked, consider:- Is your question clear.- Did you ask nicely.- Are you showing any effort to solve the problem yourself