  Local models are schemes defined in linear algebra terms that describe the
'etale local structure of integral models for Shimura varieties and other
moduli spaces. We point out that the flatness conjecture of Rapoport-Zink on
local models fails in the presence of ramification and that in that case one
has to modify their definition. We study in detail certain modifications of the
local models for G=R_{E/F}GL(n), with E/F a totally ramified extension, and for
a maximal parahoric level subgroup. The special fibers of these models are
subschemes of the affine Grassmannian. We show that the new local models are
smoothly equivalent to "rank varieties" of matrices, are flat, normal, with
rational singularities and that their special fibers contain the expected
Schubert strata. A corollary is that Schubert varieties in the affine
Grassmannian are smoothly equivalent to nilpotent orbit closures and are normal
with rational singularities, even in positive characteristics. We give some
applications to the calculation of sheaves of nearby cycles and describe a
relation with geometric convolution. Finally, in the general EL case, we
replace the flatness conjecture of Rapoport-Zink with a conjecture about the
modified local models.
