An image of dry ground

Using AI to detect drought ; A tutorial on how to make a drought detection AI using satellite images

Vihaan Nair
12 min readJan 25, 2024

--

For many continents, excessive anomalous warmth characterized much of 2023. It was the warmest year on record for North and South America, Africa, and globally, second warmest year for Asia and Europe, and eighth warmest year for Australia. The January-December period ended up very dry across most of Canada, Central America, Southwest Asia, and the Mediterranean, and parts of Australia and South America, particularly the Amazon region, Venezuela, and the southern tip of the continent. — NCEI

This statistic is derived from the National Centers for Environmental Information (NCEI)’s monthly report for December 2023. The report, titled “December 2023 Global Drought Narrative,” discusses global drought conditions. Although the report is quite extensive, I recommend reading it to gain a comprehensive understanding of the global drought situation.

According to the WHO, drought is defined as a :

(Drought is a) prolonged dry period in the natural climate cycle that can occur anywhere in the world. It is a slow-onset disaster characterized by the lack of precipitation, resulting in a water shortage. Drought can have a serious impact on health, agriculture, economies, energy and the environment.

Also, according to the same webpage, around 55 million people worldwide are affected by droughts annually. Droughts are the most significant hazard to agriculture, impacting both livestock and crop farming. They threaten livelihoods by simply reducing access to water, cause mass migrations, and increase the risk of illness and death because of the reduced quality of sanitation because of reduced access to water; if you don’t get it, try washing your hands without water and you’ll see what I mean. I encourage you to read through the entire webpage for a better understanding of the situation.

Oh and I forgot to mention…

They’re getting worse every year due to climate change.

According to a research article titled A global transition to flash droughts under climate change, they’ve pointed out that drought has been getting worse. I’ll let the following quote from the abstract explain.

…drought intensification rates have sped up over sub seasonal time scales and that there has been a transition toward more flash droughts over 74% of the global regions identified by the Intergovernmental Panel on Climate Change Special Report on Extreme Events during the past 64 years.

It’s also mentioned that this trend correlates with the increased rates of evaporation and precipitation reduction caused by climate change.

Now the question on your mind right now is probably, “what is a flash drought?” A great question by the way, according to a research letter titled Microwave remote sensing of short-term droughts during crop growing seasons which assessed the ability of using microwave radiation to detect soil moisture. While this research letter focused on drought monitoring using microwave radiation for soil moisture analysis, they also touched upon what a flash drought is.

Short-term droughts during the crop growing seasons sometimes occur together with abnormally high temperature, and positive feedback between the land and atmosphere [Hong and Kalnay, 2000] often intensifies the drought conditions. These droughts are recently termed as “flash droughts” due to their rapid development, unusual intensity, and devastating impacts [Hoerling et al., 2014].

To understand their devastating impacts better in case if it’s not apparent already. According to the same source, in the summer of 2013; around 2 million hectares in the Guizhou and Hunan provinces in China as well as affecting 13 in southern China.

So let me just quickly summaries what we’re facing. Droughts are increasing in frequency as well as developing faster which is making it harder to alert communities in advance to protect themselves from the devastating impacts to agriculture and it’s impacts on sanitation and nutriton of the people suffering in drought affected places.

What’s being done to do this; and why we need more detection systems and technologies in place

This is a problem we must tackle, and fortunately, there are some mitigation strategies that we can use to help mitigate the effects of drought when it strikes a region. A study was conducted in the Bikita district of the Masvingo province in Zimbabwe, titled Effectiveness of drought mitigation strategies in Bikita District, Zimbabwe the study aimed to find the efficiency of different drought mitigation strategies.

(pg.104) Effectiveness of drought mitigation strategies in Bikita District, Zimbabwe The most effective strategies used were Food aid and Food for work as you can see.

One of the most effective strategies used was food aid, where the government would provide food to households. This strategy also tackled a major side effect of drought, which is hunger. This is especially important since :

Own (food) production is the most common source of food (Figure 4) because in rural areas majority of the households still depend on rain fed agriculture as their basis of livelihood — pg.104 Effectiveness of drought mitigation strategies in Bikita District, Zimbabwe

So most of the people in the region relied on sustenance farming to provide food for themselves and their families.

I can’t stress enough the importance of reading through the study to gain a full understanding of what transpired.

Now, let’s discuss drought detection. While mitigation is beneficial, it becomes significantly more effective when paired with detection. It’s similar to falling ill; if you’re sick, you would take sick leave and rest to recover. However, if you underwent screening even before symptoms appeared, you could prepare yourself to manage your illness more effectively. Similarly, early detection of drought allows us to put more systems in place to protect people from its effects

An example of drought detection

