Bayesian optimization and uncertainty analysis of complex environmental models, with applications in watershed management