Start L2A_Process on Ubuntu Server

I install sen2cor 2.3.0 on Ubuntu Server 14.04.5 using commands:

$ wget https://repo.continuum.io/archive/Anaconda2-4.2.0-Linux-x86_64.sh
$ bash Anaconda2-4.2.0-Linux-x86_64.sh
$ wget http://step.esa.int/thirdparties/sen2cor/2.3.0/sen2cor-2.3.0.tar.gz
$ tar -xvzf sen2cor-2.3.0.tar.gz && cd sen2cor-2.3.0 
$ python setup.py install

Installation was successful, ‘L2A_Process --help’ command return:

L2A_Process --help
usage: L2A_Process [-h] [--resolution {10,20,60}] [--sc_only] [--cr_only]
                   [--refresh] [--GIP_L2A GIP_L2A] [--GIP_L2A_SC GIP_L2A_SC]
                   [--GIP_L2A_AC GIP_L2A_AC]
                   directory
Sentinel-2 Level 2A Prototype Processor (Sen2Cor). Version: 2.3.0, created:
2016.11.18, supporting Level-1C product version: 14.
positional arguments:
  directory             Directory where the Level-1C input files are located
optional arguments:
  -h, --help            show this help message and exit
  --resolution {10,20,60}
                        Target resolution, can be 10, 20 or 60m. If omitted,
                        all resolutions will be processed
  --sc_only             Performs only the scene classification at 60 or 20m
                        resolution
  --cr_only             Performs only the creation of the L2A product tree, no
                        processing
  --refresh             Performs a refresh of the persistent configuration
                        before start
  --GIP_L2A GIP_L2A     Select the user GIPP
  --GIP_L2A_SC GIP_L2A_SC
                        Select the scene classification GIPP
  --GIP_L2A_AC GIP_L2A_AC
                        Select the atmospheric correction GIPP

Using https://github.com/olivierhagolle/Sentinel-download I download one data product via command

python Sentinel_download.py --lat 50.28 --lon 36.93 -a apihub.txt -s S2

For example S2A_OPER_PRD_MSIL1C_PDMC_20161205T152314_R021_V20161205T083332_20161205T083332.SAFE data.
When I run L2A_Process command:

L2A_Process S2A_OPER_PRD_MSIL1C_PDMC_20161205T152314_R021_V20161205T083332_20161205T083332.SAFE --resolution 10

I receive error message:

L2A_Process S2A_OPER_PRD_MSIL1C_PDMC_20161205T152314_R021_V20161205T083332_20161205T083332.SAFE --resolution 10
Traceback (most recent call last):
File “/home/opengeo/anaconda2/bin/L2A_Process”, line 11, in
load_entry_point(‘sen2cor==2.3.0’, ‘console_scripts’, ‘L2A_Process’)()
File “/home/opengeo/anaconda2/lib/python2.7/site-packages/sen2cor-2.3.0-py2.7.egg/sen2cor/L2A_Process.py”, line 169, in main
config.setSchemes()
File “/home/opengeo/anaconda2/lib/python2.7/site-packages/sen2cor-2.3.0-py2.7.egg/sen2cor/L2A_Config.py”, line 3072, in setSchemes
self.logger.fatal('wrong identifier for xml structure: ’ + product)
AttributeError: ‘NoneType’ object has no attribute ‘fatal’

What could be the problem?

The problem is solved. I had to setup Sen2Cor environmental:

export SEN2COR_HOME=/home/opengeo/sen2cor
export SEN2COR_BIN=/home/opengeo/anaconda2/lib/python2.7/site-packages/sen2cor-2.3.0-py2.7.egg/sen2cor
export GDAL_DATA=/home/opengeo/anaconda2/lib/python2.7/site-packages/sen2cor-2.3.0-py2.7.egg/sen2cor/cfg/gdal_data

1 Like