The world's third-largest energy consumer and emitter of greenhouse gases has been clinging to coal for energy security as it tries to get its economy back on track after a COVID slowdown and stave off power shortages that led to idled factories and villages without electricity during a blistering heatwave.