We calculate the distribution of the current density j in superconducting
films along the direction of an external field applied perpendicular to the
film plane. Our analysis reveals that in the presence of bulk pinning j is
inhomogeneous on a length scale of order the inter vortex distance. This
inhomogeneity is significantly enhanced in the presence of surface pinning. We
introduce new critical state model, which takes into account the current
density variations throughout the film thickness, and show how these variations
give rise to the experimentally observed thickness dependence of and
magnetic relaxation rate.Comment: RevTex, 9 PS figures. To appear in Phys. Rev.