The exception is when it is generated from waste heat, in other words, when it is utilized to recover exergy that would otherwise be rejected to the atmosphere.
My preferred solution would be to use the "solution" that Henry Kaiser utilized in Kaiser aluminum plants years ago. That is he made an arrangement to run his aluminum plants when electricity was exceedingly cheap (from hydroelectric plants).
Now there is a thermodynamic and O&M cost to starting and stopping electrochemical systems, but it's less onerous if one can predict with fair certainty when those costs would be at a premium.
During the months after the summer solstice, California, for better or worse - mostly for worse - as things stand can produce up to 14,000 MW of electrical power for brief periods. At these points, electricity may be close to worthless. (This feature, as operative now, of course drives up the cost of reliable energy because they can not recover revenue continuously although they are designed to operate continuously.) Therefore it would make economic sense to keep electricity off the grid and utilize it for industrial processes. Since it's recovered exergy and not energy consumed for the purpose of simply making electricity, the environmental impact will be minimized.
It is no longer the case that aluminum is the only metal that can be prepared by electrochemical means. The wonderful FFC process has changed all that. There is also electrochemical refining, and laser printing (additive manufacture) that can be driven by electricity without much penalty. I would advise for California, continuous electrical power generation on the order of 50,000 MW, with the sale of that power to the grid based on the economics of the grid.
One thing that California should do since solar power isn't sustainable or clean, and because it is basically available to wealthy people and not the poor, is to not subsidize it by giving fixed price returns. It should reflect the actually busbar cost of electricity; if the busbar cost is zero because the power is not needed and is generated anyway, the price should be zero.
The costs of disposal should also be addressed.
Nuclear plants could do things of value with waste electricity - electricity generated as a side product of other operations - pump water, refine metals recovered from municipal waste, run FFC plants, even run membrane based desalination plants.
The grid will always be variable, particularly because of climate change. The idea should be maximize exergy, that is efficiency.
Thanks for your comment.