One method of visually detecting drought is by analyzing satellite images of the ground that have been mapped with NDVI (Normalized Difference Vegetation Index). According to the USGS webpage titled Landsat Normalized Difference Vegetation Index NDVI is used to ‘quantify vegetation greenness,’ ‘understand vegetation density,’ and ‘assess changes in plant health.’ To clarify, this is about determining plant health and density in a region, but this tool can also be used as an indicator of drought by examining plant health.

Two images of the same region comparing detection of Landsat surface reflectance and an image of NDVI

On the rightmost image, the NDVI legend ranges from 1 to -1. Having a range close to 1 means good plant health and vice-versa. To calculate this, you must find the ratio of red(R) and near infrared (NIR) which is calculated like this, according to USGS.

(NIR — R) / (NIR + R)

They have provided two examples of how they calculated this for their images.

In Landsat 4–7, NDVI = (Band 4 — Band 3) / (Band 4 + Band 3).

In Landsat 8–9, NDVI = (Band 5 — Band 4) / (Band 5 + Band 4).

Another example

For a detection system that doesn't require plants, we could analyze soil moisture conditions.

(Soil moisture is) The total amount of water, including the water vapor, in an unsaturated soil. — Glossary of Meteorology (AMS)

According to a webpage on the NIDIS website, soil moisture detection can serve multiple purposes. It can be a tool for agriculture, monitoring plant and soil hydration, predicting droughts, floods, and forest fires, as well as managing water supply. So, it hits several birds with one stone. As a bonus, it can even detect drought and flooding conditions before most other detection systems.

A soil moisture map on the NIDIS website which was made by the NOAA, NIDIS and NASA . This is a map of the US mainland which shows soil moisture percentages. One of the driest states on the map is Louisiana since a majority of the state is either colored yellow or red

That image is of soil moisture conditions of the US mainland. Unfortunately, the rest of the map wasn’t able to load so apologies to anyone from Alaska, Hawai’i, and all the other places I couldn’t mention.

Now soil moisture conditions can be monitored remotely by using microwave imaging to view water concentrations.

Now, here’s the cool part: you don’t need laboratory equipment to create a detection algorithm. In fact, you don’t even need coding skills to build it. This is a project I created that you could do for fun. Another viable option is to potentially create the most advanced drought detection system that uses satellite data, but by then, you might have broken your computer.

What you will need

Teachable Machine — This is a machine learning algorithm that you can teach and requires no code to function

EarthExplorer — This is a tool that you could use to get the satellite images, this tools also provides NDVI maps and other maps as well alongside the map of the world. Other tools are available similar to this.

A tutorial to figure out the workings of Teachable Machine — This is the one that I used to help me figure out how Teachable Machine works, there are many tutorials online about this and if you want to go in blindfolded and figure it out on the way, you can do that too.

Tools for precipitation and drought patterns — These are the ones I used specifically, Total Rainfall, Drought maps (I used Canada’s and USA’s maps.) use the one that best suits your region or better yet, use a global one in addition to that to get a more dynamic dataset. We need these in order to verify and ensure that our images are either from a region with either a low or high likelihood of drought.

Here’s what I did

Firstly, we need to find our dataset. EarthExplorer provides us with a satellite view of the earth. All you need to do is take screenshots of the land, put them in a folder, and then, when you’re on Teachable Machine, upload the images to either the ‘no/low risk’ or ‘moderate/high risk’ categories (these are the two classes that you created for the machine learning algorithm).

The only question is, what will be the criteria to differentiate the two datasets? The AI will pick up on the patterns on its own, but we need to know which is which first.

This is where the tools for precipitation and rainfall come in. Using these maps, find at least 15 different regions that have heavy amounts of rainfall, and 15 that have low amounts of rainfall and have been frequently subjected to drought.

Here are two of the images that I used. The first is of a region that has a high likelihood of drought, the second is of a low likelihood.

Somewhere in Canada
Also somewhere in Canada

An interesting observation to point out is that regions near the ocean or near a body of water are less likely to be subjected to drought than regions away from waterbodies.

Now that you’ve selected the dataset, all you need to do is upload the images to the corresponding classes and train the machine. In toggle named “Advanced”, which sits just below the “Train” button, you can increase epochs which are training periods that the AI takes. The more there are, the better the AI. You can also change batch size and learning rate. Batch size controls the amount of images used in each epoch and learning rate is self-explanatory. I recommend not changing it.

What we can learn from this

