Carbonate sedimentology and diagenesis