Package 'urbanAnnualRunoff'

Title: R Package for Deriving Urban Surfaces for Storm Runoff Analysis
Description: Used in Project KEYS for generating inputs to runoff model ABIMO for application in cities with data scarcity.
Authors: Roberto Tatis-Muvdi [aut] , Michael Rustler [aut, cre] , KEYS [fnd], Kompetenzzentrum Wasser Berlin gGmbH (KWB) [cph]
Maintainer: Michael Rustler <[email protected]>
License: MIT + file LICENSE
Version: 0.1.0
Built: 2024-11-14 03:44:55 UTC
Source: https://github.com/KWB-R/urbanAnnualRunoff

Help Index


Emissions: calculate loads

Description

The annual load is calculated with V x c. For for heavy metals -> l/m2-year x ug/l = ug/m2-year; for BOD/COD/TSS -> l/m2-year x mg/l = mg/m2-year

Usage

calculate_loads(abimo_inpout, concentrations)

Arguments

abimo_inpout

data.frame or SpatialPolygonsDataFrame with ABIMO input and output as retrieved by postProcessABIMO

concentrations

concentrations data frame as retrieved by read_concentrations

Value

add calculated loads as additional colums to abimo_inpout data.frame or SpatialPolygonsDataFrame


abimo: compute climate

Description

