Depolarizing field in temperature-graded ferroelectrics from an atomistic viewpoint