Error using sen2cor v 2.3.0 with DEM

I have tested the new release of sen2cor (v 2.3.0) on Unix.

The problem reported in this post Using DEM for L2A_Process - Error seems to be fixed by using subprocess.Popen.wait().

I still have problems using DEM, the reported error is:

Traceback (most recent call last):
File “/opt/anaconda2/lib/python2.7/multiprocessing/process.py”, line 258, in _bootstrap
self.run()
File “/opt/anaconda2/lib/python2.7/site-packages/sen2cor-2.3.0-py2.7.egg/sen2cor/L2A_ProcessTile.py”, line 121, in run
if self.process_60() == False:
File “/opt/anaconda2/lib/python2.7/site-packages/sen2cor-2.3.0-py2.7.egg/sen2cor/L2A_ProcessTile.py”, line 147, in process_60
return self.process()
File “/opt/anaconda2/lib/python2.7/site-packages/sen2cor-2.3.0-py2.7.egg/sen2cor/L2A_ProcessTile.py”, line 196, in process
if(self.preprocess() == False):
File “/opt/anaconda2/lib/python2.7/site-packages/sen2cor-2.3.0-py2.7.egg/sen2cor/L2A_ProcessTile.py”, line 289, in preprocess
if(self.tables.importBandList() == False):
File “/opt/anaconda2/lib/python2.7/site-packages/sen2cor-2.3.0-py2.7.egg/sen2cor/L2A_Tables.py”, line 1091, in importBandList
if(self.gdalDEM_Shade(demfile) == False):
File “/opt/anaconda2/lib/python2.7/site-packages/sen2cor-2.3.0-py2.7.egg/sen2cor/L2A_Tables.py”, line 1582, in gdalDEM_Shade
self.importBand(self.SDW, sdwfile)
File “/opt/anaconda2/lib/python2.7/site-packages/sen2cor-2.3.0-py2.7.egg/sen2cor/L2A_Tables.py”, line 1633, in importBand
indataArr = gdal.Open(filename, GA_ReadOnly)
RuntimeError: No such file or directory

The problem occurs using both one or multiple cores.
If the DEM option is set to “NONE” the process is going through without errors (using both one or multiple cores).

Any solutions?

Federico

I had the same problem with sen2cor v2.4.0.

The solution I found was to set the ‘DEM_folder’ in the sen2cor ‘L2A_GIP’ configuration file to the ‘/home’ folder. Maybe some Linux OS privileges may limit the use of other folders while importing the DEM files.

Federico

Update for users who have this problem on sen2cor version 2.5.5.

The configuration file ‘L2A_GIPP.xml’ now specify that the ‘DEM_Directory’ should be located in the sen2cor home folder:

 <DEM_Directory>/home/username/sen2cor/2.5/dem</DEM_Directory>
<!-- should be either a directory in the sen2cor home folder or 'NONE'. If NONE, no DEM will be used -->

Location of the sen2cor home folder is set in file ‘L2A_Bashrc’ with variable ‘SEN2COR_HOME’.
In example:
SEN2COR_HOME=/home/username/sen2cor/2.5

Federico