Abstract. The uncertainty of physical parameters is a major reason for a poor precipitation simulation performance in Earth system models (ESMs), especially over the tropical and Pacific regions. Although tuning related parameters can help reduce such uncertainty factors, repetitive runs of ESMs incur large computational costs. While surrogate models can reduce the computational costs in many tuning scenarios, building an effective surrogate model for the community atmospheric model (CAM) is a complex integration of many processes, which is an unresolved challenge due to its strong nonlinear behaviors. In this study, we present a surrogate model-based parameter tuning framework for the CAM and apply it to improve the CAM5 precipitation performance. We propose a multilevel surrogate model-based optimization method. First, a global-level surrogate model is constructed with a gradient boosting regression tree (GBRT), which has been proven, through cross-validation experiments, to have a more significant effect than other methods. The candidate point approach (CAND) is applied to balance exploration and exploitation to obtain better values for establishing a local-level surrogate model. A local-level surrogate model is then constructed based on a much smaller number of chosen points. We design a trust region approach to adjust the sampling region during the tuning process. This proposed method has a faster convergence speed and higher accuracy during the tuning process. We attempt a region-based optimization method to improve the CAM simulation results over some areas with large errors. The results show that the surrogate model-based optimization method can significantly improve the simulation performance of the CAM model. The average improvement of the selected regions is 19 %. To integrate the optimization results of these regions, we design a nonuniform parameter parameterization scheme and integrate the parameters using a parameter smoothing scheme, and the experimental results improve in four regions. These experimental results demonstrate that the proposed method improves the precipitation simulation of the CAM model.