An internal investigation by NASA 's inspector general concluded that political appointees in the agency 's public affairs office had tried to restrict reporters ' access to its leading climate scientist , Dr. James Hansen .