Moulay Ismail considered this early-18th-century complex one of his finest architectural projects, and on paper it's a marvel. The massive, thick-walled, barrel-vaulted granaries (tribes paid taxes in grain) were kept cool through a system of underfloor water channels, drawing from a cistern below. Outside to the west are the remains of stables for a supposed 12,000 horses. In practice, unless you're particularly interested in water engineering, there is not much to see, considering the rather steep admission price.
If you do visit, don't miss the room tucked away in the far right corner of the granary, where a noria is installed. The horse-driven water wheel would have once drawn up buckets of water from the cistern. Beyond the granary lie the stables, with row upon row set at angles to give the stable masters maximum visibility of their steeds across a huge area. Its flat roof likely collapsed during an 18th-century earthquake.
In summer, it’s a long (2km) hot walk from Moulay Ismail’s mausoleum, so you might prefer a taxi or horse carriage. If you walk, follow the road from the mausoleum south between the high walls and past the main entrance of the Royal Palace (no visitors) to find the entrance straight ahead.