A presentation of cnoidal wave theory for pratical application