  Let G be a ribbon graph, i.e., a connected finite graph G together with a
cyclic ordering of the edges around each vertex. By adapting a construction due
to O. Bernardi, we associate to any pair (v,e) consisting of a vertex v and an
edge e adjacent to v a bijection between spanning trees of G and elements of
the set Pic^g(G) of degree g divisor classes on G, where g is the genus of G.
Using the natural action of the Picard group Pic^0(G) on Pic^g(G), we show that
the Bernardi bijection gives rise to a simply transitive action \beta_v of
Pic^0(G) on the set of spanning trees which does not depend on the choice of e.
  A plane graph has a natural ribbon structure (coming from the
counterclockwise orientation of the plane), and in this case we show that
\beta_v is independent of v as well. Thus for plane graphs, the set of spanning
trees is naturally a torsor for the Picard group. Conversely, we show that if
\beta_v is independent of v then G together with its ribbon structure is
planar. We also show that the natural action of Pic^0(G) on spanning trees of a
plane graph is compatible with planar duality.
  These findings are formally quite similar to results of Holroyd et al. and
Chan-Church-Grochow, who used rotor-routing to construct an action r_v of
Pic^0(G) on the spanning trees of a ribbon graph G, which they show is
independent of v if and only if G is planar. It is therefore natural to ask how
the two constructions are related. We prove that \beta_v = r_v for all vertices
v of G when G is a planar ribbon graph, i.e. the two torsor structures
(Bernardi and rotor-routing) on the set of spanning trees coincide. In
particular, it follows that the rotor-routing torsor is compatible with planar
duality. We conjecture that for every non-planar ribbon graph G, there exists a
vertex v with \beta_v \neq r_v.
