Magnetized compact vortices in stably stratified atmospheres