Our distributor in Chile sent us a request to implement PenMan-Montieth formula for evapotranspiration measurement using dataTaker. This formula requires several parameters that need to be calculated first from 10 measurements:
- temperature (average, maximum and minimum)
- relative humidity (average, maximum and minimum)
- wind speed average
- radiation
- altitude from sea level
- latitude
We manage to develop such script within dataTaker for this calculation, I have already included sensor information as well. You may replace the sensor with other brand as required. This is the script:
BEGIN"EVAPTR"
PROFILE HOST_PORT BPS=4800
PROFILE HOST_PORT FUNCTION=SERIAL
PROFILE SERSEN_PORT BPS=9600
PROFILE SERSEN_PORT DATA_BITS=8
PROFILE SERSEN_PORT PARITY=NONE
PROFILE SERSEN_PORT FLOW=NONE
PROFILE SERSEN_PORT MODE=RS422
PROFILE SERSEN_PORT FUNCTION=MODBUS_MASTER
S1=0,4000,0,56
RS1M
RA1M
'reading parameters
'Thies Clima US 4.9200.00.001: MODBUS RTU
1MODBUS(AD1,R3:5005,MBL,MES,"T~degC",0.1,=101CV,W)
102CV(W)=101CV
1MODBUS(AD1,R3:5013,MBL,MES,"RH~%",0.1,=103CV,W)
104CV(W)=103CV
1MODBUS(AD1,R3:5001,MBL,MES,"WS~m/s",0.1,=105CV,W)
106CV(W)=105CV
'Kipp and Zonen CMP10: terminal 1+ and 1-
1V(S4,=107CV,W)
108CV(W)=107CV
'normal weather measurement every 15 minutes
RB15M LOGONB
101CV(AV,"T~degC")(MX,"T Max~degC")(MN,"T Min~degC")
103CV(AV,"RH~%")(MX,"RH Max~%")(MN,"RH Min~%")
105CV(W)(AV,"WS_AV~m/s")
'evapotranspiration calculation every day
RC1D LOGONC
102CV(W)(AV,=1CV)(MX,=2CV)(MN,=3CV)
104CV(W)(AV,=4CV)(MX,=5CV)(MN,=6CV)
106CV(W)(AV,=7CV)
108CV(W)(AV,=8CV)
'Garmin 18x PC: HOST port
2SERIAL("\m[GPGGA,]\m[,]%2d[201CV]%f[202CV]\m[,]\m[,]\m[,]\m[,]\m[,]\m[,]\m[,]%f[9CV]\e")
9CV("Altitude~masl")=66
10CV("Latitude~deg")=201CV+(202CV/60)
'Date
20SV("Date",=51CV)
21SV("Month",=52CV)
22SV("Year",=53CV)
'calculation
11CV("Latitude~rad",FF2)=D2R(10CV)
12CV("Atmospheric Pressure~kPa",FF2)=101.3*((293-0.0065*9CV)/293)^5.26
13CV("Latent Heat~MJ/kg",FF2)=2.501-(2.361*3CV/1000)
14CV("Psychrometric Constant~kPa/degC",FF2)=(1.013/(1000*0.622))*12CV/13CV
15CV("Vapour Pressure T~kPa",FF2)=0.6108*E^(17.27*1CV/(1CV+237.3))
16CV("Vapour Pressure T max~kPa",FF2)=0.6108*E^(17.27*2CV/(2CV+237.3))
17CV("Vapour Pressure T min~kPa",FF2)=0.6108*E^(17.27*3CV/(3CV+237.3))
18CV("Average Vapour Pressure~kPa",FF2)=(16CV+17CV)/2
19CV("Vapour Pressure Saturation Slope~ kPa/degC",FF2)=4098*15CV/(1CV+237.3)^2
20CV("Mod Psychrometric Constant~kPa/degC",FF2)=14CV*(1+0.34*7CV)
21CV("Actual Vapour Pressure~kPa",FF2)=(0.5*17CV*5CV/100)+(0.5*16CV*6CV/100)
22CV("Aerodinamic Term for PM~mm/day",FF2)=(20CV*900*7CV*(18CV-21CV))/((19CV+20CV)*(1CV+273.16))
1IV(W)=(275*52CV/9)
2IV(W)=(9+52CV)/12)
3IV(W)=(53CV/4)
4IV(W)=(53CV+2-4*3IV)/3
23CV("No of Days in Julian calendar")=1IV-(2IV*(1-4IV))+51CV-30
24CV("Inv Relative Distance to the Sun~rad",FF2)=1+0.033*COS(2*PI*23CV/365)
25CV("Solar Declination~rad",FF2)=0.409*SIN(2*PI*23CV/365-1.39)
26CV("Solar Declination Angle~rad",FF2)=ACOS(-TAN(11CV)*TAN(25CV))
27CV("Extraterrestrial Radiation~MJ/m2",FF2)=(118.08/PI)*24CV*(26CV*SIN(11CV)*SIN(25CV)+COS(11CV)*COS(25CV)*SIN(26CV))
28CV("Solar Radiation~MJ/m2",FF2)=8CV*0.0864
29CV("Net Solar Radiation~MJ/m2",FF2)=(1-0.23)*28CV
30CV("Solar Radiation on clear sky~MJ/m2",FF2)=(0.75+2*10^-5*9CV)*27CV
31CV("Net Wave Radiation~MJ/m2",FF2)=4.903*(10^-9)*((2CV+273.16)^4+(3CV+273.16)^4)*(0.34-0.14*SQRT(21CV))*(1.35*(28CV/30CV)-0.35)/2
32CV("Net Radiation~MJ/m2",FF2)=29CV-31CV
33CV("Radiation Term~mm/day",FF2)=0.408*19CV*32CV/(19CV+20CV)
34CV(W)=33CV+22CV
34CV("Evapotranspiration~mm/day",FF2)=(34CV<0)?0:34CV
END
That script has 3 schedules:
- schedule A that running every minute to read weather sensors.
- schedule B that run every 15 minutes to calculate statistic from schedule A
- schedule C that run every day to calculate evapotranspiration.
Evapotranspiration itself will be calculated on daily basis using statistic of 1 minute measurement.
Best regards,
Rudy Gunawan
Our distributor in Chile sent us a request to implement PenMan-Montieth formula for evapotranspiration measurement using dataTaker. This formula requires several parameters that need to be calculated first from 10 measurements:
- temperature (average, maximum and minimum)
- relative humidity (average, maximum and minimum)
- wind speed average
- radiation
- altitude from sea level
- latitude
We manage to develop such script within dataTaker for this calculation, I have already included sensor information as well. You may replace the sensor with other brand as required. This is the script:
````
BEGIN"EVAPTR"
PROFILE HOST_PORT BPS=4800
PROFILE HOST_PORT FUNCTION=SERIAL
PROFILE SERSEN_PORT BPS=9600
PROFILE SERSEN_PORT DATA_BITS=8
PROFILE SERSEN_PORT PARITY=NONE
PROFILE SERSEN_PORT FLOW=NONE
PROFILE SERSEN_PORT MODE=RS422
PROFILE SERSEN_PORT FUNCTION=MODBUS_MASTER
S1=0,4000,0,56
RS1M
RA1M
'reading parameters
'Thies Clima US 4.9200.00.001: MODBUS RTU
1MODBUS(AD1,R3:5005,MBL,MES,"T~degC",0.1,=101CV,W)
102CV(W)=101CV
1MODBUS(AD1,R3:5013,MBL,MES,"RH~%",0.1,=103CV,W)
104CV(W)=103CV
1MODBUS(AD1,R3:5001,MBL,MES,"WS~m/s",0.1,=105CV,W)
106CV(W)=105CV
'Kipp and Zonen CMP10: terminal 1+ and 1-
1V(S4,=107CV,W)
108CV(W)=107CV
'normal weather measurement every 15 minutes
RB15M LOGONB
101CV(AV,"T~degC")(MX,"T Max~degC")(MN,"T Min~degC")
103CV(AV,"RH~%")(MX,"RH Max~%")(MN,"RH Min~%")
105CV(W)(AV,"WS_AV~m/s")
'evapotranspiration calculation every day
RC1D LOGONC
102CV(W)(AV,=1CV)(MX,=2CV)(MN,=3CV)
104CV(W)(AV,=4CV)(MX,=5CV)(MN,=6CV)
106CV(W)(AV,=7CV)
108CV(W)(AV,=8CV)
'Garmin 18x PC: HOST port
2SERIAL("\m[GPGGA,]\m[,]%2d[201CV]%f[202CV]\m[,]\m[,]\m[,]\m[,]\m[,]\m[,]\m[,]%f[9CV]\e")
9CV("Altitude~masl")=66
10CV("Latitude~deg")=201CV+(202CV/60)
'Date
20SV("Date",=51CV)
21SV("Month",=52CV)
22SV("Year",=53CV)
'calculation
11CV("Latitude~rad",FF2)=D2R(10CV)
12CV("Atmospheric Pressure~kPa",FF2)=101.3*((293-0.0065*9CV)/293)^5.26
13CV("Latent Heat~MJ/kg",FF2)=2.501-(2.361*3CV/1000)
14CV("Psychrometric Constant~kPa/degC",FF2)=(1.013/(1000*0.622))*12CV/13CV
15CV("Vapour Pressure T~kPa",FF2)=0.6108*E^(17.27*1CV/(1CV+237.3))
16CV("Vapour Pressure T max~kPa",FF2)=0.6108*E^(17.27*2CV/(2CV+237.3))
17CV("Vapour Pressure T min~kPa",FF2)=0.6108*E^(17.27*3CV/(3CV+237.3))
18CV("Average Vapour Pressure~kPa",FF2)=(16CV+17CV)/2
19CV("Vapour Pressure Saturation Slope~ kPa/degC",FF2)=4098*15CV/(1CV+237.3)^2
20CV("Mod Psychrometric Constant~kPa/degC",FF2)=14CV*(1+0.34*7CV)
21CV("Actual Vapour Pressure~kPa",FF2)=(0.5*17CV*5CV/100)+(0.5*16CV*6CV/100)
22CV("Aerodinamic Term for PM~mm/day",FF2)=(20CV*900*7CV*(18CV-21CV))/((19CV+20CV)*(1CV+273.16))
1IV(W)=(275*52CV/9)
2IV(W)=(9+52CV)/12)
3IV(W)=(53CV/4)
4IV(W)=(53CV+2-4*3IV)/3
23CV("No of Days in Julian calendar")=1IV-(2IV*(1-4IV))+51CV-30
24CV("Inv Relative Distance to the Sun~rad",FF2)=1+0.033*COS(2*PI*23CV/365)
25CV("Solar Declination~rad",FF2)=0.409*SIN(2*PI*23CV/365-1.39)
26CV("Solar Declination Angle~rad",FF2)=ACOS(-TAN(11CV)*TAN(25CV))
27CV("Extraterrestrial Radiation~MJ/m2",FF2)=(118.08/PI)*24CV*(26CV*SIN(11CV)*SIN(25CV)+COS(11CV)*COS(25CV)*SIN(26CV))
28CV("Solar Radiation~MJ/m2",FF2)=8CV*0.0864
29CV("Net Solar Radiation~MJ/m2",FF2)=(1-0.23)*28CV
30CV("Solar Radiation on clear sky~MJ/m2",FF2)=(0.75+2*10^-5*9CV)*27CV
31CV("Net Wave Radiation~MJ/m2",FF2)=4.903*(10^-9)*((2CV+273.16)^4+(3CV+273.16)^4)*(0.34-0.14*SQRT(21CV))*(1.35*(28CV/30CV)-0.35)/2
32CV("Net Radiation~MJ/m2",FF2)=29CV-31CV
33CV("Radiation Term~mm/day",FF2)=0.408*19CV*32CV/(19CV+20CV)
34CV(W)=33CV+22CV
34CV("Evapotranspiration~mm/day",FF2)=(34CV<0)?0:34CV
END
````
That script has 3 schedules:
- schedule A that running every minute to read weather sensors.
- schedule B that run every 15 minutes to calculate statistic from schedule A
- schedule C that run every day to calculate evapotranspiration.
Evapotranspiration itself will be calculated on daily basis using statistic of 1 minute measurement.
Best regards,
Rudy Gunawan
edited May 1 '20 at 1:59 pm