  In this paper we revisit the problem of a nematic liquid crystal in contact
with patterned substrates. The substrate is modelled as a periodic array of
parallel infinite grooves of well-defined cross section sculpted on a
chemically homogeneous substrate which favors local homeotropic anchoring of
the nematic. We consider three cases: a sawtooth, a crenellated and a
sinusoidal substrate. We analyse this problem within the modified Frank-Oseen
formalism. We argue that, for substrate periodicities much larger than the
extrapolation length, the existence of different nematic textures with distinct
far-field orientations, as well as the anchoring transitions between them, are
associated with the presence of topological defects either on or close to the
substrate. For the sawtooth and sinusoidal case, we observe a homeotropic to
planar anchoring transition as the substrate roughness is increased. On the
other hand, a homeotropic to oblique anchoring transition is observed for
crenellated substrates. In this case, the anchoring phase diagram shows a
complex dependence on the substrate roughness and substrate anchoring strength.
