Which problem did ancient Mesopotamians have to solve in order to protect their cities and fields?

.how to control flooding
.how to prevent wind erosion
.how to build bricks out of clay
.how to defend against attacks by nomads