Customizing RHEAS¶
Initializing and updating the database¶
The RHEAS database needs to be populated with a variety of datasets that can be fetched automatically. A configuration file can be used to control and define which datasets are downloaded and imported in the PostGIS database. The configuration file follows the INI format, with each section corresponding to a dataset.
Unless the entire spatial extent of the datasets needs to be ingested into the database, a domain
section should be created in the configuration file describing the bounding box for the domain of interest.
minlat
: the minimum latitude of the bounding boxmaxlat
: the maximum latitude of the bounding boxminlon
: the minimum longitude of the bounding boxmaxlon
: the maximum longitude of the bounding box
If the dataset is being fetched for the first time, a starting date needs to be provided within each dataset section while an ending date can be optionally provided.
startdate
: start date of data fetched (format is year-month-day)enddate
: the last date of data to be fetched
If the dataset already exists in the database, then RHEAS will only download data after the last date available in the database (unless this is bypassed by the startdate
keyword).
An example configuration file (named data.conf
) that will download TRMM, CHIRPS and IRI datasets is given below.
[domain]
minlat: -2
maxlat: -2
minlon: 30
maxlon: 34
[trmm]
[iri]
startdate: 2000-2-1
enddate: 2000-3-1
[chirps]
startdate: 2014-1-3
Since no option is provided under the trmm
section, RHEAS will download data from the latest date available in the database to today.
After the configuration file has been created, the database can be initialized/updated by calling RHEAS as
./bin/rheas -u data.conf
where data.conf
is the name of the configuration file.