Sen2Cor Configuration

Sen2Cor Configuration#

This section focuses on Sen2Cor 2.12 configuration.

1. To configure sen2cor, you must first download the context data used for certain Sentinel-2 pre-processing steps here ESACCI-LC package for SC module Downloading may take some time.

  1. Move and extract the unzip downloaded files to this sen2cor directory : /Sen2Cor-02.12.03-Linux64/lib/python2.7/site-packages/sen2cor/aux_data

  2. Create DEM directory : ./sen2cor/2.12/dem

  3. Update Sen2Cor configuration file nano ~/sen2cor/2.12/cfg/L2A_GIPP.xml

Your L2A_GIPP.xml file should look like this :

<DEM_Directory>dem/srtm</DEM_Directory>
<DEM_Reference>http://srtm.csi.cgiar.org/wp-content/uploads/files/srtm_5x5/TIFF/</DEM_Reference>
<DEM_Terrain_Correction>FALSE</DEM_Terrain_Correction>  # If you don't want DEM terrain correction
  1. Update the sen2chain configuration file so sen2chain can now use your new sen2cor configuration : nano ~/sen2chain_data/config/config.cfg

~$ sen2cor_bashrc_paths = /path/to/Sen2Cor-02.12.03-Linux64/L2A_Bashrc
  1. Then, in python, update Sen2Chain by using any method :

>>> from sen2chain import Tile
>>> Tile('40KCB').info