Gradient Function from the bottom to the top

I already have a dynamic function that lets me put snow on top of everything but i can’t find for the love of me any info on how to make a gradient function that goes from the bottom to the top. I just want to do this link text

Please provide pictures with your answer thank you very much.

the one minus node will invert a gradient. hotkey is ‘o’