Pergolas and louvred roof systems are useful for both sun and rain, and for whatever your needs might be. The louvred slats on a pergola can open to let in sunlight, and close to provide shade or block the rain. This can be automated with rain sensors to close the louvres.