Here is a brief overview of the origin of carbonate sedimentary rocks:
Carbonate accumulation requires specific environmental conditions often summarized as the This factory thrives in warm, clear, shallow, well-lit marine waters free from siliciclastic mud influx, which chokes filtering organisms and limits light penetration.
Carbonates are "allergic" to mud and sand. High levels of siliciclastic sediment (like river runoff) "choke" carbonate production. From Sediment to Rock diagenesis
Occurs when rain or fresh groundwater infiltrates the sediment (often during sea-level drops). It is highly aggressive toward unstable minerals. Aragonite and HMC dissolve, supplying calcium for the precipitation of stable LMC blocky equant cements. This zone creates extensive vuggy and moldic secondary porosity.
Carbonate sedimentary rocks, primarily limestones cap C a cap C cap O sub 3 dolostones
: Begins immediately after deposition, occurring in near-surface settings where marine or meteoric waters circulate. This stage includes early cementation, dissolution, and recrystallization of metastable aragonite and high-Mg calcite to low-Mg calcite.