Under investigation in this paper is the AB system describing marginally unstable baroclinic wave packets in geophysical fluids. By means of the n -fold modified Darboux transformation, the semirational solutions in terms of the determinants of the AB system are derived. These solutions, which are a combination of rational and exponential functions, can be used to model the nonlinear superposition of the Akhmediev breathers (or the Kuznetsov-Ma breathers) and the rogue waves. The k -order rogue wave of the AB system is produced by the interaction between the l-order rogue wave with $\frac{1}{2}(k-l)(k+l+1)$ neighboring elements in the $(k-l)$ -order breathers $(0<l<k)$ . The proper values of eigenvalue $ \lambda$ and shift $ S_{0}$ are also the requirement for generating the higher-order rogue waves. The link between the baseband modulational instability and the existence condition of these rogue waves is revealed.