Calculation of the reference evapotranspiration

Several methods are available to calculate the reference crop evapotranspi­ration, depending on the data available. One of these methods is the Blaney-Criddle equation from Brouwer and Heibloem (1986):

(15.1)   MSHE_Python_Scripting00001.jpg

where ET0 is the reference evapotranspiration as an average of a period of one month [mm/day], p is the mean daily percentage of annual daytimehours, and Tmean is the daily mean air temperature [C].

The following Python plugin calculates the reference evapotranspiration for a 1-year MIKE SHE simulation using the Blaney-Criddle method accordingly to the example provided by Brouwer and Heibloem (1986).

The plugin is composed of three parts:

1.       Importing MShePy module

2.       Creating global variables (P, T_max, and T_min)

3.       Calculating and assigning the evapotranspiration at the beginning of each time step

In order to calculate the evapotranspiration (point 3), the evapotranspiration object is created. Since the temperature and the percentage of daytime hours is given in monthly average, the month of the current time step is used to select the corresponding values for the month. These values are used to cal­culate the reference evapotranspiration value and assign it to the MIKE SHE simulation. For this example, the evapotranspiration value was chosen to be a global value for the whole model domain.

import MShePy #importe the MShePy module

#define global variables
#monthly average of percentage of daytime hours
P = [0.26, 0.26, 0.27, 0.28, 0.29, 0.29, 0.29, 0.28, 0.28, 0.27, 0.26, 0.25]
#monthly average of daily maximum temperature (℃)
T_max = [32.1, 35.8, 38, 38.7, 39, 36.6, 32.6, 30.8, 31.8, 34.8, 35, 32]     
#monthly average of daily minimum temperature (℃)
T_min = [15.5, 18.8, 21.8, 24.5, 26, 25, 22.7, 22, 23, 21.3, 18.7, 16.6]     

def preTimeStep():                                    #define the preTimeStep slot
PET = MShePy.dataset(MShePy.paramTypes.ET_REF_EXC)    #Create PET dataset

time = MShePy.wm.currentTime()            #Find current time step
month = time.month                                 #Find current month
T_mean = (T_max[month-1]+T_min[month-1])/2   #Average temperature
ET = P[month-1]*(0.46*T_mean+8)         #Calculate ET (mm/d)
PET.value(ET)                                          #Assign value to PET dataset
MShePy.wm.setValues(PET)                   #Assign ET value to simulation