My 2012 Leaf had the same symptoms: EV warning light , P31E9 code, and whining sound. The sound was loudest on the driver's side which made me suspect that it was something else but the #1 water pump. I finally decided that it was the radiator fan going into high speed because it sensed...