## 04/06/2012 - 3:23PM source('h:/watersmart/lib.R') ## define some variables trace.len <- 50 # length of traces nsim <- 1200 # number of traces rdata.file <- 'leesferry-knn.RData' # file name for .RData file (saves output) rdata.file.cc <- 'leesferry-knn-cc.RData' # file name for climate change .RData file (saves output) ## filepath will default to the current working directory. ## therefore, it is noteworth to know whether user has file- ## editing privelages in the current working directory ## I am now setting the current working directory: setwd('h:/watersmart/scriptdata/knn/') ## The directory could also be supplied as filepath='h:/watersmart/' ## read the observed flow data (Lee's Ferry) x <- 'h:/watersmart/scriptdata/knn/lf_yr_vector.txt' v_cc_knn(xpath=x,sim.len=trace.len,nsims=nsim,filepath=NULL,output.rdata=rdata.file,mean.change=NULL,returnpath=NULL) ## the file 'output/SimFlow-KNN.txt' will be output, as mean.change is NULL v_cc_knn(xpath=x,sim.len=trace.len,nsims=nsim,filepath=NULL,output.rdata=rdata.file.cc,mean.change=-0.1,returnpath=NULL) ## the file 'output/SimFlow-KNN-cc.txt' will be output, as mean.change is -10%