RMarf | R Documentation |
This function computes antecedent rainfall for Rainmaker event files or any file with a list of specified dates.
Input files must have a as.POSIXctformatted date/time column. This format can be achieved by using the RMprep function The name of the rainfall column can also be changed as desired using the RMprep funtion
Subset the data by antecedent time period (can also assign to a df if you like) then define ARF values for the subset. Do this for all date periods in the sample file.
RMarf( df, date = "date", rain = "rain", df.events, sdate = "StartDate", days = c(0.5, 1, 2, 3, 5, 10, 15, 20), varnameout = "ARF" )
df |
dataframe Unit values rain file |
date |
string Date column name in df as POSIX |
rain |
string Column in df with instantaneous rain values |
df.events |
dataframe with dates/times for events |
sdate |
string Name of start date column in df.events rain file as POSIX |
days |
vector of times in days for summing antecedent rainfall |
varnameout |
string prefix for resulting antecedent rainfall variable names |
df.events dataframe
RDB <- CedarRRain RDB2 <- RMprep(RDB,prep.type=1,date.type=1,dates.in="CST.Time",tz="CST6CDT") RDB3 <- subset(RDB2, upload.ph3_site_basin_cedar_creek.Id.0....Geographical.Mean.kg.m.2.>-1) event.list <- RMevents(df=RDB3,ieHr=6, rainthresh=0.2, rain="upload.ph3_site_basin_cedar_creek.Id.0....Geographical.Mean.kg.m.2.") events.0.2 <- event.list$storms2 intensities <- RMintensity(RDB3,date="pdate", rain="upload.ph3_site_basin_cedar_creek.Id.0....Geographical.Mean.kg.m.2.", events.0.2,sdate="StartDate",edate="EndDate",depth="rain",xmin=c(5,15,30)) ARFrain <- RMarf(df = RDB3, date = "pdate", rain="upload.ph3_site_basin_cedar_creek.Id.0....Geographical.Mean.kg.m.2.", df.events=intensities,sdate="StartDate",days=c(1,3,5),varnameout="ARF")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.