IHEWAcollect¶
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 |
|
CFSR |
|
CHIRPS |
|
CSR |
|
DEM |
|
ECMWF |
|
FEWS |
|
GLDAS |
|
GLEAM |
|
GPM |
|
HiHydroSoil |
|No longer provided. |Download current version from: |www.futurewater.eu/projects/hihydrosoil/ |
JRC |
|
MCD12Q1 |
|
MCD43A3 |
|
MOD09GQ |
|
MOD10A2 |
|
MOD11A2 |
|
MOD13Q1 |
|
MOD15A2H |
|
MOD16A2 |
|
MOD17A2H |
|
MOD17A3H |
|
MSWEP |
|
PROBAV |
|
RFE |
|
SoilGrids |
|
TRMM |
|
TWC |
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