Water Detect Algorithm

Overview

WaterDetect

DOI

Synopsis

WaterDetect is an end-to-end algorithm to generate open water cover mask, specially conceived for L2A Sentinel 2 imagery from MAJA1 processor, without any a priori knowledge on the scene. It can also be used for Landsat 8 images and for other multispectral clustering/segmentation tasks.

The water masks produced by WaterDetect were primarily designed for water quality product computation (Obs2Co processing chain) and are also used for multi-temporal water maps (Surfwater processing chain). Both chains are supported by the "SWOT-Downstream" and TOSCA programs by CNES. Products are provided by the THEIA / Hydroweb-NG platform.

The WaterDetect algorithm uses a multidimensional agglomerative clustering technique on a subsample of the scene's pixels, to group them in classes, and a naive bayes classifier to generalize the results for the whole scene, as summarized in the following picture:

Screenshot

All the details and tests has been described in the article Automatic Water Detection from Multidimensional Hierarchical Clustering for Sentinel-2 Images and a Comparison with Level 2A Processors, under revision by the journal Remote Sensing of Environment.

How to cite

Cordeiro, M. C. R.; Martinez, J.-M.; Peña-Luque, S. Automatic Water Detection from Multidimensional Hierarchical Clustering for Sentinel-2 Images and a Comparison with Level 2A Processors. Remote Sensing of Environment 2021, 253, 112209. https://doi.org/10.1016/j.rse.2020.112209.

Tutorial

The following topics have the first steps to install and run the library. For a more comprehensive tutorial with code samples and results please refer to this tutorial https://cordmaur.medium.com/water-detection-in-high-resolution-satellite-images-using-the-waterdetect-python-package-7c5a031e3d16.

Supported Formats

The algorithm has been developed taking into account atmospherically corrected images from MAJA, as described in the paper. However other image formats are also supported. To the present, the following image formats are supported:

Dependencies

The required libraries are:

GDAL>=3.0.2
matplotlib>=3.1.2
PyPDF2>=1.26.0
scipy>=1.3.2
scikit-learn>=0.22
skikit-image>=0.16.2
numpy>=1.17
PIL>=8.0
lxml>=4.5

Note 1:

GDAL is required to open the satellite images. It's still possible to use without GDAL, from a python console or jupyter notebook, loading the rasters manually and passing all the necessary bands to the DWImageClustering class. Check the topic "Usage from Console" for more information.

Note 2:

Scikit-Image is only necessary to run Otsu threshold method.

The test_dependencies.py can be used to check if all libraries are loading correctly. Simply run:

Instalation

The easiest way to install waterdetect package is with pip command:
pip install waterdetect

Alternatively, you can clone the repository and install from its root throught the following commands:

git clone https://github.com/cordmaur/WaterDetect.git
cd WaterDetect
pip install .

Once installed, a waterdetect entry point is created in the path of the environment. One can check the installation and options by running waterdetect --help. If GDAL is not found, a message will raise indicating that waterdetect will only run from a console.

usage: waterdetect [-h] [-GC] [-i INPUT] [-o OUT] [-s SHP] [-p PRODUCT]
                   [-c CONFIG]

The waterdetect is a high speed water detection algorithm for satellite
images. It will loop through all images available in the input folder and
write results for every combination specified in the .ini file to the output
folder. It can also run for single images from Python console or Jupyter
notebook. Refer to the onlinedocumentation

optional arguments:
  -h, --help            show this help message and exit
  -GC, --GetConfig      Copy the WaterDetect.ini from the package into the
                        specifieddirectory and skips the processing. Once
                        copied you can edit the .ini file and launch the
                        waterdetect without -c option.
  -i INPUT, --input INPUT
                        The products input folder. Required.
  -o OUT, --out OUT     Output directory. Required.
  -s SHP, --shp SHP     SHP file. Optional.
  -p PRODUCT, --product PRODUCT
                        The product to be processed (S2_THEIA, L8_USGS, S2_L1C
                        or S2_S2COR)
  -c CONFIG, --config CONFIG
                        Configuration .ini file. If not specified
                        WaterDetect.ini from current dir and used as default

To copy the package's default .ini file into the current directory, type:
`waterdetect -GC .` without other arguments and it will copy WaterDetect.ini
into the current directory.

Config File

