  We investigate the asymptotic behavior as $t\to+\infty$ of solutions to a
weighted porous medium equation in $ \mathbb{R}^N $, whose weight $\rho(x)$
behaves at spatial infinity like $ |x|^{-\gamma} $ with subcritical power,
namely $ \gamma \in [0,2) $. Inspired by some results by Alikakos-Rostamian and
Kamin-Ughi from the 1980s on the unweighted problem, we focus on solutions
whose initial data $u_0(x)$ are not globally integrable with respect to the
weight and behave at infinity like $ |x|^{-\alpha} $, for
$\alpha\in(0,N-\gamma)$. In the special case $ \rho(x)=|x|^{-\gamma} $ and $
u_0(x)=|x|^{-\alpha} $ we show that self-similar solutions of Barenblatt type,
i.e. reminiscent of the usual source-type solutions, still exist, although they
are no longer compactly supported. Moreover, they exhibit a transition
phenomenon which is new even for the unweighted equation. We prove that such
self-similar solutions are attractors for the original problem, and convergence
takes place globally in suitable weighted $ L^p $ spaces for $p\in[1,\infty)$
and even globally in $L^\infty$ under some mild additional regularity
assumptions on the weight. Among the fundamental tools that we exploit, it is
worth mentioning a global smoothing effect for non-integrable data.
