We introduce an explicit representation of Antarctic ice shelf cavities in the Estimating the Circulation and Climate of the Ocean, Phase II (ECCO2) ocean retrospective analysis; and compare resulting basal melt rates and patterns to independent estimates from satellite observations. Two simulations are carried out: The first is based on the original ECCO2 vertical discretization; the second has higher vertical resolution particularly at the depth range of ice shelf cavities. The original ECCO2 vertical discretization produces higher than observed melt rates and leads to a misrepresentation of Southern Ocean water mass properties and transports. In general, thicker levels at the base of the ice shelves lead to increased melting because of their larger heat capacity. This strengthens horizontal gradients and circulation within and outside the cavities and, in turn, warm water transports from the shelf break to the ice shelves. The simulation with more vertical levels produces basal melt rates (1735 ± 164 Gt/a) and patterns that are in better agreement with observations. Thinner levels in the sub-ice-shelf cavities improve the representation of a fresh/cold layer at the ice shelf base and of warm/salty water near the bottom, leading to a sharper pycnocline and reduced vertical mixing underneath the ice shelf. Improved water column properties lead to more accurate melt rates and patterns, especially for melt/freeze patterns under large cold-water ice shelves. At the 18 km grid spacing of the ECCO2 model configuration, the smaller, warm-water ice shelves cannot be properly represented, with higher than observed melt rates in both simulations.