Soil forms from parent rocks through physical disintegration of rocks and by chemical alteration of the rock fragments. The types of soil minerals can reveal if the environment was cool or warm, wet or dry, or whether the water was fresh or salty. Because CRISM is able to detect many minerals in the soil or regolith, the instrument is being used to help decipher ancient Martian environments. CRISM has found a characteristic layering pattern of aluminum-rich clays overlying iron- and magnesium-rich clays in many areas scattered through Mars' highlands. Surrounding Mawrth Vallis, these "layered clays" cover hundreds of thousands of square kilometers. Similar layering occurs near the Isidis basin, in the Noachian plains surrounding Valles Marineris, and in Noachian plains surrounding the Tharsis plateau. The global distribution of layered clays suggests a global process. Layered clays are late Noachian in age, dating from the same time as water-carved valley networks. The layered clay composition is similar to what is expected for soil formation on Earth - a weathered upper layer leached of soluble iron and magnesium, leaving an insoluble aluminum-rich residue, with a lower layer that still retains its iron and magnesium. Some researchers have suggested that the Martian clay "layer cake" was created by soil-forming processes, including rainfall, at the time that valley networks formed.