How to fill missing Elevations to empty Contour Lines with PyQGIS

Elevation contour lines without the elevation attribute is common when we import contour lines from Autocad DXF files, but it has also happened that contour data was stored on a hard disk drive without elevation attribute and years later data is found and there is no one to ask to restore the missing information. This tutorial shows a practical procedure to fill missing elevations on contour lines with the use of PyQGIS on QGIS 3. The procedure uses an intersection line that crosses the contour lines where the base elevation and interval is known. There are some specific instructions to run the script that are well described on the video.

Read More

Temporal discretization impact on MODFLOW Model Heads and Water Budget

For a transient model, a modeler needs to conceptualize a coherent and feasible time discretization approach, nevertheless searching for temporal discretization guidelines the Internet gives you digital noise: nothing relevant, nothing precise, nothing useful. These is the type of situation where you ask yourself: how many stress periods do I need, how many time steps do I require, which should be an appropriate size of the model output, or more important, will the size and number of stress periods and time steps have an effect on the model output?

Read More

How to Convert a PDF to ESRI Shapefile with Python, Geopandas and Inkscape - Tutorial

In order to use the spatial data provided on a report we need procedures to extract the data on effective way. The amount of tools and techniques are quite advanced, and requires several open source software for specific procedures. We have done a complete tutorial with all the step required to extract the vector spatial data of a map reported as PDF into a ESRI shapefile. For this tutorial we have used Inkscape for the conversion of the PDF to DXF, QGIS to extract some information of the DXF, Python and Geopandas on a Jupyter Lab session for spatial translation and scaling.

Read More

The dark side of Python for Hydrology / Hydrogeology and the nightmare of unmet dependencies

The near future of data processing for Hydrology / Hydrogeology is written in Python 3, and many universities and institutions are shifting from teaching C++, Matlab or Fortran to Python. It is surprising the amount of tools, packages, codes and Ipython notebooks available for the data processing and data analysis of water related data, even with high success in data analysis reproducibility.

However, there is not always a sunshine on working with Python, especially if you are working on Windows. After you have done your first steps in hydrological series plotting, statistical analysis or even run a neural network, you might want to do more with Python and there is when the situation can become unbearable.

Read More

How to do more Groundwater Modeling (or any modeling) in less amount of time

Because time matters and everybody wants results and solutions now, groundwater modelers (or any water resources modeler) have to think how they can do more with the limited time available. This is a restructuration, a reengineering, a new conceptualization of not only what we do, but how we do, and if in the end we are happy with the main results, and secondary results we get from our modeling work.

Groundwater modelers are water resources specialists with high skills in computing, coding, maths and groundwater flow regime comprehension. The type of work, the complexity of the given areas of study, the limited observation data, the limited budget, the short completion times and the overall low perception and low understanding of groundwater flow and groundwater quality makes the modeling work somehow particular where we have to adopt special techniques to deliver good work while preserving the modeler integrity and wellness.

Read More

The soft and hard courses every Applied Hydrogeology Master Program should have

There isn’t as well a clear definition of applied hydrogeology, that following the literal meaning should be the hydrogeology in practice. We like the definition of applied hydrogeology as the real world hydrogeology, as the hydrogeology of non-homogeneous, non-infinite, non-isotropic and even non-porous media; applied hydrogeology is the hydrogeology that goes behind the book, far away from the “aquifer, aquitard, aquiclude” classification. Applied hydrogeology is the part of hydrogeology that solve problems, the science that tells us if the groundwater remediation will work, if a industrial complex will have water on the coming decade, or when the salinitization from the pumping well will overcome the reverse osmosis plant capacity.

Read More

6 aquifers that every hydrogeologist should visit on a lifetime

Perception and interest on the groundwater resources are of high initial interest but long term low popularity, that is why normal and plain hydrogeologist need to promote an innovative perspective of the relation from human society with the groundwater resources as a strong part for every environmental protection plan and sustainable management policy elaboration.

This article has a list of aquifers around the globe, with special characteristics where a normal audience can see how water can exist below surface, how people have interacted with the aquifer

Read More

How to work with Transmissivities in MODFLOW with Model Muse - Tutorial

