Topobathymetric elevation generation for flood modeling with geospatial Python

Elevation maps that represent surface and river bathymetry are an essential input for flood modeling in software like HEC-RAS. Even with the latest version of high profile open source GIS software as QGIS the combination of a surface elevation map and a river bottom elevation map is a challenge that requires many turnaround, conversion and manual labour. We have developed a useful script that works with surface and river bottom elevation in a "smart" way and creates a geospatial raster with the topobathymetric elevation by the use of geospatial Python libraries as Shapely and Rasterio. The script also includes some key steps to identify the river body and treat the missing values on the bathymetry map.

Read More

Open, modify, run, and read output from HEC-RAS models with Python - Tutorial

Python can communicate with other softwares through standards in Windows (COMs) and thus provides a higher level of interoperability for river flow models made in HEC-RAS. The amount of tools provided by HEC-RAS through the COM is huge; in this tutorial we will cover some examples of HEC-RAS model interaction for two applied cases from Python scripts in Jupyter Lab.

Read More

Flood simulation from direct rainfall with Python and Landlab - Tutorial

Simulation of direct precipitation events over a surface is important to assess the impacted areas and manage disaster situations. Response to precipitation is evaluated over cells in a 2D model and runoff is routed to the stream networks. Landlab is a Python library for a variety of surface processes and can model shallow water flow over topography with a variety of algorithms. We have developed an applied case of direct rainfall for flood modeling over a geospatial raster where an initial water height is applied and then flows over the surface. Resulting water heights are exported as geospatial rasters.

Read More

Simplify / densify stream network online with Hatari Utils - Tutorial

Watershed delineation and stream network determination are common tasks on the hydrological analysis for any area of interest. There is a parameter on the stream network determination that allows us to have simple stream networks that resemble the main water courses or dense stream networks that map all the permanent / temporary streams. This is an applied example of  stream network determination on our online platform Hatari Utils where you can specify the number of upstream cells and interactively review the result.

Read More

Maps of Days without Rain generation with Python and Rasterio - Tutorial

Water resurces management requires not only some direct values as precipitation amounts but also more elaborated data as days without rain. Based on the CHIRPS dataset for year 2022 stored on NetCDF format we have elaborated a map of days without rain for a given country and exported the results as a fully geospatial raster. There is a particular discussion about the data type and the data value to calculate and store value just for the selected location.

Read More

Could you delineate a watershed and river network in 52 seconds? - Tutorial

Delineation of watershed and river network is one of the most common tasks in modern hydrology but it might comprise a group of steps on a desktop software that take several minutes to perform. We wanted to recreate the process in an mostly automated workflow in an online platform that substantially reduces the amount of time involved in the process. 

We came up with a solution on Hatari Utils (utils.hatarilabs.com) that allows us to delineate a basin of 530 km2 in just 52 seconds. Results from the platform also include the river network and the main river and are available as geospatial ESRI shapefiles.

Read More

Interactive representation of a geospatial raster with Python, Folium and Rasterio - Tutorial

Sometimes we want to reproduce or want to get something similar to a desktop GIS environment on a Jupyter notebook with options to show/hide layers and select background maps, but there was a missing part on our effort and it was the raster representation.

We have developed an applied case of single band raster representation on a Jupyter notebook with Rasterio and Folium. The raster has to be in WGS84 and the script can be coupled with more Folium features for the representation of vector data, background maps, menus and popups.

Read More

How to make a lake/reservoir volume-elevation curve with Python - Tutorial

Python is a programming language capable of performing calculations for hydrological studies and water resources evaluations. We have done a tutorial for the volume-elevation curve determination of the lake Patillas in Puerto Rico with Python and numerical / spatial libraries as Numpy and Rasterio. Finally, results were compared to the volume-elevation curve form a USGS survey. The procedure was done this time for a lake, but can be easily applied to any reservoir or water body when the bottom elevation is available as a raster file.

Read More

Basic example of hydrological modeling at basin scale with HEC HMS 4.5

HEC HMS is a software developed by the US Corps of Engineers that implements a series of hydrological methods to represent different physical process of the water cycle. The tools and options of HEC HMS make it a very versatile and powerful software for the hydrological simulation of different escenarios as extreme events on arid regions, or water balances in wet climates.

This tutorial shows the complete procedure to set up and simulate the hydraulic response of a 8 hour storms over a 20 hour period, model results are intended to show maximum flows and flow development with time. The area of study is a andean basin that was divided on two sub-basins (high and low part), each one has their own storm precipitation data. The model consider the use of hydrological components as subbasin, reaches and sinks.

Read More

Parameter Optimization Simulation for a Basin Model with HEC HMS

Model optimization involves adjusting parameter values so that the simulated results match stream flows as closely as posible. The software have two different search algorithms for the optimization as well as a variety of objective functions to measure the goodness of fit between simulated and observed stream flow.

Optimization trials are quite simple to set up and compute. This tutorial show the complete procedure to run a optimization for a hydrological model on a andean basin.

Read More

Climate change impact on watershed response

Mathematical models of global climate can reproduce many aspects of the physical climate system. General Circulation Models (GCMs) simulate physical processes in the atmosphere, ocean, cryosphere, and on land surface. Predictive scenarios on climate change will be applied to selected GCM models and their output will be used on the PRMS hydrologic simulations.

Read More

Development of a watershed-based water balance

Water balance is known as the balance of water entering the system and the water that leaves within a specified time, but to understand it better we need to understand: what is a watershed? Unterstood as a whole, a unity, as a system, as the space bounded by the union of all the headers that form the main river through the territory drained by a single natural drainage system.

Read More

Case studies of watershed-based water balance

A watershed can be defined as “the topographic area within which apparent surface water runoff drains to a specific point on a stream or to a waterbody such as a lake” (Shimon, 2010), this way a watershed works as a large water collector converting water inputs into runoff and water storage (Chavarri, 2012). Knowing watershed´s hydrological characteristics (precipitation, runoff, evapotranspiration, and groundwater infiltration) allows to evaluate spatial and temporal water resources availability, it is useful for water resources allocation and flow control. Water balance is a tool that allows knowing basin characteristics by application of the mass conservation principle or continuity equation (Rose, 2004; Essam, 2007), according to rhis principle, any difference between inputs and outputs must be reflected in a change in the storage of water within the budget area (UNESCO, 1988; Shimon, 2010).

Read More