An improved adjoint-based ocean wave reconstruction and prediction method