Revert "Remove unused grains lookup"

This reverts commit 52be720d62cc601196f3405e090fb98511c86227.
Revert "Remove debugging pprint"

This reverts commit 4617a931be354f7e98a6999ed70d22cef70ed262.
Reintroduce the removed grains information.

Removed on 4617a931be354f7e98a6999ed70d22cef70ed262 and 52be720d62cc601196f3405e090fb98511c86227.
Merge pull request #8354 from s0undt3ch/develop

Reintroduce the removed grains information