Odor in stagnant water kept outside occurs because of algae growth and decomposition. Algae is a photosynthetic organism, which means it requires sunlight to grow and reproduce. Reducing algae in your water, and thereby reducing odor in stagnant water, means adding a chemical that will kill the algae or storing it in the shade to prevent algae blooms.
Keep the Water Moving
If you can possibly not have your water standing stagnant, do so. Not only will moving water reduce algae growth and odor, but it will also prevent mosquito larvae from hatching on the water surface. Stagnant water should be avoided wherever possible as it is a source of illness and provides a place for disease vectors to reproduce.
Adding chemical algae killer, which can be purchased from your local home supply store or pond market, will neutralize any algae growing in your water, which will substantially reduce the amount of odor emanating from stagnant water, but care will still have to be taken to filter or screen the water to remove debris that will otherwise decompose and cause a methane smell.
Another method of reducing algae growth and smell in stagnant water is to buy pond dye, which dyes your water a color that eliminates the spectrum of sunlight required for algae to grow and reproduce. Pond dye is environmentally friendly and will not harm any organisms living in the stagnant water, which may or may not be a positive as it will also do nothing for mosquito and other insect larvae hatching in your water.
Wherever possible, sealing your stagnant water in a container or placing a lid over the source of the stagnant water will do a world of good with regards to odor. Algae cannot grow in an oxygen-free environment, and whatever small amount of growth there may be will be curtailed by the lack of sunlight. Furthermore, the odor will not escape the container. This is a feasible solution to odor emanating from a relatively small container, such as a rain barrel, but not larger water sources such as drainage ditches and flooded areas.