COMMENTS FROM THE AUTHOR: The following is a JavaScript Exercise and though it has been tested no guarantees regarding the accuracy of the calculations are made.
Drought Factor