Many studies estimate social discount rates based on the Ramsey rule. The rule has been augmented in various ways in order to reflect the decision maker's attitude toward risk and uncertainty. In this article, we adopt the recursive utility with ambiguity of Ju and Miao and develop a general social discount rate formula via the utility gradient method. The derived formula allows us to obtain the three-way explicit separation of risk aversion, intertemporal substitution, and ambiguity aversion as in Traeger. It also goes beyond the classical two-period setting and thus term structures of social discount rates under ambiguity can be studied. Due to the generality of this approach, we can directly apply the well-known growth scenarios under climate change so as to derive scenario-based social discount rates, which can be used as a guide in practice to assess climate change policies or related projects.