...
This section provides scripts for both cases and for both CEMS-Flood products, GloFAS and EFAS.
Prepare and retrieve data
For the following exercises on extracting time series on the local machine, we are going to use the latitude and longitude coordinates from a tiny subset of the GRDC dataset.
Copy the content of the box code block into an empty file named "GRDC.csv", the file should reside in your working folder.
...
Then, retrieve the following datasets into the same working folder.
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
import cdsapi c = cdsapi.Client() c.retrieve( 'cems-glofas-historical', { 'variable': 'river_discharge_in_the_last_24_hours', 'format': 'grib', 'hydrological_model': 'lisflood', 'product_type': 'intermediate', 'hyear': '2021', 'hmonth': 'january', 'hday': [ '01', '02', '03', '04', '05', '06', '07', '08', '09', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21', '22', '23', '24', '25', '26', '27', '28', '29', '30', '31', ], 'system_version': 'version_3_1', }, 'glofas_historical.grib') |
...
Info | ||
---|---|---|
| ||
EFAS x and y coordinates, when converted from GRIB to NetCDF, are not projected coordinates but matrix indexes (i, j), It is necessary to download the upstream area static file file that contains the projected coordinates and replace it in EFAS. |
...