So "forty days and forty nights occur in seven the next seven days. The seven refers to the seven planets and the seven chakras that we must pass through to get to the crown chakra and enter the kingdom of heaven. So with the context of meditation, what could the 40 days and 40 nights represent?
Here the metaphor of flooding to kill all the evildoers is the same as when you are in meditation and killing the beasts that torment you or cause uncontrollable desire. Get in the Ark then the flood waters come. The ark is the place in your mind that you go to be safe and peaceful and seek the kingdom of heaven in meditation. You will be protected as all the others drown, allegorically speaking of course.