Computes the global hydrological balance of a water basin from the
measurements of water level, outflows, and precipitation/evapotranspiration.
For analyzing Albufera data, you should not need to directly run this
function, and you can instead use the albufera_hb_global wrapper, that
calls hb_global()
with the right arguments, extracted from the built-in
datasets.
Usage
hb_global(
level,
rain_mm,
evapotranspiration_mm,
outflows,
...,
storage_curve = erahumed::linear_storage_curve(slope = 1, intercept = 0),
petp_surface = erahumed::linear_petp_surface(surface_P = 1, surface_ETP = 1)
)
Arguments
- level
numeric vector. Time series of lake levels, in meters.
- rain_mm
numeric vector. Time series of precipitation values, in millimiters.
- evapotranspiration_mm
numeric vector. Time series of evapotranspiration values, in millimiters.
- outflows
a data.frame whose columns are the time series of outflows, expressed in cube meters per second.
- ...
additional columns to be appended in the returned data-frame. Each of these additional (named) arguments should be a vector of the same length implied by the previous arguments.
- storage_curve
a function that takes a numeric vector as input, and returns a numeric vector of the same length. Function that converts lake levels (passed through the
level
argument) into lake volumes.- petp_surface
a function that takes two numeric vectors of common length as inputs, and returns a numeric vector of the same length. Function that converts precipitation and evapotranspiration values (passed through the
rain_mm
andevapotranspiration_mm
arguments) into an overall volume change.
Value
An object of class hb_global
, a lightweight wrapper of data.frame
with a few additional visualization methods (most prominently
plot.hb_global). The underlying data-frame contains as columns the
input time series, as well as the following calculated columns:
volume
Volume time series, obtained from the storage curve.volume_change
Differenced time series of volume. The \(n\)-th is given by \(\Delta V _n \equiv V_{n+1}-V_n\), where \(V_n\) is volume at time step \(n\).petp_change
Time series. The amount \(\Delta V _n ^\text{P-ETP}\) of volume change due to precipitation and evapotranspiration, obtained from the P-ETP surface.outflow_total
Time series of total outflows, measured in cube meters per second. This is the sum \(\sum _i O_i\) of time series passed through theoutflows
argument, plus an extra term \(\delta O\) of unaccounted outflow. The correction term is defined by \(\delta O = \frac{\Delta V _n - \Delta V _n ^\text{P-ETP}}{24 \times 60 \times 60} -\sum _i O_i\) and is chosen in such a way to ensure that the total inflow is always non-negative.outflow_extra
Time series. The unaccounted outflow term \(\delta O\) described above.inflow_total
Time serie of total inflows, in cube meters per second. This is computed as \(I = \sum _{i} O_i + \delta O + \frac{\Delta V _n - \Delta V _n ^\text{P-ETP}}{24 \times 60 \times 60}\).residence_time_days
. Residence time, as modeled by hbg_residence_time.