A petrocalcic horizon is a diagnostic horizon in the USDA soil taxonomy (ST) and in the World Reference Base for Soil Resources (WRB).
They can occur in conjunction with duripans where the conditions are right and there are enough free carbonates in the soil.
Calcium carbonates are found in alkaline soils, which are typical of arid and semiarid climates.
A common field test for the presence of carbonates is application of hydrochloric acid to the soil, which indicates by fizzing and bubbling the presence of calcium carbonates.
There is also some evidence that petrocalcic horizons can form "in situ" by alteration of limestone parent materials and alternating dissolution/precipitation of calcium carbonates.