Time-Varying Production Schedule. Because most methanol plants in the US are located in Texas 24 , we consider real-time (15-min time interval) and day-ahead (1-hr time interval) electricity markets in the ERCOT market. To account for regional differences within this market, we explore prices in the Panhandle and in Houston. Detailed information on electricity markets is provided in the SI. In short, the Panhandle has a lower average electricity price and a higher negative price frequency than Houston. We also consider the flexible and inflexible operation modes for the electrolysis system. In the first mode, the electrolyzer adjusts hydrogen production to respond to the market dynamics. In the second mode, the electrolyzer does not respond to market dynamics and hydrogen production is kept constant. The production schedule of the flexible unit in the first month of 2020 (Panhandle,TX) is presented in Figure . As expected, hydrogen production drops down during the high price hours or even collapses to zero. When the electricity prices go down, the electrolyzer turns on at full capacity (4.61 tons per 15 mins). Because less hydrogen is produced during peak hours, hydrogen stored in the tank is consumed to meet the demand (2.75 tons per 15mins). During the off-peak hours, more hydrogen is produced than needed. The excess hydrogen (1.87 tons per 15mins) is stored in the tank. The storage level goes down during peak hours since the stored gas is consumed; during the off-peak hours, the gas in the tank builds up. The tank capacity for this scenario was obtained via optimization and was found to be 431 tons. The production profiles of other case studies can be found in the SI, and similar patterns are observed.