Timelapse (2019) of Lake Balaton showcasing the Ulyssys Water Quality Viewer script with Sentinel-2 and Sentinel-3 imagery side by side

Water Quality Information for Everyone

Introducing the Ulyssys Water Quality Viewer, a custom script to dynamically visualize the chlorophyll and sediment conditions of water bodies on Sentinel-2 and Sentinel-3 images.

Sentinel Hub Blog
Published in
7 min readMar 4, 2020


A guest blog post by András Zlinszky and Gergely Padányi-Gulyás

Foreword by Sentinel Hub

The script by András Zlinszky and Gergely Padányi-Gulyás has won the first prize in the second round of the Sentinel Hub Custom Script Contest and it is available on our GitHub repository. This post is part of a series of guest blog posts written by script authors, talking about their entries to our Contest, giving some more insight into how the scripts are working and what can be achieved using them.

Water Quality Information for Everyone

Water quality problems affect many lakes and rivers worldwide, but only a fraction of water bodies are covered by regular in-situ monitoring. Even where monitoring data is collected, information is difficult to access, available in most cases only in the national language and often only in the form of offline tables. Meanwhile, satellite imagery offers a source of information on all waters of the world.

From a satellite perspective, water quality is defined by the status of the water for human use (irrigation, industry, drinking and recreation) and as a natural habitat. Just like terrestrial ecosystems, aquatic ecosystems are based on energy and biomass acquired through photosynthesis, and the amount of phytoplankton (microscopic and algae floating freely in the water) determines the availability of energy and carbon throughout the food web. Phytoplankton concentrations correlate strongly with the colour of the water, therefore this can be observed from satellites, and is typically expressed in micrograms per liter of chlorophyll in the water.

The intensity of photosynthesis is mostly limited by the availability of light, which in turn is limited by the transparency of the water. This can be expressed in optical units as turbidity, or in a more quantitative way based on milligrams of suspended sediment per liter of water.

Chlorophyll and suspended sediment concentration are the two main optical parameters of water quality from an ecological perspective, but also often from a human perspective: high concentrations of chlorophyll reached during local mass productions of algae (algae blooms) can be toxic to humans, and high concentrations of suspended sediment are unattractive for recreation and can be problematic for industrial use. Many sources of water pollution result in an obvious signal in either suspended sediment or chlorophyll, eg. the influx of sewage usually carries suspended sediment and results in increased growth of algae.

Therefore, our aim with this custom script was to provide visualizations of water quality that are available and accessible globally. There is a rapidly growing volume of research on improving algorithms for detection of chlorophyll and suspended sediment in optically complex waters, and there are a number of ongoing research projects focusing on water quality monitoring from satellite imagery either at the local or the global scale. However, while our tools for quantifying water quality parameters are still far from perfect, we believe good non-quantitative visualizations can already provide a major contribution towards water quality monitoring.

The Benefits of Water Quality Monitoring

The purpose of water quality monitoring is to understand the physical and ecological processes that influence water use, but also to provide timely warnings and inform decision makers when interventions are necessary. Accurate sampling-based information will always be essential, but visualizations of point samples have a limited ability to convey a message compared to maps or images. Whatever we do, in-situ monitoring will always involve interpolation between samples in space and time, and satellite imagery helps a great deal to make these interpolations more accurate. For this process, Sentinel-2 and Sentinel-3 are game changers: Sentinel-2 has sufficient spatial resolution to produce images that can be interpreted by non-experts, including from relatively small water bodies. One of our favourite examples is the image below (Fig 1). The dynamics of this image demonstrate that even in a lake, water may travel with considerable speed and create detailed spatial patterns. In the presence of natural or semi-natural tracers, these movements are highlighted and can be compared with models or measurements.

Figure 1: the inflow of coloured dissolved organic matter from the tributary river into the lake highlights the formation of a classical vortex street in the lee of the harbour piers

The most important contribution of Sentinel-3 is the high temporal resolution. Even for large lakes, a single image of 300 m pixel size might not be very informative, but by creating short videos from time series of images, the movement of water and the dynamics of algae become easy to interpret. These datasets provide a completely different approach to water monitoring: instead of single point measurements or single static images that inform about the situation at a given point in time, dynamic processes of lakes can be followed with a temporal and spatial resolution close to the scales where they happen (Fig 2). As an example, the following .gif animation shows how an algae bloom on Lake Balaton forms and dissipates: wherever clouds don’t interrupt the daily time series, the actual movement of currents and eddies can be followed.

