IHEWAengine.utils package

Submodules

IHEWAengine.utils.Download_Data module

Authors: Tim Hessels

UNESCO-IHE 2017

Contact: t.hessels@unesco-ihe.org Repository: https://github.com/wateraccounting/wa Module: Function/Start

Those function download the data that is not downloaded yet

IHEWAengine.utils.Download_Data.DEM(Dir, latlim, lonlim, Resolution, Product='HydroSHED')[source]

This functions check the DEM file from SRTM that needs to be downloaded, and send the request to the collect functions.

Parameters
  • Dir (str) – Path to all the output data of the Basin

  • latlim (array) – Array containing the latitude limits [latmin, latmax]

  • lonlim (array) – Array containing the longitude limits [lonmin, lonmax]

  • (optional) (Product) – Defines the resolution of the product

  • (optional) – Defines the product that will be used

Returns

Data_Path – Path from the Dir to the downloaded data

Return type

str

IHEWAengine.utils.Download_Data.DEM_Dir(Dir, latlim, lonlim, Resolution, Product='HydroSHED')[source]

This functions check the DEM direction file from SRTM that needs to be downloaded, and send the request to the collect functions.

Parameters
  • Dir (str) – Path to all the output data of the Basin

  • latlim (array) – Array containing the latitude limits [latmin, latmax]

  • lonlim (array) – Array containing the longitude limits [lonmin, lonmax]

  • (optional) (Product) – Defines the resolution of the product

  • (optional) – Defines the product that will be used

Returns

Data_Path – Path from the Dir to the downloaded data

Return type

str

IHEWAengine.utils.Download_Data.ETreference(Dir, latlim, lonlim, Startdate, Enddate, Product)[source]

This functions check the ET reference files that needs to be downloaded, and send the request to the product functions.

Parameters
  • Dir (str) – Path to all the output data of the Basin

  • latlim (array) – Array containing the latitude limits [latmin, latmax]

  • lonlim (array) – Array containing the longitude limits [lonmin, lonmax]

  • Startdate (str) – Contains the start date of the model ‘yyyy-mm-dd’

  • Enddate (str) – Contains the end date of the model ‘yyyy-mm-dd’

Returns

Data_Path – Path from the Dir to the downloaded data

Return type

str

IHEWAengine.utils.Download_Data.Evapotranspiration(Dir, latlim, lonlim, Startdate, Enddate, Product='MOD16')[source]

This functions check the evapotranspiration files that needs to be downloaded, and send the request to the collect functions.

Parameters
  • Dir (str) – Path to all the output data of the Basin

  • latlim (array) – Array containing the latitude limits [latmin, latmax]

  • lonlim (array) – Array containing the longitude limits [lonmin, lonmax]

  • Startdate (str) – Contains the start date of the model ‘yyyy-mm-dd’

  • Enddate (str) – Contains the end date of the model ‘yyyy-mm-dd’

  • (optional) (Product) – Defines the product that will be used (default is MOD16)

Returns

Data_Path – Path from the Dir to the downloaded data

Return type

str

IHEWAengine.utils.Download_Data.GPP(Dir, latlim, lonlim, Startdate, Enddate, Product='MOD17')[source]

This functions check the GPP files that needs to be downloaded, and send the request to the collect functions.

Parameters
  • Dir (str) – Path to all the output data of the Basin

  • latlim (array) – Array containing the latitude limits [latmin, latmax]

  • lonlim (array) – Array containing the longitude limits [lonmin, lonmax]

  • Startdate (str) – Contains the start date of the model ‘yyyy-mm-dd’

  • Enddate (str) – Contains the end date of the model ‘yyyy-mm-dd’

  • (optional) (Product) – Defines the product that will be used (default is MOD17)

Returns

Data_Path – Path from the Dir to the downloaded data

Return type

str

IHEWAengine.utils.Download_Data.GWF(Dir, latlim, lonlim)[source]

This functions check the Gray Water Footprint file from TWC that needs to be downloaded, and send the request to the collect functions.

Parameters
  • Dir (str) – Path to all the output data of the Basin

  • latlim (array) – Array containing the latitude limits [latmin, latmax]

  • lonlim (array) – Array containing the longitude limits [lonmin, lonmax]

Returns

Data_Path – Path from the Dir to the downloaded data

Return type

str

IHEWAengine.utils.Download_Data.JRC_occurrence(Dir, latlim, lonlim, Product)[source]

This functions check the water occurrence file from JRC that needs to be downloaded, and send the request to the collect functions.

Parameters
  • Dir (str) – Path to all the output data of the Basin

  • latlim (array) – Array containing the latitude limits [latmin, latmax]

  • lonlim (array) – Array containing the longitude limits [lonmin, lonmax]

  • (optional) (Product) – Defines the product that will be used

Returns

Data_Path – Path from the Dir to the downloaded data

Return type

str

IHEWAengine.utils.Download_Data.LAI(Dir, latlim, lonlim, Startdate, Enddate, Product='MOD15')[source]

