GIP_L2A_AC file?!

Hello,
I am having an issue whenever I try to run in cmd:
L2A_Process --resolution 10 --GIP_L2A_AC GIP_L2A_AC + directory. It returns:

Sentinel-2 Level 2A Prototype Processor (Sen2Cor), 2.3.0, created: 2016.11.18 started ...
file does not exist: C:\Users\FaTHER\Documents\sen2cor\cfg\GIP_L2A_AC

I checked the folder and there is the file L2A_GIPP.xml. Why does he call for GIP_L2A_AC file?
Anyone encountered this? Thanks.

1 Like

Try to add the full path to the xml file in your command call by adding --GIP_L2A C:\Users\FaTHER\Documents\sen2cor\cfg\GIP_L2A_AC\L2A_GIPP.xml

I don’t know if this works but it is indicated in the help:

C:\>L2A_Process --help
usage: L2A_Process-script.py [-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.2.1, created:
2016.04.29, supporting Level-1C product version: 13.1.

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
2 Likes

Thank you very much for your feedback.

When I run now:
L2A_Process --resolution 20 --GIP_L2A_AC C:\Users\FaTHER\Documents\sen2cor\cfg\GIP_L2A_AC\L2A_GIPP.xml C:\S2A_OPER_PRD_MSIL1C_PDMC_20160614T225122_R050_V20160610T090901_20160610T090901\S2A_OPER_PRD_MSIL1C_PDMC_20160614T225122_R050_V20160610T090901_20160610T090901.SAFE\GRANULE\S2A_OPER_MSI_L1C_TL_MTI__20160614T160614_A005052_T35TNL_N02.02

I get:
Traceback (most recent call last):
File “C:\Program Files\Anaconda2\Scripts\L2A_Process-script.py”, line 11, in
load_entry_point(‘sen2cor==2.3.0’, ‘console_scripts’, ‘L2A_Process’)()
File “C:\Program Files\Anaconda2\lib\site-packages\sen2cor-2.3.0-py2.7.egg\sen2cor\L2A_Process.py”, line 169, in main
config.setSchemes()
File “C:\Program Files\Anaconda2\lib\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’

Someone said to copy ‘cfg’ folder to the root of folder ‘sen2cor-2.3.0-py2.7.egg’ but doesnt seem to work either.

have you tried running it for the whole .SAFE folder?

1 Like

Tried now. It started… thank you very much.
But its a large file… will take half the day. I wanted only a specific granule… What could be the reason?

there should be a way to process single granules of the old format but I never tested it:

I’m not sure wether sen2cor already deals with the new format where single tiles can be downloaded individually:
https://sentinels.copernicus.eu/web/sentinel/news/-/article/forthcoming-sentinel-2-l1c-product-evolution-in-autumn-2016

1 Like

Much appreciation for your suggestions and feedback.
So I managed to start the AtmCorr for one granule with the command:
L2A_Process --resolution 20 --GIP_L2A C:\Users\FaTHER\Documents\sen2cor\cfg\L2A_GIPP.xml C:\S2A_OPER_PRD_MSIL1C_PDMC_20160614T225122_R050_V20160610T090901_20160610T090901\S2A_OPER_PRD_MSIL1C_PDMC_20160614T225122_R050_V20160610T090901_20160610T090901.SAFE\GRANULE\S2A_OPER_MSI_L1C_TL_MTI__20160614T160614_A005052_T35TNL_N02.02

but this happened only from the second try. At the first try it returned:
Sentinel-2 Level 2A Prototype Processor (Sen2Cor), 2.3.0, created: 2016.11.18 started ... Traceback (most recent call last): File "C:\Program Files\Anaconda2\Scripts\L2A_Process-script.py", line 11, in <module> load_entry_point('sen2cor==2.3.0', 'console_scripts', 'L2A_Process')() File "C:\Program Files\Anaconda2\lib\site-packages\sen2cor-2.3.0-py2.7.egg\sen2cor\L2A_Process.py", line 297, in main L2A_TILES = updateTiles(config) File "C:\Program Files\Anaconda2\lib\site-packages\sen2cor-2.3.0-py2.7.egg\sen2cor\L2A_Process.py", line 43, in updateTiles L1C_TILES = config.createOrUpdateL2A_UserProduct() File "C:\Program Files\Anaconda2\lib\site-packages\sen2cor-2.3.0-py2.7.egg\sen2cor\L2A_Config.py", line 3465, in createOrUpdateL2A_UserProduct os.rename(oldfile, newfile) WindowsError: [Error 3] The system cannot find the path specified
…but as I checked this resulted in the creation of the specified folder for the command to run. And I ran again the first command:
L2A_Process --resolution 20 --GIP_L2A C:\Users\FaTHER\Documents\sen2cor\cfg\L2A_GIPP.xml C:\S2A_OPER_PRD_MSIL1C_PDMC_20160614T225122_R050_V20160610T090901_20160610T090901\S2A_OPER_PRD_MSIL1C_PDMC_20160614T225122_R050_V20160610T090901_20160610T090901.SAFE\GRANULE\S2A_OPER_MSI_L1C_TL_MTI__20160614T160614_A005052_T35TNL_N02.02
and now correction is running.

Hope this will help someone else. Big thanks for the tip to add L2A_GIPP.xml’s directory path in command. I thought that ‘directory’ in help was referring to the product directory.

glad to hear it works - thanks for sharing.
You can as well mark your post as the solution so maybe it helps others finding answes faster in the future.

Hi,

It is necessary that If we want to set some determinate parameters, we have to specify the L2A_GIPP.xml path? If not the process use the default parameters?

Thank you

MIKEL