The waterdetect needs a config file that specifies the bands used in the clustering process as well as other parameters. To obtain the default version of this file, one can use waterdetec -GC and the file WaterDetect.ini will be copied into the current working folder.

Usage as Script

The basic usage for the waterdetect is:
waterdetect -i c:/input_folder -i -c:/output_folder -p S2_THEIA

The input directory should contain the uncompressed folders for the images. The script will loop through all folders in the input directory and save the water masks, graphs and reports to the output folder. The output folder must be created beforehand.

If the config file is not specified, the script will search for WaterDetect.ini in the current folder.

Usage from Console

Once properly installed, the WaterDetect can be run from a console or a Jupyter Notebook, by import the package and calling DWDetectWater.

>>> import waterdetect as wd
>>> !waterdetect -GC
>>> wd.DWWaterDetect.run_batch(input_folder='D:\Images\Input\',
                               output_folder='D:\Images\Output',
                               shape_file='D:\Shp\SomeShapefile.shp',
                               product=wd.DWProducts.Sentinel2_THEIA,
                               config_file='WaterDetect.ini'
                              )

For more information on how to use it from jupyter notebook, in batch or single mode or to use it with other satellite images or without GDAL, please refer to the tutorial available here https://towardsdatascience.com/water-detection-in-high-resolution-satellite-images-using-the-waterdetect-python-package-7c5a031e3d16.

Contributors

Author: Maurício Cordeiro (ANA/GET)
Supervisor: Jean-Michel Martinez (IRD/GET)
Validation dataset: Santiago Pena Luque (CNES)

Institutions

License

This code is licensed under the GNU General Public License v3.0 license. Please, refer to GNU's webpage (https://www.gnu.org/licenses/gpl-3.0.en.html) for details.

Reference

(1) Hagolle, O.; Huc, M.; Pascual, D. V.; Dedieu, G. A Multi-Temporal Method for Cloud Detection, Applied to FORMOSAT-2, VENµS, LANDSAT and SENTINEL-2 Images. Remote Sensing of Environment 2010, 114 (8), 1747–1755. https://doi.org/10.1016/j.rse.2010.03.002.

(2) Cordeiro, M. C. R.; Martinez, J.-M.; Peña-Luque, S. Automatic Water Detection from Multidimensional Hierarchical Clustering for Sentinel-2 Images and a Comparison with Level 2A Processors. Remote Sensing of Environment 2021, 253, 112209. https://doi.org/10.1016/j.rse.2020.112209.

