Introduction

In recent decades, the agricultural sector has undergone marked transformation that has evolved over time. It can be stated that the first step began with the mechanization of farm work and the introduction of fertilizers and phytosanitary products. Later significant progress was made thanks to information and communication technologies (ICT) being introduced, which enables vast quantities of data about soil status, water availability, crop development, the amount of plant sanitary product applied to each plant, etc., to be collected and transmitted1,2,3,4,5,6. All this, along with historic information about weather, the progression of plagues or diseases, is leading to a major transformation in the sector that is increasing productivity and competition7.

Therefore, the management and integration of different databases will be one of the advances that will have a strong impact in forthcoming years because it will allow decisions to be quickly, effectively and accurately made to optimize production and costs8.

At the same time, this sector faces low water availability and increasingly degraded quality9. Therefore, efficient water resources management is the main tool to confer farms stability and sustainability10. In relation to this, the use of ICT is an excellent support to efficiently manage water resources11. Employing ICT in agriculture is based on using sensors that monitor various agri-environmental variables related to the soil–plant-atmosphere combination to quantify or estimate water requirements9. Knowing environmental data allows the evapotranspiration (ET) demand in an area to be calculated, with which the consumption of a given crop can be estimated by applying the corresponding corrective coefficients. Such information can help to more efficiently manage irrigation. As a network of public agrometeorological stations that obtain such data exists, placing them at farmers’ disposal seems important.

Different websites can be found on the Internet that offer interesting agroclimate information to be consulted12,13,14, although some shortcomings have been detected that should be stressed. Some examples of these shortcomings are: (i) the web format does not match that of mobile devices; (ii) data consultations are awkward and slow; (iii) consulting time data is impossible; (iv) forms to consult data are lacking; (v) data cannot be plotted as graphs; (vi) there are no weather forecasts; (vii) no basic data about stations to make inquiries with are available.

In order to overcome these deficiencies and to offer users a practical and efficient tool, a web application has been developed to: (i) consult ETo; (ii) consult data from the different selected stations; (iii) obtain weather forecasts. The aim of this project is to have a web application that meets a series of minimum characteristics that: (a) is simple; (b) offers a responsive presentation, that is, it adapts to different devices; (c) serves to collect data in real time to calculate daily ET and its time to be later stored in a database.

Another objective of this project is for users to make accurate irrigation decisions by bearing in mind information on the ET demand offered by this tool. This allows improved water resources management without having to invest in any sensors network.

Materials and methods

Websites analysis

