Adjoint-based online learning of two-layer quasi-geostrophic baroclinic turbulence