  We describe a higher dimensional generalization of Ramanujan's differential
equations satisfied by the Eisenstein series $E_2$, $E_4$, and $E_6$. This will
be obtained geometrically as follows. For every integer $g\ge 1$, we construct
a moduli stack $\mathcal{B}_g$ over $\mathbf{Z}$ classifying principally
polarized abelian varieties of dimension $g$ equipped with a suitable
additional structure: a symplectic-Hodge basis of its first algebraic de Rham
cohomology. We prove that $\mathcal{B}_g$ is a smooth Deligne-Mumford stack
over $\mathbf{Z}$ of relative dimension $2g^2 + g$ and that
$\mathcal{B}_g\otimes \mathbf{Z}[1/2]$ is representable by a smooth
quasi-projective scheme over $\mathbf{Z}[1/2]$. Our main result is a
description of the tangent bundle $T_{\mathcal{B}_g/\mathbf{Z}}$ in terms of
the cohomology of the universal abelian scheme over the moduli stack of
principally polarized abelian varieties $\mathcal{A}_g$. We derive from this
description a family of $g(g+1)/2$ commuting vector fields $(v_{ij})_{1\le i
\le j \le g}$ on $\mathcal{B}_g$; these are the higher Ramanujan vector fields.
In the case $g=1$, we show that $v_{11}$ coincides with the vector field
associated to the classical Ramanujan equations.
  This geometric framework taking account of integrality issues is mainly
motivated by questions in transcendental number theory. In the upcoming second
part of this work, we shall relate the values of a particular analytic solution
to the differential equations defined by $v_{ij}$ with Grothendieck's periods
conjecture on abelian varieties.
