Wiener-chaos analysis on Bayesian models with applications in agriculture and climatology