all_month and all_year is not defined

This change should fix it by referring directly to precip_data