Modified annualgrid function

added 'p' parameter for annual ppt calculation