Wine is a complex mixture of chemical compounds in a hydro-alcoholic solution with a pH around 4. The chemistry of wine and its resultant quality depend on achieving a balance between three aspects of the berries used to make the wine: their sugar content, acidity and the presence of secondary compounds. Vines store sugar in grapes through photosynthesis, and acids break down as grapes ripen. Secondary compounds are also stored in the course of the season. Anthocyanins give grapes a red color and protection against ultraviolet light. Tannins add bitterness and astringency which acts to defend vines against pests and grazing animals. Environmental factors such as soil, rainfall and fog affect flavor in ways that can be described collectively as "character" or the French term “terroir”. As climate change disrupts long-established patterns of temperature and precipitation in wine-growing regions and causes more extreme weather events, the rate at which sugars, acids and secondary compounds develop during the growing season can be disrupted. Hotter temperatures and an earlier growing season can push chemistry of berries towards higher sugar content, less acids and differences in aromas. Other factors such as smoke taint from fires can negatively impact chemistry and flavor, resulting in flaws and wine faults that can make the wines undrinkable. Acids in wine Phenolic compounds in wine Proteins in wine Sugars in wine Yeast assimilable nitrogen Minerals Dissolved gas (CO2) Monoterpenes and sesquiterpenes such as linalool and α-terpineol Glutathione (reduced and oxidized) Aroma of wine Methoxypyrazines Esters: Ethyl acetate is the most common ester in wine, being the product of the most common volatile organic acid — acetic acid, and the ethyl alcohol generated during the fermentation. Norisoprenoids, such as C13-norisoprenoids found in grape (Vitis vinifera) or wine, can be produced by fungal peroxidases or glycosidases. Ascorbic acid is used during wine making Sulfur dioxide (SO2), a preservative often added to wine Gum arabic has been used in the past as fining agent.