-
Notifications
You must be signed in to change notification settings - Fork 0
APIs for data access
The following Application Programming Interfaces (APIs) are available to access forecasts data from different forecasting chains in PHARES.
| Name | Access | Geographic domain | Status | Link |
|---|---|---|---|---|
| Demo | Open | West Africa and Sahel | Selected dates | http://api-demo.phares-agrhymet.cilss.int/ |
| WAS | Restricted | West Africa and Sahel | Operational data | https://api-was.phares-agrhymet.cilss.int/ |
| BFA | Restricted | Burkina Faso | Operational data | https://api-bfa.phares-agrhymet.cilss.int/ |
- Make sure to have an account linked to Google. See how to link email to Google.
- Contact us to ask for access
Each API contains data for one or more storage zones, i.e. one zone for each forecasting chain in the geographic domain, and an additional storage zone for bulletin templates. In each forecasting chain the data is structured into folders and then individual files. These data, folders and files depend on the forecasting system which the forecasting chain belongs to, which is presented separately below.
For the FANFAR-related forecasting chains data is structured in the following types of folders:
- One folder with static data for the selected forecast chain. This folder is named
_static. - One folder for each day a forecast has been produced (the forecast issue date). These are named by the date, i.e. YYYYMMDD, e.g.
20260510 - One folder containing the latest available forecasts, named
latest.
-
subbasins_pourpoint_coordinates.shp: Shapefile with polygons of subbasins (catchments) in the hydrological model HYPE. -
stations-cout.gpkg: GeoPackage file with points showing the locations of hydrometric stations in the hydrological model HYPE. -
thresholds-al-cout.txt: Textfile containing the flood hazard alert level thresholds ("al") for discharge ("cout") from the HYPE model, for each subbasin. Note "alert level" and "severity level" are used interchangeably.
- One NetCDF file containing data for the forecast time period (1 to 10 day forward starting from the forecast issue date). The name of the file follows the following convention:
forecast_YYYY-MM-DDRX.nc, where YYYY is year, MM is month, DD is day, and RX is the revision number of the file. For exampleforecast_2026-05-10R1.ncmeans the file contains data for the forecast issued on 2026-05-10 and for the forecast period. R1 means that it is the first version of the file (i.e. it has not been changed after being produced once). - One NetCDF file containing data for dates immediately before the forecast issue date, i.e. the analysis period used to initialize the model. The name of the file follows the following convention:
analysis_YYYY-MM-DDRX.nc, where YYYY is year, MM is month, DD is day, and RX is the revision number of the file. For exampleanalysis_2026-05-10R2.ncmeans the file contains data for the forecast issued on 2026-05-10 for the analysis period. R2 means that it is the second version of the file (i.e. it has been changed once after being produced initially).
The NetCDF files have dimensions time and id, where id corresponds to the subbasin id in subbasins_pourpoint_coordinates.shp and stations-cout.gpkg. the NetCDF files contain a number of variables. The most important are the following:
-
cout: HYPE variable for simulated streamflow (discharge, m3/s), at the outlet of each subbasin. -
cout_AL_QC: Streamflow categorized into alert levels (AL) based on flood hazard thresholds. Valid at the outlet of each subbasin. Note "alert level" and "severity level" are used interchangeably. QC means that for some subbasins (mainly dry areas), the threshold method (return periods estimated by GEV) is not able to define thresholds accurately ("Disqualified alert levels"). -
cout_AL: Streamflow categorized into alert levels (AL) based on flood hazard thresholds. Unlike cout_AL_QC, this variable is not filtered for cases where the threshold method is inaccurate. -
cout_AL_thresholds_1,cout_AL_thresholds_2andcout_AL_thresholds_3: threshold values used to categorize streamflow when creatingcout_AL_QCandcout_AL -
cprc: HYPE variable for precipitation (mm/day) in each subbasin. -
upcprc: HYPE variable for upstream precipitation, i.e. the area-weighted averaage precipitation in the entire upstream area of the catchment above the selected subbasin (mm/day). -
cros: HYPE variable for surface runoff (mm/day) in each subbasin. -
evap: HYPE variable for actual evaporation (mm/day) in each subbasin. -
corl: HYPE variable for water level of the river at the outlet of the subbasin (m above global reference, usually sea level) Available only in selected subbasins where a rating curve is present. -
crrl: HYPE variable for water level of the river at the outlet of the subbasin. Here the unit is in the local reference system, usually cm above local reference, typically the zero-level of a local gauge.crrlis available only in selected subbasins where a rating curve is present.
- NetCDF files for the latest forecast issue date. A copy of the forecast*.nc and analysis*.nc files for the latest date
- Once you have selected a variable (see list above) you should use an appropriate color map (cmap) that fits with this variable. For continous variables, use continuous color maps; and for categorical variables use categorical colour maps.
- For the variable
cout_AL_QC, we recommend to use the custom color map that shows the categories in the same way as on the visualisation portal. I.e. usecout_AL_QC-polygon.xmlas cmap.
- Home
- Contact
- Visualisation portal
- APIs for data access
- FANFAR system
- Models, data and forecasting chains
- Terminology
- Exercises
- Account Configuration
- Web Portal Navigation & Flood Risk Analysis
- Data Extraction and Processing
- Accueil
- Contact
- Portail de visualisation
- API pour l’accès aux données
- Système FANFAR
- Modèles, données et chaînes de prévision
- Terminologie
- Exercices
- Configuration du compte
- Navigation dans le portail web et analyse du risque d’inondation
- Extraction et traitement des données