Hi Hazem. It's an example of what we call an "absolute phrase" (the noun and participle form their own phrase).
Another way of expressing the same idea is: "if the weather permits, we may drive to the beach".
Other examples of an absolute phrases are: "God willing, we'll be able to travel next year", "having got up, we ate our breakfast", or "the temperature being warm, we decided to go for a picnic".
Sometimes there is a conditional element to these phrases, but sometimes they just express a completed action. Often they link two separate ideas in a sentence.
I hope this makes sense!