Figure 2: formation and dissipation of an algae bloom on Lake Balaton (🌐EO Browser)

We hope that by providing easy access to these imagery data sources, we can also support the work of scientists studying aquatic habitats by providing background maps of the water quality situation wherever they carry out their measurements. Any kind of geo-tagged data can be compared with these water quality visualizations, so they can provide the context for aquatic ecology, hydrology or geomorphology studies as well. During the development of the script, we spent a lot of time admiring the beauty of lakes and rivers, and during earlier scientific outreach work, we found that satellite images have an artistic beauty that can help raise awareness of the importance of water quality processes. Therefore we included some basic tools that help create visually compelling pictures by highlighting either the background or the foreground with user-defined colours or transparent layers (Fig 3).

Figure 3: The Ulyssys Water Quality Viewer script used over the Tsimlyansk Reservoir, Russia. (🌐EO Browser)

From a technical perspective, the main problem of water quality remote sensing is that high sediment concentrations reduce the transparency of water and make remote sensing of chlorophyll concentrations unfeasible. In fact, high sediment concentrations in water are exactly like clouds are in the atmosphere, since they obscure the signal we are looking for. To a certain extent, spectral unmixing or radiative transfer modelling can help, but just like for clouds, there is no one-size-fits-all solution. For our simple script we decided to work around this problem: the solution was to visualize chlorophyll and suspended sediment together in a common palette where chlorophyll is only shown if sediment concentrations are low. Therefore the user does not have to choose between one or the other and find potentially misleading chlorophyll values for situations with high suspended sediment. We also purposefully avoided quantitative concentration metrics everywhere throughout the documentation. Satellite-based water quality applications have received the criticism that they create a false impression of no errors or uncertainty, and through this they convey the message that improvement of remote sensing algorithms or in situ monitoring is not necessary. On the contrary, we hope that by acknowledging the uncertainties in our visualization that arise through clouds, haze, turbidity and the errors of the chlorophyll algorithm itself, we can draw attention to the need for more detailed monitoring. This would ideally consist of a system of in-situ measurements cross-calibrated with locally tuned satellite algorithms, handled together in a web GIS. Of course, such a system can not be developed globally, but hopefully by bringing satellite imagery closer to users interested in water quality we can encourage national and regional water authorities to invest in such infrastructure.

Meanwhile, the Ulyssys Water Quality Viewer (UWQV) can provide qualitative information from all the inland waters of the world where water quality monitoring is not available. This includes remote locations but also zones of conflict or humanitarian crisis where clean water is especially precious and information difficult to obtain.

Figure 4: North Azadegan Oil Field, Iraqi/Iranian border, Sentinel-2 image with applied UWQV script, acquired on September 8th, 2019

The future of UWQV is up to the Sentinel Hub custom script development community: the code was designed to make adding new algorithms as easy as possible. The next major step would be to somehow enable joint visualizations of multiple sources of data: e.g. Sentinel-3 or Landsat-8 thermal imagery or Sentinel-1 water surface roughness would be highly informative if shown alongside (or overlain with) our water quality maps.

The script was developed by András Zlinszky and Gergely Padányi-Gulyás from Hungary. Gergely was the programmer and wrote most of the documentation, while András selected the remote sensing algorithms based on his earlier work with Global Lake Watch. A lot of the processing steps were based on earlier Custom scripts (transparent overlaying, cloud masking etc.), and we hope that some of the features of UWQV (such as minifying or automatic handling of multiple satellites) can be useful for future scripts.

We at Sentinel Hub would once again like to thank András (@azlinszky) and Gergely (@fegyi001) for their participation in the Contest. You can see more details about their winning script on our GitHub.

You can find all the scripts submitted to the Contest on the official Contest page and on our GitHub. To learn more about remote sensing and custom scripts we invite you to take a look at our education pages. There you can find interesting introductions into using remote sensing to take a look at volcanoes, wildfires, and measuring air pollution from space.