iCOR module using gpt operator (iCOR-S2)

Hello

I have installed the iCOR module for sentinel 2 and Landsat 8 atmospheric correction.
On my linux system. After some modifications on the module system variables (assigned icor_py as \src\icor.py, like linux system and I changed it to /src/icor.py), it works interactively.

However I have tried to batch processing using the corresponding gpt operator (iCOR-S2) and I have not succeed:

\n\nError: Missing source ‘MTD_MSIL1C.xml’ in node ‘iCOR_S2’\n"

I have tried change to the SAFE directory that contains the file 'MTD_MSIL1C.xml, put the SAFE directory or put the entire path to de ${sourceProduct} parameter.

Has anybody experience using iCOR module in batch processing using the gpt iCOR-S2 operator?

please find enclosed the xml file

Regards
Josep

icor_s2b.xml (1.2 KB)

2 Likes

I’m trying to do it in Windows.

nothing to do, I can’t run iCOR in batch mode too.
Here is my attempt.

prova.xml (2.4 KB)

Hello

I asked iCOR development team, and they were aware about that, as SNAP forum moderator had forwarded the post to them. He told me that iCOR was not developed taking into account the gpt operator, so it could not work in the current release. They will work on that. However he suggested me run the batch job outside SNAP, looking the SNAP log files to get examples. He sent me an example for linux:

"Example command line
/usr/bin/python /opt/vito/icor/src/icor.py --keep_intermediate false --cloud_average_threshold 0.2 --cloud_low_band B01 --cloud_low_threshold 0.15 --cirrus true --aot true --aot_window_size 500 --simec false --watervapor false --wv_override 2.0 --bg_window 1 --cirrus_threshold 0.005 --aot_override 0.1 --ozone_override 0.33 --water_band B05 --water_threshold 0.05 --data_type L8 --output_file /tmp/LC81070352016013LGN00_processed.tif /media/landsat8/L8scene/LC81070352016013LGN00_MTL.txt’

Logfile location
[homedir]/.snap/system/var/log/messages.log"

It is working now for me on linux !!!
Josep

1 Like

Hi Josep,
in your post you write about some modifications on the module system variables, I have the same problem (\src\icor.py instead of /src/icor.py) in ma Linux installation. Could you explain me how you solved the problem?

Thanks in advanced!
Regards
Roberta

1 Like

@jcoca I am also interested, because I have the same problem with slash and backslash and linux system, but I do not know how to modify system variables

Hello

To change the slash to backslash Choose SNAP Menu /Tools/Manage external tools/
select iCOR-{S2,L8} click on Edit. Then click on system variables and change de backslash. I did that to do some test interactively, however our main use is from command line calling icor.py directly.

Regards
Josep

Hello jcoca,

I have installed ICOR S2 in my windows pc and i tried to run it…i got the following error…

parsing arguments
done
Traceback (most recent call last):
File “c:\Program Files\VITO\iCOR\src\icor.py”, line 108, in
raise Exception(“environment variable ICOR_DIR not set”)
Exception: environment variable ICOR_DIR not set
Process exited with value 1
Finished tool execution in 0 seconds

and my system variables are

environment variables:

Please help me out to solve this issue…

Thanks in advance…

Hello Mounika,

just a simple question : did you restart snap after installing iCOR and the s2 STA ? new environment variables are only picked up after restarting the SNAP environment.
You can also test if the problem resides in SNAP or in the iCOR installation by copiying the command into a windows Command Prompt.
c:\Users[USERNAME]\AppData\Roaming\SNAP\var\log\messages.log
after you tried to run it.
it should look like :
c:\Program Files\VITO\iCOR\bin\Python27\python.exe c:\Program Files\VITO\iCOR\src\icor.py --keep_intermediate false --cloud_average_threshold 0.19 --cloud_low_band B01 --cloud_low_threshold 0.25 --cirrus true --aot true --aot_window_size 100 --simec false --watervapor false --bg_window 1 --cirrus_threshold 0.01 --aot_override 0.1 --ozone_override 0.33 --wv_override 2.0 --water_band B08 --water_threshold 0.05 --data_type S2 --output_file [output_location][PRODUCT_XML_LOCATION]

Please let me know
greetings,
Stefan Adriaensen

1 Like

Yes…it is working after restarting snap…Thanks for your response…