prec_window: prec_window

View source: R/prec_window.R

prec_windowR Documentation

prec_window

Description

This is a function to get the predictions for a specific output simulated by SCOPE and calculate the accuracy.

Usage

prec_window(prec_vec, max_dry_hours, timestamp, value_on = 0.01)

Arguments

prec_vec

a vector with the volume of precipitation.

max_dry_hours

max possible number of hours without raining.

timestamp

timestamp datetime.

Value

The result is a data.frame with all the number of hours after raining and the precipitaion volume in mm

Examples

Examples of uses of the function
library(tidyverse)

Input_Berlin_grid %>%
 filter(id_pixel == 1169) %>%
 mutate(timestamp=REddyProc::BerkeleyJulianDateToPOSIXct(t, tz = "UTC")) %>%
 select(timestamp, prec_hour) -> prec_1169

prec_window_1169 <- prec_window(prec_vec = prec_1169$prec_hour,
                              timestamp = prec_1169$timestamp,
                               max_dry_hours = 400)


AlbyDR/rSCOPE documentation built on Dec. 19, 2024, 7:29 p.m.