Add test values for debugging function
Use nested 'ifelse' statements for precipitation code

Applied a different scheme to determine the precip
code.