IHEWAcollect

CoverAlls Travis ReadTheDocs DockerHub PyPI Zenodo

This is the documentation of IHEWAcollect.

IHEWAcollect is a collection of tools to download remote sensing data. This project is fully developed by Water Accounting team at IHE-Delft.

GDAL library is required, see How to install GDAL.

Warning

Set gdal executable files to system “PATH”.

Must contain accounts.yml file, for security reason, we don’t suggest you to share accounts.yml, see accounts.yml-example.

accounts.yml-encrypted is safe to be shared, it can be generated by generate_encrypt() function.

accounts.yml-credential contains your password and key, to encrypt accounts.yml-encrypted.

Installation

Install from pip

IHEWAcollect Python package is hosted on Python Package Index (PyPI).

Install from pip.

$ pip install IHEWAcollect

Install from source code

Download source code from Github.

$ git clone https://github.com/wateraccounting/IHEWAcollect.git
$ cd IHEWAcollect

Install from source code.

$ python setup.py install

Uninstall IHEWAcollect

$ pip uninstall IHEWAcollect

Optional data

Test data can be download from IHE FTP.

Save the test data to “IHEWAcollect/tests/data/Products” folder.

Docker

Set “System -> Base Memory” to max capacity in Virtual Machine.

Set “Shared Folders” in Virtual Machine.

  • Folder Path: D:\IHEWAcollect

  • Folder Name: d/IHEWAcollect

  • Auto-mount: Yes

  • Make Permanent: Yes

Download source code from Github.

$ git clone https://github.com/wateraccounting/IHEWAcollect.git
$ cd IHEWAcollect

Restart Docker Virtual Machine image.

$ docker-machine restart

Pull the ihewacollect image.

$ docker pull wateraccounting/ihewacollect

Or build from source code.

$ docker build -t wateraccounting/ihewacollect .

Check images.

$ docker images

Check ip address.

$ docker-machine env
export DOCKER_HOST="tcp://192.168.99.100:2376"

Run the image with Jupyter Notebook. To access Jupyter http://192.168.99.100:8888/

$ docker run -it --name ihewacollect -p 8888:8888 -v /d/IHEWAcollect:/notebooks wateraccounting/ihewacollect

Check running image (container), in the new cmd window.

$ docker container list

Access to running image, in the new cmd window.

$ docker exec -it ihewacollect bash

$ cd /notebooks/

$ python3 setup.py install
$ python3 ./examples/ex_CFSR_GRIB.py

Clean running cache.

$ docker system prune -f && docker volume prune -f && docker container prune -f

Remove image.

$ docker rmi wateraccounting/ihewacollect

Use

Examples can be found at examples.

import os
import IHEWAcollect

path = os.getcwd()
file_accounts = os.path.join(path, 'accounts.yml')
file_credential = os.path.join(path, 'accounts.yml-credential')
file_encrypted = os.path.join(path, 'accounts.yml-encrypted')

if os.path.exists(file_accounts) or os.path.exists(file_encrypted):
    product = 'CFSR'
    version = 'v1'
    parameter = 'radiation'
    resolution = 'daily'
    variable = 'dlwsfc'
    bbox = {
        'w': -19.0,
        'n': 38.0,
        'e': 55.0,
        's': -35.0
    }
    period = {
        's': '2008-01-01',
        'e': '2008-01-31'
    }
    nodata = -9999

    IHEWAcollect.Download(workspace=path,
                          product=product,
                          version=version,
                          parameter=parameter,
                          resolution=resolution,
                          variable=variable,
                          bbox=bbox,
                          period=period,
                          nodata=nodata,
                          is_status=False)

Products

Details can be found at Products.

Product

Link

ASCAT

https://www.copernicus.eu

CFSR

https://www.noaa.gov

CHIRPS

https://geog.ucsb.edu

CSR

https://podaac.jpl.nasa.gov

DEM

http://earlywarning.usgs.gov

ECMWF

https://www.ecmwf.int

FEWS

https://earlywarning.usgs.gov/fews

GLDAS

https://ldas.gsfc.nasa.gov/gldas

GLEAM

http://www.gleam.eu

GPM

https://pmm.gsfc.nasa.gov/GPM

HiHydroSoil

|No longer provided. |Download current version from: |www.futurewater.eu/projects/hihydrosoil/

JRC

https://global-surface-water.appspot.com

MCD12Q1

https://lpdaac.usgs.gov/products/mcd12q1v006

MCD43A3

https://lpdaac.usgs.gov/products/mcd43a3v006

MOD09GQ

https://lpdaac.usgs.gov/products/mod09gqv006

MOD10A2

https://nsidc.org/data/MOD10A2/versions/6

MOD11A2

https://lpdaac.usgs.gov/products/mod11a2v006

MOD13Q1

https://lpdaac.usgs.gov/products/mod13q1v006

MOD15A2H

https://lpdaac.usgs.gov/products/mod15a2hv006

MOD16A2

https://lpdaac.usgs.gov/products/mod16a2v006

MOD17A2H

https://lpdaac.usgs.gov/products/mod17a2hv006

MOD17A3H

https://lpdaac.usgs.gov/products/mod17a3hv006

MSWEP

https://princetonclimate.com

PROBAV

http://proba-v.vgt.vito.be/en

RFE

https://data.noaa.gov/dataset

SoilGrids

https://www.isric.org

TRMM

https://pmm.nasa.gov/trmm

TWC

https://www.wateraccounting.org

Code of Conduct

  • Be friendly and patient

  • Be welcoming

  • Be considerate

  • Be respectful

  • Be careful in the words that you choose

  • When we disagree, try to understand why

Contents

Indices and tables