A presentation of cnoidal wave theory for practical application