forked from ConservationInternational/teamcode
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrangeTest
More file actions
27 lines (20 loc) · 798 Bytes
/
rangeTest
File metadata and controls
27 lines (20 loc) · 798 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#source('~/Jimmy_Code/teamcode/tools/team_db_query.R')
#Load in the TEAM climate data
#cldata <- f.teamdb.query('climate')
#clmeta <- cldata$cl_temp_maxmin
#cldata <- cldata$cl_data
load('cl_data_new2014-04-24.gzip')
vb.data.3.0 <- cl_data_all[which(cl_data_all$TEAMSiteName == unique(cl_data_all$TEAMSiteName)[3] &
cl_data_all$ProtocolVersion == 'Climate 3'), ]
#Relative humidity range test 1
rh.r1.test <- f.rh.r1(vb.data)
#Temperature range test 1
temp.r1.test <- f.temp.r1(vb.data)
#NEED TO ADD TEMPERATURE RANGE TEST 2
#Rainfall range test 1
system.time(rain.r1.test <- f.rain.r1(vb.data.3.0))
#g<-cmpfun(f.rain.r1)
#compare <- microbenchmark(f.rain.r1(vb.data.3.0), g(vb.data.3.0), times = 1000)
#autoplot(compare)
#Rainfall range test 2
rain.r2.test