## I will use synthetic data for this.  Output plot is for verification only.
## Can include in function, if so desired.

source('h:/watersmart/lib.r')
#setwd('h:/watersmart/scriptdata/crwas/')

## natural data used for synthesizing 
lee <- 'h:/watersmart/scriptdata/crwas/lf_mnt_vector.txt'

## leesim = synthetic data A.K.A. model.flows
leesim <- 'h:/watersmart/scriptdata/crwas/lf_mnt_sim_vector.txt'

## perturb is a vector ranging between 0.5 and 1.5.
## this can be thought of as delta.flow, or the change in model flows when 
## perturbed climate data is used as input
perturb <- 'h:/watersmart/scriptdata/crwas/lf_delta_flow_vector.txt'

## perturbed flow will be the model flows (leesim above) multiplied by perturb, or the delta flows
## since delta.flow = model.flow / perturbed.flow, perturbed.flow = model.flow / delta.flow
perturb.flow <- 'h:/watersmart/scriptdata/crwas/lf_mnt_perturb_flow_vector.txt'

## OPTION (A) as described in table
v_cc_crwas(obs.flow=lee,model.flow=leesim,perturbed.flow=perturb.flow,delta.flow=NULL,filepath='c:/users/verdina/desktop/testing/crwas/',returnpath='c:/users/verdina/desktop/testing/crwas/crwasSuccess_optionA.txt')

## OPTION (B) as described in table
v_cc_crwas(obs.flow=lee,model.flow=NULL,perturbed.flow=NULL,delta.flow=perturb,filepath='c:/users/verdina/desktop/testing/crwas/',returnpath='c:/users/verdina/desktop/testing/crwas/crwasSuccess_optionB.txt')

