1

I use python scripting to automate processing of several Landsat 8 scenes.

I use a VPS (4 core, 8GB memory, SSD) running Ubuntu 14.04 with GRASS 7.0.1

Line in script for i.landsat.toar:

grass.run_command('i.landsat.toar', input='b', output='rb', metfile='/home/ben/map/working/%s_MTL.txt' % scene, sensor='oli', method='dos4', pixel='1000')

Usually this works flawlessly but on occasion (1 in 100) when calculating dark pixel the script will just hang endlessly in some sort of loop.

I added a timer function so that if it hangs for more than 15 min it will raise error and move onto the next scene. That works for now but even when I restart the server and download the Landsat scenes again I still get the same error. I also run GRASS 7 on a Windows 2008 server but do not have the same problem with exact same scene.

Curiously even when it works it still leaves the command open. When opening htop I often have 3 or 4 i.landsat.toar commands still running taking 100% CPU of each core.

Is this a known problem? I had a quick search of known bugs and couldnt find anything.

Update: still no solution to problem. The same scenes keep causing this problem.

2
  • Please check the output of g.region -p, does this match the image extent and region?
    – markusN
    Nov 28, 2015 at 23:58
  • I set the region using the band 8 tif so should match.
    – Ben
    Nov 29, 2015 at 20:16

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.