Rapid and cost-effective estimation of soil total nitrogen (TN) is essential for soil fertility assessment and nutrient management. However, the performance of laboratory visible–near-infrared (Vis–NIR) models is shaped not only by preprocessing and modeling strategy but also by sample preparation and the soil’s compositional background. In this study, TN prediction was evaluated using 376 topsoil samples from two contrasting datasets: Mollisols from the black-soil region of Northeast China and Ultisols from Qiyang County, Hunan Province, southern China. Spectra acquired over 350–2500 nm for three particle-size fractions were preprocessed using Savitzky–Golay smoothing combined with standard normal variate (SNV), first-derivative, or second-derivative transformations, and modeled using partial least squares regression (PLSR), support vector regression (SVR), and extreme gradient boosting (XGBoost). Model development used a 5 × 5 nested cross-validation followed by evaluation on a sample-grouped held-out test set. Among all combinations, XGBoost with first-derivative preprocessing on the 0.25 mm fraction produced the best performance, with test R2 values of 0.91 for Mollisol and 0.78 for Ultisol. Shapley additive explanations (SHAP) and principal component analysis (PCA) consistently identified informative spectral regions at 430–480 and 1330–1450 nm for Mollisol and at 585–635, 820–900, and 2180–2240 nm for Ultisol. Prediction errors were larger in the sampled Ultisol dataset and increased with DCB-extractable Fe and mineral backgrounds. A second-stage log-domain residual correction incorporating ancillary soil properties further reduced the Ultisol RMSE from 0.30 to 0.27 g kg−1. These findings support the 0.25 mm, first-derivative, XGBoost workflow as a robust laboratory Vis–NIR approach for TN prediction and indicate that composition-aware residual correction can improve prediction in oxide- and mineral-rich soils.
A systematic elucidation of soil ammonia (NH3) volatilization (SAV) and the underlying drivers is imperative for evaluating NH3 pollution mitigation strategies and advancing sustainable agricultural practices. Currently, no scientific consensus has been established on the effects of maize–soybean intercropping on SAV across varying nitrogen (N) application rates. A consecutive field experiment was conducted over a 2-year period from 2024 to 2025 with a split-plot design. The experiment comprised three cropping systems (maize monocropping (MM), soybean monocropping (MS), and maize–soybean intercropping (IMS)) and three N application rates (no N application (NN), 20% reduced N application (20%RN), and conventional N application (ConN)). The results demonstrated that N application markedly increased SAV. Accumulative SAV was 4.94–6.01 kg ha−1 under NN treatment, whereas it was 8.21–27.89 kg ha−1 under ConN treatment, 7.25–21.52 kg ha−1 under 20%RN treatment. Under ConN treatment, the accumulative SAV in IMS was 21.34 kg·ha−1 and 27.89 kg·ha−1 in 2024 and 2025, respectively, which were significantly higher than those in MM by 16.80% and 13.33%. Under 20% RN treatment, the accumulative SAV in IMS was 15.46 kg·ha−1 and 19.24 kg·ha−1 in 2024 and 2025, respectively, which were lower than those in MM by 3.07% and 10.59%. SAV was positively correlated with soil ammonium N concentration. Moreover, within an appropriate range, SAV increased in response to rising soil water content and temperature. Collectively, maize–soybean intercropping integrated with a 20% nitrogen reduction mitigated environmental risks associated with reactive nitrogen losses. This system constitutes a stable yield, resource-efficient, and ecologically sustainable cropping practice.