read Climate Engine data and compute (source: https://app.climateengine.org/climateEngine)

Usage

computeABIMOclimate(
  rawdir,
  file_inp,
  file_out,
  summer_month_start = 4,
  skip = 6,
  sep = "",
  dec = "."
)

Arguments

rawdir

rawdir

file_inp

name of input file

file_out

name of output file to be written in "raw_dir"

summer_month_start

number of month where summer half year starts (default: 4)

skip

skip (default: 6)

sep

sep (default: ”)

dec

dec (default: '.')

Value

data frame with yearly summed measurements (summer half year, total year sum) and also text file written to "raw_dir" with "out_file" name


Fix ABIMO shares

Description

Fix ABIMO shares

Usage

fix_abimo_shares(abimo)

Arguments

abimo

abimo object

Value

fixed percental shares (PROBAU, PROVGU, STR_FLGES)


Get ABIMO Statistics

Description

Get ABIMO Statistics

Usage

get_abimo_stats(abimo_inpout)

Arguments

abimo_inpout

abimo_inpout

Value

tibble with columns "catchment_km2", "rainfall_cbm", "infiltration_cbm", evapotrans_cbm and "vrr" (1 - runoff_cbm / rainfall_cbm)


Get Scenario Results

Description

Get Scenario Results

Usage

get_scenario_results(paths)

Arguments

paths

paths to directory containing all ABIMO scenario results

Value

tibble


compute ABIMO variable FLGES (block area without street area)

Description

compute ABIMO variable FLGES (block area without street area)

Usage

makeFLGES(subcatchmSPobject)

Arguments

subcatchmSPobject

subcatchmSPobject

Value

???


spatial overlay of subcatchments and raster holding information required by ABIMO

Description

spatial overlay of subcatchments and raster holding information required by ABIMO

Usage

makeOverlay(
  rawdir,
  rasterData,
  subcatchmSPobject,
  overlayName,
  subcatchmNamesCol
)

Arguments

rawdir

Path to data directory.

rasterData

Name of raster file containing classified image.

subcatchmSPobject

Spatial dataset containing subcatchment polygons (ABIMO Blockteilflächen) (sp object type, R package sp).

overlayName

Name of output overlay object.

subcatchmNamesCol

Name of column in the attribute table of subcatchmSPobject that contains the subcatchment identifiers. This is used for naming the elements of the resulting list

Value

save overlay as .Rdata in directory "rawdir" with filename defined in


compute ABIMO variable PROBAU (covered sealed area)

Description

compute ABIMO variable PROBAU (covered sealed area)

Usage

makePROBAU(rawdir, rasterData, overlayName, targetValue)

Arguments

rawdir

rawdir

rasterData

rasterData

overlayName

overlayName

targetValue

targetValue

Value

???


compute ABIMO variable STR_FLGES (street area of block area)

Description

compute ABIMO variable STR_FLGES (street area of block area)

Usage

makeSTR_FLGES(
  rawdir,
  subcatchmSPobject,
  rasterData,
  overlayName,
  targetValue,
  mask,
  add_streets_outside_subcatchments = FALSE
)

Arguments

rawdir

rawdir

subcatchmSPobject

subcatchmSPobject

rasterData

rasterData

overlayName

overlayName

targetValue

targetValue

mask

mask

add_streets_outside_subcatchments

boolean (TRUE/FALSE), if TRUE: as is done for Berlin, street area outside of the subcatchment polygons is distributed among the polygons in proportion to their area. thus: street area of polygon = internal street area + allocated external street area, if FALSE: only street area within subcatchments are counted (default: FALSE)

Value

STR_FLGES


compute ABIMO variable VG (soil sealing percentage)

Description

based on online global land use data

Usage

makeVG(rawdir, subcatchmSPobject, rasterData, targetValue)

Arguments

rawdir

rawdir

subcatchmSPobject

subcatchmSPobject

rasterData

rasterData

targetValue

targetValue

Value

???


helper function: pad CODE column of ABIMO table

Description

helper function: pad CODE column of ABIMO table

Usage

padCODE(string)

Arguments

string

string with CODE identifier

Value

padded CODE identifier (with leading "0" depending of maximium character length)


abimo: postprocess

Description

read dbf results file and joins with input shapefile

Usage

postProcessABIMO(path_input, path_output)

Arguments

path_input

path of ABIMO input shapefile

path_output

path of ABIMO output DBF file

Value

joined SpatialPolygonsDataFrame with ABIMO input and output


Emissions: read concentrations from OgRe database

Description

imports data from OgRe database and selects relevant substances for case study sites (Beijing, Jinxi) and calculates mean concentrations over all structures (column: "mean"). In addition new columns (short_name, unit_load, label_load) are created

Usage

read_concentrations(path)

Arguments

path

path to OgRe database file "annual_mean_conc.csv"

Value

data frame with selected substances and column


Results of ABIMO Scenario Analysis For Beijing

Description

A dataset for ABIMO modelling results for Beijing case study

Usage

scenario_results_beijing

Format

A data.frame with 21 rows and 20 variables:

scenario_name

name of scenario

catchment_km2

sum of FLGES ans STR_FLGES (in square kilometers)

rainfall_cbm

total rianfall in catchment ABIMO (in cubicmeters/year)

runoff_cbm

calculated runoff by ABIMO (in cubicmeter)

infiltration_cbm

calculated infiltration by ABIMO (in cubicmeter/year)

evapotrans_cbm

calculated evapotranspiration by ABIMO (in cubicmeter/year)

vrr

calculated volume rainfall retained (1-runoff_cbm/rainfall_cbm)

abimo_inpout

tibble with ABIMO input/output (only water balance)

abimo_inpout_emissions

tibble with ABIMO input/output (water balance + emissions)

BOD.kg_yr

Biological Oxygen Demand (in kg/year)

COD.kg_yr

Chemical Oxygen Demand (in kg/year)

TSS.kg_yr

Total Supended Solid (in kg/year)

Pb.kg_yr

Lead (in kg/year)

Cd.kg_yr

Cadmium (in kg/year)

Cr.kg_yr

Chrome (in kg/year)

Cu.kg_yr

Copper (in kg/year)

Ni.kg_yr

Nickel (in kg/year)

Va.kg_yr

Vanadium (in kg/year)

Zn.kg_yr

Zinc (in kg/year)


Results of ABIMO Scenario Analysis For Jinxi

Description

A dataset for ABIMO modelling results for Jinxi case study

Usage

scenario_results_jinxi

Format

A data.frame with 3 rows and 20 variables:

scenario_name

name of scenario

catchment_km2

sum of FLGES ans STR_FLGES (in square kilometers)

rainfall_cbm

total rianfall in catchment ABIMO (in cubicmeters/year)

runoff_cbm

calculated runoff by ABIMO (in cubicmeter)

infiltration_cbm

calculated infiltration by ABIMO (in cubicmeter/year)

evapotrans_cbm

calculated evapotranspiration by ABIMO (in cubicmeter/year)

vrr

calculated volume rainfall retained (1-runoff_cbm/rainfall_cbm)

abimo_inpout

tibble with ABIMO input/output (only water balance)

abimo_inpout_emissions

tibble with ABIMO input/output (water balance + emissions)

BOD.kg_yr

Biological Oxygen Demand (in kg/year)

COD.kg_yr

Chemical Oxygen Demand (in kg/year)

TSS.kg_yr

Total Supended Solid (in kg/year)

Pb.kg_yr

Lead (in kg/year)

Cd.kg_yr

Cadmium (in kg/year)

Cr.kg_yr

Chrome (in kg/year)

Cu.kg_yr

Copper (in kg/year)

Ni.kg_yr

Nickel (in kg/year)

Va.kg_yr

Vanadium (in kg/year)

Zn.kg_yr

Zinc (in kg/year)