|
| 1 | +# Sen2Cor 3 version 3.01.00 |
| 2 | + |
| 3 | +## Retrieve Sen2cor 3.01.00 documentation from sftp server |
| 4 | + |
| 5 | +``` |
| 6 | +hostname = 'sftp.telespazio.fr' |
| 7 | +port = 22 # default SFTP port is 22 |
| 8 | +username = 'sen2cor3' |
| 9 | +password = '4sen2like' |
| 10 | +remote_path = '/upload/Sen2Cor-3.01.00/Documentation/' |
| 11 | +``` |
| 12 | + |
| 13 | +**_Sen2cor 3.01.00 Software Release Note:_** |
| 14 | +sftp://sen2cor3@sftp.telespazio.fr/upload/Sen2Cor-3.01.00/Documentation/S2-SEN2LIKE-Sen2Cor_3.01.00-SRN_V1.1.pdf |
| 15 | + |
| 16 | +**_Sen2cor 3.01.00 Software Configuration and User Manual:_** |
| 17 | +sftp://sen2cor3@sftp.telespazio.fr/upload/Sen2Cor-3.01.00/Documentation/S2-SEN2LIKE-Sen2Cor_3.01.00-SUM_V1.1.pdf |
| 18 | + |
| 19 | +## Retrieve Sen2cor 3.01.00 software from sftp server |
| 20 | + |
| 21 | +Either with a software like Filezilla: |
| 22 | + |
| 23 | +``` |
| 24 | +hostname = 'sftp.telespazio.fr' |
| 25 | +port = 22 # default SFTP port is 22 |
| 26 | +username = 'sen2cor3' |
| 27 | +password = '4sen2like' |
| 28 | +remote_path = '/upload/Sen2Cor-3.01.00/Software/sen2cor_3.1.0_python_3.10_20240313.zip' |
| 29 | +``` |
| 30 | + |
| 31 | +e.g: sftp://sen2cor3@sftp.telespazio.fr/upload/Sen2Cor-3.01.00/Software/sen2cor_3.1.0_python_3.10_20240313.zip |
| 32 | + |
| 33 | +or with the example script "sen2cor3_download.py" based on "paramiko" module. |
| 34 | +It requires paramiko version 3.4.0 that could be installed with conda [see below](#create-the-sen2like-conda-environment): |
| 35 | + |
| 36 | +``` |
| 37 | +conda activate sen2like |
| 38 | +conda install paramiko=3.4.0 -c conda-forge |
| 39 | +``` |
| 40 | + |
| 41 | +``` |
| 42 | +python sen2cor3_download.py sen2cor3_install_dir |
| 43 | +``` |
| 44 | + |
| 45 | +## Unzip sen2cor_3.1.0_python_3.10.zip into the Sen2Cor 3 directory of your choice |
| 46 | + |
| 47 | +``` |
| 48 | +e.g. sen2cor3_install_dir=/opt/sen2cor3/code/ |
| 49 | +cd $sen2cor3_install_dir |
| 50 | +unzip sen2cor_3.1.0_python_3.10.zip |
| 51 | +``` |
| 52 | + |
| 53 | +## Auxiliary Data Symbolic linking |
| 54 | + |
| 55 | +Sen2Cor3 relies on a set of external auxiliary data that needs to be available in Sen2Cor3 "aux_data" folder: |
| 56 | +- ECMWF CAMS data: daily, monthly |
| 57 | +- ESA CCI files |
| 58 | +- Copernicus DEM files |
| 59 | + |
| 60 | +Further details are available in Sen2Cor3 Software User Manual. |
| 61 | + |
| 62 | +Examples of symbolic linking is given hereafter: |
| 63 | +- symbolic linking of your local CAMS folder that contains daily CAMS data e.g. /data/CAMS/daily |
| 64 | +- symbolic linking of your local ESA CCI files e.g. /data/AUX_DATA/ |
| 65 | + |
| 66 | + |
| 67 | +``` |
| 68 | +cd $sen2cor3_install_dir/sen2cor_3.1.0_python_3.10/SEN2COR_3/aux_data |
| 69 | +ln -s /data/CAMS/daily ./ECMWF/daily |
| 70 | +ln -s /data/AUX_DATA/ESACCI-LC-L4-Snow-Cond-500m-MONTHLY-2000-2012-v2.4 ./ESACCI-LC-L4-Snow-Cond-500m-MONTHLY-2000-2012-v2.4 |
| 71 | +ln -s /data/AUX_DATA/ESACCI-LC-L4-WB-Map-150m-P13Y-2000-v4.0.tif ./ESACCI-LC-L4-WB-Map-150m-P13Y-2000-v4.0.tif |
| 72 | +ln -s /data/AUX_DATA/ESACCI-LC-L4-LCCS-Map-300m-P1Y-2015-v2.0.7.tif ./ESACCI-LC-L4-LCCS-Map-300m-P1Y-2015-v2.0.7.tif |
| 73 | +``` |
| 74 | + |
| 75 | +## Install miniconda if conda is not already installed on your system |
| 76 | + |
| 77 | +https://repo.anaconda.com/miniconda/Miniconda3-py37_22.11.1-1-Linux-x86_64.sh |
| 78 | + |
| 79 | +## Create the sen2like conda environment |
| 80 | + |
| 81 | +Once you retrieved the code, go into Sen2Cor3 root source folder and run the following command to create a conda env named sen2like: |
| 82 | + |
| 83 | +``` |
| 84 | +cd $sen2cor3_install_dir/sen2cor_3.1.0_python_3.10 |
| 85 | +conda create -n sen2like --file requirements.txt -c conda-forge |
| 86 | +``` |
| 87 | + |
| 88 | +## Activate sen2like conda environment |
| 89 | + |
| 90 | +Sen2Cor 3.1 uses the same conda environment as Sen2like: |
| 91 | + |
| 92 | +``` |
| 93 | +conda activate sen2like |
| 94 | +``` |
| 95 | + |
| 96 | +### Test the Command line execution |
| 97 | + |
| 98 | +``` |
| 99 | +python $sen2cor3_install_dir/sen2cor_3.1.0_python_3.10/SEN2COR_3/L2A_Process.py --help |
| 100 | +
|
| 101 | +output: |
| 102 | +usage: L2A_Process.py [-h] [--mode MODE] [--resolution {10,20,30,60}] [--datastrip DATASTRIP] [--tile TILE] [--output_dir OUTPUT_DIR] [--work_dir WORK_DIR] |
| 103 | + [--img_database_dir IMG_DATABASE_DIR] [--res_database_dir RES_DATABASE_DIR] [--processing_centre PROCESSING_CENTRE] [--archiving_centre ARCHIVING_CENTRE] |
| 104 | + [--processing_baseline PROCESSING_BASELINE] [--raw] [--tif] [--sc_only] [--sc_classic] [--sc_cog] [--cr_only] [--debug] [--GIP_L2A GIP_L2A] |
| 105 | + [--GIP_L2A_SC GIP_L2A_SC] [--GIP_L2A_AC GIP_L2A_AC] [--GIP_L2A_PB GIP_L2A_PB] [--Hyper_MS] |
| 106 | + input_dir |
| 107 | +
|
| 108 | +Sen2Cor. Version: 03.01.00, created: 2024.02.29, supporting Level-1C product version 14.2 - 14.9, supporting Level-1TP Collection_1-2 Landsat_8-9, supporting Hyper Level-1C - . |
| 109 | +
|
| 110 | +positional arguments: |
| 111 | + input_dir Directory of Level-1C input |
| 112 | +
|
| 113 | +options: |
| 114 | + -h, --help show this help message and exit |
| 115 | + --mode MODE Mode: generate_datastrip, process_tile |
| 116 | + --resolution {10,20,30,60} |
| 117 | + Target resolution, can be 10, 20 or 60m for S2, 30m for Hyper. If omitted, only 20 and 10m resolutions will be processed |
| 118 | + --datastrip DATASTRIP |
| 119 | + Datastrip folder |
| 120 | + --tile TILE Tile folder |
| 121 | + --output_dir OUTPUT_DIR |
| 122 | + Output directory |
| 123 | + --work_dir WORK_DIR Work directory |
| 124 | + --img_database_dir IMG_DATABASE_DIR |
| 125 | + Database directory for L1C(H) input images |
| 126 | + --res_database_dir RES_DATABASE_DIR |
| 127 | + Database directory for results and temporary products |
| 128 | + --processing_centre PROCESSING_CENTRE |
| 129 | + Processing centre as regex: ^[A-Z_]{4}$, e.g "SGS_" |
| 130 | + --archiving_centre ARCHIVING_CENTRE |
| 131 | + Archiving centre as regex: ^[A-Z_]{4}$, e.g. "SGS_" |
| 132 | + --processing_baseline PROCESSING_BASELINE |
| 133 | + Processing baseline in the format: "dd.dd", where d=[0:9] |
| 134 | + --raw Export raw images in rawl format with ENVI hdr |
| 135 | + --tif Export raw images in TIFF format instead of JPEG-2000 |
| 136 | + --sc_only Performs only the scene classification at 60 or 20m resolution, 30m for Hyper |
| 137 | + --sc_classic Performs scene classification in Sen2Cor 2.9 mode |
| 138 | + --sc_cog Export SCL image in COG format instead of JPEG_2000 |
| 139 | + --cr_only Performs only the creation of the L2A product tree, no processing |
| 140 | + --debug Performs in debug mode |
| 141 | + --GIP_L2A GIP_L2A Select the user GIPP |
| 142 | + --GIP_L2A_SC GIP_L2A_SC |
| 143 | + Select the scene classification GIPP |
| 144 | + --GIP_L2A_AC GIP_L2A_AC |
| 145 | + Select the atmospheric correction GIPP |
| 146 | + --GIP_L2A_PB GIP_L2A_PB |
| 147 | + Select the processing baseline GIPP |
| 148 | + --Hyper_MS To Process a Hyper_MS product |
| 149 | +
|
| 150 | +
|
| 151 | +``` |
| 152 | + |
| 153 | + |
| 154 | + |
0 commit comments