Comments
  • Multiple bands detected from S2B L1A S2COR

    Multiple bands detected from S2B L1A S2COR

    Hi,

    I'm having some issues in trying to run correctly waterdetect. I tried to use it on a variety of imagery from Copernicus but it failed everytime.

    I'm trying to run it on this specific tile S2B_MSIL2A_20210613T070619_N0300_R106_T40TEM_20210613T085847.SAFE, which should be compatible with the product S2_S2COR. However, when waterdetect runs, it returns this error:

    Loading configuration file WaterDetect.ini
    File WaterDetect.ini verified.
    Folder /Volumes/ANSSD/testFolder/input_folder verified.
    Folder /Volumes/ANSSD/testFolder/output_folder verified.
    Starting WaterDetection version: 1.5.8
    Opening image in folder /Volumes/ANSSD/testFolder/input_folder/S2B_MSIL2A_20210613T070619_N0300_R106_T40TEM_20210613T085847.SAFE
    Retrieving bands for product S2_S2COR
    70 were found:
    Loading band: Blue
    ****** WARNING ********
    More than one band _B02_10m. in image list. Skipping to the next image
    

    Do you have any insight on how to fix it and correctly run waterdetect?

    Thanks in advance!

    opened by andreabenedetti 18
  • Support required

    Support required

    Hello,

    I am newbie and trying to replicate this project on a EC2 instance and i have completed all the setup, created input and output folders in in the instance.

    I would like to know what file format i should upload in to the input folder to run the water detect command? can i use the sentinel open data on aws? if yes, can you direct me to the right file type.

    Thank you for your support

    opened by Krish-newbie 8
  • Effect of changing the reference band

    Effect of changing the reference band

    Hi Cordmaur,

    Thanks for sharing this outstanding work.

    I am working on a project related to water body identification and would like to have data with as high resolution as possible. I have found that by modifying the reference_band = Mir to Nir or other 10m band in the ".init" file, then I can change the resolution (to 10m) and I have successfully obtained the results.

    I would like to ask if the output of the model at 10m resolution (reference_band = Nir) is better than the 10m image obtained by simply interpolating the 20m result (reference_band = Mir) with NDWI+B12 as input. I am asking this question only because I am not sure why you defaulted the reference band in the code to MIR instead of the higher resolution NIR (or other 10m bands), since your article clearly states a 10m result.

    Best, Zhen Hao

    opened by haozhen315 3
  • Running without GDAL(For example, Landsat TM images)

    Running without GDAL(For example, Landsat TM images)

    I have updated the process in "Running without GDAL" with reference to the media article (Water Detection in High Resolution Satellite Images using the waterdetect python package) that describes it in more detail.

    Here, I use waterdetect to extract water bodies from a scene of Landsat TM imagery.

    Code part

    import waterdetect as wd import rasterio from osgeo import gdal

    !waterdetect -GC

    Copying c:\users\gw_studio\documents\miniconda3\lib\site-packages\WaterDetect.ini into current dir. WaterDetect.ini copied into C:\Users\GW_Studio\Documents\PythonCode.

    config = wd.DWConfig(config_file='WaterDetect.ini')

    Loading configuration file WaterDetect.ini File WaterDetect.ini verified.

    config.clustering_bands, config.detect_water_cluster

    ([['mndwi', 'ndwi', 'Mir2']], 'maxmbwi')

    b2 = rasterio.open('D:\LT05\LT05_L1TP_122044_19911117_20200915_02_T1_B2.tif').read() b3 = rasterio.open('D:\LT05\LT05_L1TP_122044_19911117_20200915_02_T1_B3.tif').read() nir = rasterio.open('D:\LT05\LT05_L1TP_122044_19911117_20200915_02_T1_B4.tif').read() mir1 = rasterio.open('D:\LT05\LT05_L1TP_122044_19911117_20200915_02_T1_B5.tif').read() mir2 = rasterio.open('D:\LT05\LT05_L1TP_122044_19911117_20200915_02_T1_B7.tif').read() b2.shape, b3.shape, nir.shape, mir1.shape, mir2.shape

    ((1, 6694, 7198), (1, 6694, 7198), (1, 6694, 7198), (1, 6694, 7198), (1, 6694, 7198))

    bands = {'Green': b2.squeeze(), 'Red': b3.squeeze(), 'Nir': nir.squeeze(),'Mir': mir1.squeeze(),'Mir2': mir2.squeeze()} wmask = wd.DWImageClustering(bands=bands, bands_keys=['Mir2', 'mndwi', 'ndwi'], invalid_mask=None, glint_processor=None, config=config) mask = wmask.run_detect_water()

    Selection of best number of clusters using Calinski-Harabasz Index: k=2 :Calinski_harabaz index=525017.1368054692 k=3 :Calinski_harabaz index=272406.8028330963 k=4 :Calinski_harabaz index=414875.9712176703 k=5 :Calinski_harabaz index=600524.7602326183 k=6 :Calinski_harabaz index=480991.67515900405 k=7 :Calinski_harabaz index=508319.4897511767 k=8 :Calinski_harabaz index=436496.13557214226 k=9 :Calinski_harabaz index=423649.7968669792 k=10 :Calinski_harabaz index=376965.3596922822 Applying clusters based naive bayes classifier Assgnin 1 to cluster_id 3 Skipping cluster_id 3

    import matplotlib.pyplot as plt plt.imshow(wmask.cluster_matrix)

    image

    save_ay = wmask.cluster_matrix dataset=gdal.Open("D:\LT05\LT05_L1TP_122044_19911117_20200915_02_T1_B2.tif") im_geotrans = dataset.GetGeoTransform() im_proj = dataset.GetProjection() save = wd.DWutils.array2raster(filename='test.tif', array=save_ay, geo_transform=im_geotrans, projection=im_proj, nodatavalue=-1, dtype=None)

    Saving image: test.tif

    Local results

    • "test.tif" loaded in ArcGIS Pro

    image

    • Water pixel extracted from "test.tif"

    image

    • Compare with the raw satellite image

    image

    opened by zhengzihao 3
  • The basic process gets

    The basic process gets "killed" after/during "Calculating clusters for the following combination of bands"

    Input (ran from the jupyter notebook, so i leave the original !): !waterdetect -i {input_folder} -o {output_folder}

    Output:

    Loading configuration file WaterDetect.ini
    File WaterDetect.ini verified.
    Folder / verified.
    Folder /waterdetect_test verified.
    Opening image in folder /waterdetect_test
    Retrieving bands for product S2_THEIA
    Opening image in folder /SENTINEL2A_20180824-100141-227_L2A_T33TVL_C_V1-0
    Retrieving bands for product S2_THEIA
    10 were found:
    Loading band: Blue
    Loading band: Green
    Loading band: Red
    Loading band: Mir
    Loading band: Mir2
    Loading band: Nir
    Loading band: Nir2
    Loading band: RedEdg1
    Loading band: RedEdg2
    Loading band: RedEdg3
    0...10...20...30...40...50...60...70...80...90...100 - done.
    Input file size is 10980, 10980
    0...10...20...30...40...50...60...70...80...90...100 - done.
    Saving image: /SENTINEL2A_20180824-100141-227_L2A_T33TVL_C_V1-0_invalid_mask.tif
    Calculating clusters for the following combination of bands:
    ['mndwi', 'ndwi', 'Mir2']
    Killed
    

    The process stops. This are the files it creates (and apparently copies?) image

    opened by mazingaro 3
  • No water in the matrix

    No water in the matrix

    Here, I use Waterdetect to extract water bodies from a scene of Sentinel 2 imagery.

    Code

    import waterdetect as wd
    import rasterio
    
    config = wd.DWConfig(config_file='WaterDetect.ini')
    config.clustering_bands, config.detect_water_cluster
    

    Loading configuration file WaterDetect.ini File WaterDetect.ini verified. ([['mndwi', 'ndwi', 'Mir2']], 'maxmbwi')

    b3 = rasterio.open('.../T31UES_20220719T105041_B03_20m.jp2').read()
    b4 = rasterio.open('.../T31UES_20220719T105041_B04_20m.jp2').read()
    nir = rasterio.open('.../T31UES_20220719T105041_B8A_20m.jp2').read()
    mir1 = rasterio.open('.../T31UES_20220719T105041_B11_20m.jp2').read()
    mir2 = rasterio.open('.../T31UES_20220719T105041_B12_20m.jp2').read()
    bands = {'Green': b3.squeeze()/10000, 'Red': b4.squeeze()/10000, 'Nir': nir.squeeze()/10000,'Mir': mir1.squeeze()/10000,'Mir2': mir2.squeeze()/10000}
    wmask = wd.DWImageClustering(bands=bands, bands_keys=['Mir2', 'mndwi', 'ndwi'], invalid_mask=None, config=config)
    mask = wmask.run_detect_water()
    plt.imshow(wmask.cluster_matrix)
    
    

    Selection of best number of clusters using Calinski-Harabasz Index: k=2 :Calinski_harabaz index=150.58256179023687 k=3 :Calinski_harabaz index=81.65946151674528 k=4 :Calinski_harabaz index=1867.2173765910154 k=5 :Calinski_harabaz index=3691.9700226205587 k=6 :Calinski_harabaz index=3017.54521958539 k=7 :Calinski_harabaz index=2515.1876336606165 Applying clusters based naive bayes classifier Assgnin 1 to cluster_id 3 Skipping cluster_id 3 <matplotlib.image.AxesImage at 0x7fa03fea6430>

    plt.imshow(wmask.water_mask==1)

    np.unique(wmask.water_mask)

    array([0], dtype=int8)

    np.unique(wmask.cluster_matrix)

    array([0, 2, 3, 4, 5], dtype=int8)

    Questions

    Why my matrix "wmask.water_mask" and "wmask.water_mask" have no cluster "1" which is water ?

    opened by nmh4598 2
  • 'DWWaterDetect' has no attribute 'run_single'

    'DWWaterDetect' has no attribute 'run_single'

    Hi, Thank you for creating this library. It looks great. I am trying to use it to detect water in some satellite images. We have the 'tif' files (i.e. S2B_MSIL2A_20220508T155819_N0400_R097_T17RLN_20220508T205707_1018.tif). The tif file is already sized to a 3.5 miles by 3.5 mile. However, we get the following error -> 'DWWaterDetect' has no attribute 'run_single'.

    In addition, I am not sure the reason for using the shape file

    This is how we are calling the function - do we need a shape file or is it optional? Thank you in advance for your help.

    water_mask = wd.DWWaterDetect.run_single(image_folder='Img/', temp_folder='tmp/' # shape_file='D:/Shp/Area_Tiete.shp' )

    opened by cmorenoUCB2021 2
  • Problems with S2_L1C Images

    Problems with S2_L1C Images

    Hi! I'm experiencing some troubles trying to run the script with a S2_L1C image, particularly this one: https://scihub.copernicus.eu/dhus/odata/v1/Products('ea4dfeee-1d28-47c5-a6a8-c86ada64768f')/$value

    It seems to be some sorts of recursive problem, not sure exactly what.

    This is the console output:

    (base) Macbook-Pro-2020-de-*******:WaterDetect ******$ python runWaterDetect.py -i ./Input/ -o ./Output/ -s ../../../Downloads/LaJara/LaJara.shp --product S2_L1C Loading configuration file WaterDetect.ini File WaterDetect.ini verified. Folder ./Input/ verified. File ../../../Downloads/LaJara/LaJara.shp verified. Folder ./Output/ verified. Starting WaterDetection version: 1.5.10 Opening image in folder Input/S2A_MSIL1C_20210207T174511_N0209_R098_T13SDA_20210207T212818.SAFE Retrieving bands for product S2_L1C ****** WARNING ******** [Errno 2] No such file or directory: 'Input/S2A_MSIL1C_20210207T174511_N0209_R098_T13SDA_20210207T212818.SAFE/GRANULE/Input/S2A_MSIL1C_20210207T174511_N0209_R098_T13SDA_20210207T212818.SAFE/GRANULE/L1C_T13SDA_A029410_20210207T175338/IMG_DATA'. Skipping to the next image

    I was not able to find any other image source for that particular place. I'm on MacOS Big Sur, and the latest version of the script.

    opened by fede1608 2
  • Clipping input data to the valid range kill the process

    Clipping input data to the valid range kill the process

    Hi,

    First of all, thank you so much for the package. I am trying to run it from both (notebook and Terminal window) but I always get this error message:

    "Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers)"

    The whole output is this one:

    Opening image in folder /home/diego/EBD/Varios/Sentinel2_Flood/imgs/sen2cor/S2B_MSIL2A_20220501T110619_N0400_R137_T30STG_20220501T131135.SAFE Retrieving bands for product S2_S2COR 36 were found: Loading band: Blue Loading band: Green Loading band: Red Loading band: Mir Loading band: Mir2 Loading band: RedEdg1 Loading band: RedEdg2 Loading band: RedEdg3 Loading band: Nir Loading band: Nir2 Warning: External mask None not found! Invalid pixels (0.23079226678080034) < maximum (0.95). Saving final MASK Saving image: /home/diego/EBD/Varios/Sentinel2_Flood/outputs/S2B_MSIL2A_20220501T110619_N0400_R137_T30STG_20220501T131135/S2B_MSIL2A_20220501T110619_N0400_R137_T30STG_20220501T131135_invalid_mask.tif 0...10...20...30...40...50...60...70...80...90...100 - done. Input file size is 10980, 10980 0...10...20...30...40...50...60...70...80...90...100 - done. Calculating clusters for the following combination of bands: ['mndwi', 'ndwi', 'Mir2'] Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers). Terminado (killed)

    I'd appreciate your help.

    opened by Digdgeo 1
  • Arial Font Not Found

    Arial Font Not Found

    When attempting to run this it works well until running the "create_mask_report" function. After some digging I found that it's trying to open a font file that doesn't exist on Ubuntu: "arial.ttf". Looks like you can only open fonts by passing the absolute path on Ubuntu.

    Recommend you include the font with the install.

    .../WaterDetect/waterdetect/Common.py in create_glint_pdf(xml, name_img, output_folder, g, pdf_merger)
        956         d = ImageDraw.Draw(out)
        957         # font size
    --> 958         font = ImageFont.truetype("arial.ttf", 16)
        959 
        960         # Test about glint values
    
    .../lib/python3.7/site-packages/PIL/ImageFont.py in truetype(font, size, index, encoding, layout_engine)
        834 
        835     try:
    --> 836         return freetype(font)
        837     except OSError:
        838         if not isPath(font):
    
    .../lib/python3.7/site-packages/PIL/ImageFont.py in freetype(font)
        831 
        832     def freetype(font):
    --> 833         return FreeTypeFont(font, size, index, encoding, layout_engine)
        834 
        835     try:
    
    .../lib/python3.7/site-packages/PIL/ImageFont.py in __init__(self, font, size, index, encoding, layout_engine)
        192                     return
        193             self.font = core.getfont(
    --> 194                 font, size, index, encoding, layout_engine=layout_engine
        195             )
        196         else:
    
    OSError: cannot open resource
    
    opened by jshermeyer 1
  •  error during clustering -No such file or directory of 'img_composite.pdf' in the output directory

    error during clustering -No such file or directory of 'img_composite.pdf' in the output directory

    Hi,

    thank you so much for the package and I was testing the sentinel-2 with single mode. Weather the pdf_reports = True or False and the create_composite =True or Flase, the error 'No such file or directory : 'Output/data/data_composite.pdf' happened. Would you please give me any advice?

    cheers.

    opened by HEGIT2018 1
  • skip re-processing of existing results

    skip re-processing of existing results

    Hi there. Nice package! I am currently giving it a try processing some S2_THEIA products. I have unpacked several products to a directory and run the package with

    waterdetect -i ./in -o ./out -p S2_THEIA
    

    I wanted to unpack some more scenes into my source directory and run the program again but it basically ignores the existing output and starts processing them again.
    It would be fantastic if repeated runs would leave existing products untouched.

    Cheers, John

    P.S. I think there is a small typo in the README:

    - waterdetect -i c:/input_folder -i -c:/output_folder -p S2_THEIA
    + waterdetect -i c:/input_folder -o -c:/output_folder -p S2_THEIA
    
    opened by johntruckenbrodt 0
