diff --git a/docs/Sensitivity_analysis_with_FAST.md b/docs/Sensitivity_analysis_with_FAST.md index 4015d351..a0ed499b 100644 --- a/docs/Sensitivity_analysis_with_FAST.md +++ b/docs/Sensitivity_analysis_with_FAST.md @@ -9,7 +9,7 @@ The algorithm will tell you, how sensitive your parameters are based on whatever iterations you need to get an reliable information about your parameter. The number of iteration can be calculate after [Henkel et al. GLOBAL SENSITIVITY ANALYSIS OF NONLINEAR MATHEMATICAL MODELS - AN IMPLEMENTATION OF TWO COMPLEMENTING VARIANCE-BASED ALGORITHMS, 2012] (https://www.informs-sim.org/wsc12papers/includes/files/con308.pdf): - $$N = (1+4M^2(1+(k-2)d))k$$ +$$N = (1+4M^2(1+(k-2)d))k$$ with N = needed parameter iterations, M= inference factor (SPOTPY default M=4) and d= frequency step (SPOTPY default d=2) and k as the number of parameters of your model. diff --git a/docs/img/DREAM_parameter_uncertainty_Hymod.png b/docs/img/DREAM_parameter_uncertainty_Hymod.png new file mode 100644 index 00000000..e29b48e2 Binary files /dev/null and b/docs/img/DREAM_parameter_uncertainty_Hymod.png differ diff --git a/docs/img/DREAM_r_hat.png b/docs/img/DREAM_r_hat.png new file mode 100644 index 00000000..2cf526b5 Binary files /dev/null and b/docs/img/DREAM_r_hat.png differ diff --git a/docs/img/DREAM_simulation_uncertainty_Hymod.png b/docs/img/DREAM_simulation_uncertainty_Hymod.png new file mode 100644 index 00000000..3187fa8d Binary files /dev/null and b/docs/img/DREAM_simulation_uncertainty_Hymod.png differ diff --git a/spotpy/examples/tutorial_dream_hymod.py b/spotpy/examples/tutorial_dream_hymod.py index 57da1852..08a609c9 100644 --- a/spotpy/examples/tutorial_dream_hymod.py +++ b/spotpy/examples/tutorial_dream_hymod.py @@ -40,8 +40,8 @@ acceptance_test_option = 6 sampler=spotpy.algorithms.dream(spot_setup, dbname='DREAM_hymod', dbformat='csv') - #r_hat = sampler.sample(rep, nChains, nCr, eps, convergence_limit, - # runs_after_convergence,acceptance_test_option) + r_hat = sampler.sample(rep, nChains, nCr, eps, convergence_limit, + runs_after_convergence,acceptance_test_option) @@ -57,15 +57,17 @@ ax = plt.subplot(1,1,1) q5,q25,q75,q95=[],[],[],[] for field in fields: - q5.append(np.percentile(results[field][-100:-1],2.5)) - q95.append(np.percentile(results[field][-100:-1],97.5)) + q5.append(np.percentile(results[field][-100:-1],2.5))# ALl 100 runs after convergence + q95.append(np.percentile(results[field][-100:-1],97.5))# ALl 100 runs after convergence ax.plot(q5,color='dimgrey',linestyle='solid') ax.plot(q95,color='dimgrey',linestyle='solid') ax.fill_between(np.arange(0,len(q5),1),list(q5),list(q95),facecolor='dimgrey',zorder=0, - linewidth=0,label='parameter uncertainty') + linewidth=0,label='simulation uncertainty') ax.plot(spot_setup.evaluation(),color='red', markersize=2,label='data') ax.set_ylim(-50,450) ax.set_xlim(0,729) + ax.set_ylabel('Discharge [l s-1]') + ax.set_xlabel('Days') ax.legend() fig.savefig('DREAM_simulation_uncertainty_Hymod.png',dpi=150) #########################################################