A numerical model for an interacting ice shelf and ocean is presented in which the ice- shelf base exhibits a channelized morphology similar to that observed beneath Petermann Gletscher’s (Greenland) floating ice shelf. Channels are initiated by irregularities in the ice along the grounding line and then enlarged by ocean melting. To a first approximation, spatially variable basal melting seaward of the grounding line acts as a steel-rule die or a stencil, imparting a channelized form to the ice base as it passes by. Ocean circulation in the region of high melt is inertial in the along-channel direction and geostrophically balanced in the transverse direction. Melt rates depend on the wavelength of imposed variations in ice thickness where it enters the shelf, with shorter wavelengths reducing overall melting. Petermann Gletscher’s narrow basal channels may therefore act to preserve the ice shelf against excessive melting. Overall melting in the model increases for a warming of the subsurface water. The same sensitivity holds for very slight cooling, but for cooling of a few tenths of a degree a reorganization of the spatial pattern of melting leads, surprisingly, to catastrophic thinning of the ice shelf 12 km from the grounding line. Subglacial discharge of fresh water along the grounding line increases overall melting. The eventual steady state depends on when discharge is initiated in the transient history of the ice, showing that multiple steady states of the coupled system exist in general.