comp_derivedvar: Compute derived variables

Description Usage Arguments Details Source

Description

Format and compute derived a set of environmental variables from input dataset that contains HydroATLAS variables for the purpose of predicting intermittency.

Usage

1

Arguments

copy

(logical) whether to make a copy of dt (if TRUE) or to modify it in place (if FALSE)

dt

data.table which contains rows as records and HydroATLAS environmental variables as columns.

Details

This function only formats and compute derived variables deemed relevant for the intermittency analysis.

Steps include:

  1. Convert some -9999 that should be 0 after checking them

  2. Count the number of -9999 values per column

  3. Convert the rest of the -9999 values to NA

  4. Compute a set of derived variables based on existing variables in HydroATLAS (e.g. pre_mm_cvar= fifelse(pre_mm_cmx==0, 0, pre_mm_cmn/pre_mm_cmx))

  5. Correct scaling from RiverATLAS (e.g. Degree of regulation is out of 10,000 in HydroATLAS)

Source

Linke, S., Lehner, B., Dallaire, C. O., Ariwi, J., Grill, G., Anand, M., ... & Tan, F. (2019). Global hydro-environmental sub-basin and river reach characteristics at high spatial resolution. Scientific Data, 6(1), 1-15.


messamat/globalIRmap documentation built on July 4, 2021, 10:48 a.m.