  Poincar\'e-gravity modes described by the shallow water equations in a
rotating frame have non-trivial topology, providing a new perspective on the
origin of equatorially trapped Kelvin and Yanai waves. We investigate the
topology of rotating shallow water equations and continuously stratified
primitive equations in the presence of a background sinusoidal shear flow. The
introduction of a background shear flow not only breaks the Hermiticity and
homogeneity of the system but also leads to instabilities. We show that
singularities in the phase of the Poincar\'e waves of the unforced
shallow-water equations and primitive equations persist in the presence of
shear. Thus the bulk Poincar\'e bands have non-trivial topology and we expect
and confirm the persistence of the equatorial waves in the presence of shear
along the equator where the Coriolis parameter $f$ changes sign.
