Baptism – do we have it because of the Flood?

The question was asked if 1 Peter 3:20-21 means we have baptism because of the Flood. Let’s read it in context:

1 Peter 3:20-22 (NRSV)
20 who in former times did not obey, when God waited patiently in the days of Noah, during the building of the ark, in which a few, that is, eight persons, were saved through water. 21 And baptism, which this prefigured, now saves you—not as a removal of dirt from the body, but as an appeal to God for a good conscience, through the resurrection of Jesus Christ, 22 who is at the right hand of God, having gone into heaven, after angels and authorities and powers had been subjected to Him.