Added code from Budyko, r_functions submodule
minor changes and plotting