I put the file 200406010115.goesir in "/ put / incoming."
Make a run with the following script:
Code: Select all
def scm(directory):
import os;
fs = os.listdir(directory);
# now fs will be a list of all the files in directory
from edu.wisc.ssec.mcidas import AreaFile;
for name in fs:
print "Reading in:",name
af = AreaFile(directory+"/"+name);
ad = af.getAreaDirectory();
count = 0;
data = af.getFloatData();
# now look through the first band y count pixels
# MCS detected when his temperature infrared (TIR) is < 219 K
for i in xrange(ad.getLines()):
for j in xrange(ad.getElements()):
if (data[0][i][j]) == 200:
print "For file",name," count = ",count
scm("/home/mcidasv/Documentos/SSEC/20040601")
it is working well and i get the following:
Reading in: 200406010145.goes12ir
For file 200406010145.goes12ir count = 3126
Reading in: 200406010545.goes12ir
For file 200406010545.goes12ir count = 4455
Reading in: 200406012115.goes12ir
For file 200406012115.goes12ir count = 4690
Reading in: 200406010915.goes12ir
For file 200406010915.goes12ir count = 3373
Reading in: 200406010315.goes12ir
For file 200406010315.goes12ir count = 2390
Reading in: 200406011945.goes12ir
For file 200406011945.goes12ir count = 5902
Reading in: 200406010715.goes12ir
For file 200406010715.goes12ir count = 4644
Reading in: 200406011715.goes12ir
For file 200406011715.goes12ir count = 5613
Reading in: 200406012145.goes12ir
For file 200406012145.goes12ir count = 3976
Reading in: 200406010845.goes12ir
For file 200406010845.goes12ir count = 5269
Reading in: 200406011345.goes12ir
For file 200406011345.goes12ir count = 4895
Reading in: 200406010445.goes12ir
For file 200406010445.goes12ir count = 3910
Reading in: 200406011515.goes12ir
For file 200406011515.goes12ir count = 3563
Reading in: 200406010015.goes12ir
For file 200406010015.goes12ir count = 2684
Reading in: 200406011315.goes12ir
For file 200406011315.goes12ir count = 4915
Reading in: 200406011745.goes12ir
For file 200406011745.goes12ir count = 6666
Reading in: 200406010115.goes12ir
For file 200406010115.goes12ir count = 3095
The values ??shown in "count" correspond to the number of pixels whose value is 200? If this is so, I have a problem here because the script take into account all the pixels whose value is 200, how I can do to only count the pixels whose value of 200 is kept for three hours or more and that only counts for the region of Mexico (32 N, 14 N, -120 W,-80W)?
Display image for data 200406010115.goes12ir (attached)