Hydraulic parameters for an aquifer flow can be expressed on different terms like Hydraulic Conductivity (K) or Transmissivity (T). On the default setup of MODFLOW 2005 with Model Muse there is no option to use directly Transmissivity unless a manual conversion is done to transform into K, this is because the selected flow package is Layer Property Flow (LPF).

When the flow package changes to Block Centered Flow (BCF6) it is possible to insert Transmissivities directly as datasets or as a object property. The BCF package also has more options for the layer type, with unconfined and partial confined aquifer options.

Read More

Performance analysis of Open Drone Map to process hundreds of drone images

So far, OpenDroneMap is a strong open source alternative for the processing of drone imagery. We have done a recursive analysis over a set of aerial photos on a standard desktop computer to have a panorama of the rates and trends from OpenDroneMap in the computation of different amount of images. Although the rates and trends apply only for a specific dataset and computer configuration, this study can to be taken as a reference for the computational time and as a perspective of how the software works with great amount of data.

Read More

Tutorial of Unstructured Grid Groundwater Model with MODFLOW 6 and Model Muse 4

Of the latest devopments in groundwater modeling there are two softwares: Modflow 6 and Model Muse 4. both developed by the USGS. The first software is the latest version of MODFLOW that allows triangular and unstructured grids, and the second is the latest version (from June 23) of the graphical user interface Model Muse that supports Modflow 6.

Unstructured grid it a type of discretization that allows us to have small cells at certain parts of the model while the rest of the model has bigger cells. This optimization of the model grid and cell number decrease the computing time, the size of the output files and the speed of the visualization tools. With unstructured grids we can model a great extension while preserving the right accuracy of the points of interest, we can even insert regional faulting or complex geological setups.

This tutorial shows the complete procedure to create a geospatial model of a alluvial aquifer with the interaction of regional flow, river and wells. The tutorial creates the unstructured grid, boundary conditions, model geometry, simulate flow with MODFLOW 6 and represent results in Model Muse 4.

Read More

Basic Example of Land Subsidence Modeling with MODFLOW SUB and Model Muse 4

Cities under high exploitation of groundwater resources face severe problems of land subsidence due to pumping. This complex problem was addressed from earlier versions of MODFLOW as MODFLOW 2000 and has two packages: MODFLOW SUB and  for its simulation with different options for the conceptualization and numerical modeling of normal aquifers and low conductivity interbeds.

Scientific research and professional consulting on the field of land subsidence modeling is limited; this scarcity might be because the coupled complexity of the appliance of numerical groundwater modeling and consolidation theory.

Read More

How to convert an ArcGIS Style to QGIS 3 - Tutorial

Spatial data created / processed by commercial or open source software follows standards by institutions like the Open Geospatial Consortium; this standards allow the interoperability of the vector or raster data among different software however standards apply to the position but not the style. Styles from ArcGIS were not easy to convert to formats compatible with QGIS, specially if you don’t have the commercial software.

Governmental offices release spatial data as land use, land cover, infraestructures, and sometimes release styles in ArcGIS formats posing a great obstacle for the QGIS users. This tutorial shows the complete procedure to convert ArcGIS Style to QGIS as *.xml format with a case study of land cover from Costa Rica. The tutorial is developed in Windows, if you are a Linux and Mac users its necessary to install Mdbtools on your own operating system.

Read More

How to create a fully Geospatial Groundwater Model with MODFLOW and Flopy - Tutorial

Nature is geospatial, and every physical process related to the groundwater flow and transport regime is spatially located or spatially distributed. Groundwater models are based on a grid structure and models are discretized on cells located on arrangements of rows and columns; is that level of disconnexion of the spatial position of a piece of porous media and the corresponding cell row and column that creates some challenges for the sustainable management of groundwater resources.

We have to create or re-create the duality in between the geospatial and the model grid, that would be similar to duality of a vector GIS object and its metadata on its essence but more difficult to manage. Affortunately Flopy, the Python library to build and simulate MODFLOW models, has tools to georeference the model grid even with rotation options. The workflow is kind of explicit, meaning that the modeler need a medium knowledge of Python and Flopy tools. This tutorial shows the whole procedure to create a fully geospatial groundwater with MODFLOW and Flopy.

Read More

Which is the most critical hydrogeological data needed for a numerical model?

