In the present research, the energy demanded by the wastewater treatment plant of a winery and the pumping station of the irrigation system of a vineyard is supplied by a stand-alone renewable energy system formed by three photovoltaic arrays connected to a microgrid. A relatively small battery maintains the stability and quality of the energy supply acting as a short-term energy storage. Hydrogen is generated in a production and refueling plant specifically designed for this project, and it is eventually used in a plugin BEV properly modified as a hybrid vehicle by adding a PEM fuel cell. On the one hand, the technical and economic feasibility of the on-site electricity production for the winery and vineyard, compared to the commercial electricity from the grid and diesel gensets, is demonstrated. On the other hand, the diesel savings by the hydrogen generated on site are assessed. The electricity (72 MWh) and hydrogen (1,214 m 3 ) produced in the first year have saved the emission of around 27 tons of equivalent CO 2 . P Power consumed (kW) Subscript Bat Battery system CE Commercial energy DG Diesel generation set Gen General Inv Inverters PV PV solar plant 1. Introduction 1 Increasing the use of renewable energy sources (RES) in the energy mix has become 2 a challenge for power engineers and scientists all over the world. Even when hybrid 3 power systems based on RES (HRES) have attracted the attention of the sustainable 4 energy market, the optimal use of either solar photovoltaic (PV) or wind power is 5 difficult, specifically in local power grids. This is because of their fluctuating and 6 intermittent nature, due to the dependence on meteorological conditions. Thus, 7 standalone renewable energy sources cannot guarantee a reliable power supply. A 8 typical solution to this problem is the use of HRES combining both short-term energy 9 storage options (batteries, capacitors, flywheels, or compressed air) and long-term ones 10 with hydrogen as energy storage. Hydrogen is considered the energy vector of the 11 future, especially if it is produced from RES [1-5]. Different energy storage systems have 12 been used to optimize the energy management of power systems based on single or 13 multiple RES in the household sector, in applications such as plug-in battery electric 14 vehicles (BEV) [6] or fuel cells [7-10]. 15 In remote rural areas, the energy demand can be actually satisfied using HRES, but 16 their introduction has been limited by the lack of economic viability and technical 17 adaptation. Aerial power lines, which are very expensive, are normally extended in 18 natural areas to distribute commercial electricity to the consumers. These 19 infrastructures have a severe environmental impact affecting the skyline and, what is 20 more important, killing both native and migratory birds, something especially serious in 21 the case of endangered species. In the particular case of the wine industry, energy 22 demands (irrigation, farming machinery, thermal processes, mobility, etc.) present 23 strong seasonal c...