This isn’t just a fun project you can do in your spare time. There’s plenty to learn from this. Here’s all the things I learned while working on this project :

  1. There are tools to use that require barely any or no coding knowledge at all to use — Just take a look at Teachable Machine, usually to make an AI like that you would need to know how to code, but you don’t. However, to make more complex algorithms you need to learn how to code.
  2. Drought is more likely the farther away from a waterbody your community is — Waterbodies serve as a regulatory factor for the local climate as they act as heat sinks making temperatures less extreme which correlates to a decreased likelihood of drought including the fact that it’s a big amount of water.
  3. Climate change is leading to more severe and common droughts globally — In the past few hundred years after the industrial revolution. Millions of tons of CO2 have been released by our civilization through the burning of fossil fuels. Carbon dioxide is a greenhouse gas and one of the main contributors to climate change. Quoting from the USGS webpage titled Droughts and Climate Change “Since 2000, the western United States is experiencing some of the driest conditions on record. The southwestern U.S., in particular, is going through an unprecedented period of extreme drought. This will have lasting impacts on the environment and those who rely on it.” and it’s not just drought that increasing in severity and number, but flooding, tropical storms, wildfires and increasingly hotter and drier summers as well.
  4. This is why we need to invest more in the space industry — Many people argue against this saying that “we need to solve issues here on earth first” but investing in science and innovation, especially in the SpaceTech industry will lead to more innovation to solve these problems. If we can have more satellites designed to screen for precursors and monitor the effects of disasters caused by climate change, many people will be saved from drought, flood, wildfires, and tropical storms.

Some final words

So here’s my take on the situation. We need to invest more in drought detection and mitigation as well as having technologies in place to better forecast natural disasters. An example of one of the many systems used in drought monitoring is NADM which is a drought monitor that covers Canada, Mexico and the USA.

(NADM) This is a map created by a collaborative effort of Mexico, Canada, and the USA. The map shows all drought and abnormally dry regions in Canada, Mexico, and the USA

Then there is GDIS or the Global Drought Information System. This map is made by the NOAA and you can see drought conditions according to several maps as well as seeing tools in forecasting and drought management tools.

Now the best thing we can do to mitigate or better yet, prevent drought is curbing our emissions and stopping anthropogenic climate change. I don’t think I need to say any more, mentioned several times that this situation is getting worse because of this and not to mention the fact that it’s increasing the amount of wildfires, floods, droughts, and tropical storms.

(Canadian Geographic) This is a map that shows the amount of burned land area due to wildfires from 1921 to 2023 in Canada. The white spots are not snow but areas burned by the wildfires.

It’s hard to see, but in 2023 we’d seen 15.2 hectares burned because of these fires.

From personal experience, because of the wildfires happening in my country, we were alerted of several instances of smog and smoke caused by these wildfires even though they didn’t happen in Ottawa. I still remember during the summer when the skies were grey instead of blue and that the sun would sometimes be smothered by the smoke. This moment, only this one was when I became interested in the affect climate change had on natural disasters.

Drought and SpaceTech

Then my passion for climate melded with my interest in SpaceTech and even though I touched on this matter earlier on, I’ll do it again. There is a lot of potential for the SpaceTech industry to help us combat the effects of climate change, especially drought. We could focus on making better detection systems, such as an array of satellites in orbit that would measure soil moisture conditions 24/7 to alert communities in danger, but we could also look at mining asteroids for water which could then be transported to regions suffering from drought. We could also expand our civilization to the stars by building colonies on the moon and Mars to significantly increase the amount of resources we have so we can tackle the issues of climate change and other issues as well such as building infrastructure for all communities.

Drought and Climate Change

The best way to reduce drought frequency and severity is to cut our emissions. I’ve said this multiple times throughout the article and explained the correlation between rising temperatures in dry regions caused by anthropogenic climate change and the severity and frequency of drought occurring worldwide.

(A realistic look at CO2 emissions, climate change and the role of sustainable chemistry) This graph shows the amount of carbon dioxide emissions from 1850 to 2019. The dashed line shows the world population.

This is what we’ve been emitting for a good chunk of industrial history. The bulk of these emissions come from energy sources according to the graph. Now I can’t provide a surefire way to stop climate change, but the only way we can achieve the goal of reducing or better yet eliminating our emissions requires international cooperation.

Now when it comes to our future with drought there are three possible variations of the many futures that I can see for us. The first path takes us to a future where we are unprepared to diagnose and make communities and industries more resilient to drought in the most vulnerable areas. The second path is where we are prepared to address drought and that we’ve made better mitigation strategies to protect communities from all the effects of drought such as lack of water, sanitation, and food.

The third and best future is the one where we have curbed our emissions to zero and that even though there is still drought, we’ll be prepared to tackle this threat at any time of the year.

It’s up to our decisions and choices which will guide us down one of the three, and if you ask me; I really like that third option.

--

--

Vihaan Nair

A 14 year old with a burning interest for space, medicine and martial arts