idx2Timeseries: idx2Timeseries

Description Usage Arguments Value Examples

Description

Extracts output time series corresponding to accepted simulation. indices with a selected time window.

Usage

1
2
idx2Timeseries(dwsFolderPath, startDate, endDate, captionDwsVar, TW = "day",
  acceptedIndices = "all")

Arguments

dwsFolderPath

Folder path for .DWS output folder.

startDate

Start date with format YYYY-MM-DD (e.g. "2002-01-01").

endDate

End date with format YYYY-MM-DD (e.g. "2003-01-01").

captionDwsVar

Variable caption as it appears in the .DWS output file.

TW

Time averaging window could be: "day" , or "week", or "month" or "year" or any multiple of them, e.g. "3 month".

acceptedIndices

An integer vector containing accepted simulation numbers.

Value

A dataframe containing aggregated time series for the selected TW.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
## Not run: 
# Creating a copy of tutorial folder:
    getExampleFolder()
# Creating a list for setting inputs:
    globalInput <- inputGen()
# Setting parameter bounds:
    globalInput$apexPARM$Root_growth_soil[1] = 0.15
    globalInput$apexPARM$Root_growth_soil[2] = 0.2
    globalInput$apexPARM$Soil_evap_plant_cover[1] = 0
    globalInput$apexPARM$Soil_evap_plant_cover[2] = 0.5
# Performing Monte Carlo simulation:
    input4SA <- APEXSENSUN::mc4APEX(globalInput)
# Extracting time series
  extractedTimeseries <- idx2Timeseries(dwsFolderPath = "Example/Calculated_Outputs/DWS",
                                        startDate="2002-01-01", endDate="2003-01-01",
                                        captionDwsVar = "ET",TW="month",
                                        acceptedIndices=c(1,15,10,8))

## End(Not run)

Rapex2017/apexsensun documentation built on May 4, 2019, 6:39 p.m.