If I wish to take a whiff of coffee grounds do I make a blessing? Is it preferable not to do it at all? Thank you.
It is fine to take a whiff and to recite a blessing on the scent.
This is only the case where you take the coffee and intentionally take a whiff to enjoy the scent, and not where you smell the coffee inadvertently while drinking.
See Perach Shoshan 1:13; Mishnah Berurah 216:16; Chazon Ovadyah p. 339; VeZos HaBerachah p. 74. These authorities write that the correct blessing is “hanosen reiach tov bepeiros”.
However, others write that one should recite borei minei besamim; see Birkas Hashem Vol. 3, no. 12, 19; VeZos HaBerachah p. 381. See also Yalkut Yosef 216 note 6.
Both options are legitimate.