Baseline high-resolution maps of soil nutrients in Morocco to support sustainable agriculture
Authors:
Phosphorus (P) and potassium (K) are essential fertilizer elements whose recommendations require soil
analysis tailored to crop-specific needs. However, in developing countries like Morocco, access to open
databases on nutrient bioavailability remains limited, hindering data-driven agricultural strategies.
This paper presents the first national reference maps of available P and exchangeable K at 250 m
resolution over Morocco’s croplands using digital soil mapping with machine learning algorithms and
environmental covariates. Unlike previous efforts employing traditional interpolation methods, these
maps were developed using Random Forest by integrating 5,276 soil samples for P and 6,978 for K with
76 environmental covariates representing climate, topography, vegetation, and parent material. Model
validation using independent test datasets demonstrated strong performance, with R2 values of 0.78 for
P and 0.80 for K. Uncertainty assessment through bootstrapping confirmed prediction stability across
diverse agricultural landscapes. These baseline maps enhance fertilizer recommendations, promote
precision farming and support agricultural sustainability. The maps are freely available through
open-access repository, enabling evidence-based decision-making for researchers, practitioners, and
policymakers to improve nutrient management efficiency.