Kathmandu University: Dhulikhel, Kavre
Kathmandu University: Dhulikhel, Kavre
Kathmandu University: Dhulikhel, Kavre
Dhulikhel, Kavre
Environmental Modelling
ENVS 404
Introduction
Model Evaluation is the subordinate part of the model development process. It is the phase
in which it is decided whether the model performs better. Without model evaluation, we
would have no idea of how different from reality the model simulation would be, we cannot
be certain that the model behaves in the way we think it should and we cannot determine
which parts of the model are most likely to affect the results. There are four different
methods for model evaluation. They are:
I. Graphical analysis
a) Plots to reveal the accuracy of the simulation should
show the result that is needed from the model
include the simulated and measured values on the same plot
show errors in the measurements as error bars and variations in simulations as
error bars or as a band of potential results
use axes that highlight the acceptable error un the simulation
avoid confusing and complicated presentation
b) Plots to illustrate the behavior and importance if the model component should
only include as much complexity as can be interpreted by the eye
include any measurements that are available
show the importance of the components as changes in the distribution of the
results
II. Quantitative Analysis
a. A thorough quantitative analysis should include both
an analysis of coincidence (difference)
an analysis of association (trends)
b. A quantitative analysis compares the simulation to the independent measurements.
c. Coincidence can be expressed as
the total difference (root mean squared error)
the bias (relative error or mean difference)
the error excluding error due to variations in the measurements (lack of fit)
d. The significance of coincidence can be determined by
a comparison to the 95% confidence interval, or
a direct comparison to the P value obtained in the t test or the F test
e. The association can be expressed as the sample correlation coefficient.
f. The significance of the association can be determined using a t-test.
III. Sensitivity Analysis
a. Common types of sensitivity analysis are
a one-at-a-time sensitivity analysis (input varied one by one)
a factorial analysis (more than one parameter adjusted at one time)
b. Sensitivity may be expressed
as the correlation coefficient between the inputs and the outputs
by regression analysis
as the sensitivity coefficient
as the sensitivity index
IV. Uncertainty Analysis
a. Common types of uncertainty analysis are
a one-at-a-time uncertainty analysis
a differential analysis
b. A variation in the input parameters is represented
as a fixed percentile about the mean
using a probability density function and Monte Carlo sampling
c. Uncertainty can be expressed
as the importance index
as the relative deviation ratio
Problems
Co-incidence:
Standard error=5.71533
Total Bias= -639.67
Association
𝑟2= 0.64
Based on the above data, we can say that this model provides a good estimate for the
optimum nitrogen application rate. Also, the value of R2 is 0.64 and closer the value of R2 to
1, the more simulated value is equal to measured value.
From the above graphs we can say that the model is quite consistent for spring wheat and
shows good coincidence and association values. It is also consistent for winter wheat as the
simulated values show good association but the coincidence is reduced. The model is
inconsistent for winter oilseed rape and the simulated values show lower coincidence and
association than both spring wheat and winter wheat.
Here, series 1 represents the plot between crop yield and measured value of optimum
nitrogen and series 2 represents the plot between crop yield and the modelled value of
optimum nitrogen.
Overall, the model is quite okay but improvement can be made to reduce the errors. The
simulations for spring wheat and winter wheat are significantly associated and coincident
with the measured values. The simulations for winter oilseed rape are neither highly
coincident nor associated with the measured values.
2. Population Growth
Examine the behavior of a simple model of the growth of a rabbit population in a warren
during summer. The number of rabbits is estimated using the following model:
The change in rabbit population for 10 weeks was plotted using Python. From the above
graph, we can see that the population of rabbit increases exponentially with time.
Sensitivity Analysis
For sensitivity analysis, the values of Rstart, k1 and k2 were changed within the range ± 20%
with step size of 5%. The sensitivity index for Rstart, k1 and k2 are calculated to be 0.27, 0.39
and 0.002 respectively. From the above graphs we can see that rabbit population is sensitive
to the changes in value of Rstart and k1 but it is not sensitive to the changes in k2. The model
can be simplified by removing the exponential expression including k2 as changing it has no
significant impact on the model.
Source code
import numpy as np
k1 = 0.5
k2 = 0.02
t = np.linspace(0,10,20)
r_cal =[]
for i in t:
r_cal.append(r)
plt.plot(t,r_cal,'purple')
plt.ylabel('No. of Rabbits')
plt.show()
import numpy as np
r_start = 500
k1 = 0.5
k2 = 0.02
t = 10
r_cal=[]
for i in ch:
r_ch=r_start +(i/100)*r_start
r_cal.append(r)
plt.plot(ch,r_cal,'purple')
plt.ylabel('No. of Rabbits')
plt.xlabel('Change in R_start(%)')
plt.show()
#Sensitivity index
s_index = (max(r_cal)-min(r_cal))/max(r_cal)
import numpy as np
r_start = 500
k1 = 0.5
k2 = 0.02
t = 10
r_cal=[]
for i in ch:
k1_ch= k1 +(i/100)*k1
r_cal.append(r)
plt.plot(ch,r_cal,'purple')
plt.ylabel('No. of Rabbits')
plt.xlabel('Change in k1 (%)')
plt.show()
#Sensitivity index
s_index = (max(r_cal)-min(r_cal))/max(r_cal)
import numpy as np
r_start = 500
k1 = 0.5
k2 = 0.02
t = 10
r_cal=[]
for i in ch:
k2_ch= k2 +(i/100)*k2
r_cal.append(r)
plt.plot(ch,r_cal,'purple')
plt.ylabel('No. of Rabbits')
plt.ylim(500, 660)
plt.xlabel('Change in k2 (%)')
plt.show()
#Sensitivity index
s_index = (max(r_cal)-min(r_cal))/max(r_cal)