Principal Investigator Dr. Yousef A. Al-Rumikhani Natural Resources & Environment Research Institute King Abdulaziz City for Science and Technology, P.O.Box 6086, Riyadh-11442, Kingdom of Saudi Arabia CHAPTER 1 – SOFTWARE DESIGN INTRODUCTION The “EVAPO SAUDIA” program provides standardized calculations of reference evapotranspiration (ET) by ten methods commonly in use. The primary purposes of this software are to: Provide standardized reference ET calculations for the different agroclimatic regions of Saudi Arabia. Provide the accurate reference ET by selecting different ETO methods for different climatic conditions. Formation of climatic database, its utilization for the more reliable ET O and selection of suitable ETO equations for different climatic regions. Provide the monthly reference ET contour maps of Saudi Arabia. Graphical representation of reference ET and table for a weather station. Interpolation of monthly reference ET values for a non-weather station place. Whilst every effort has been made to ensure the validity of the algorithms used in the calculation equations, the accuracy of the calculated evapotranspiration depends upon the accuracy of the input data measurement, setting of the weather station and relevance of the chosen evapotranspiration calculation method. KACST takes no responsibility for matters arising from the application of the results of this program. Dr. Yousef A. Al-Rumikhani The program is designed to use the mean monthly climate data base (Microsoft access file) of the available weather stations in the Kingdom of Saudi Arabia. The user can select whole country to see reference ET contour map of Saudi for a certain month, can select a weather station to see reference ET graphically through whole year and can enter the coordinates of certain palace away from the weather stations, to see reference ET for a month. The software can compute reference ET on monthly basis and computations are presented as mm/day. The EVAPO SAUDIA is written in Visual Basic Version 6.0, Professional Edition. It runs on computers that have Windows 95, 98, ME, NT, 2000 or XP operating systems. The screen resolution must be set to 800 x 600 of higher. Screen resolutions of 640 x 480 will not show the entire data-tables, bar charts or contour map screens. The basic algorithms and routines used in this program are taken from the Food and Agriculture Organization of the united Nation (FAO) reports FAO-24 and FAO-56, ASCE and FAO reports/papers available on internet. 1.1.2 Main structure of the program EVAPO SAUDIA VERSION 1.0 Location Selection ListBox (LSL) Whole Country 0 Weather Station 1 Enter Location Coordinates 2 0 LSL Subroutine EQLIST 1 Weather Station Selection Table Subroutine OK N Subroutine EQLIST Contour Map Y Table 2 Enter o Latitude o Longitude Month Selection Subroutine EQLIST Suroutine Msele Month Selection Subroutine OK N Bar Graph ETo Value Y Bar Graph Subroutine OK Contour Map Subroutine OK Subroutine OK Subroutine EQLIST List Box Selection for Ten ETo Equation Must Select one Equation 1 Subroutine PMANFAO24 2 Subroutine PMONT 3 Subroutine PENMODIF Equation 4 Subroutine HARGREAVES Equation 5 Subroutine PRIESTLY Equation 6 Subroutine BLANCRID Equation 7 Subroutine JENSEN Equation Equation Equation Equation 8 Subroutine PEVAPO 9 Subroutine RADIATION Main Database TABLE NAME: Location Structure of Table STATION-NAM REGION AGENCY LONGITUDE LATITUDE ALTITUDE STATION_ID CODE Description: The Location Table having eight fields. The station name field contains all the stations The region field holds all the regions The agency field have name of the agency. There are two agencies MOA and MET.MOA stands for ministry of Agriculture. MET stands for Metallurgical department. The table consists the corresponding Longitude, Latitude and Altitude. For that stations. The Longitude, Latitude defined in degrees where as altitude in meters. The code was generated based on Latitude, longitude and Agency name TABLE NAME: PANEVAPO Structure of Table: CODE JAN FEB MAR APR MAY JUNE JULY AUG SEP OCT NOV DEC PANM PAN CASE Description: The panevporation table having 15 fields. The code was generated based on Latitude, longitude and Agency name. The JAN-DEC fields having the mean monthly data of pan evaporation. TABLE NAME: Rainfall Structure of Table: CODE JAN FEB MAR APR MAY JUNE JULY AUG SEP OCT NOV DEC Description: The Rainfall table having 13 fields. The code was generated based on Latitude, longitude and Agency name. The JAN-DEC fields having the mean monthly data of rainfall from January to December TABLE NAME: RH Structure of Table: CODE JAN FEB MAR APR MAY JUNE JULY AUG SEP OCT NOV DEC Description: The RH table having 13 fields. The code was generated based on Latitude, longitude and Agency name. The JAN-DEC fields having the mean monthly data of Relative Humidity (%) from January to December TABLE NAME: SolRadi Structure of Table: CODE JAN FEB MAR APR MAY JUNE JULY AUG SEP OCT NOV DEC Description: The SolRadi table having 13 fields. The code was generated based on Latitude, longitude and Agency name. The JAN-DEC fields having the mean monthly data of Solar Radiation from January to December TABLE NAME: SShine Structure of Table: CODE JAN FEB MAR APR MAY JUNE JULY AUG SEP OCT NOV DEC Description: The SShine table having 13 fields. The code was generated based on Latitude, longitude and Agency name. The JAN-DEC fields having the mean monthly data of Relative Sunshine from January to December TABLE NAME: Tmx Structure of Table: CODE JAN FEB MAR APR MAY JUNE JULY AUG SEP OCT NOV DEC Description: The Tmx table having 13 fields. The code was generated based on Latitude, longitude and Agency name. The JAN-DEC fields having the mean monthly data of Temperature Maximum January to December TABLE NAME: Tmn Structure of Table: CODE JAN FEB MAR APR MAY JUNE JULY AUG SEP OCT NOV DEC Description: The Tmn table having 13 fields. The code was generated based on Latitude, longitude and Agency name. The JAN-DEC fields having the mean monthly data of Temperature minimum from January to December TABLE NAME: Wind Structure of Table: CODE JAN FEB MAR APR MAY JUNE JULY AUG SEP OCT NOV DEC Description: The Wind table having 13 fields. The code was generated based on Latitude, longitude and Agency name. The JAN-DEC fields having the mean monthly data of wind from January to December 1.2.2 Data Structure of Database Table Name: Location Field Name STATION NAME REGION AGENCEY LONGITUDE LATITUDE ALTITUDE STATION-ID CODE Data Type Text Description Size Name of the weather station 50 Characters Text Text Region of the Saudi Arabia MOA= Ministry of Agriculture, MET=Metallurgical Dept. Longitude Degrees Latitude Degrees Above sea level (m) Agency Identification number Generated based on Latitude, Longitude and 50 Characters 50 Characters Number Number Number Text Number Long Integer Long Integer Long Integer 50 characters Long Integer Agency Identification Number Description: The Location table having eight fields. The Station name field contains all the stations .The region field holds all the regions. The Agency field have name of the agency. There are two agencies MOA and MET.MOA stands for Ministry of Agriculture, MET stands for Metallurgical department. The table consists the corresponding Longitude, Latitude and Altitude for that stations.friday The Longitude, Latitude defined in degrees where as Altitude in meters. The station identification number optimized from the agency. The code was generated based on Latitude, Longitude and Agency name. Table Name: PANEVAPO Design of the Pan Evaporation Table: Field Name CODE Data Type Text JAN Number FEB MAR APR MAY JUN JUL AUG Number Number Number Number Number Number Number SEP Number OCT Number NOV Number DEC Number PANM PANCASE Number Text Table Name: Rainfall Description Generated based on Latitude, Longitude and Agency Identification Number January mean monthly data of pan evaporation March mean monthly data of pan evaporation April mean monthly data of pan evaporation May mean monthly data of pan evaporation June mean monthly data of pan evaporation July mean monthly data of pan evaporation June mean monthly data of pan evaporation August mean monthly data of pan evaporation September mean monthly data of pan evaporation October mean monthly data of pan evaporation November mean monthly data of pan evaporation December mean monthly data of pan evaporation PAN Category PAN Case Width of Field 50 characters Long Integer Long Integer Long Integer Long Integer Long Integer Long Integer Long Integer Long Integer Long Integer Long Integer Long Integer Long Integer Long Integer 50 Characters Design of the Rainfall Table: Field Name CODE Data Type Text JAN FEB MAR APR MAY JUN JUL AUG SEP OCT NOV DEC Number Number Number Number Number Number Number Number Number Number Number Number Description Generated based on Latitude, Longitude and Agency Identification Number January mean monthly data of rainfall February mean Monthly data of rainfall March mean Monthly data of rainfall April mean monthly data of rainfall May mean Monthly data of rainfall June mean Monthly data of rainfall July mean Monthly data of rainfall August mean mean Monthly data of rainfall September mean Monthly data of rainfall October mean Monthly data of rainfall November mean Monthly data of rainfall December mean Monthly data of rainfall Width of Field 50 characters Long Integer Long Integer Long Integer Long Integer Long Integer Long Integer Long Integer Long Integer Long Integer Long Integer Long Integer Long Integer Table Name: RH Design of the Relative Humidity Table: Field Name CODE Data Type Text JAN Number FEB MAR Number Number APR Number MAY JUN JUL AUG SEP Number Number Number Number Number OCT Number NOV Number DEC Number Description Generated based on Latitude, Longitude and Agency Identification Number January mean Monthly data of relative humidity Monthly mean data of relative humidity February mean Monthly data of relative humidity March mean Monthly data of relative humidity April mean Monthly data of relative humidity May mean Monthly data of relative humidity June mean Monthly data of relative humidity July mean Monthly data of relative humidity August mean Monthly data of relative humidity September mean Monthly data of relative humidity November mean Monthly data of relative humidity December mean Monthly data of relative humidity Width of Field 50 characters Long Integer Long Integer Long Integer Long Integer Long Integer Long Integer Long Integer Long Integer Long Integer Long Integer Long Integer Long Integer Table Table: SolRadi Design of the Solar Radiation Table: Field Name CODE Data Type Text JAN FEB Number Number MAR APR MAY JUN JUL AUG SEP Number Number Number Number Number Number Number OCT NOV Number Number DEC Number Description Generated based on Latitude, Longitude and Agency Identification Number January mean Monthly data of solar radiation February mean Monthly data of solar radiation March mean Monthly data of solar radiation April mean Monthly data of solar radiation May mean Monthly data of solar radiation June mean Monthly data of solar radiation July mean Monthly data of solar radiation August mean Monthly data of solar radiation September mean Monthly data of solar radiation October mean Monthly data of solar radiation November mean Monthly data of solar radiation December mean Monthly data of solar radiation Width of Field 50 Characters Long Integer Long Integer Long Integer Long Integer Long Integer Long Integer Long Integer Long Integer Long Integer Long Integer Long Integer Long Integer Table Name: SShine Design of the Sun Shine Table: Field Name CODE Data Type Text JAN FEB MAR APR MAY JUN JUL AUG SEP OCT Number Number Number Number Number Number Number Number Number Number Description Generated based on Latitude, Longitude and Agency Identification Number January mean Monthly data of sunshine February mean Monthly data of sunshine March mean Monthly data of sunshine April mean Monthly data of sunshine May mean Monthly data of sunshine June mean Monthly data of sunshine July mean Monthly data of sunshine August mean Monthly data of sunshine September mean Monthly data of sunshine October mean Monthly data of sunshine Width of Field 50 characters Long Integer Long Integer Long Integer Long Integer Long Integer Long Integer Long Integer Long Integer Long Integer Long Integer NOV DEC Number Number November mean Monthly data of sunshine December mean Monthly data of sunshine Long Integer Long Integer Table Name: Tmx Design of Temperature Maximum Table: Field Name CODE Data Type Text JAN Number FEB Number MAR Number APR Number MAY Number JUN Number JUL Number AUG Number SEP Number OCT Number NOV Number DEC Number Description Generated based on Latitude, Longitude and Agency Identification Number January mean Monthly data of maximum temperature February mean Monthly data of maximum temperature March mean Monthly data of maximum temperature April mean Monthly data of maximum temperature May mean Monthly data of maximum temperature June mean Monthly data of maximum temperature July mean Monthly data of maximum temperature August mean Monthly data of maximum temperature September mean Monthly data of maximum temperature October mean Monthly data of maximum temperature November mean Monthly data of maximum temperature December mean Monthly data of maximum temperature Width of Field 50 Characters Long Integer Long Integer Long Integer Long Integer Long Integer Long Integer Long Integer Long Integer Long Integer Long Integer Long Integer Long Integer Table Name: Tmin Design of the Temperature Minimum Table: Field Name CODE Data Type Text JAN Number FEB Number MAR Number APR Number MAY Number JUN Number JUL Number AUG Number SEP Number OCT Number NOV Number DEC Number Table Name: Wind Description Generated based on Latitude, Longitude and Agency Identification Number January mean Monthly data of minimum temperature February mean Monthly data of minimum temperature March mean Monthly data of minimum temperature April mean Monthly data of minimum temperature May mean Monthly data of minimum temperature June mean Monthly data of minimum temperature July meanMonthly data of minimum temperature August meanMonthly data of minimum temperature September mean Monthly data of minimum temperature October mean Monthly data of minimum temperature November mean Monthly data of minimum temperature December meanMonthly data of minimum temperature Width of Field 50 Characters Long Integer Long Integer Long Integer Long Integer Long Integer Long Integer Long Integer Long Integer Long Integer Long Integer Long Integer Long Integer Design of Wind Table: Field Name CODE JAN FEB MAR APR MAY JUN JUL AUG SEP OCT NOV DEC Data Type Text Number Number Number Number Number Number Number Number Number Number Number Number Description January mean Monthly data of wind speed February mean Monthly data of wind speed March mean Monthly data of wind speed April mean Monthly data of wind speed May mean Monthly data of wind speed June mean Monthly data of wind speed July mean Monthly data of wind speed August mean Monthly data of wind speed September mean Monthly data of wind speed October mean Monthly data of wind speed November mean Monthly data of wind speed December mean Monthly data of wind speed Width of Field 50 characters Long Integer Long Integer Long Integer Long Integer Long Integer Long Integer Long Integer Long Integer Long Integer Long Integer Long Integer Long Integer 1.2.3 Data structure of subroutine Tables Data structure of Subroutine Table-B n/N 0 20 0 0.2 0.4 0.6 0.8 1.0 40 RHmin % 60 80 100 U2 day = 0 m/sec Refrence: Crop water requirements, FAO24, table 1, page 110, by Pruitt and Doorenbos (1977) Description: The values for 'a' and 'b' of the relationship ETo = a + b p(0.46T + 8) are given for 'b' in above table for different levels of RHmin,n/N,and Uday.The computer program uses the table 'b' values is included in the program and interpolates between the different ranges of RHmin,n/N,Uday. RHmin – Relative Humidity n/N – Sunshine hour's Uday - Day time wind conditions Data structure of subroutine Table-P Months Latitude 00 Latitude 50 Latitude 100 Latitude 150 Latitude 200 Latitude 250 Latitude 300 Latitude 350 Latitude 400 Latitude 450 JAN FEB MAR APR MAY JUNE JULY AUG SEP OCT NOV DEC Reference: Crop water requirements, FAO24, table 1, page 6. Description: The value for p of the relationship ETo = a + b p (0.46T + 8).the above table contains mean daily percentage (P) of annual day time hours for different latitudes Data Structure of Subroutine Table - C RHmax = 30% 3 6 9 12 Rs mm/day Uday m/sec RHmax = 60% 3 6 9 12 RHmax = 90% 3 6 9 12 Uday/Unight =4.0 0 3 6 9 Uday/Unight =3.0 0 3 6 9 Uday/Unight =2.0 0 3 6 9 Uday/Unight =1.0 Reference: Crop water requirements, FAO24, table 16, page28 Latitude 500 Description: The above table presents the value of 'c' for different conditions of RHmax, Rs, Uday and Uday/Unight. Data Structure of Subroutine Table - W Temperature 0 C 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 36 38 40 W at altitude m 0 500 1 000 2 000 3 000 4 000 Reference: Crop water requirements, FAO24, table 9, page24 Description: The values of Weighting Factor (w) for the Effect of radiation on ETo different Temperatures and altitudes Data Structure of Subroutine Table - C RHmax = 30% 3 6 9 12 Rs mm/day Uday m/sec RHmax = 60% 3 6 9 12 RHmax = 90% 3 6 9 12 Uday/Unight =4.0 0 3 6 9 Uday/Unight =3.0 0 3 6 9 Uday/Unight =2.0 0 3 6 9 Uday/Unight =1.0 Reference: Crop water requirements, FAO24, table 16, page28 Description: The above table presents the value of 'c' for different conditions of RHmax, Rs, Uday and Uday/Unight. Data Structure of Subroutine Table - W Temperature 0 C 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 36 38 40 W at altitude m 0 500 1 000 2 000 3 000 4 000 Reference: Crop water requirements, FAO24, table 9, page24 Description: The values of Weighting Factor (w) for the Effect of radiation on ETo different Temperatures and altitudes 1.2.4 Algorithms of subroutine Tables This subroutine (Table-P) is calling under Balney-Criddle Method. Open "c:\Table-P.dat" For Input As #1 For i = 1 To 12 For j = 0 To 10 Input #1, P(i, j) Next j Next i Close (1) This subroutine (Table-B) is calling under Blany-Criddl Methoed Open "c:\Table-B.dat" For Input As #2 For i = 1 To 36 'Solar Radiations * Wind at 2 m For j = 0 To 5 'Relative Humidity Input #2, B(i, j) Next j Next i Close (2) This Subroutine (Table-W) is calling under Corrected Penman FAO24. Open "c:\Table-W.dat" For Input As #4 For j = 0 To 4 For i = 1 To 20 Input #4, fW(i, j) Next i Next j Close (4) This Subroutine (Table-C) is calling under Corrected Penman FAO24. Open "c:\table-c.dat" For Input As #5 For j = 1 To 16 For i = 1 To 12 Input #5, c(i, j) Next i Next j Close (5) 1.2.5 Flowchart of subroutine Table 1.2.6 Arrangement of used subroutine t in Program SubRoutine Subroutine Equations Month_sele Main ETo X Stn_select X CmdExit_click X Eqnlist_click X PMANFAO24 X PMONT X PENMODIF X HARVEGES X PRISTELY X BLANCRID X BLANIModif X JENSEN X Form_load X Mselect_click X Interpol X Methodsele_click X Equation_list X LLCmdok_click X ERRload X Eqn_seled X Month_seltd X Interpola X TxtLati_change X TxtLatim_change X Txtlong_change X TxtlongM_change X Cmdok_click X X X Form_load X X X6 Form_load1 X ReForm(ea,Eb) X X X ReFormI(ea,Eb) X X X X X X X X X X X X X X X X X X X X X X X PMexit_click X Old_Form X X Old_Form1 OLD1 Form_OldFo X Barchat Bar chart X X X X X X X X X Contour Map X X X X X X X X X Description: The above Table describing the arrangement of the subroutines in evaporation pogram. It has subroutine names in rows and subroutine equations in coloums. The Main ETo file of the pogram calling the 18 subroutines. The 'X' mark indicates that where the subroutine is calling in the evaporation program. 1.2.7 Arrangement of used subroutine tables in Program SubRoutine Tables Subroutine Equations PMANFAO24 PMONT PENMODIF Table-P.dat Table-B.dat HARVEGES PRISTELY BLANCRID BLANIModif X JENSEN X PEVAPO RADIATION X Table-W.dat X Table-C.dat X X Pantable X X X Description: The above Table describing the arrangement of the subroutine Tables in evaporation pogram. It has subroutine. Tables in rows and subroutine equations in coloums.The 'X' mark indicates that where the subroutine Table is calling in the evaporation program. 1.2.8 Arrangements of used database in program Main Database LOCATION Subroutine Equations PMANFAO24 PMONT PENMODIF HARVEGES PRISTELY BLANCRID BLANIModif JENSEN PEVAPO RADIATION X X X X X X X X X X PANEVAPO X RH X X X X SShine X X X X X Tmx X X X X X X Tmn X X X X SR X X X X Wind X X X X X X X X X X X X X X X X X X X X X SAUDIARABIA CONTOURING 1.3.1 Flowchart of subroutine contour map Subroutine Contour Map ETo Equations Result Weather Station Latitude, Longitude, ETo monthly values Initialize Database file EToSA.dbf Month Selection Subroutine Month List Box Select a Month ASCII file GRDdat Latitude, Longitude, Selected Month ETo Database EToSA.dbf Rows = 250 Columns = 250 MinX = 12 MaxX = 33 MinY = 34 MaxY = 60 21 SURFER GrdDat.dat TO Temp.grd Application Girding SURFER Temp.grd TO Saudia.grd Application Blanking CONTOUR Saudia.grd TO Temp.dat VIEW ASCII FILE Subroutine ContourMap View Contour Map 1.3.2 Explanation of the subroutine contour map Subroutine Contour Map This program generates a contour map for the Saudi Arabia with surfer application for the selected months with the result of ETo equations ETo Equations Result: ETo Equations Result The monthly ETo results are coming from one out of ten equations and the out put will be in millimeters. The ten equations are: a) Corrected Penman Method FAO-24 b) Penman modified (Penman 1948,1963) c) Penman Monteith FAO-56 d) Hargreaves Temperature Method e) Jensen-Haise Method f) Blaney-criddle Method g) Blaney-Modified FAO-24 h) Priestly-Taylor Method i) Pan Evaporation FAO-24 j) Radiation Method FAo-24 ETo Calculation by panman Monteith (FAO 56) formula for Kingdom of Saudi Arabia Latitude 42.39 40.06 Longitude JAN FEB MAR APR MAY JUNE JULY AUG SEP OCT A Temporary database file will be created with a Longitude(X), Latitude(Y) and ETo result (Z) from the stored data base of weather station Weather Station Initialize Database file EToSA.dbf Latitude, Longitude, ETo monthly values XYZ data files contain the raw data interpreted by Surfer when producing a grid [.GRD] file. XYZ data files are organized in Column and Row format. By default Surfer expects the X data to be contained in column A, the Y data in Column B, and the Z data in Column C. Row 2 Row 3 Row 4 Row 5 Row 6 Row 7 - D 18.14 1.993 2.045 3.375 4.851 5.460 6.903 6.257 5.717 5.O54 3.600 2.145 1.7 29.47 2.177 3.145 5.030 7.610 8.495 10.35 10.84 9.545 8.282 5.780 3.602 2.0 Initialize Database file: Row 1 NOV Column A Column B Column C Longitude(X) Latitude(Y) Elevation (Z) Row 8 - Month selection subroutine Month selection is a subroutine pogram to select a month from month list box (January to December)to create a contour map for Saudi Arabia based on the ETo result Month Selection Subroutine Month List Box Select a Month SURFER APPLICATION: Surfer application converts the location of weather station (X,Y,Z) into Grid Mesh (250rowes x 250coloums ) and remove the points out side Saudi Arabia boundery Surfer converts X,Y,Z devided in to 250 x 250 grid points (MaxX, MinY) (330, 340) (MaxX, MaxY (330, 600) (MinX, MinY) (120, 340) (MaxX, Max (120, 600) Latitude (X) = 12 to 33 degrees Longitude(Y) =34 to 66 degrees Minimum Latitude=MinX Maximun Latitude=MaxX Minimum Longitude=MinY Minimum Longitude=MaxX ASCII file GRD.dat Latitude, Longitude, Selected month ETo Database EToSA.dbf Rows = 250 Columns = 250 MinX = 12 MaxX = 33 MinY = 34 MaxY = 60 Gridding of Saudi Arabia Map: Gridding processes which trace from irregular space location data into equally space grid node of Saudi Arabia. The location data of weather station is not equally spaced. To make a contour map for weather station gridding is needed. The temporary data of Longitude, Latitude and ETo result [DAT] file is in ASCII format converts into grid nodes The density of grid refers to the rows and columns in a grid file. The X, Y, Z values between Longitude (120 to 350North), Latitude (340 to 600) and converts into (250 rows and 250 columns) equally spaced data. This temporary created GrdDat.dat file converts into binary format as Temg.ged file. GrdDat.dat TO Temp.grd SURFER Application Girding Blanking for Saudi Arabia out side boundary: Blanking application removes the node pointes of the gird out side of the Saudia boundary and store into new saudia boundary and store into binary format. The blanking procedure modifies by placing a special blanking value for each grid node that lines with in the area to be blanked. It uses the Temp.grd file and modified as saudia.grd file that contain only node points of inside Saudi Arabia. SURFER Temp.grd TO Saudia.grd Application Blanking Contour converts blanked grid file into the ASCII format. The values uses for the input of contour subroutine. The contour subprogram uses the saudi.grd file as input and converts Temp.dat file. The program converting binary format to ASCII format and it is temporary file. CONTOUR Saudia.grd TO Temp.dat VIEW ASCII FILE Subroutine Contour map of Saudi Arabia: Contour subroutine map reads the data file and draw a map for Saudi Arabia. The program generate the contour map for the selected month based on the ETo equation .The program draw a contour map on screen for the select month estimated by ETo equations .It shows the variation of the Eto values at different weather stations View Contour Map CHAPTER2 – EVAPORATION EQUATIONS OF PROGRAMS Subroutine PMONT CropHeight = 12 'Crop Height TempHumid = 190 'Height temperature and humidity measurements CropHgtWnd = 200 'Wind speed measured at Crop Height AerDynResist = Log((CropHgtWnd - 0.667 * CropHeight) / (0.123 * CropHeight)) * Log((TempHumid - 0.667 * CropHeight) / (0.0123 * CropHeight)) / (0.41) ^ 2 AeroTCoeff = 0.622 * 3.486 * 86400 / (AerDynResist * 1.01) pi = 3.141592654 SWa = 0.25 'Short Wave Radiations SWb = 0.5 'Short Wave Radiations Alpha = 0.23 'Albedo LWa = 0.9 'LongWave Radiations LWb = 0.1 'LongWave Radiations LWal = 0.34 'LongWave Radiations Albedo LWbl = -0.139 'LongWave Radiations Albedo 'Label1.Caption = "Radiant = " + Format (radiant, "####.####") 'Label2.Caption = "AeroTCoeff = " + Format(AeroTCoeff, "####.##") For j = 1 To TotalStn If MainETo.StnAlone = 1 Then radiant = Lati * pi / 180 Else radiant = LatiR(j) * pi / 180 End If If MainETo.StnAlone <> 1 Then For i = 1 To 12 Tmx(i) = TmxR(j, i) Tmn(i) = TmnR(j, i) RHm(i) = RHmR(j, i) Wnd(i) = WndR(j, i) SS(i) = SSR(j, i) SR(i) = SRR(j, i) RF(i) = RFR(j, i) PE(i) = PER(j, i) Next i Lati = LatiR(j) Longi = LongiR(j) Elev = ElevR(j) End If For i = 1 To 12 AvgT(i) = (Tmx(i) + Tmn(i)) / 2 Wind(i) = Wnd(i) / 86.4 EaTn(i) = 0.61078 * Exp(17.27 * Tmn(i) / (Tmn(i) + 237.3)) EaTx(i) = 0.61078 * Exp(17.27 * Tmx(i) / (Tmx(i) + 237.3)) EaTxTn(i) = (EaTx(i) + EaTn(i)) / 2 Edew(i) = RHm(i) / (50 / EaTx(i) + 50 / EaTn(i)) RHmean(i) = Edew(i) / EaTx(i) * 100 RHdel(i) = Edew(i) / EaTx(i) / 2 + Edew(i) / EaTn(i) / 2 ETxTn(i) = 2049 * EaTx(i) / (Tmx(i) + 237.3) ^ 2 + 2049 * EaTn(i) / (Tmn(i) + 237.3) ^ 2 Patm(i) = 101.3 * ((293 - 0.0065 * Elev) / 293) ^ 5.253 Lambda(i) = 2.501 - (0.002361 * AvgT(i)) Gamma(i) = 0.0016286 * Patm(i) / Lambda(i) rc(i) = 70 'For Grass, 86 for Alfalfa (rc-> Canopy resistance Ra(i) = AerDynResist / Wind(i) GammaP(i) = Gamma(i) * (1 + rc(i) / Ra(i)) DlGm(i) = ETxTn(i) / (ETxTn(i) + GammaP(i)) GmDgm(i) = Gamma(i) / (ETxTn(i) + GammaP(i)) Aeroterm(i) = GmDgm(i) * Wind(i) * AeroTCoeff * (EaTxTn(i) - Edew(i)) / (AvgT(i) + 273) Dayno(i) = (30.5 * i - 14.6) Soldeclin(i) = Sin(((2 * pi * Dayno(i) / 365) - 1.39)) * 0.4093 xx(i) = Sin(Soldeclin(i)) * Sin(radiant) yy(i) = Cos(Soldeclin(i)) * Cos(radiant) temp1 = -Tan(Soldeclin(i) * Tan(radiant)) Omega(i) = Atn(-temp1 / Sqr(-temp1 * temp1 + 1)) + 2 * Atn(1) 'ArcCos function define Dr(i) = (1 + 0.033 * Cos((2 * pi / 365) * Dayno(i))) RAa(i) = 37.586 * Dr(i) * (Omega(i) * xx(i) + Sin(Omega(i)) * yy(i)) N1(i) = 24 / pi * Omega(i) NbyN(i) = SS(i) / N1(i) Rns(i) = (1 - Alpha) * RAa(i) * (SWa + SWb * NbyN(i)) FNbyN(i) = (LWb + LWa * NbyN(i)) Sigma(i) = 0.00000000245 * ((Tmx(i) + 273) ^ 4 + (Tmn(i) + 273.16) ^ 4) Emissivity(i) = LWal + LWbl * Sqr(Edew(i)) Rbo(i) = 0.00000000245 * (LWal + LWbl * Sqr(Edew(i))) * (((Tmx(i) + 273.16) ^ 4 + (Tmn(i) + 273.16) ^ 4)) LWR(i) = Rbo(i) * (LWb + LWa * NbyN(i)) RnsRl(i) = Rns(i) - LWR(i) Next i AvgT(0) = AvgT(12) For i = 1 To 12 G(i) = 0.14 * (AvgT(i) - AvgT(i - 1)) RnG(i) = RnsRl(i) - G(i) RadTm(i) = DlGm(i) * RnsRl(i) / Lambda(i) RadTmG(i) = DlGm(i) * RnG(i) / Lambda(i) ETcomb(i) = RadTm(i) + Aeroterm(i) ETG(i) = RadTmG(i) + Aeroterm(i) ETGptg(i) = (ETcomb(i) - ETG(i)) / ETcomb(i) ETos(i) = ETG(i) EToSA(j, i) = ETG(i) Next i Next j Subroutine PMANFAO24 CropHeight = 12 'Crop Height TempHumid = 190 'Height temperature and humidity measurements CropHgtWnd = 200 'Wind speed measured at Crop Height AerDynResist = Log((CropHgtWnd - 0.667 * CropHeight) / (0.123 * CropHeight)) * Log((TempHumid - 0.667 * CropHeight) / (0.0123 * CropHeight)) / (0.41) ^ 2 AeroTCoeff = 0.622 * 3.486 * 86400 / (AerDynResist * 1.01) pi = 3.141592654 SWa = 0.25 'Short Wave Radiations SWb = 0.5 'Short Wave Radiations Alpha = 0.23 'Albedo LWa = 0.9 'LongWave Radiations LWb = 0.1 'LongWave Radiations LWal = 0.34 'LongWave Radiations Albedo LWbl = -0.139 'LongWave Radiations Albedo radiant = Lati * pi / 180 albedo = 0.25 ' for grass a0 = 0.6817 A1 = 0.0027864 A2 = 0.0181768 a3 = -0.0682501 a4 = 0.0126514 a5 = 0.0097297 a6 = 0.000043025 a7 = -0.000000092118 k = 0.41 R = 287 'J/kg/K Gravity = 9.81 ' m/s2 TK0 = 293.16 'K Azero = 0 'meter lapserate = 0.0065 'K/m Pzero = 101.3 'KPa Open "c:\Table-W.dat" For Input As #4 For j = 0 To 4 For i = 1 To 20 Input #4, fW(i, j) Next i Next j Close (4) Open "c:\table-c.dat" For Input As #5 For j = 1 To 16 For i = 1 To 12 Input #5, c(i, j) Next i Next j Close (5) 'Open "c:\TestFAO24.txt" For Output As #6 For j = 1 To TotalStn If MainETo.StnAlone <> 1 Then radiant = LatiR(j) * pi / 180 Else radiant = Lati * pi / 180 End If For i = 1 To 12 AvgT(i) = (Tmx(i) + Tmn(i)) / 2 Wind(i) = Wnd(i) / 86.4 EaTn(i) = 0.61078 * Exp(17.27 * Tmn(i) / (Tmn(i) + 237.3)) EaTx(i) = 0.61078 * Exp(17.27 * Tmx(i) / (Tmx(i) + 237.3)) ea(i) = (EaTx(i) + EaTn(i)) / 2 EaTxTn(i) = (EaTx(i) + EaTn(i)) / 2 Edew(i) = RHm(i) / (50 / EaTx(i) + 50 / EaTn(i)) Ed(i) = Edew(i) 'RHmax RHmax(i) = Edew(i) / EaTn(i) * 100 RHmean(i) = Edew(i) / EaTx(i) * 100 RHdel(i) = Edew(i) / EaTx(i) / 2 + Edew(i) / EaTn(i) / 2 ETxTn(i) = 2049 * EaTx(i) / (Tmx(i) + 237.3) ^ 2 + 2049 * EaTn(i) / (Tmn(i) + 237.3) ^ 2 Patm(i) = 101.3 * ((293 - 0.0065 * Elev) / 293) ^ 5.253 'Lambda(i) = 2.501 - (0.002361 * AvgT(i)) Gamma(i) = 0.006595 * Patm(i) 'Gamma(i) = 0.0016286 * Patm(i) / Lambda(i) rc(i) = 70 'For Grass, 86 for Alfalfa (rc-> Canopy resistance Ra(i) = AerDynResist / Wind(i) GammaP(i) = Gamma(i) * (1 + rc(i) / Ra(i)) DlGm(i) = ETxTn(i) / (ETxTn(i) + GammaP(i)) GmDgm(i) = Gamma(i) / (ETxTn(i) + GammaP(i)) Aeroterm(i) = GmDgm(i) * Wind(i) * AeroTCoeff * (EaTxTn(i) - Edew(i)) / (AvgT(i) + 273) Dayno(i) = (30.5 * i - 14.6) Soldeclin(i) = Sin(((2 * pi * Dayno(i) / 365) - 1.39)) * 0.4093 xx(i) = Sin(Soldeclin(i)) * Sin(radiant) yy(i) = Cos(Soldeclin(i)) * Cos(radiant) temp1 = -Tan(Soldeclin(i) * Tan(radiant)) Omega(i) = Atn(-temp1 / Sqr(-temp1 * temp1 + 1)) + 2 * Atn(1) 'ArcCos function define Dr(i) = (1 + 0.033 * Cos((2 * pi / 365) * Dayno(i))) RAa(i) = 37.586 * Dr(i) * (Omega(i) * xx(i) + Sin(Omega(i)) * yy(i)) 'Uday N1(i) = 24 / pi * Omega(i) 'UDay/UNight ratio NbyN(i) = SS(i) / N1(i) 'Rns(i) = (1 - albedo) * SR(i) / 2.45 Rnl(i) = albedo * (Tk ^ 4) * (7.723 - (10 * Edew(i)) ^ 0.5) * (0.1 + 0.9 * NbyN(i)) 'RS Rns(i) = (1 - Alpha) * RAa(i) * (SWa + SWb * NbyN(i)) FNbyN(i) = (LWb + LWa * NbyN(i)) If RHmax(i) > 0 And RHmax(i) < 45 Then RH = 45 If RHmax(i) >= 45.01 And RHmax(i) < 75 Then RH = 60 If RHmax(i) >= 75.01 Then RH = 90 If FNbyN(i) < 1.5 Then Unight = 1 If FNbyN(i) >= 1.5 And FNbyN(i) < 2.5 Then Unight = 2 If FNbyN(i) >= 2.5 And FNbyN(i) < 3.5 Then Unight = 3 If FNbyN(i) >= 3.5 Then Unight = 4 If SR(i) > 0 And SR(i) < 4.5 Then SolR = 3 If SR(i) >= 4.5 And SR(i) < 7.5 Then SolR = 6 If SR(i) >= 7.5 And SR(i) < 10.5 Then SolR = 9 If SR(i) >= 10.5 Then SolR = 12 If N1(i) >= 0 And N1(i) < 1.5 Then Uday = 0 If N1(i) >= 1.5 And N1(i) < 4.5 Then Uday = 3 If N1(i) >= 4.5 And N1(i) < 7.5 Then Uday = 6 If N1(i) >= 7.5 Then Uday = 9 xin = (RH / 30 - 1) * 4 + SolR / 3 yin = (4 - Unight) * 4 + (Uday / 3 + 1) '************************************ Altitude = Int(Elev / 500) * 500 TempC = Int(AvgT(i) / 2#) * 2 '************************************ FWnd = 0.27 * (1 + Wnd(i) / 100) '************************************ Rn(i) = Rns(i) - Rnl(i) '************************************ ETos(i) = c(xin, yin) * (fW(TempC / 2, Altitude / 500) * Rn(i) + (1 - fW(TempC / 2, Altitude / 500)) * (ea(i) - Ed(i))) EToSA(j, i) = ETos(i) Next i Next j Subroutine PENMODIF\ CropHeight = 12 'Crop Height TempHumid = 190 'Height temperature and humidity measurements CropHgtWnd = 200 'Wind speed measured at Crop Height AerDynResist = Log((CropHgtWnd - 0.667 * CropHeight) / (0.123 * CropHeight)) * Log((TempHumid - 0.667 * CropHeight) / (0.0123 * CropHeight)) / (0.41) ^ 2 AeroTCoeff = 0.622 * 3.486 * 86400 / (AerDynResist * 1.01) pi = 3.141592654 SWa = 0.25 'Short Wave Radiations SWb = 0.5 'Short Wave Radiations Alpha = 0.23 'Albedo LWa = 0.9 'LongWave Radiations LWb = 0.1 'LongWave Radiations LWal = 0.34 'LongWave Radiations Albedo LWbl = -0.139 'LongWave Radiations Albedo 'Label1.Caption = "Radiant = " + Format(radiant, "####.####") 'Label2.Caption = "AeroTCoeff = " + Format(AeroTCoeff, "####.##") radiant = Lati * pi / 180 albedo = 0.25 ' for grass a0 = 0.6817 A1 = 0.0027864 A2 = 0.0181768 a3 = -0.0682501 a4 = 0.0126514 a5 = 0.0097297 a6 = 0.000043025 a7 = -0.000000092118 k = 0.41 R = 287 'J/kg/K Gravity = 9.81 ' m/s2 TK0 = 293.16 'K Azero = 0 'meter lapserate = 0.0065 'K/m Pzero = 101.3 'KPa If MainETo.StnAlone = 1 Then TotalStn = 1 MSFlexGrid1.Cols = 3 MSFlexGrid1.Rows = 1 MSFlexGrid1.AllowUserResizing = flexResizeColumns MSFlexGrid1.ColWidth(1) = 2700 MSFlexGrid1.ColWidth(2) = 1100 s$ = "<Months |>T.Max(o C)|>T.Min(o C)|>AverageT(o C)|>Mean RH(%)|>Min.RH(%)|>Wind (km/d)|>SunShine(h)|>DayNight(%)|>ETo (mm/d)" MSFlexGrid1.FormatString = s$ End If If MainETo.StnAlone = 0 Then MSFlexGrid1.Cols = 3 MSFlexGrid1.Rows = 1 MSFlexGrid1.AllowUserResizing = flexResizeColumns MSFlexGrid1.ColWidth(1) = 2700 MSFlexGrid1.ColWidth(2) = 1100 s$ = "<Station Name |>April |>May |>June |>Latitude |>Longitude |>January |>February |>March |>July |>August |>December " MSFlexGrid1.FormatString = s$ End If Open "c:\Table-W.dat" For Input As #4 For j = 0 To 4 For i = 1 To 20 Input #4, fW(i, j) Next i Next j Close (4) AvgT(0) = (Tmx(12) + Tmn(12)) / 2 |>September |>October |>November For j = 1 To TotalStn If MainETo.StnAlone <> 1 Then radiant = LatiR(j) * pi / 180 Else radiant = Lati * pi / 180 End If If MainETo.StnAlone <> 1 Then For i = 1 To 12 Tmx(i) = TmxR(j, i) Tmn(i) = TmnR(j, i) RHm(i) = RHmR(j, i) Wnd(i) = WndR(j, i) SS(i) = SSR(j, i) SR(i) = SRR(j, i) RF(i) = RFR(j, i) PE(i) = PER(j, i) Next i Lati = LatiR(j) Longi = LongiR(j) Elev = ElevR(j) End If For i = 1 To 12 AvgT(i) = (Tmx(i) + Tmn(i)) / 2 Wind(i) = Wnd(i) / 86.4 EaTn(i) = 0.61078 * Exp(17.27 * Tmn(i) / (Tmn(i) + 237.3)) EaTx(i) = 0.61078 * Exp(17.27 * Tmx(i) / (Tmx(i) + 237.3)) ea(i) = (EaTx(i) + EaTn(i)) / 2 EaTxTn(i) = (EaTx(i) + EaTn(i)) / 2 Edew(i) = RHm(i) / (50 / EaTx(i) + 50 / EaTn(i)) Ed(i) = Edew(i) 'RHmax RHmax(i) = Edew(i) / EaTn(i) * 100 RHmean(i) = Edew(i) / EaTx(i) * 100 RHdel(i) = Edew(i) / EaTx(i) / 2 + Edew(i) / EaTn(i) / 2 ETxTn(i) = 2049 * EaTx(i) / (Tmx(i) + 237.3) ^ 2 + 2049 * EaTn(i) / (Tmn(i) + 237.3) ^ 2 Patm(i) = 101.3 * ((293 - 0.0065 * Elev) / 293) ^ 5.253 'Lambda(i) = 2.501 - (0.002361 * AvgT(i)) Gamma(i) = 0.006595 * Patm(i) 'Gamma(i) = 0.0016286 * Patm(i) / Lambda(i) rc(i) = 70 'For Grass, 86 for Alfalfa (rc-> Canopy resistance Ra(i) = AerDynResist / Wind(i) GammaP(i) = Gamma(i) * (1 + rc(i) / Ra(i)) DlGm(i) = ETxTn(i) / (ETxTn(i) + GammaP(i)) GmDgm(i) = Gamma(i) / (ETxTn(i) + GammaP(i)) Aeroterm(i) = GmDgm(i) * Wind(i) * AeroTCoeff * (EaTxTn(i) - Edew(i)) / (AvgT(i) + 273) Dayno(i) = (30.5 * i - 14.6) Soldeclin(i) = Sin(((2 * pi * Dayno(i) / 365) - 1.39)) * 0.409 xx(i) = Sin(Soldeclin(i)) * Sin(radiant) yy(i) = Cos(Soldeclin(i)) * Cos(radiant) temp1 = -Tan(Soldeclin(i) * Tan(radiant)) Omega(i) = Atn(-temp1 / Sqr(-temp1 * temp1 + 1)) + 2 * Atn(1) 'ArcCos function define Dr(i) = (1 + 0.033 * Cos((2 * pi / 365) * Dayno(i))) RAa(i) = 37.586 * Dr(i) * (Omega(i) * xx(i) + Sin(Omega(i)) * yy(i)) N1(i) = 24 / pi * Omega(i) NbyN(i) = SS(i) / N1(i) Rnl(i) = albedo * (Tk ^ 4) * (7.723 - (10 * Edew(i)) ^ 0.5) * (0.1 + 0.9 * NbyN(i)) Rns(i) = (1 - Alpha) * RAa(i) * (SWa + SWb * NbyN(i)) / 41.855 Altitude = Int(Elev / 500) * 500 TempC = Int(AvgT(i) / 2#) * 2 FW1 = fW(TempC / 2, Altitude / 500) Rn(i) = Rns(i) - Rnl(i) LatHVap = 595 - 0.51 * AvgT(i) Pressure = 1013 - 0.1055 * Elev Delta = 2 * (0.00738 * AvgT(i) + 0.8072) ^ 7 - 0.00116 Gama = 0.386 * Pressure / LatHVap DoDGamma = Delta / (Delta + Gama) GoDGamma = Gama / (Delta + Gama) SoilFden = 0.38 * (AvgT(i) - AvgT(i - 1)) ETos(i) = DoDGamma * Rn(i) + GoDGamma * 15.36 * FW1 * (ea(i) - Ed(i)) EToSA(j, i) = ETos(i) Next i Next j Subroutine Hargreaves For j = 1 To TotalStn If MainETo.StnAlone <> 1 Then radiant = LatiR(j) * pi / 180 Else radiant = Lati * pi / 180 End If If MainETo.StnAlone <> 1 Then For i = 1 To 12 Tmx(i) = TmxR(j, i) Tmn(i) = TmnR(j, i) SR(i) = SRR(j, i) Next i Lati = LatiR(j) Longi = LongiR(j) Elev = ElevR(j) End If For i = 1 To 12 AvgT(i) = (Tmx(i) + Tmn(i)) / 2 ETos(i) = 0.0135 * (AvgT(i) + 17.78) * SR(i) EToSA(j, i) = ETos(i) Next i Next j Subroutine JENSEN CropHeight = 12 'Crop Height TempHumid = 190 'Height temperature and humidity measurements CropHgtWnd = 200 'Wind speed measured at Crop Height AerDynResist = Log((CropHgtWnd - 0.667 * CropHeight) / (0.123 * CropHeight)) * Log((TempHumid - 0.667 * CropHeight) / (0.0123 * CropHeight)) / (0.41) ^ 2 AeroTCoeff = 0.622 * 3.486 * 86400 / (AerDynResist * 1.01) pi = 3.141592654 SWa = 0.25 'Short Wave Radiations SWb = 0.5 'Short Wave Radiations Alpha = 0.23 'Albedo LWa = 0.9 'LongWave Radiations LWb = 0.1 'LongWave Radiations LWal = 0.34 'LongWave Radiations Albedo LWbl = -0.139 'LongWave Radiations Albedo 'Label1.Caption = "Radiant = " + Format(radiant, "####.####") 'Label2.Caption = "AeroTCoeff = " + Format(AeroTCoeff, "####.##") If MainETo.StnAlone = 1 Then TotalStn = 1 MSFlexGrid1.Cols = 3 MSFlexGrid1.Rows = 1 MSFlexGrid1.AllowUserResizing = flexResizeColumns MSFlexGrid1.ColWidth(1) = 2700 MSFlexGrid1.ColWidth(2) = 1100 s$ = "<Months |>T.Max(o C)|>T.Min(o C)|>AverageT(o C)|>ETo (mm/d)" MSFlexGrid1.FormatString = s$ End If If MainETo.StnAlone = 0 Then MSFlexGrid1.Cols = 3 MSFlexGrid1.Rows = 1 MSFlexGrid1.AllowUserResizing = flexResizeColumns MSFlexGrid1.ColWidth(1) = 2700 MSFlexGrid1.ColWidth(2) = 1100 s$ = "<Station Name |>April |>May |>June |>Latitude |>Longitude |>January |>February |>March |>July |>August |>December " MSFlexGrid1.FormatString = s$ End If For j = 1 To TotalStn If MainETo.StnAlone <> 1 Then radiant = LatiR(j) * pi / 180 Else radiant = Lati * pi / 180 End If If MainETo.StnAlone <> 1 Then For i = 1 To 12 Tmx(i) = TmxR(j, i) Tmn(i) = TmnR(j, i) RHm(i) = RHmR(j, i) Wnd(i) = WndR(j, i) SS(i) = SSR(j, i) SR(i) = SRR(j, i) RF(i) = RFR(j, i) PE(i) = PER(j, i) Next i Lati = LatiR(j) Longi = LongiR(j) Elev = ElevR(j) End If '-------------------------------------------------------iMaxT = Tmx(1) iMinT = Tmn(1) For i = 2 To 12 If Tmx(i) > iMaxT Then |>September |>October |>November iMaxT = Tmx(i) iMinT = Tmn(i) iMax = i End If Next i SE1 = 7.608353659 - 0.0144517725 * iMaxT + 0.04105626543 * iMaxT ^ 2 SE2 = 7.608353659 - 0.0144517725 * iMinT + 0.04105626543 * iMinT ^ 2 'SE1 = 0.61078 * Exp(17.27 * iMaxT / (iMaxT + 237.3)) 'SE2 = 0.61078 * Exp(17.27 * iMinT / (iMinT + 237.3)) Cl = 38# - 2 * Elev / 305# 'Cl = 68# - (3.6 * Elev / 1000) Ch = 50# / (SE1 - SE2) 'Ct = 1 / (Cl + 7.3 * Ch) Ct = (Cl + (13# * Ch)) ^ -1 Tx = -2.5 - 0.14 * (SE1 - SE2) - Elev / 550 'Tx = 27.5 - 0.25 * (SE2 - SE1) - Elev / 1000 For i = 1 To 12 AvgT(i) = (Tmx(i) + Tmn(i)) / 2 Wind(i) = Wnd(i) / 86.4 EaTn(i) = 0.61078 * Exp(17.27 * Tmn(i) / (Tmn(i) + 237.3)) EaTx(i) = 0.61078 * Exp(17.27 * Tmx(i) / (Tmx(i) + 237.3)) ea(i) = (EaTx(i) + EaTn(i)) / 2 EaTxTn(i) = (EaTx(i) + EaTn(i)) / 2 Edew(i) = RHm(i) / (50 / EaTx(i) + 50 / EaTn(i)) Ed(i) = Edew(i) 'RHmax RHmax(i) = Edew(i) / EaTn(i) * 100 RHmean(i) = Edew(i) / EaTx(i) * 100 RHdel(i) = Edew(i) / EaTx(i) / 2 + Edew(i) / EaTn(i) / 2 ETxTn(i) = 2049 * EaTx(i) / (Tmx(i) + 237.3) ^ 2 + 2049 * EaTn(i) / (Tmn(i) + 237.3) ^ 2 Patm(i) = 101.3 * ((293 - 0.0065 * Elev) / 293) ^ 5.253 'Lambda(i) = 2.501 - (0.002361 * AvgT(i)) Gamma(i) = 0.006595 * Patm(i) 'Gamma(i) = 0.0016286 * Patm(i) / Lambda(i) rc(i) = 70 'For Grass, 86 for Alfalfa (rc-> Canopy resistance Ra(i) = AerDynResist / Wind(i) GammaP(i) = Gamma(i) * (1 + rc(i) / Ra(i)) DlGm(i) = ETxTn(i) / (ETxTn(i) + GammaP(i)) GmDgm(i) = Gamma(i) / (ETxTn(i) + GammaP(i)) Aeroterm(i) = GmDgm(i) * Wind(i) * AeroTCoeff * (EaTxTn(i) - Edew(i)) / (AvgT(i) + 273) Dayno(i) = (30.5 * i - 14.6) Soldeclin(i) = Sin(((2 * pi * Dayno(i) / 365) - 1.39)) * 0.4093 xx(i) = Sin(Soldeclin(i)) * Sin(radiant) yy(i) = Cos(Soldeclin(i)) * Cos(radiant) temp1 = -Tan(Soldeclin(i) * Tan(radiant)) Omega(i) = Atn(-temp1 / Sqr(-temp1 * temp1 + 1)) + 2 * Atn(1) 'ArcCos function define Dr(i) = (1 + 0.033 * Cos((2 * pi / 365) * Dayno(i))) RAa(i) = 37.586 * Dr(i) * (Omega(i) * xx(i) + Sin(Omega(i)) * yy(i)) 'Uday N1(i) = 24 / pi * Omega(i) 'UDay/UNight ratio NbyN(i) = SS(i) / N1(i) 'Rns(i) = (1 - albedo) * SR(i) / 2.45 Rnl(i) = albedo * (Tk ^ 4) * (7.723 - (10 * Edew(i)) ^ 0.5) * (0.1 + 0.9 * NbyN(i)) 'RS Rns(i) = (1 - Alpha) * RAa(i) * (SWa + SWb * NbyN(i)) Altitude = Int(Elev / 500) * 500 TempC = Int(AvgT(i) / 2#) * 2 '************************************ FWnd = 0.27 * (1 + Wnd(i) / 100) '************************************ Rn(i) = Rns(i) - Rnl(i) 'ETos(i) = ((0.0239001 * SR(i)) + 50) * (AvgT(i) / (AvgT(i) + 15#) * 0.4 / 30) ETos(i) = Ct * (AvgT(i) - Tx) * Rn(i) 'ETos(i) = ((68# - (36 * Elev / 1000)) + (13# * (50 / (SE1 - SE2)))) * (AvgT(i) - (27.5 0.25 * (SE1 - SE2) - Elev / 1000)) * Rn(i) EToSA(j, i) = ETos(i) Next i Next j Subroutine PEVAPO For j = 1 To TotalStn If EVAPMain.StnAlone = False Then radiant = LatiR(j) * pi / 180 Else radiant = Lati * pi / 180 End If If EVAPMain.StnAlone = False Then For i = 1 To 12 Tmx(i) = TmxR(j, i) Tmn(i) = TmnR(j, i) RHm(i) = RHmR(j, i) Wnd(i) = WndR(j, i) SS(i) = SSR(j, i) SR(i) = SRR(j, i) RF(i) = RFR(j, i) PE(i) = PER(j, i) Next i Lati = LatiR(j) Longi = LongiR(j) Elev = ElevR(j) End If KPan = 0.75 For i = 1 To 12 ETos(i) = PE(i) * KPan EToSA(j, i) = ETos(i) Next i Next j Subroutine RADIATION CropHeight = 12 'Crop Height TempHumid = 190 'Height temperature and humidity measurements CropHgtWnd = 200 'Wind speed measured at Crop Height AerDynResist = Log((CropHgtWnd - 0.667 * CropHeight) / (0.123 * CropHeight)) * Log((TempHumid - 0.667 * CropHeight) / (0.0123 * CropHeight)) / (0.41) ^ 2 AeroTCoeff = 0.622 * 3.486 * 86400 / (AerDynResist * 1.01) pi = 3.141592654 SWa = 0.25 'Short Wave Radiations SWb = 0.5 'Short Wave Radiations Alpha = 0.23 'Albedo LWa = 0.9 'LongWave Radiations LWb = 0.1 'LongWave Radiations LWal = 0.34 'LongWave Radiations Albedo LWbl = -0.139 'LongWave Radiations Albedo 'Label1.Caption = "Radiant = " + Format(radiant, "####.####") 'Label2.Caption = "AeroTCoeff = " + Format(AeroTCoeff, "####.##") radiant = Lati * pi / 180 albedo = 0.25 ' for grass a0 = 0.6817 A1 = 0.0027864 A2 = 0.0181768 a3 = -0.0682501 a4 = 0.0126514 a5 = 0.0097297 a6 = 0.000043025 a7 = -0.000000092118 k = 0.41 R = 287 'J/kg/K Gravity = 9.81 ' m/s2 TK0 = 293.16 'K Azero = 0 'meter lapserate = 0.0065 'K/m Pzero = 101.3 'KPa If EVAPMain.StnAlone = True Then TotalStn = 1 MSFlexGrid1.Cols = 3 MSFlexGrid1.Rows = 1 MSFlexGrid1.AllowUserResizing = flexResizeColumns MSFlexGrid1.ColWidth(1) = 2700 MSFlexGrid1.ColWidth(2) = 1100 s$ = "<Months |>T.Max(o C)|>T.Min(o C)|>AverageT(o C)|>Mean RH(%)|>Min.RH(%)|>Wind (km/d)|>SunShine(h)|>DayNight(%)|>ETo (mm/d)" MSFlexGrid1.FormatString = s$ Else MSFlexGrid1.Cols = 3 MSFlexGrid1.Rows = 1 MSFlexGrid1.AllowUserResizing = flexResizeColumns MSFlexGrid1.ColWidth(1) = 2700 MSFlexGrid1.ColWidth(2) = 1100 s$ = "<Station Name |>April |>May |>June |>Latitude |>July |>August |>December " MSFlexGrid1.FormatString = s$ End If Open "c:\Table-W.dat" For Input As #4 For j = 0 To 4 For i = 1 To 20 Input #4, fW (i, j) Next i Next j |>Longitude |>January |>February |>March |>September |>October |>November Close (4) Open "c:\table-c.dat" For Input As #5 For j = 1 To 16 For i = 1 To 12 Input #5, c (i, j) Next i Next j Close (5) ' Open "c:\Test.txt" For Output As #6 ' ' ' For j = 1 To TotalStn If EVAPMain.StnAlone = False Then Radiant = LatiR (j) * pi / 180 Else Radiant = Lati * pi / 180 End If If EVAPMain.StnAlone = False Then For i = 1 To 12 Tmx (i) = TmxR(j, i) Tmn (i) = TmnR (j, i) RHm (i) = RHmR (j, i) Wnd (i) = WndR (j, i) SS (i) = SSR (j, i) SR (i) = SRR (j, i) RF (i) = RFR (j, i) PE (i) = PER(j, i) Next i Lati = LatiR (j) Longi = LongiR (j) Elev = ElevR (j) End If For i = 1 To 12 AvgT (i) = (Tmx(i) + Tmn(i)) / 2 Wind (i) = Wnd(i) / 86.4 EaTn (i) = 0.61078 * Exp(17.27 * Tmn(i) / (Tmn(i) + 237.3)) EaTx (i) = 0.61078 * Exp(17.27 * Tmx(i) / (Tmx(i) + 237.3)) ea (i) = (EaTx(i) + EaTn(i)) / 2 EaTxTn (i) = (EaTx(i) + EaTn(i)) / 2 Edew (i) = RHm(i) / (50 / EaTx(i) + 50 / EaTn(i)) Ed(i) = Edew(i) 'RHmax RHmax(i) = Edew(i) / EaTn(i) * 100 RHmean(i) = Edew(i) / EaTx(i) * 100 RHdel(i) = Edew(i) / EaTx(i) / 2 + Edew(i) / EaTn(i) / 2 ETxTn(i) = 2049 * EaTx(i) / (Tmx(i) + 237.3) ^ 2 + 2049 * EaTn(i) / (Tmn(i) + 237.3) ^ 2 Patm(i) = 101.3 * ((293 - 0.0065 * Elev) / 293) ^ 5.253 'Lambda(i) = 2.501 - (0.002361 * AvgT(i)) Gamma(i) = 0.006595 * Patm(i) 'Gamma(i) = 0.0016286 * Patm(i) / Lambda(i) rc(i) = 70 'For Grass, 86 for Alfalfa (rc-> Canopy resistance Ra(i) = AerDynResist / Wind(i) GammaP(i) = Gamma(i) * (1 + rc(i) / Ra(i)) DlGm(i) = ETxTn(i) / (ETxTn(i) + GammaP(i)) GmDgm(i) = Gamma(i) / (ETxTn(i) + GammaP(i)) Aeroterm(i) = GmDgm(i) * Wind(i) * AeroTCoeff * (EaTxTn(i) - Edew(i)) / (AvgT(i) + 273) Dayno(i) = (30.5 * i - 14.6) Soldeclin(i) = Sin(((2 * pi * Dayno(i) / 365) - 1.39)) * 0.4093 xx(i) = Sin(Soldeclin(i)) * Sin(radiant) yy(i) = Cos(Soldeclin(i)) * Cos(radiant) temp1 = -Tan(Soldeclin(i) * Tan(radiant)) Omega(i) = Atn(-temp1 / Sqr(-temp1 * temp1 + 1)) + 2 * Atn(1) 'ArcCos function define Dr(i) = (1 + 0.033 * Cos((2 * pi / 365) * Dayno(i))) RAa(i) = 37.586 * Dr(i) * (Omega(i) * xx(i) + Sin(Omega(i)) * yy(i)) 'Uday N1(i) = 24 / pi * Omega(i) 'UDay/UNight ratio NbyN(i) = SS(i) / N1(i) 'Rns(i) = (1 - albedo) * SR(i) / 2.45 Rnl(i) = albedo * (Tk ^ 4) * (7.723 - (10 * Edew(i)) ^ 0.5) * (0.1 + 0.9 * NbyN(i)) 'RS Rns(i) = (1 - Alpha) * RAa(i) * (SWa + SWb * NbyN(i)) FNbyN(i) = (LWb + LWa * NbyN(i)) If RHmax(i) > 0 And RHmax(i) < 45 Then RH = 45 If RHmax(i) >= 45.01 And RHmax(i) < 75 Then RH = 60 If RHmax(i) >= 75.01 Then RH = 90 If FNbyN(i) < 1.5 Then Unight = 1 If FNbyN(i) >= 1.5 And FNbyN(i) < 2.5 Then Unight = 2 If FNbyN(i) >= 2.5 And FNbyN(i) < 3.5 Then Unight = 3 If FNbyN(i) >= 3.5 Then Unight = 4 If SR(i) > 0 And SR(i) < 4.5 Then SolR = 3 If SR(i) >= 4.5 And SR(i) < 7.5 Then SolR = 6 If SR(i) >= 7.5 And SR(i) < 10.5 Then SolR = 9 If SR(i) >= 10.5 Then SolR = 12 If N1(i) >= 0 And N1(i) < 1.5 Then Uday = 0 If N1(i) >= 1.5 And N1(i) < 4.5 Then Uday = 3 If N1(i) >= 4.5 And N1(i) < 7.5 Then Uday = 6 If N1(i) >= 7.5 Then Uday = 9 xin = (RH / 30 - 1) * 4 + SolR / 3 yin = (4 - Unight) * 4 + (Uday / 3 + 1) '************************************ Altitude = Int(Elev / 500) * 500 TempC = Int(AvgT(i) / 2#) * 2 '************************************ FWnd = 0.27 * (1 + Wnd(i) / 100) '************************************ Rn(i) = Rns(i) - Rnl(i) '************************************ ETos(i) = c(xin, yin) * (fW(TempC / 2, Altitude / 500) * Rn(i)) '************************************ EToSA(j, i) = ETos(i) Subroutine BLANCRID Open "c:\Table-P.dat" For Input As #1 For i = 1 To 12 For j = 0 To 10 Input #1, P(i, j) Next j Next i Close (1) For j = 1 To TotalStn If EVAPMain.StnAlone = False Then radiant = LatiR(j) * pi / 180 Else radiant = Lati * pi / 180 End If '-------------------------------------------------------- For i = 1 To 12 AvgT(i) = (Tmx(i) + Tmn(i)) / 2 ETos(i) = P(i, Int(Lati / 5)) * (0.46 * AvgT(i) + 8.13) EToSA(j, i) = ETos(i) Next i Next j Subroutine BLANCRID Open "c:\Table-P.dat" For Input As #1 For i = 1 To 12 For j = 0 To 10 Input #1, P(i, j) Next j Next i Close (1) Open "c:\Table-B.dat" For Input As #2 For i = 1 To 36 For j = 0 To 5 'Solar Radiations * Wind at 2 m 'Relative Humidity Input #2, B(i, j) Next j Next i Close (2) Open "C:\Test.txt" For Output As #3 For j = 1 To TotalStn If EVAPMain.StnAlone = False Then radiant = LatiR(j) * pi / 180 Else radiant = Lati * pi / 180 End If MaxDayHr = 1 For i = 1 To 12 If SS(i) > MaxDayHr Then MaxDayHr = SS(i) Next i For i = 1 To 12 AvgT(i) = (Tmx(i) + Tmn(i)) / 2 Wind(i) = Wnd(i) / 86.4 Dh1 = (Int((SS(i) / MaxDayHr) * 10 / 2) * 2 / 10) / 0.2 Dh2 = (Int((Wind(i) + 0.5) / 2) * 2) / 2 Dh3 = (Int((RHm(i) + 5) / 20) * 20) / 20 xin = Dh1 * 6 + Dh2 yin = Dh3 a = 0.0043 * RHm(i) - SS(i) - 1.41 ETos(i) = a + B(xin, yin) * (P(i, Int(Lati / 5)) * (0.46 * AvgT(i) + 8.13)) EToSA(j, i) = ETos(i) Next i Next j Subroutine PRIESTLY CropHeight = 12 'Crop Height TempHumid = 190 'Height temperature and humidity measurements CropHgtWnd = 200 'Wind speed measured at Crop Height AerDynResist = Log((CropHgtWnd - 0.667 * CropHeight) / (0.123 * CropHeight)) * Log((TempHumid - 0.667 * CropHeight) / (0.0123 * CropHeight)) / (0.41) ^ 2 AeroTCoeff = 0.622 * 3.486 * 86400 / (AerDynResist * 1.01) pi = 3.141592654 SWa = 0.25 'Short Wave Radiations SWb = 0.5 'Short Wave Radiations Alpha = 0.23 'Albedo LWa = 0.9 'LongWave Radiations LWb = 0.1 'LongWave Radiations LWal = 0.34 'LongWave Radiations Albedo LWbl = -0.139 'LongWave Radiations Albedo For j = 1 To TotalStn If EVAPMain.StnAlone = False Then radiant = LatiR(j) * pi / 180 Else radiant = Lati * pi / 180 End If For i = 1 To 12 AvgT(i) = (Tmx(i) + Tmn(i)) / 2 Wind(i) = Wnd(i) / 86.4 EaTn(i) = 0.61078 * Exp(17.27 * Tmn(i) / (Tmn(i) + 237.3)) EaTx(i) = 0.61078 * Exp(17.27 * Tmx(i) / (Tmx(i) + 237.3)) EaTxTn(i) = (EaTx(i) + EaTn(i)) / 2 Edew(i) = RHm(i) / (50 / EaTx(i) + 50 / EaTn(i)) RHmean(i) = Edew(i) / EaTx(i) * 100 RHdel(i) = Edew(i) / EaTx(i) / 2 + Edew(i) / EaTn(i) / 2 ETxTn(i) = 2049 * EaTx(i) / (Tmx(i) + 237.3) ^ 2 + 2049 * EaTn(i) / (Tmn(i) + 237.3) ^ 2 Patm(i) = 101.3 * ((293 - 0.0065 * Elev) / 293) ^ 5.253 Lambda(i) = 2.501 - (0.002361 * AvgT(i)) Gamma(i) = 0.0016286 * Patm(i) / Lambda(i) rc(i) = 70 'For Grass, 86 for Alfalfa (rc-> Canopy resistance Ra(i) = AerDynResist / Wind(i) GammaP(i) = Gamma(i) * (1 + rc(i) / Ra(i)) DlGm(i) = ETxTn(i) / (ETxTn(i) + GammaP(i)) GmDgm(i) = Gamma(i) / (ETxTn(i) + GammaP(i)) Aeroterm(i) = GmDgm(i) * Wind(i) * AeroTCoeff * (EaTxTn(i) - Edew(i)) / (AvgT(i) + 273) Dayno(i) = (30.5 * i - 14.6) Soldeclin(i) = Sin(((2 * pi * Dayno(i) / 365) - 1.39)) * 0.4093 xx(i) = Sin(Soldeclin(i)) * Sin(radiant) yy(i) = Cos(Soldeclin(i)) * Cos(radiant) temp1 = -Tan(Soldeclin(i) * Tan(radiant)) Omega(i) = Atn(-temp1 / Sqr(-temp1 * temp1 + 1)) + 2 * Atn(1) 'ArcCos function define Dr(i) = (1 + 0.033 * Cos((2 * pi / 365) * Dayno(i))) RAa(i) = 37.586 * Dr(i) * (Omega(i) * xx(i) + Sin(Omega(i)) * yy(i)) N1(i) = 24 / pi * Omega(i) NbyN(i) = SS(i) / N1(i) Rns(i) = (1 - Alpha) * RAa(i) * (SWa + SWb * NbyN(i)) FNbyN(i) = (LWb + LWa * NbyN(i)) Sigma(i) = 0.00000000245 * ((Tmx(i) + 273) ^ 4 + (Tmn(i) + 273.16) ^ 4) Emissivity(i) = LWal + LWbl * Sqr(Edew(i)) Rbo(i) = 0.00000000245 * (LWal + LWbl * Sqr(Edew(i))) * (((Tmx(i) + 273.16) ^ 4 + (Tmn(i) + 273.16) ^ 4)) LWR(i) = Rbo(i) * (LWb + LWa * NbyN(i)) RnsRl(i) = Rns(i) - LWR(i) Next i AvgT(0) = AvgT(12) For i = 1 To 12 G(i) = 0.14 * (AvgT(i) - AvgT(i - 1)) RnG(i) = RnsRl(i) - G(i) ETos(i) = Alpha*ETxTn(i)*RnG(i)/((ETxTn(i)+Gamma)*Lambda) EToSA(j, i) = ETG(i) Next i Next j 2.2 LIST OF THE EVAPORATION EQATION Reference ET Methods Calculated by EVAPO SAUDIA Version 1.0 The EVAPO SAUDIA program offers the user ten alternative methods of evapotranspiration calculation by combination equations from various sources. The program provides calculations that are compatible with United Nations Food and Agriculture Organization (FAO) Irrigation Paper N0. 24 & 56 and with standardized forms of the ASCE Penman-Monteith equation. a) Corrected Penman FAO-24 (Doorenbos and Pruitt, 1975, 1977) b) Penman Modified (Penman 1948, 1963) c) Penman Monteith FAO-56 (Monteith, 1965 & 1981, Allen et al., 1989) d) Hargreaves Temperature Method (Hargreaves and Samani, 1985) e) Jensen-Haise Method (Jensen and Haise, 1963) f) Blaney-Criddle (Israelsen and Hansen, 1962) g) Blaney-Criddle Modified FAO-24 (Doorenbos and Pruitt, 1977) h) Priestley-Taylor (Radiation and Temperature Method, 1972) i) Pan Evaporation FAO-24 (Doorenbos and Pruitt, 1977) j) Radiation Method FAO-24 (Doorenbos and Pruitt, 1977) 2.3 Design of the equations