This PR adds the ForcingsEngineLumpedDataProvider class, inheriting from ForcingsEngineDataProvider<double, CatchmentAggrDataSelector>.
This provider interacts with the python-based Forcings Engine when running in "hydrofabric" mode (i.e. in the configuration file, GRID_TYPE="hydrofabric"). The following variables are accessible through the data provider interface:
BMI Variable
Alias
Description
Units
U2D_ELEMENT
U2D
10-m U-component of wind
m/s
V2D_ELEMENT
V2D
10-m V-component of wind
m/s
T2D_ELEMENT
T2D
2-m Air Temperature
K
Q2D_ELEMENT
Q2D
2-m Specific Humidity
kg/kg
LWDOWN_ELEMENT
LWDOWN
Surface downward long-wave radiation flux
W/m^2
SWDOWN_ELEMENT
SWDOWN
Surface downward short-wave radiation flux
W/m^2
PSFC_ELEMENT
PSFC
Surface Pressure
Pa
RAINRATE_ELEMENT
RAINRATE
Surface Precipitation Rate
mm/s
Within the engine's catchment domain, each variable has an aggregated scalar value for each catchment. As such, every constructed lumped data provider is associated with a single catchment (but, the underlying forcings engine instance is shared between them).
~This PR also includes a minor change to the parent base class, which moves the time and config file path member variables into the protected scope to allow printing of them in derived functions/exceptions and prevent the need to perform some conversions within std::chrono if they were kept in the private scope.~
This PR adds the
ForcingsEngineLumpedDataProvider
class, inheriting fromForcingsEngineDataProvider<double, CatchmentAggrDataSelector>
.This provider interacts with the python-based Forcings Engine when running in "hydrofabric" mode (i.e. in the configuration file,
GRID_TYPE="hydrofabric"
). The following variables are accessible through the data provider interface:U2D_ELEMENT
U2D
V2D_ELEMENT
V2D
T2D_ELEMENT
T2D
Q2D_ELEMENT
Q2D
LWDOWN_ELEMENT
LWDOWN
SWDOWN_ELEMENT
SWDOWN
PSFC_ELEMENT
PSFC
RAINRATE_ELEMENT
RAINRATE
Within the engine's catchment domain, each variable has an aggregated scalar value for each catchment. As such, every constructed lumped data provider is associated with a single catchment (but, the underlying forcings engine instance is shared between them).
~This PR also includes a minor change to the parent base class, which moves the time and config file path member variables into the
protected
scope to allow printing of them in derived functions/exceptions and prevent the need to perform some conversions withinstd::chrono
if they were kept in theprivate
scope.~Additions
data_access::ForcingsEngineLumpedDataProvider
ForcingsEngineLumpedDataProviderTest
test fixture using AORC data from AWS S3.Testing
Notes
In order to run the forcings engine unit tests prerequisites must be met:
$WGRIB2
environment variable with the path to yourwgrib2
executable, e.g.Checklist