letting go of the magic bullet ideal is even a better bet. Good casters can cast almost anything. And when it doesn't go out perfectly, they don't make a face at the reel and blame the line, they adjust their stroke.
Spey claves are a great place to try rod/line combos.
I'm not a fan of 'magic bullet' thinking either, thus the use of the word 'guesstimate' in the above. Example of what I mean by that: When I travel I usually carry 2-3 rods, partly to be able to rig different systems, partly as insurance. So over the years I've accumulated quite a few different lines in different systems, short heads, mid-and long-belly, various lines cut for tips, some intermediate or multi-density lines, etc. When I set up a system, whether because I have a new rod or it's been so long since I used the rod I've forgotten what I last cast on it, what I don't do is pull out all the lines I have and cast them all to 'see what I like best'. I start with a reference line system I am familiar with -- for a mid-length rod, that might be something like a NextCast 55 -- pull out two weights I think are likely to work based on the rod weighting, go and try them out. Usually I have a slight preference for one or the other, I go with that one. Based on the specs of that line and the rod length I have a pretty good idea what weight scandi/skagit/short-belly/mid-belly etc., given the 30-40gr windows most line makers adopt, is going to be a reasonable match. That is a purely experiential way of getting a 'guesstimate', it usually gives results good enough I can quickly match up whatever combos I need for a given trip without fiddling around very much. And I'm certainly not obsessing over 20gr one way or another or other fine details. sushiyummy apparently has a more numerical system that works for him. Certainly when moving outside well-trodden combos, e.g. single-hand rated lines on double-handed rods or vice-versa, some sort of numerical thinking is useful to get into the ballpark of what is most likely to work. Beyond that I agree it is about adaptation.
At the same time, please don't tell me that a good caster, who finds a given line+rod combo well-balanced, in the midpoint of the rod's window, at a given spec, will be equally satisfied with the same model line carrying 20%+ more grains. Changes this large or larger are enough to affect the rod performance in a way that is more than subjective. I don't believe in magic bullets, but I do believe line design affects achievable performance. I don't believe in weight tweaks that are in the range of manufacturing tolerance, but I don't believe 'a good caster can cast anything' either. Almost all designed systems have both ranges of optimal performance and points of diminishing returns to optimization.