Releases(v1.5.13)
  • v1.5.13(Sep 29, 2022)

    Code updated to comply with Sen2Cor processing baseline 04.00, that started in January, 25th 2022. BoA offset was added to the Sen2Cor workflow to deal with negative values.

    Source code(tar.gz)
    Source code(zip)
  • v1.5.12(Mar 31, 2022)

  • v1.5.11(Nov 10, 2021)

  • v1.5.10(Nov 8, 2021)

  • v1.5.9(Nov 5, 2021)

    Version 1.5.9

    • Added external mask processing through the command process_ext_masks. It prepares an external mask (ex. created by FMask) to be used by WaterDetect.
    • Bug corrections
    Source code(tar.gz)
    Source code(zip)
  • v1.5.8(May 3, 2021)

  • v1.5.7(Apr 26, 2021)

    1.5.7

    • New entry point runWaterDetect.py
    • Namespace correction for different versions of sklearn package
    • New treatment for negative reflectance values (individual pixel correction)
    • Added regularization option to avoid extreme values on Normalized Difference indices.
    • New water cluster detection method based on lowest Nir reflectance ("minnir")
    • Updated reporting. Invalid mask is superimposed to the RGB scene representation
    • Added support for Sen2Cor internal masks
    • GLINT mode (For entire scenes only). Creates a Glint heatmap based on viewing and solar angles and updates the thresholds to include waters with sun glint in the final mask
    Source code(tar.gz)
    Source code(zip)
  • v1.1(Nov 18, 2020)

