Experiments of an IoT-based wireless sensor network for ﬂ ood monitoring in Colima, Mexico

Urban ﬂ ooding is one of the major issues in many parts of the world, and its management is often challenging. One of the challenges highlighted by the hydrology and related communities is the need for more open data and monitoring of ﬂ oods in space and time. In this paper, we present the development phases and experiments of an Internet of Things (IoT)-based wireless sensor network for hydrometeorological data collection and ﬂ ood monitoring for the urban area of Colima-Villa de Álvarez in Mexico. The network is designed to collect ﬂ uvial water level, soil moisture and weather parameters that are transferred to the server and to a web application in real-time using IoT Message Queuing Telemetry Transport protocol over 3G and Wi-Fi networks. The network is tested during three different events of tropical storms that occurred over the area of Colima during the 2019 tropical cyclones season. The results show the ability of the smart water network to collect real-time hydrometeorological information during extreme events associated with tropical storms. The technology used for data transmission and acquisition made it possible to collect information at critical times for the city. Additionally, the data collected provided essential information for implementing and calibrating hydrological models and hydraulic models to generate ﬂ ood inundation maps and identify critical infrastructure.


INTRODUCTION
Recent developments of digital cities as the exploration of cyberspace to smart cities as the exploitation of the physical space resulted in proposing that the next stage is a networked society based on cyber-physical systems (Ishida ). This conceptualisation advocated in recent decade such as digital twins for a range of infrastructures is currently being implemented in water systems (Lee ). The coupling between the physical and cybernetic layers of water systems and related infrastructure can provide new opportunities to increase the efficiency of water infrastructure and can increase resilience in water planning and services (Makropoulos & Sávic ). For example, using multiple sensors, water systems and related infrastructure can be controlled in real-time and data can be continuously integrated into models. Such pairing of the virtual and physical components of the water systems will also be an Water in cities is a critical resource, and its management is associated with many challenges; for example, monitoring freshwater quality and quantity is a local and global concern (Artiola ; Camara et al. ). Water can also present a threat to the population when flooding occurs (Olya & Alipour ; Plümper et al. ; Ryan ). Tackling flooding disasters in urban areas is a primary concern in many cities around the globe (Davidsson ). Therefore, smart digital infrastructure to monitor and forecast flood events is critical for improving the resilience of urban areas to hazards such as those related to flooding.
Climate change is set to increase the frequency and severity of floods in many parts of the world (Miller & Hutchins ). Extreme hydroclimatic events will continue to disproportionately affect vulnerable populations and lowincome countries (Enenkel et al. ). In past years, the number of reported flood events has increased substantially (Tanoue et  Floods in Mexico are a major challenge for managers as flood events are increasing in regularity and severity (De et al. ). Climate-related disaster management in Mexico has been focussing more on the actions of repairing, emergency assistance than on the prevention (Constantino et al. ). However, this form of intervention does not reduce the possibility of disasters with the corresponding negative effect on the social functioning of the geographical areas that usually face such events.
In the light of current knowledge, it is important to develop a preventive approach to mitigating the risk of flooding in Mexico. One effective way to reduce the risk of floods lies in developing and implementing an early warning system. This early warning system is one of the main tools in the preventive approach; unfortunately, many developing countries have poor flood monitoring infrastructure (Matthews et al. ). The density of the river and climate monitoring network in Mexico is severely deficient now. Urban areas are particularly unmonitored currently, and only the cities of Tuxtla Gutierrez, Tijuana, Monterrey, Acapulco, Chalco, and Mexico City have a hydrometeorological alert system. The state of Colima (west-central Mexico) is often affected by the cyclonic activity from the Pacific basin.
Colima-Villa de Alvarez is the most urbanised area of the state. Its proximity to the coastline makes it exposed to tropical cyclones and their associated hazards. In the last decade, flooding is becoming more frequent in Colima and in the context of climate change; it is likely that this increasing trend will continue in the coming decades.

Study area
The Colima River catchment is located in the north of the Colima state (west-central Mexico). It is a sub-catchment of the Armeria's river basin (Figure 1). The catchment area is about 150 km 2 , and the main Colima River originates from the slopes of the Colima volcano and has a dynamic river bank vegetation. The state of Colima is often affected by the Eastern Pacific cyclonic activity during the tropical cyclones season. Colima-Villa de Alvarez is the most urbanised area of the state, and its proximity to the Pacific coastline makes it exposed to tropical storms that frequently

Network design and sensor locations
Several field campaigns were conducted across the catchment area to select suitable sites for data collection and sensor deployment. First, rivers and their tributaries in the Colima river basin was mapped and analysed before the survey. The main goal was to assess the optimal sites needed for flood monitoring and prediction and assess the representativeness of the selected locations following the pre- We worked with different stakeholders during the site selection process, the most significant being the local water authority (CONAGUA-Colima) in addition to the public schools, universities and other public institutions. Several meetings with the above stakeholders were held to establish the most suitable and secure locations for the sensors. These  collaborations provided valuable information on the suitability and security of the final selected locations. For example, public schools and universities across Colima city provided their support to deploy the weather stations on their building roofs where the weather station is exposed, safe and easy to maintain. For the water level nodes, non-contact ultrasonic sensors were placed under bridges with data loggers and solar panels placed on towers of 6 m high. Figure 3 shows the locations of the selected nodes along with the signal strength of the 3G/4G network in the study area.

Hardware and network development
The network is based on four building blocks ( Figure 4): • The weather station nodes use Ethernet technology for their communication with the server; the nodes are also equipped with local storage.
• Water level nodes (hereafter RiverCore) encompassing ultrasonic water level sensors (Toughsonic). RiverCore communicates with the server using 3G cellular communication technology, and it is also equipped with a local data storage.
• The Drifters which are floater designed to map water velocity for specific events, have a GPS and local storage; they use 900 MHz Long-Range RF Module (XBEE XSC PRO) technology to communicate with RiverDrones.
• RiverDrone is a drone used to locate the drifters along the rivers. RiverDrone uses 900 MHz Long-Range technology to communicate with the Drifters and 3G to connect to the central server.
Each of the components has its respective embedded system based on the energy and communication requirements. Regarding the software design, all the devices were programmed in C þþ for microcontrollers using serial interrupts and time control tasks. All communication with the central server uses the IoT publish-subscribe-based messaging protocol (MQTT) that includes messages in JSON format that allows the standardisation of information. This allows the website to display the data in near-real-time and store the data in a database.

Static nodes
Weather station nodes. The weather station node retrieves information from the commercial multisensory Atmos 41, which includes 12 weather sensors (solar radiation, precipitation, vapour pressure, relative humidity, air temperature, humidity sensor temperature, barometric pressure, horizontal wind speed, wind gust, wind direction, tilt, lighting and lighting average distance). Atmos 41 is a three-wire interface following the SDI-12 protocol for communicating sensor measurements (Table 1). We designed a shield/ daughterboard for Arduino MEGA with an Ethernet communication (ENC28J60), a local storage unit with a capacity of 32G allowing data backup during potential breaks of communication with the central server and a real-time clock to timestamp mark.
RiverCore nodes. The RiverCore node is composed of an ultrasonic water level (Toughsonic) and soil moisture (Teros10) used for water level monitoring, high water level warnings and for hydrological modelling a shield/daughterboard with own design using Arduino DUE with a 3G cellular communication (SIM5320A), RS-485 transceiver and a data logger; details are shown in Table 2.

Dynamic nodes
The fixed static hydrometeorological nodes are supported by   RiverDrone. After this, the RiverDrone will search and communicate with the drifter to recover it later.

TESTS AND RESULTS
A part of the web application platform is open to the public where real-time water level and weather parameters can be visualised. Another part of the application allows access and download of historical information using    (Table 5). These events generated significant rainfall and damage such as collapse of bridges, the destruction of roads and the flooding of critical infrastructure (e.g. schools, hospitals and  During the event periods, the data were collected and sent to the server every 5 min but for practical reasons, the data were aggregated to 10 min in the following analyses.

Lorena storm
The storm Lorena generated in the Pacific basin and its effects on Colima-Villa de Álvarez metropolitan area occurred on 18 September 2019 at 4:00 pm Figure 7(a) shows the hyetograph recorded by the weather station nodes across the network.
The maximum accumulated precipitation during the event was 157.82 mm recorded at node 6.
During the Lorena event, six weather station nodes out of eight were continuously in operation and did not lose the connection during the peak of the event. Figures 8(b)-8(d) show the spatial distribution of the precipitation across the area interpolated using kriging. The spatial interpolation showed that the network is well distributed spatially and allowed the capture of rainfall differences across the  Mexico. Due to its proximity to the coastal populations of the state of Colima, the event was closely monitored. However, Priscilla ceased to be a tropical storm as it weakened after making landfall. The government cancelled a tropical storm warning for the state of Colima.
The analysis of the precipitation records generated, as a result of this event, allowed to identify increases in the water level of urban rivers appeared since a day before (19 October) a mesoscale phenomenon that registers up to 40 mm the Colima-Villa Álvarez metropolitan area (Figure 9(a)).
During the Priscilla pass, the maximum precipitation recorded across the network was 21 mm (20 October). October and 19 October.

Hydrological modelling
The preliminary hydrological model for the

Drifters and RiverDrone experiments
The Drifter experiments were performed on 28 February 2020, in Coquimatlán, Colima, Mexico, between approximately 9 am and 12 pm ( Figure 11). The site was selected for its suitability, easy accessibility and safety of the team.
The following steps were performed to conduct the experiment: • define the suitable river stretch for releasing and collecting the drifters, • release the three drifters at the same time, • follow and captured the drifter at the exit point, and extract the microSD card, and • check the web application for data upload.
The Drifter path and its associated data are obtained and visualised on the web application's map as illustrated in Figure 12. Table 6 summarises the data collected and related to the water velocity and the distance of Drifter journey.
RiverDrone experiment was performed on 25 January 2020, in Manzanillo, Colima, Mexico. The objective of the experiment was to examine the ability of the River-Drone to search and find the drifters. The experiment was conducted in a first place in an open sea, and Drifter-Sniffer was tested to obtain real-time coordinates of the drifter location for their respective collection: • The drifter released in the sea about 2 km from the Drifter-Sniffer.
• The location of the Drifters displayed on the web application is when the Drifter-Sniffer detects a drifter using the 3G network.
• Drifter are manually collected and data are uploaded to the server. Figure 13 shows the drifter path along with its locations and velocities.

Dissemination of results
To   Women's participation is essential for effective disaster risk management. School children and youth are agents of change and must be given the space and ways to contribute to disaster risk reduction.  In terms of improvements and limitations, it is necessary to keep maintaining the system regularly and correct data issues and bugs when necessary. Additional new functionalities in the web application are needed such as easily choosing time intervals for sampling, appending the quality of the GPS signal to the datalogger. Sensor security and vandalism has been an issue although, in our network, we used higher towers and protected the sensors under bridges with a metal box. For the drifter sensors, overall, more tests are needed and it is convenient to add new functions to the current system since at the moment it does not show the distance or the intensity of the signal between the drifter and the sniffer.