  For a nullhomologous Legendrian knot in a closed contact 3-manifold Y we
consider a contact structure obtained by positive rational contact surgery. We
prove that in this situation the Heegaard Floer contact invariant of Y is
mapped by a surgery cobordism to the contact invariant of the result of contact
surgery. In addition we characterize the spin-c structure on the cobordism that
induces the relevant map. As a consequence we determine necessary and
sufficient conditions for the nonvanishing of the contact invariant after
rational surgery when Y is the standard 3-sphere, generalizing previous results
of Lisca-Stipsicz and Golla. In fact our methods allow direct calculation of
the contact invariant in terms of the rational surgery mapping cone of
Ozsv\'ath and Szab\'o. The proof involves a construction called reducible open
book surgery, which reduces in special cases to the capping-off construction
studied by Baldwin.