Owner
null
ColoringMapAlgorithm-CSP- - Graphical Coloring of Countries with Condition Satisfaction Algorithm

ColoringMapAlgorithm-CSP- Condition Satisfaction Algorithm Output Condition

Kerem TAN 2 Jan 10, 2022
Genetic Algorithm, Particle Swarm Optimization, Simulated Annealing, Ant Colony Optimization Algorithm,Immune Algorithm, Artificial Fish Swarm Algorithm, Differential Evolution and TSP(Traveling salesman)

scikit-opt Swarm Intelligence in Python (Genetic Algorithm, Particle Swarm Optimization, Simulated Annealing, Ant Colony Algorithm, Immune Algorithm,A

郭飞 3.7k Jan 3, 2023
Genetic Algorithm, Particle Swarm Optimization, Simulated Annealing, Ant Colony Optimization Algorithm,Immune Algorithm, Artificial Fish Swarm Algorithm, Differential Evolution and TSP(Traveling salesman)

scikit-opt Swarm Intelligence in Python (Genetic Algorithm, Particle Swarm Optimization, Simulated Annealing, Ant Colony Algorithm, Immune Algorithm,A

郭飞 3.7k Jan 1, 2023
Python scripts aim to use a Random Forest machine learning algorithm to predict the water affinity of Metal-Organic Frameworks

The following Python scripts aim to use a Random Forest machine learning algorithm to predict the water affinity of Metal-Organic Frameworks (MOFs). The training set is extracted from the Cambridge Structural Database and the CoRE_MOF 2019 dataset.

null 1 Jan 9, 2022
AnuGA for the simulation of the shallow water equation

ANUGA Contents ANUGA What is ANUGA? Installation Documentation and Help Mailing Lists Web sites Latest source code Bug reports Developer information L

Geoscience Australia 147 Dec 14, 2022
A Fast Monotone Rotating Shallow Water model

pyRSW A Fast Monotone Rotating Shallow Water model How fast? As fast as a sustained 2 Gflop/s per core on a 2.5 GHz cpu (or 2048 Gflop/s with 1024 cor

Guillaume Roullet 13 Sep 28, 2022
ecowater-softner is a Python library for collecting information from Ecowater water softeners.

Ecowater Softner ecowater-softner is a Python library for collecting information from Ecowater water softeners. Installation Use the package manager p

null 6 Dec 8, 2022
Water quality integration for Home Assistant with data provided by Budapest FVM

Water Quality FVM (Budapest, HU) custom integration for Home Assistant This custom component integrates water quality information provided by Budapest

Atticus Maximus 3 Dec 23, 2021
In this tutorial, raster models of soil depth and soil water holding capacity for the United States will be sampled at random geographic coordinates within the state of Colorado.

Raster_Sampling_Demo (Resulting graph of this demo) Background Sampling values of a raster at specific geographic coordinates can be done with a numbe

null 2 Dec 13, 2022
Suite of tools for retrieving USGS NWIS observations and evaluating National Water Model (NWM) data.

Documentation OWPHydroTools GitHub pages documentation Motivation We developed OWPHydroTools with data scientists in mind. We attempted to ensure the

null 36 Dec 11, 2022
Flood modeling by 2D shallow water equation

hydraulicmodel Flood modeling by 2D shallow water equation. Refer to Hunter et al (2005), Bates et al. (2010). Diffusive wave approximation Local iner

null 6 Nov 30, 2022
A simple solution for water overflow problem in Python

Water Overflow problem There is a stack of water glasses in a form of triangle as illustrated. Each glass has a 250ml capacity. When a liquid is poure

Kris 2 Oct 22, 2021
Build surface water network for MODFLOW's SFR Package

Surface water network Creates surface water network, which can be used to create MODFLOW's SFR. Python packages Python 3.6+ is required. Required geop

Mike Taves 20 Nov 22, 2022
A water drinking notification every hour to keep you healthy while coding :)

Water_Notification A water drinking notification every hour to keep you healthy while coding. ?? ?? Stay Hydrated Stay Healthy ?? ?? Authors @CrazyCat

Arghya Banerjee 1 Dec 22, 2021
A short term landscape evolution using a path sampling method to solve water and sediment flow continuity equations and model mass flows over complex topographies.

r.sim.terrain A short-term landscape evolution model that simulates topographic change for both steady state and dynamic flow regimes across a range o

Brendan Harmon 7 Oct 21, 2022
ArduinoWaterHeaterIOT - IoT Probe of a solar PV water heating system - Arduino, Python, MQTT, MySQL

ArduinoWaterHeaterIOT IoT Probe of a solar PV water heating system - Arduino, Raspberry Pi, Python, MQTT, MySQL The Arduino sends the AC and DC watts

Jacques Fourie 1 Jan 11, 2022
Amitkumar Mishra 2 Jan 14, 2022
The aim is to extract timeseries water level 2D information for any designed boundaries within the EasyGSH model domain

bct_file_generator_for_EasyGSH The aim is to extract timeseries water level 2D information for any designed boundaries within the EasyGSH model domain

Clayton Soares 1 Jul 8, 2022
Stai Beta Of Staiking Chain - Food, Water And Electricity - Worldwide

Stai Beta Of Staiking Chain - Food, Water And Electricity - Worldwide

STATION-I 2 Feb 5, 2022
Mini Software that give reminder to drink water as per your weight.

Water Notification Desktop Python The Mini Software built in Python (tkinter) that will remind you to drink water on specific time span based on your

Om Jogani 5 Dec 16, 2022