17 |
17 |
jobs=expand.grid(tile=tiles$Tile,year=2000:2012,month=1:12)
|
18 |
18 |
jobs[,c("ULX","ULY","LRX","LRY")]=tiles[match(jobs$tile,tiles$Tile),c("ULX","ULY","LRX","LRY")]
|
19 |
19 |
|
|
20 |
|
|
21 |
jobs=jobs[jobs$month==1,]
|
20 |
22 |
## Run the python downloading script
|
21 |
23 |
#system("~/acrobates/adamw/projects/environmental-layers/climate/procedures/ee.MOD09.py -projwin -159 20 -154.5 18.5 -year 2001 -month 6 -region test")
|
22 |
24 |
i=6715
|
23 |
25 |
testtiles=c("h02v07","h02v06","h02v08","h03v07","h03v06")
|
24 |
26 |
todo=which(jobs$tile%in%testtiles)
|
25 |
|
#todo=todo[1:3]
|
26 |
|
#todo=1:nrow(jobs)
|
27 |
|
lapply(todo,function(i)
|
|
27 |
todo=todo[1:3]
|
|
28 |
todo=1:nrow(jobs)
|
|
29 |
#todo=todo[500:503]
|
|
30 |
mclapply(todo,function(i)
|
28 |
31 |
system(paste("~/acrobates/adamw/projects/environmental-layers/climate/procedures/ee.MOD09.py -projwin ",jobs$ULX[i]," ",jobs$ULY[i]," ",jobs$LRX[i]," ",jobs$LRY[i],
|
29 |
|
" -year ",jobs$year[i]," -month ",jobs$month[i]," -region ",jobs$tile[i],sep="")))
|
|
32 |
" -year ",jobs$year[i]," -month ",jobs$month[i]," -region ",jobs$tile[i],sep="")),mc.cores=1)
|
30 |
33 |
|
31 |
34 |
|
32 |
35 |
## Get list of available files
|
... | ... | |
35 |
38 |
df$date=as.Date(paste(df$year,"_",df$month,"_15",sep=""),"%Y_%m_%d")
|
36 |
39 |
|
37 |
40 |
## subset to testtiles?
|
38 |
|
df=df[df$region%in%testtiles,]
|
39 |
|
|
|
41 |
#df=df[df$region%in%testtiles,]
|
|
42 |
df=df[df$month==1,]
|
40 |
43 |
table(df$year,df$month)
|
41 |
44 |
|
42 |
45 |
## drop some if not complete
|
Updated EE compiler