This functions check the Leaf Area Index files that needs to be downloaded, and send the request to the collect functions.

Parameters
  • Dir (str) – Path to all the output data of the Basin

  • latlim (array) – Array containing the latitude limits [latmin, latmax]

  • lonlim (array) – Array containing the longitude limits [lonmin, lonmax]

  • Startdate (str) – Contains the start date of the model ‘yyyy-mm-dd’

  • Enddate (str) – Contains the end date of the model ‘yyyy-mm-dd’

  • (optional) (Product) – Defines the product that will be used (default is MOD15)

Returns

Data_Path – Path from the Dir to the downloaded data

Return type

str

IHEWAengine.utils.Download_Data.NDVI(Dir, latlim, lonlim, Startdate, Enddate, Product='MOD13')[source]

This functions check the GPP files that needs to be downloaded, and send the request to the collect functions.

Parameters
  • Dir (str) – Path to all the output data of the Basin

  • latlim (array) – Array containing the latitude limits [latmin, latmax]

  • lonlim (array) – Array containing the longitude limits [lonmin, lonmax]

  • Startdate (str) – Contains the start date of the model ‘yyyy-mm-dd’

  • Enddate (str) – Contains the end date of the model ‘yyyy-mm-dd’

  • (optional) (Product) – Defines the product that will be used (default is MOD17)

Returns

Data_Path – Path from the Dir to the downloaded data

Return type

str

IHEWAengine.utils.Download_Data.NPP(Dir, latlim, lonlim, Startdate, Enddate, Product='MOD17')[source]

This functions check the NPP files that needs to be downloaded, and send the request to the collect functions.

Parameters
  • Dir (str) – Path to all the output data of the Basin

  • latlim (array) – Array containing the latitude limits [latmin, latmax]

  • lonlim (array) – Array containing the longitude limits [lonmin, lonmax]

  • Startdate (str) – Contains the start date of the model ‘yyyy-mm-dd’

  • Enddate (str) – Contains the end date of the model ‘yyyy-mm-dd’

  • (optional) (Product) – Defines the product that will be used (default is MOD17)

Returns

Data_Path – Path from the Dir to the downloaded data

Return type

str

IHEWAengine.utils.Download_Data.Precipitation(Dir, latlim, lonlim, Startdate, Enddate, Product='CHIRPS')[source]

This functions check the precipitation files that needs to be downloaded, and send the request to the collect functions.

Parameters
  • Dir (str) – Path to all the output data of the Basin

  • latlim (array) – Array containing the latitude limits [latmin, latmax]

  • lonlim (array) – Array containing the longitude limits [lonmin, lonmax]

  • Startdate (str) – Contains the start date of the model ‘yyyy-mm-dd’

  • Enddate (str) – Contains the end date of the model ‘yyyy-mm-dd’

  • (optional) (Product) – Defines the product that will be used (default is CHIRPS)

Returns

Data_Path – Path from the Dir to the downloaded data

Return type

str

IHEWAengine.utils.Download_Data.Precipitation_Daily(Dir, latlim, lonlim, Startdate, Enddate, Product='CHIRPS')[source]

This functions check the precipitation files that needs to be downloaded, and send the request to the collect functions.

Parameters
  • Dir (str) – Path to all the output data of the Basin

  • latlim (array) – Array containing the latitude limits [latmin, latmax]

  • lonlim (array) – Array containing the longitude limits [lonmin, lonmax]

  • Startdate (str) – Contains the start date of the model ‘yyyy-mm-dd’

  • Enddate (str) – Contains the end date of the model ‘yyyy-mm-dd’

  • (optional) (Product) – Defines the product that will be used (default is CHIRPS)

Returns

Data_Path – Path from the Dir to the downloaded data

Return type

str

IHEWAengine.utils.Download_Data.Set_Start_End_Dates(Startdate, Enddate, Data_Path, freq)[source]

This functions check all the files if they are already downloaded, or needs to be downloaded.

Parameters
  • Startdate (str) – Contains the start date of the model ‘yyyy-mm-dd’

  • Enddate (str) – Contains the end date of the model ‘yyyy-mm-dd’

  • Data_Path (str) – Path to the downloaded data

  • freq ('D','8D','MS', or 'AS') – Defines the frequenct of the dataset that must be downloaded

Returns

  • Startdates (str) – Contains all the start dates of data that needs to be downloaded

  • Enddates (str) – Contains all the end dates of data that needs to be downloaded

IHEWAengine.utils.Download_Data.Soil_Properties(Dir, latlim, lonlim, Para='ThetaSat_TopSoil')[source]

This functions collect the soil properties layers from HiHydroSoil from the FTP server, by sending the request to the collect functions.

Parameters
  • Dir (str) – Path to all the output data of the Basin

  • latlim (array) – Array containing the latitude limits [latmin, latmax]

  • lonlim (array) – Array containing the longitude limits [lonmin, lonmax]

  • Para (str) – Soil property layer that must be downloaded

Returns

Data_Path – Path from the Dir to the downloaded data

Return type

str

Module contents