| Algorithm 1. Irrigation Algorithm. | |
| 1 | Variable initialization |
| 2 | User parameter initialization |
| 3 | ETo calculation |
| 4 | Determination of the Crop Stage |
| 5 | If Water stress then |
| 6 | Calculate irrigation adjustment due to water stress |
| 7 | end if |
| 8 | If High salinity levels then |
| 9 | Calculate irrigation adjustment due to salinity |
| 10 | end if |
| 11 | If Precipitation then |
| 12 | Determine the precipitation amount |
| 13 | Determine the hour of the precipitation |
| 14 | Calculate irrigation adjustment due to precipitation |
| 15 | end if |
| 16 | Calculate ETc |
| 17 | Calculate Irrigation requirements of the crop |
| 18 | End. |