A model for the transition to baroclinic chaos