Land cover classification using a Naives Bayes algorithm with Python - Tutorial

Machine learning can be applied to many fields as land cover classification from remote sensing imagery. The performance and accuracy of classification will depend on the number of raster bands, the image resolution, the land cover type and the algorithm used. This tutorial will perform an applied case of land cover classification from a panchromatic image in Python using the Naives Bayes algorithm implemented on the Scikit Learn package. The classification will cover four categories as: rivers, river beaches, woods and pastures; coding is performed under a Jupyter Notebook with Python running from a geospatial Conda environment. Some graphics and statistics about the classification precision are also included on the tutorial.

Read More
Comment

 

Suscribe to our online newsletter

Subscribe for free newsletter, receive news, interesting facts and dates of our courses in water resources.

 

Simple example of ion exchange modeling with Phreeqc and Aquifer App - Tutorial

An example that demonstrates the Phreeqc and Aquifer App capabilities to model ion exchange. This example uses the cation ion exchange approach where only the EXCHANGE keyword is used because EXCHANGE_MASTER_SPECIES and EXCHANGE_SPECIES are included in phreeqc.dat database. The model output is parsed as charts and tables and the solution composition and description are calculated and compared before and after the exchange.

Read More
Comment

 

Suscribe to our online newsletter

Subscribe for free newsletter, receive news, interesting facts and dates of our courses in water resources.

 

A Python class to export Modflow 2005 model 3D geometry and parameters to Vtk - Tutorial

Generating 3D visualizations of groundwater models is essential to analyze the flow regime, perform quality checks and see the interaction of the groundwater body with external factors / boundary conditions. The Flopy library has tools to export the parameters, boundary conditions and results that we have modified and compiled within a Python class. The use of this class allows the generation of Vtk files on a friendly way and in few steps. The tutorial also includes a representation of the parameters generated in ParaView.

Read More
Comment

 

Suscribe to our online newsletter

Subscribe for free newsletter, receive news, interesting facts and dates of our courses in water resources.

 

Simple example of kinetic dissolution of calcite with Phreeqc and Aquifer Lab - Tutorial

This is an example of calcite dissolution with kinetics where a simplified rate and initial molality are defined. The tutorial covers creation of an input file for Phreeqc, database selection, Phreeqc simulation in Aquifer App and analysis of processed output data on a Jupyter notebook. Finally the molality of Calcium and pH are plotted with time.

Read More
Comment

 

Suscribe to our online newsletter

Subscribe for free newsletter, receive news, interesting facts and dates of our courses in water resources.

 

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
Comment

 

Suscribe to our online newsletter

Subscribe for free newsletter, receive news, interesting facts and dates of our courses in water resources.

 

Simple example of irreversible reactions in Phreeqc and Aquifer App - Tutorial

This is a tutorial of geochemical modeling in Phreeqc and Aquifer App that uses the REACTION keyword for the simulation of irreversible reactions that transfer a certain amount of elements to or from the solution. The selected example deals with the reaction of rainwater with NaCl and Calcite over 4 steps. Phreeqc simulation and model output analysis are performed on the Aquifer App that has great tools for the model setup and the analysis through interactive menus, tables and charts.

Read More
Comment

 

Suscribe to our online newsletter

Subscribe for free newsletter, receive news, interesting facts and dates of our courses in water resources.

 

Simple example of mineral equilibrium in water with Phreeqc and Aquifer App - Tutorial

This tutorial cover all the steps to build and run a geochemical model of a water sample in equilibrium with Fluorite and Gypsum. The tutorial explains the parameters to setup a mineral together with and analysis of the element concentrations, the amount of dissolved phases and the final saturation indices.

Read More
Comment

 

Suscribe to our online newsletter

Subscribe for free newsletter, receive news, interesting facts and dates of our courses in water resources.

 

Automatic calibration of transient pumping test with MODFLOW 6, Python, FloPy and Scikit Learn - Tutorial

Python has awesome packages for machine learning that can be coupled to groundwater models and perform automatic calibration of hydraulic parameters. This tutorial covers the procedure to implement a neural network based on a set of parameters set with corresponding head values; the study case is on a transient pumping test model with an observation point located around 10 meters away from the pump well. The analysis predicts the calibration parameters from the spatially interpolated observed head values. 

Read More
2 Comments

 

Suscribe to our online newsletter

Subscribe for free newsletter, receive news, interesting facts and dates of our courses in water resources.

 

How to export a MODFLOW 6 model grid to shapefile with Python and Flopy - Tutorial

We did this tutorial since the documentation or examples on the topic were not available. Flopy can export the model grid and model attributes to shapefile with a coordinate system of reference for the three types of discretizations of MODFLOW 6. We have done an applied example to export the grid of a discretized by vertices model (DISV) to the ESRI Shapefile model. The tutorial also show options for the final grid representation in geopandas.

Read More
Comment

 

Suscribe to our online newsletter

Subscribe for free newsletter, receive news, interesting facts and dates of our courses in water resources.

 

Seawater speciation modeling on cloud with Aquifer App and Phreeqc - Tutorial

No more installations, no more database link up, no more raw text data as model output. Aquifer App now can run Phreeqc with great tools for the geochemical model setup, database selection and tables / graphics for the different simulation components.

This applied example calculates the distribution of aqueous species in seawater and the saturation state of seawater relative to a set of minerals and is based on the Example 1 of the USGS Phreeqc example documentation.

Read More
Comment

 

Suscribe to our online newsletter

Subscribe for free newsletter, receive news, interesting facts and dates of our courses in water resources.

 

Sensibility analysis of transient pumping test with MODFLOW-6, Flopy and SALib - Tutorial

