Skip to contents

Add convert flow or rainfall data to a volume

Usage

asVol(x, area)

# S3 method for data.table
asVol(x, area = NULL)

# S3 method for HydroImport
asVol(x, area = NULL)

# S3 method for HydroAggs
asVol(x, area = NULL)

Arguments

x

Data set of classes HydroImport or ¬HydroAggs

area_km

Area of coverage for rain gauges

Value

Calculated volume of flow or rainfall

Examples

# Load bewdley dataset
data(bewdley)

# Calculate volumes
asVol(bewdley)
#>                    dateTime value quality  qcode volume
#>                      <POSc> <num>  <char> <char>  <num>
#>      1: 2008-10-01 09:00:00  25.3    Good   <NA>  22770
#>      2: 2008-10-01 09:15:00  25.5    Good   <NA>  22950
#>      3: 2008-10-01 09:30:00  25.6    Good   <NA>  23040
#>      4: 2008-10-01 09:45:00  25.6    Good   <NA>  23040
#>      5: 2008-10-01 10:00:00  25.7    Good   <NA>  23130
#>     ---                                                
#> 490844: 2022-10-01 07:45:00  12.0    Good   <NA>  10800
#> 490845: 2022-10-01 08:00:00  11.8    Good   <NA>  10620
#> 490846: 2022-10-01 08:15:00  11.6    Good   <NA>  10440
#> 490847: 2022-10-01 08:30:00  11.6    Good   <NA>  10440
#> 490848: 2022-10-01 08:45:00  11.6    Good   <NA>  10440

# Print the bewdley dataset
bewdley
#> 
#> ── Class: HydroImport ──────────────────────────────────────────────────────────
#> 
#> ── Metadata: ──
#> 
#> Data Type: Raw Import
#> Station name: Bewdley
#> WISKI ID: 2001
#> Parameter Type: Flow
#> Modifications: NA
#> Start: 2008-10-01 09:00:00
#> End: 2022-10-01 08:45:00
#> Time Step: 900
#> Observations: 490848
#> Easting: 378235
#> Northing: 276165
#> Longitude: -2.321186
#> Latitude: 52.383072
#> 
#> 
#> ── Observed data: ──
#> 
#>                    dateTime value quality  qcode volume
#>                      <POSc> <num>  <char> <char>  <num>
#>      1: 2008-10-01 09:00:00  25.3    Good   <NA>  22770
#>      2: 2008-10-01 09:15:00  25.5    Good   <NA>  22950
#>      3: 2008-10-01 09:30:00  25.6    Good   <NA>  23040
#>      4: 2008-10-01 09:45:00  25.6    Good   <NA>  23040
#>      5: 2008-10-01 10:00:00  25.7    Good   <NA>  23130
#>     ---                                                
#> 490844: 2022-10-01 07:45:00  12.0    Good   <NA>  10800
#> 490845: 2022-10-01 08:00:00  11.8    Good   <NA>  10620
#> 490846: 2022-10-01 08:15:00  11.6    Good   <NA>  10440
#> 490847: 2022-10-01 08:30:00  11.6    Good   <NA>  10440
#> 490848: 2022-10-01 08:45:00  11.6    Good   <NA>  10440
#> 
#> 
#> 
#> For more details use the $methods() function, the format should be as
#> `Object_name`$methods()