Reducing flare at moon rise

I love shooting moon rise, especially just as it edges over a natural landscape or the edge of a building. With a shot like this, my intent was to also take additional shots at f11-f16 to get the moon nice and clean. The problem is in order to get the foreground subjects enough exposure, the moon flare bleeds all over the place. Simply layering in a clean moon looks so fake.
So my question is: is there any process in Darktable or Gimp that can reduce that flaring by about 90% so I can layer in a clean moon?
_DSC2633.NEF (18.2 MB)

Maybe with the tone equalizer module?


_DSC2633.NEF.xmp (5.5 KB)

To really test this, one would need also a picture of the “clean” moon.

Thanks! I hadn’t even thought of using that module. While it doesn’t get me completely to where I want the end result, it is much better than the other modules I tried.

I did a shot of the moon (free of obstacles) some time ago, from an exposure series. Aligned and expusure fused in Hugin, with a relatively large mask smoothing radius. That meant that some of the flare remained visible in the image and the moon itself was fairly bright, but all detail, including the dark side remained visible. This might actually work better with brighter surroundings because then the flare would be weaker compared to its surroundings – but it might be more difficult to execute because the exposure series takes longer than a single frame, and so the exposures may not be perfectly aligned due to the moon moving. But then, the frames where the moon is overexposed don’t have any detail in that area, and if the bloom is misaligned by a few pixels, that’s not going to cause issues. It might become really hard with moving clouds, though.