This tutorial covers the whole procedure to perform a sensitivity analysis over a 72 hour pumping test plus recovery on the hydraulic response in an observation piezometer located at 11 meters from the well. the Since the study case it’s a transient model the sensitivities will vary over time and stage of pumping/recovery.

Read More
Comment

 

Suscribe to our online newsletter

Subscribe for free newsletter, receive news, interesting facts and dates of our courses in water resources.

 

How to import a Leapfrog geological model to Model Muse with Python - Tutorial

Having a geological model can enhance numerical models since it allows to represent higher accuracy the potential distribution of hydraulic parameters in the horizontal and vertical direction. The process to implement/insert a geological model into a Modflow model is a challenge due to restrictions on proprietary software and spatial tools; we have done the whole procedure to insert a geological model into a MODFLOW-NWT groundwater model with scripts in Python, Pyvista and others.

The code extracts the cell centroids of the modflow model and then compares its position with the different geological units exported from Leapfrog to Vtk. Once the corresponding lithology of the cell is identified a hydraulic parameter is assigned. The tutorial works from Vtks of a geological model done in Leapfrog, but it can work with any Vtk.

Read More
Comment

 

Suscribe to our online newsletter

Subscribe for free newsletter, receive news, interesting facts and dates of our courses in water resources.

 

Convert geological units from Leapfrog (*.msh) to VTK using Python and GemGIS - Tutorial

This tutorial shows the complete procedure to convert a geological unit as a Leapfrog mesh (*.msh) to the VTK (Visualization Toolkit) format using Python and GemGIS. Follow these steps to seamlessly transfer your geological data for advanced visualization, analysis and comparison with other model results.

Read More
Comment

 

Suscribe to our online newsletter

Subscribe for free newsletter, receive news, interesting facts and dates of our courses in water resources.

 

Geological modeling of sedimentary layers from geospatial rasters with Python and Gempy - Tutorial

Based on a coupled workflow on QGIS and Python it is possible to extract the required information for a Gempy model and run it for defined voxel sizes. This tutorial covers the whole procedure of spatial data preparation, data preprocessing in defined formats and geological modeling with Python and Gempy.

Read More
Comment

 

Suscribe to our online newsletter

Subscribe for free newsletter, receive news, interesting facts and dates of our courses in water resources.

 

How to georeference a image/raster with Python and Rasterio - Tutorial

Georeferencing in Python has the advantage that it can be performed repeatedly without the need to define control points each time. It also allows you to add/remove control points and observe the impact on the transformation array. This tutorial demonstrates the complete georeferencing process of a national map using 3 points whose pixel coordinates have been extracted from the Paint utility in Windows. The tutorial also exports the raster while assigning a reference system.

Read More
2 Comments

 

Suscribe to our online newsletter

Subscribe for free newsletter, receive news, interesting facts and dates of our courses in water resources.

 

Groundwater modeling of a pumping test over a confined aquifer with MODFLOW-6 and FloPy - Tutorial

We have done an applied groundwater model for a pumping test on a confined aquifer. The wellsite is located on the Clairborne aquifer (Georgia, USA) and has two observations on different layers besides the well itself. The aquifer test has two periods of pumping and recovery that last 3 days each one and the numerical model was constructed with MODFLOW-6 based on a Python script with the FloPy package. Comparison among observed and simulated wells were done with plots in Matplotlib.

Read More
Comment

 

Suscribe to our online newsletter

Subscribe for free newsletter, receive news, interesting facts and dates of our courses in water resources.

 

Lithium speciation calculation on salt lake brines with Phreeqc and Python - Tutorial

Lithium interaction with the aqueous phase on brines phase is not well understood or at least not well covered by the scientific publications. To evaluate brine composition, brine dynamics and the interaction of the different components is really a challenge with the available tools for geochemical modeling as Phreeqc since it doesn’t appear in all the databases and in most it is only associated with sulfates.

Read More
Comment

 

Suscribe to our online newsletter

Subscribe for free newsletter, receive news, interesting facts and dates of our courses in water resources.

 

Online tools for groundwater modeling preprocessing with Model Muse - Tutorial

If you want to speed up some steps in groundwater modeling you might be interested in the tools presented on this tutorial. We have developed some online tools that replace intense and time consuming tasks on desktop software and web servers and provide vector and raster data on the formats required by Model Muse. The tutorial covers the steps of DEM generation as Surfer Grid File (*.grd) with the definition of watersheds and river network based on two online services provided by Hatarilabs.

Read More
Comment

 

Suscribe to our online newsletter

Subscribe for free newsletter, receive news, interesting facts and dates of our courses in water resources.

 

How to split Modflow 6 groundwater model with Flopy and MF6Splitter - Tutorial

Modflow 6 has changed in many ways the traditional concepts of groundwater modeling; now a group of models can run under a "simulation" and these models can interchange flow and transport. Under this structure Flopy has implemented a tool to split a groundwater model into several models where their results can be reconstructed and compared to the original entire models. Capabilities and features like this make Flopy and Modflow 6 a great tool for developing advanced groundwater models that simulate complicated tasks or requirements to the groundwater flow regime.

Read More
Comment

 

Suscribe to our online newsletter

Subscribe for free newsletter, receive news, interesting facts and dates of our courses in water resources.

 

How to reproject, clip and interactively plot HDFs with Python and GDAL - Tutorial

Large amount of spatial data is indexed and delivered through files in Hierarchical Data Format (HDF). These files are compatible with desktop GIS software as QGIS but they are not so easy to open/read/process with standard Python libraries as Rasterio, or with dedicated libraries. On our research we found the spatial functionality on the powerful GDAL binaries and library for Python. 

Read More
Comment

 

Suscribe to our online newsletter

Subscribe for free newsletter, receive news, interesting facts and dates of our courses in water resources.