A hydrodynamic model for valley winds