The diurnal cycle in the oceanic surface winds in the trop-cal eastern Pacific is shown, through numerical experiments with a regional atmospheric model, to be associated with the migrating diurnal atmospheric thermal tide, forced by absorption of solar near-IR radiation by tropospheric water vapor, and a topographically-modified extended sea-breeze, forced by diurnal land heating. Idealized experiments prove capable of discriminating the effects of both processes, showing that beyond 2000 km from the coast, the thermal tide is dominant, while closer to the coast both processes are of the same order. The shortwave forcing due to water vapor is also found to produce a diurnal cycle in precipitation, but the process appears to be independent from the thermal tide and it is proposed that this effect is mediated by the radiatively-forced changes in the column stability.