ErmCopernicusImporter

An alternative to the steps 3 to 5 of the workflow (ErmKriging, ErmRadiation and ErmPrestleyEt), for basins without enough meteo stations: the input data of the sub-basins are taken from the daily AgERA5 dataset of the Copernicus Climate Data Store, a global grid of about 0.1° (some 10 km) derived from the ERA5 reanalysis. For each day of the period, the module stores in the GeoFrame database the mean over each sub-basin of:

Variable

AgERA5

Stored as

temperature

2 m temperature, 24 hour mean

°C

precipitation

precipitation flux

mm/day

evapotranspiration

reference evapotranspiration (FAO-56 Penman-Monteith)

mm/day

The model needs only these three variables, so the net radiation of ErmRadiation is not needed. ErmStationDataImporter is still needed, for the discharge measured at the stream gauges, which the calibration compares with the simulated one.

A few things to consider:

  • AgERA5 data are daily, so the calibration and the simulation have to run with a daily time step (pTimeStepMinutes = 60*24).

  • Each daily value is stored at the time of the day of pStartTimestamp: it has to be the same as the one of the station data, or the simulated and observed discharges are not aligned.

  • The reference evapotranspiration is the one of a grass reference surface, not the Priestley-Taylor one of ErmPrestleyEt: the parameters calibrated with one of the two are not valid for the other.

  • The AgERA5 cells are larger than the sub-basins, and the precipitation varies even more smoothly than its grid: in small basins all the sub-basins can get the same precipitation.

The data are downloaded with the Copernicus API token and kept in the download folder set in the Settings: the data of each day and variable are downloaded only once, as a global file, and then read from the folder. The first run on a long period has to download three files per day, each one a job of the Climate Data Store, and can take long.

Parameters

Alternative to the steps 3 to 5 of the ERM/GeoFrame water budget workflow (ErmKriging, ErmRadiation and ErmPrestleyEt): downloads from Copernicus the daily AgERA5 mean temperature, precipitation and reference evapotranspiration (FAO-56 Penman-Monteith) and stores their mean over each sub-basin. AgERA5 data are daily, so the workflow has to run with a daily time step. The Copernicus API token and the folder where the downloaded data are kept are taken from the HortonMachine settings.

Toolbox folder: GeoFrame
Status: Draft
Keywords: ERM, GeoFrame, Copernicus, AgERA5, Meteo
Authors: Andrea Antonello
Class: org.hortonmachine.hmachine.geoframe.ermworkflow.ErmCopernicusImporter

Inputs

Parameter

Type

Unit

Default

Description

inGpkg

GeoPackage file

The GeoFrame database, with the sub-basins of the data preparation.

inDtm

raster file

The digital elevation model used for the data preparation: the resolution of the basin elevation raster of its outputs folder is the one at which the Copernicus data are averaged over the sub-basins.

pStartTimestamp

String

Start of the period to import. Format: yyyy-MM-dd HH:mm, in UTC. Each day gets this time of the day: it has to be the same as the one of the station data.

pEndTimestamp

String

End of the period to import. Format: yyyy-MM-dd HH:mm, in UTC.

doDeleteExistingData

boolean

false

If true, the temperatures, precipitations and evapotranspirations already in the database are deleted first.

downscaleFactor

int

1

Downscale factor for the resolution at which the data are averaged over the sub-basins. If greater than 1, the resolution of the basin elevation raster is divided by this factor: faster, but small sub-basins could get no cells.

Example

import org.hortonmachine.hmachine.geoframe.ermworkflow.ErmCopernicusImporter;

// the folder containing the input data: change it to yours
var workspace = "/data/COURSE_WATER/"

var ci = new ErmCopernicusImporter()
ci.inDtm = workspace + "dem.tif"
ci.inGpkg = workspace + "outputs/geoframe_data.gpkg"
// the time of the day has to be the one of the station data
ci.pStartTimestamp = "2015-01-01 01:00"
ci.pEndTimestamp = "2023-12-31 01:00"
ci.doDeleteExistingData = true
ci.process()