A 3D optimal control problem related to the urban heat islands