From a conversation with a specialist in soil subsidence we came to the conclusion about which was the most critical hydrogeological data needed for a numerical model. There is a proposed list of required data on this link, but when we plan a hydrogeological study which is critical? Data about the groundwater flow regime and the hydrogeological environment is always scarce. And there are even more complications on the data gathering because these data depend on a number of institutions and shareholders that could not be willing to share it because there is a mainstream idea

Read More

Key aspects for the sustainable use of groundwater to meet industrial water demand

Hydrogeologist need to support the industry in a modular manner where hydrogeological concepts and evaluations has to be understood by all the related stakeholders in order to conduct an industrial activity with a clear sense of pumping / water level performance and changes in water quality with time.

Read More

How to do a georeferenced Stiff Diagram with Python 3 and QGIS 3 - Tutorial

Stiff Diagrams are a common and powerful tool for the representation of surface water / groundwater main ions. Anion and cation concentrations are represented on equivalent weight (meq/l), and usually cations are represented at the left side and anions at the right side. Traditionally, this diagram is useful for the comparison of the main water chemical components by examination of a series of diagrams, however it was not easy to compare the diagrams with the position of the observacion point.

To enhance the chemical analysis on regional scale this tutorial has coupled the Stiff Diagrams with their position on a QGIS project. The diagramas are generated from a spreadsheet with Python on a Jupyter Notebook and stored a vector file (.svg), then the images files are referenced on a style file (.sld) and uploaded to QGIS3.

Read More

How to efficiently apply Geology from Shapefiles to MODFLOW with ModelMuse with Global Variables

On the MODFLOW groundwater model construction process in Model Muse there are tools to import hydrogeological parameters as hydraulic conductivity and boundary conditions from shapefiles assigning the parameter values from the spatial object metadata. This type of workflow is useful for idealized aquifers or simple hydrogeological assessments; however on groundwater models at regional scale the calibration process requires the quick and repetitive change of the hydrogeological parameters and boundary conditions to evaluate the hydraulic response against observed data.

For model calibration the use of Global Variables (Data/Edit Global Variables...) of Model Muse makes relatively easy, ordered and with better change control the calibration process. This tutorial gives the procedure to implement Global Variables for the hydraulic conductivities of 15 hydrogeological units distributed on a model of 560 square kilometers.

Read More

Implementation of Multiple Wells with MODFLOW and Model Muse - Tutorial

Groundwater modeling on the regional scale or with huge baseline can be tedious to do manually in a Graphical User Interface as Model Muse. There are more advanced options to insert a great amount of wells with long and diverse pumping schedules with Flopy or by altering the *.gpt file with some programming effort; however these are kind of intermediate level solutions that would be time expensive for a beginner groundwater modeler.

This tutorial shows the procedure to insert multiple wells with different pumping rates in MODFLOW with Model Muse by the use of some special features. The procedure can insert wells at different depths however it cannot set the well name and in case of wells with multiple pumping records a group of superposed wells will be inserted, one for each pumping rate record.

Read More

How to get Geospatial Weather Information with QGIS and QWeather - Tutorial

Quick tutorial about how to get geospatial weather data in QGIS using the QWeather plugin. This plugin connects QGIS with the Yahoo Weather API and retrives all information from a location or a lat/long coordinate. Weather data is available for the current day and data is represent as a geojson file.

The tutorial shows the common procedure to retrieve data for capitals and explore the location and metadata information available of precipitation, wind (speed, direction), temperature and humidity. It is possible to setup a defined location list using a .csv file; for the tutorial, main cities in Saxony, Germany were selected.

Read More

MODFLOW Observed / Simulated Head Comparison Plot with Model Muse and Python - Tutorial

Groundwater modeling with MODFLOW and other codes are defined as inverse modeling where the aquifer parameters can be calculated from the comparison of model results with observed data. This comparison process is time consuming, employs acceptance criteria and trend analysis of the boundary condition influence.

There are tools for the comparison of observed and simulated heads in Model Muse and custom charts can be done with few lines in Python. This tutorial cover the whole procedure to create a simulated / observed plot in Python from the results of a MODFLOW model run on Model Muse. The study case is over a regional model with more than 100 piezometers. The tutorial creates a graph with a colorbar and exports it as a JPG file.

Read More