Revision ba7057c4
Added by Adam Wilson almost 11 years ago
climate/procedures/MOD09_CloudFigures.R | ||
---|---|---|
45 | 45 |
mod09c=brick("data/mod09_clim_mean.nc",varname="CF");names(mod09c)=month.name |
46 | 46 |
mod09a=brick("data/mod09_clim_mac.nc",varname="CF_annual")#;names(mod09c)=month.name |
47 | 47 |
|
48 |
## derivatives |
|
49 |
if(!file.exists("data/mod09_std.nc")) { |
|
50 |
system("cdo -chname,CF,CFmin -timmin data/mod09_clim_mean.nc data/mod09_min.nc") |
|
51 |
system("cdo -chname,CF,CFmax -timmax data/mod09_clim_mean.nc data/mod09_max.nc") |
|
52 |
system("cdo -chname,CF,CFsd -timstd data/mod09_clim_mean.nc data/mod09_std.nc") |
|
53 |
system("cdo -f nc2 merge data/mod09_std.nc data/mod09_min.nc data/mod09_max.nc data/mod09_metrics.nc") |
|
54 |
} |
|
55 |
|
|
56 | 48 |
mod09min=raster("data/mod09_metrics.nc",varname="CFmin") |
57 | 49 |
mod09max=raster("data/mod09_metrics.nc",varname="CFmax") |
58 | 50 |
mod09sd=raster("data/mod09_metrics.nc",varname="CFsd") |
59 | 51 |
mod09mean=raster("data/mod09_clim_mac.nc") |
60 | 52 |
|
61 |
|
|
62 | 53 |
names(mod09d)=c("Mean","Minimum","Maximum","Standard Deviation") |
63 | 54 |
|
64 |
plot(mod09a,layers=1,margin=F,maxpixels=100) |
|
55 |
#plot(mod09a,layers=1,margin=F,maxpixels=100)
|
|
65 | 56 |
|
66 | 57 |
## calculated differences |
67 | 58 |
cldm$dif=cldm$mod09-cldm$cld |
... | ... | |
82 | 73 |
cols=colr(n) |
83 | 74 |
|
84 | 75 |
|
85 |
pdf("output/validation.pdf",width=11,height=8.5)
|
|
76 |
pdf("output/Figures.pdf",width=11,height=8.5)
|
|
86 | 77 |
|
87 |
## 4-panel maps
|
|
78 |
## Figure 1: 4-panel summaries
|
|
88 | 79 |
#- Annual average |
89 | 80 |
levelplot(mod09a,col.regions=colr(100),cuts=100,at=seq(0,100,len=100),colorkey=list(space="bottom",adj=1), |
90 | 81 |
margin=F,maxpixels=1e6,ylab="Latitude",xlab="Longitude",useRaster=T)+ |
... | ... | |
92 | 83 |
#- Monthly minimum |
93 | 84 |
#- Monthly maximum |
94 | 85 |
#- STDEV or Min-Max |
86 |
p_mac=levelplot(mac,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) |
|
87 |
p_min=levelplot(mod09min,col.regions=grey(seq(0,1,len=100)),cuts=99,margin=F,maxpixels=1e5,colorkey=list(space="bottom",height=.75),useRaster=T) |
|
88 |
p_max=levelplot(mod09max,col.regions=grey(seq(0,1,len=100)),cuts=99,margin=F,maxpixels=1e5,colorkey=list(space="bottom",height=.75),useRaster=T) |
|
89 |
p_sd=levelplot(mod09sd,col.regions=grey(seq(0,1,len=100)),cuts=99,margin=F,maxpixels=1e5,colorkey=list(space="bottom",height=.75),useRaster=T) |
|
90 |
p3=c("Mean Cloud Frequency (%)"=p_mac,"Max Cloud Frequency (%)"=p_max,"Min Cloud Frequency (%)"=p_min,"Cloud Frequency Variability (SD)"=p_sd,x.same=T,y.same=T,merge.legends=T,layout=c(2,2)) |
|
91 |
print(p3) |
|
95 | 92 |
|
96 | 93 |
|
97 | 94 |
### maps of mod09 and NDP |
Also available in: Unified diff
Separated ee download from compile script. Switched to use of vrt as intermediate file form