Influence of ion attachment on the vertical distribution of the electric field and charge density below a thunderstorm