View source: R/SILOWriteFunctionsforSource.R
SILOWriteFunctionsforSource | R Documentation |
Function to bulk create functions for SILO data in Source.
SILOWriteFunctionsforSource(
X,
boundary,
shpColumn,
functionsfile,
RRfile,
RainfallDatasourcesFolder,
PETDatasourcesFolder,
RainfallDatafile,
PETDatafile,
fus
)
X |
List of SILO station data, loaded into R using SILOLoad. |
boundary |
path to a subcatchment shapefile containing the subcatchments in the Source catchment model |
shpColumn |
column in the shapefile attribute table that corresponds to the catchment numbering. |
functionsfile |
filename to create with functions to import into Source |
RRfile |
filename to create to be imported into the Source Rainfall Runoff feature table |
RainfallDatasourcesFolder |
Name to use when creating a folder in the Source function editor for the rainfall functions and time series variables |
PETDatasourcesFolder |
Name to use when creating a folder in the Source function editor for the PET functions and time series variables |
RainfallDatafile |
Filename of data source loaded in Source for rainfall, in formatting used by Source (e.g. for a file called Rain.csv from a relative folder called TimeseriesData is TimeSeriesData_Rain_csv). |
PETDatafile |
Filename of data source loaded in Source for PET, in formatting used by Source |
fus |
character vector of function unit names in the model. It is assumed that the Source rainfall-runoff scenario was created using the Geographic wizard, using the 'draw network' method (as opposed to DEM based)
This allows a raster to be loaded into Source, with an integer in each cell representing the different subcatchments.
This function will create two files:
|
Nothing to the R environment. Files functionsfile
and RRfile
are created.
## Not run:
X<-SILOLoad(sites)
shpColumn<-"OBJECTID"
functionsfile<-"functions.csv"
RRfile<-"RRFile.csv"
RainfallDatasourcesFolder<-"Rainfall"
PETDatasourcesFolder<-"PET"
RainfallDatafile<-"TimeSeriesData_Rain_csv"
PETDatafile<-"TimeSeriesData_MWet_csv"
fus<-c("regolith","igneous","carbonate","sedimentary")
SILOWriteFunctionsforSource(X,boundary,shpColumn,functionsfile,RRfile,
RainfallDatasourcesFolder,PETDatasourcesFolder,
RainfallDatafile,PETDatafile,fus)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.