Qmm_to_Dm {hydroToolkit} | R Documentation |
River discharge [m3/s] to volume [hm3]
Description
Converts mean monthly river discharge [m3/s] to total volume discharge [hm3].
Usage
Qmm_to_Dm(df)
Arguments
df |
data frame with class Date in the first column. By default the function converts the second column only. If you have daily or hourly data see agg_serie. |
Value
A data frame with two columns: Date and total volume discharge.
Examples
# Create BDHI hydro-met station
guido <- create_hydroMet(class_name = 'BDHI')
# List with meteorological variables (slots in BDHI's object)
cargar <- list('precip', 'Qmd', 'Qmm')
# Now assign as names the files
hydro_files <- list.files( system.file('extdata', package = "hydroToolkit"), pattern = 'Guido' )
names(cargar) <- hydro_files
# Build the object with the met records
guido <- build_hydroMet(obj = guido, slot_list = cargar,
path = system.file('extdata', package = "hydroToolkit") )
# Now get mean monthly discharge
Qmm <- get_hydroMet(obj = guido, name = 'Qmm')[[1]]
# Get the monthly water volume
Qmm_vol <- Qmm_to_Dm(df = Qmm)
[Package hydroToolkit version 0.1.0 Index]