Revision ba7057c4
Added by Adam Wilson almost 11 years ago
climate/procedures/ee.MOD09.py | ||
---|---|---|
68 | 68 |
|
69 | 69 |
#/////////////////////////////////// |
70 | 70 |
#// Function to extract cloud flags |
71 |
def getmod09(img): return(img.select(['state_1km']).expression("((b(0)/1024)%2)>0.5")); |
|
72 |
# added the >0.5 because some values are coming out >1. Need to look into this further as they should be bounded 0-1... |
|
71 |
def getmod09(img): return(img.select(['state_1km']).expression("((b(0)/1024)%2)").gte(1)); |
|
73 | 72 |
|
74 | 73 |
#//////////////////////////////////////////////////// |
75 | 74 |
##################################################### |
... | ... | |
101 | 100 |
}); |
102 | 101 |
|
103 | 102 |
# print info to confirm there is data |
104 |
#print(data.getInfo())
|
|
103 |
print(data.getInfo()) |
|
105 | 104 |
print(' Processing.... '+output+' Coords:'+strregion) |
105 |
print(path) |
|
106 | 106 |
|
107 | 107 |
#test=wget.download(path) |
108 | 108 |
test=subprocess.call(['-c','-q','--timeout=0','--ignore-length','--no-http-keep-alive','-O','mod09.zip',path],executable='wget') |
109 |
print('download sucess for'+output+': '+str(test)) |
|
109 |
print('download sucess for tile '+output+': '+str(test))
|
|
110 | 110 |
|
111 | 111 |
## Sometimes EE will serve a corrupt zipped file with no error |
112 | 112 |
# try to unzip it |
Also available in: Unified diff
Separated ee download from compile script. Switched to use of vrt as intermediate file form