A discrete spherical harmonics method for radiative transfer analysis in inhomogeneous polarized planar atmosphere