Shipboard and laboratory chemical analysis