  The equivalence of cooling to the gradient flow when the cooling step $n_c$
and the continuous flow step of gradient flow $\tau$ are matched is generalized
to gauge actions that include rectangular terms. By expanding the link
variables up to subleading terms in perturbation theory, we relate $n_c$ and
$\tau$ and show that the results for the topological charge become equivalent
when rescaling $\tau \simeq n_c/({3-15 c_1})$ where $c_1$ is the Symanzik
coefficient multiplying the rectangular term. We, subsequently, apply cooling
and the gradient flow using the Wilson, the Symanzik tree-level improved and
the Iwasaki gauge actions to configurations produced with $N_f=2+1+1$ twisted
mass fermions. We compute the topological charge, its distribution and the
correlators between cooling and gradient flow at three values of the lattice
spacing demonstrating that the perturbative rescaling $\tau \simeq n_c/({3-15
c_1})$ leads to equivalent results.
