Revision d6ddb3e2
Added by Adam Wilson almost 11 years ago
climate/procedures/MOD09_Visualize.R | ||
---|---|---|
15 | 15 |
|
16 | 16 |
#### Evaluate MOD35 Cloud data |
17 | 17 |
mc=brick("~/acrobates/adamw/projects/cloud/data/mod09.nc",varname="CF") |
18 |
NAvalue(mod09)=-1
|
|
18 |
NAvalue(mc)=-1
|
|
19 | 19 |
|
20 | 20 |
cols=colorRampPalette(c("#000000","#00FF00","#FF0000"))#"black","blue","red")) |
21 | 21 |
for(i in 1:156){ |
... | ... | |
60 | 60 |
|
61 | 61 |
|
62 | 62 |
pdf("output/mod09_worldclim.pdf",width=11,height=8.5) |
63 |
p1=levelplot(wc_map,col.regions=grey(seq(0,1,len=100)),cuts=99,margin=F,maxpixels=1e5,colorkey=list("top")) |
|
64 |
p2=levelplot(mac,col.regions=grey(seq(0,1,len=100)),cuts=99,margin=F,maxpixels=1e5,colorkey=list("bottom")) |
|
65 |
p3=c(p1,p2,x.same=T,y.same=T,merge.legends=T) |
|
66 |
print(p3) |
|
67 |
|
|
68 |
|
|
69 | 63 |
regs=list( |
64 |
Cascades=extent(c(-122.8,-118,44.9,47)), |
|
70 | 65 |
Hawaii=extent(c(-156.5,-154,18.75,20.5)), |
71 | 66 |
Boliva=extent(c(-71,-63,-20,-15)), |
72 | 67 |
Venezuela=extent(c(-69,-59,0,7)), |
73 |
reg=extent(c(-83,-45,-5,13)), |
|
74 |
reg2=extent(c(-81,-70,-4,10)) |
|
68 |
CFR=extent(c(17.75,22.5,-34.8,-32.6)), |
|
69 |
Madagascar=extent(c(46,52,-17,-12)) |
|
70 |
#reg2=extent(c(-81,-70,-4,10)) |
|
75 | 71 |
) |
76 |
|
|
77 |
r=3 #set region |
|
72 |
for(r in 1:length(regs)){ |
|
78 | 73 |
p_map=levelplot(crop(wc_map,regs[[r]]),col.regions=grey(seq(0,1,len=100)),cuts=99,margin=F,maxpixels=1e5,colorkey=list(space="bottom",height=.75),xlab="",ylab="",main=names(regs)[r],useRaster=T) |
79 | 74 |
p_mac=levelplot(crop(mac,regs[[r]]),col.regions=grey(seq(0,1,len=100)),cuts=99,margin=F,maxpixels=1e5,colorkey=list(space="bottom",height=.75),useRaster=T) |
80 |
p_npp=levelplot(crop(npp,regs[[r]]),col.regions=grey(seq(0,1,len=100)),cuts=99,margin=F,maxpixels=1e5,colorkey=list(space="bottom",height=.5),zscaleLog=T,useRaster=T)
|
|
81 |
p3=c("WorldClim Mean Annual Precip (mm)"=p_map,"MOD09 Cloud Frequency (%)"=p_mac,"NPP"=p_npp,x.same=T,y.same=T,merge.legends=T,layout=c(3,1))
|
|
75 |
#p_npp=levelplot(crop(npp,regs[[r]]),col.regions=grey(seq(0,1,len=100)),cuts=99,margin=F,maxpixels=1e5,colorkey=list(space="bottom",height=.5),zscaleLog=T,useRaster=T) #"NPP"=p_npp,
|
|
76 |
p3=c("WorldClim Mean Annual Precip (mm)"=p_map,"MOD09 Cloud Frequency (%)"=p_mac,x.same=T,y.same=T,merge.legends=T,layout=c(2,1))
|
|
82 | 77 |
print(p3) |
83 |
|
|
78 |
} |
|
84 | 79 |
dev.off() |
85 | 80 |
|
86 | 81 |
|
Also available in: Unified diff
udpating validation to full globe