There are two types of web-based weather information systems:

  1. a)

    Private stations: These allow data to be obtained close to each farmer's plot, provided that as many weather stations as are of interest are invested. This is an advantage in terms of the representativeness of the data for each farmer; however, it has the disadvantage of the high cost of the investment.

    1. i.

      An example is the service offered by Sencrop (www.sencrop.com), which centralises all the data from privately installed stations on one platform (if the owner so wishes) and makes them available to other users, thus reducing the investment cost.

    2. ii.

      Another example is offered by Envira IOT (www.enviraiot.es/monitorizacion-meteorologica-agricultura-precision/), which installs a private weather station and offers data provided with algorithms that facilitate user interpretation.

  2. b)

    Public stations: There are numerous web services that offer historical weather data collected from the existing network of weather stations in Spain. In general, access to these data is free of charge, but the microclimate of a particular farm may differ from the data provided by the nearest weather station.

    1. i.

      SIAR (Agro-climatic Information System for Irrigation) (https://eportal.mapa.gob.es/websiar/Inicio.aspx) offers data from stations located throughout Spain, through its website (and even has a mobile App).

    2. ii.

      At the level of autonomous communities, some offer this service through their own portals, with data from the same stations: SIAM of the Region of Murcia (www.siam.imida.es), InfoRiego of the “Junta de Castilla y León” (www.inforiego.org/opencms/opencms/info_meteo/index.html), RIA of the “Junta de Andalucía” (https://www.juntadeandalucia.es/agriculturaypesca/ifapa/riaweb/web/), among others.

The potential of the data collected in these services lies in their free access, and in the quality of the data coming from a Spanish network. On the other hand, the consultation of data is, in general, not user-friendly, nor is it adapted to mobile devices. In addition, data are consulted whose processing requires considerable office skills to be interpreted. These services lack the ability to graph the data, and the possibility of easily storing them in their own database.

Taking into account the study carried out, the AgroClimatic Evolution web application was developed, designed to provide free access to data to users, in a user-friendly and simple way. But this application is part of a broader project, the GENHIDRO platform (www.genhidro.es), aimed at the efficient and autonomous management of fertigation systems.

Therefore, the aim of this project is to ensure that the data obtained through AgroClimatic Evolution are not merely a mere visualisation and storage of data, but feed a more complex decision-making system for advice and even the direct management of fertigation systems. GENHIDRO is a platform under continuous development and aims to offer the user the possibility of interacting with the irrigation system based on data collected, among others, from meteorological information services such as those consulted through AgroClimatic Evolution.

Theorical background

The ETo was calculated in this project. This ETo concept occurs under certain conditions, on a reference surface and with no water restrictions. The ETo is a variable to study atmospheric ET demand regardless of crop type and crop development.

By relating ET to a given surface, a reference ET is obtained. From this value, ET values on other surfaces can be related. This will allow analyses based on ET alone, and independent of other site-specific variables. Thus, ETo will be the reference ET under certain growing conditions, for a reference crop. The ETo value will express the evapotranspiration capacity of the atmosphere at a given location and time of year; but it does not take into account the characteristics of the crop or soil type. The great advantage of using ETo to estimate water requirements is that its value only depends on climatic parameters, which are easy to obtain.

To understand the ETo concept, it is necessary to define what a reference surface is. According to FAO-56, it is a “hypothetical reference crop with crop height of 0.12 m, a fixed surface resistance of 70 s m-1 and an albedo value (i.e., portion of light reflected by the leaf surface) of 0.23”15.

To calculate this parameter, the FAO Penman–Monteith method is recommended because it is the only standardized method that determines ETo with climate parameters16. This method of Zotarelli was selected because it roughly approaches the ETo of any town, has robust physical bases, and explicitly incorporates physiological and aerodynamic parameters. The data required to apply the FAO Penman–Monteith method are location, temperature, relative humidity, radiation and wind.

Determining ETo is extremely important for estimating a crop’s water requirements or for conducting studies regardless of the crop type to be grown. Knowledge about ETo and the grown crop allows adjusted irrigation doses to be established and crop performance to improve.

To calculate the ETo, we applied the equations of the FAO Penman–Monteith method available in FAO-56. We began with daily ETo, calculated by the expression below:

$$ET_{o} = \frac{{0.408 \Delta \left( {R_{n} - G} \right) + \gamma \frac{900}{{T + 273}} u_{2} \left( {e_{s} - e_{a} } \right)}}{{\Delta + \gamma \left( {1 + 0.3 u_{2} } \right)}}$$
(1)

where:

ET Reference evapotranspiration [mm day-1]

RnNet radiation the crop’s surface(MJ m-2day-1)

Ra Extraterrestial radiation (mm day-1)

G Ground heat flow(MJ m-2day-1)

T Mean air temperature at a heigjt of 2 m (°C)

U2 Wind speed at a height of 2m (m s-1)

Es  Vapour saturation pressure (kPa)

ea  Real vapor pressure (kPa)

es-ea No vapor pressure (kPa)

\(\Delta\) Vapor pressure curve slope (kPa °C-1)

\(\gamma\) Psychometric constant (kPa °C-1)

For the calculation of each and every one of the parameters involved in Eq. (1), the methodology established by Zotarelli et al.16 has been followed. Thus, the daily ETo estimate is obtained, expressed in mm·day-1.

To obtain the ETo value at the hourly level, the expressions indicated by Zotarelli et al.16 vary slightly. Thus, for hourly periods, the FAO Penman–Monteith equation for the calculation of ET is modified as follows:

$$ET_{o} = \frac{{0.408 \Delta \left( {R_{n} - G} \right) + \gamma \frac{37}{{T_{hr} + 273}} u_{2} \left( {e^{o} \left( {T_{hr} } \right) - e_{a} } \right)}}{{\Delta + \gamma \left( {1 + 0.24 u_{2} } \right)}}$$
(2)

where:

ETo  Reference evapotranspiration [mm hour-1]

Rn Net radiation on the reference surface [MJ m-2 hour-1]

G Ground heat flow density [MJ m-2 hour-1]

Thr Mean air temperature every hour [°C]

\(\Delta\) Vapor saturation pressure curve slope in Thr [kPaC-1] and psychometric constant[kPa °C-1]

e (Thr) Vapor saturation pressure at Thr

ea Average real vapor pressure times [kPa]

U2 Average wind spee times [m s-1]

The adjustments made to the equations proposed by Zoratelli et al.16, in order to obtain the hourly ETo values, are shown below:

Real vapor pressure (ea) is calculated as:

$$e_{a} = e^{o} \left( {T_{hr} } \right)\frac{{HR_{hr} }}{100}$$
(3)

where:

ea Average real vapor pressure times [kPa]

e (Thr) Vapor saturation pressure at Thr

HRhr Average relative humidity time [%]

The net radiation calculation varies for time periods; first, the expression to calculate extraterrestrial radiation (Ra) becomes:

$$R_{a} = \frac{24 \cdot 60}{{\uppi }} G_{sc} d_{r} \left[ {\left( {w_{2} - w_{1} } \right)\sin \left( \varphi \right)\sin \left( \delta \right) + \cos \left( \varphi \right)\cos \left( \delta \right){\text{sin}}\left( {w_{1} } \right)} \right]$$
(4)

where:

Ra Extraterrestial radiation per hour [MJ m-2 hour-1]

Gsc Solar constant =0.082 MJ m-2 min1

dr Realative inverse Earth −  Sun distance

\(\delta\) Solar declination [rad]

\(\phi\) Latitude [rad]

W1 Radiation angle at the beginning of the period [rad]

W2 Radiation angle at the end of the period [rad]

The initial and final radiation angles are given by:

$$w_{1} = w - \frac{{\pi t_{1} }}{24}$$
(5)
$$w_{2} = w + \frac{{\pi t_{1} }}{24}$$
(6)

where:

w Sun angle when the midpoint of the considered period is reached [rad]

t1 Duration of the considered period, 1 for time periods

The procedure followed to calculate net radiation is the same as that for daily period, except for Eqs. 4, 5 and 6.

In this case, heat flux is not longer negligible. The G value, according to FAO-5615, can be reached during light periods by:

$$G_{hr} = 0.1{ }R_{n} { }$$
(7)

and for night periods:

$$G_{hr} = 0.5{ }R_{n} { }$$
(8)

With these changes in the expressions, the hourly ETo can be properly estimated. As it is now known which calculation procedure is to be used, it is possible to study how the web application works.

Web application

This web application can be used with the link that follows: (http://josemiguel.myqnapcloud.com:49169/AgroClimatic-Evolution/).

The AgroClimatic Evolution (v1.0), web application can be used in a PC or a mobile device (Android or IOS). As this web application is executed by means of a server, a web browser is necessary, and Chrome is recommended. This tools’ operation is outlined in the figure below (Fig. 1).

Figure 1
figure 1

Outline of how the AgroClimatic Evolution tool operates.

Node-RED (https://nodered.org/) is the core of the web application's operation. It is a programming tool designed to communicate with different hardware, simplifying the processes of sending and receiving information as much as possible. It allows to connect different hardware devices, use APIs to perform communications, and connect with other services, in a very innovative and interesting way. The programming is visual, based on flows, so it does not require a very advanced level of programming.

Node-RED uses the "http request" node to request data from a specific weather station to the corresponding meteorological service. The data collected are: weather station, date, temperature, relative humidity, radiation, wind speed, wind direction and dew point temperature. This information is stored in the database, and phpMyAdmin (https://www.phpmyadmin.net/), which is a free open-source software tool, is used to manage and administer the database. Another Node-RED node is in charge of calculating the hourly or daily ETo values from the obtained meteorological data. This information is stored in the database. With the "uibuilder" node, the user interface interprets the information request made by the user, and extracts the appropriate information from the database to display it on the interface. This whole process works on the back-end.

The system is connected to different APIs and/or web services to acquire interesting weather data: (i) the API that OpenWeather (https://openweathermap.org/) provides for weather forecasts; (ii) the API that the “Junta de Andalucía” (the Regional Government of Andalusia, Spain) provides for weather data; (iii) obtaining data from websites of SIAM (the Farming Information System of Murcia) and SIAR (the Agroclimate Information System for Irrigation) by scraping every 6 min (Table 1). The public stations used respect the WMO standards (World Meteorological Organization, https://community.wmo.int/standards-and-requirements-climate-observations), and its main characteristics of equipment and data management is described by María del Carmen Caro Vela from SIAR 17.

Table 1 Access to different APIs.

The data provided by all the stations are validated by applying filters at levels 0 and 1 as indicated in Standard UNE 500540:2004 “Automatic weather stations networks: Guidance for the validation of the weather data from the station networks. Real time validation”. At level 0, the structure of the data record is validated, i.e. that the number of data received is the same as the number of data expected, as well as the date and/or time, taking as invalid those that do not comply. Level 1 establishes the physical limits within which the different climate variables must move, beyond which data are considered null. Table 2 shows the physical and instrumental limits established by the UNE 500540:2004 standard. With the filtered data, and once the ETo calculations have been obtained, the user is provided with a comparison made with the raw data supplied by the public stations.

Table 2 Physical limits of the different weather variables (UNE 500540:2004).

To validate the correct execution of the process of obtaining data from the meteorological services mentioned, the following test was carried out: a weather station was taken at random, during a randomly chosen month, and the data provided directly by the service were compared with those generated by the web application developed (Tables 3, 4, and 5).

Table 3 Comparison of temperature data obtained by the AgroClimatic web application and by the Meteorological Data Service.
Table 4 Comparison for relative humidity and solar radiation data obtained by the AgroClimatic web application and by the Meteorological Data Service.
Table 5 Comparison for wind speed and ETo data obtained by the AgroClimatic web application and by the Meteorological Data Service.

To achieve an attractive and practical front-end, the information has been organised with HTML, CSS and JavaScript programming.

Results

The result of this work is a user interface which shows the information that users require and request. This information is taken from databases and the different APIs. The application’s interface is divided into different tabs as the following screenshots show. The Home Page offers general information about the tool (Fig. 2). The second tab shows the followed methodology described in the previous section (Fig. 3).

Figure 2
figure 2

View of the initial tab in (a) the web application and (b) the mobile device.

Figure 3
figure 3

View of the tab with information about the methodology followed in (a) the web application and (b) the mobile device.

The third tab is Data, where various available parameters can be consulted (Fig. 4). Here the desired agrometeorological station can be selected by the interactive map on the left or by unfolding the menus on the right. After selecting a station, a table appears with basic and simplified information to learn the general details of what is selected. The map that opens was developed by a scalable vector graphics (SVG) editor. The advantage of using SVG is the scalability with which adjustments can be made in different sizes with-out losing properties. Different sections appear at the bottom of the screen to select the desired interval of dates and, for the Murcia Region (Spain), the option to consult the hourly ETo appears (Fig. 5).

Figure 4
figure 4

View of the tab to access the area where the data on the web can be consulted.

Figure 5
figure 5

View of the hourly interval selection.

Having selected the agrometeorological station and the desired intervals, a figure and a table appear with the requested data (Fig. 6). Moreover, the Data page also shows the weather forecast, plus further data from the selected station (Fig. 7).

Figure 6
figure 6

View of the Data tab as a graph and table in (a) the web application and (b) the mobile device.

Figure 7
figure 7

View of the weather forecast and data from the selected station in the (a) web application and (b) the mobile device.

The next tab of the web application is that of stations. It shows a picture gallery to know agrometeorological stations’ location (Fig. 8). An unfolding menu appears at the top with all the options of the available stations. When a station is selected, the related pictures are automatically obtained. The images available in the Murcia Region belong to the SIAM 13. The last tab that the web application offers is the Contact tab, with information about location, social networks and contact details. Finally, the web application is responsive and adapts to different devices.

Figure 8
figure 8

View of the Stations page in (a) the web application and (b) the mobile device.

With this study, what has been achieved is to unify valuable information for the farmer, in a responsive web tool, with user-friendly visualisation on both PC and mobile devices. It also allows the data to be integrated into the GENHIDRO platform, from which the fertigation system can be controlled, thus facilitating the farmer's work. In current solutions, either a costly tool is available through private weather stations, or an obsolete public data tool is available, but which in no case allows interaction with the fertigation system.

Conclusions

The AgroClimatic Evolution web application considers developing irrigation management software with data collected from agrometeorological stations’ sensors provided or owned by different organizations. With the data offered by agrometeorological stations, an adaptive and responsive web application was developed for different kinds of devices that allows daily and hourly ET to be consulted for distinct stations. The intention of this tool is to improve irrigation management by making better use of water and suitably meeting crop needs by collecting and analyzing these data.

This can be achieved as follows: (i) the tool facilitates calculating the climate’s ET demand; (ii) by knowing crop coefficients, crop water requirements are estimated; (iii) by knowing crop irrigation needs, both the quantities of supplied water and CO2 flow rates from land can be reduced, which also helps to reduce the carbon footprint. By doing so, and following the agricultural policy proposals of the Council Commission and the European Parliament about the European Green Pact, whose aim is to pursue a climatically neutral Europe by 2050, work will be done to help to fulfill this objective. With the developed web application, access can be gained to all information from any device in a much simpler and more practical way to consult ETo, weather forecasts and details about the selected stations.