  Ray tracing radiative transfer is a powerful method for comparing theoretical
models of black hole accretion flows and jets with observations. We present a
public code, grtrans, for carrying out such calculations in the Kerr metric,
including the full treatment of polarised radiative transfer and parallel
transport along geodesics. The code is written in Fortran 90 and efficiently
parallelises with OpenMP, and the full code and several components have Python
interfaces. We describe several tests which are used for verifiying the code,
and we compare the results for polarised thin accretion disc and semi-analytic
jet problems with those from the literature as examples of its use. Along the
way, we provide accurate fitting functions for polarised synchrotron emission
and transfer coefficients from thermal and power law distribution functions,
and compare results from numerical integration and quadrature solutions of the
polarised radiative transfer equations. We also show that all transfer
coefficients can play an important role in predicted images and polarisation
maps of the Galactic center black hole, Sgr A*, at submillimetre wavelengths.
