SEN2COR tool

There are two problems:

  • the long path, which causes an error of the Sen2Cor at start, no product is generated
  • the SNAP Warning "The operator completed with the following errors:… " / Process output, which are misleading messages, as the processor finished and is generated an L2A product that can be loaded in SNAP in that case.

So it seemed it did the atmospheric correction at the end. Thanks for all help!

Only it did not store the ouptut at the allocated ouptut folder but within the renamed input folder (in my case “S2_1C_Barrax”). It created the folder “S2A_USERarrax.SAFE” and within that folder the full name: ‘S2A_USER_MTD_SAFL2A_PDMC_20150818T202138_R094_V20150818T111059_20150818T111059’.

Time for fun now!

grtz. J.

Dear Jochem,

the Sen2Cor User manual exists on:
http://s2tbx.telespazio-vega.de/sen2cor/sen2cor-sum-2.0.pdf

However it currently has no detailed description on the sen2Cor Integration into the Toolbox.

Within this manual, there is also a chapter dealing with the long path name.
Please note (!) This is a Windows problem, not a Sen2Cor related issue. All Applications will have this problem.

In you special case there is another issue: sen2Cor normally expects a correct product name to process successfully, as it uses this for creating the L2A metadata. In your case the product name is S2A_1C_Barrax.safe. It must contain at least: “S2A_OPER_LIC” to work correctly. This will fail also on my side:

[cid:image001.png@01D0F6DE.73636210]

This will in contrast work:

C:\Users\umuellerwilm\Data_S2\S2A_1C_Barrax\S2A_OPER_L1C_Barrax.Safe

Finally, do not forget to change the DN_Scale to 2000 instead of 4000, otherwise the overview picture located in the QI_DATA folder will not look very nice …

Cheers,
Uwe

Thanks Uwe - :L2A processing works but when the progress meter reaches 100% it just stays there and only gives an option to ‘Cancel’. I waited 5 minutes and then cancelled. The files are complete so perhaps this is a minor issue to be addressed (or maybe it is just how my machine handles python calls to the graphics drivers … )

Looking at L2A data now (Jochem - it is good to know I am not alone!)

Richard

Dear Uwe

Thanks for the clarification. I will read the manual and it is good that you pointed to the naming issue. Also thanks for all the efforts you guys did in developing the processor and I am sure the atmospheric correction algorithm does a great job.

However, in my opinion the so-called ‘Windows problem’ should be resolved properly. You can imagine that the majority of users install SNAP in a Windows environment. In my earlier experience with BEAM in Windows, the atmospheric correction plugins worked seamless for the older MERIS or CHRIS images (no additional software installment or renaming required). I was expecting the same experience for S2 in SNAP but it appeared to be way more complicated. Both in Windows 7 and 10, processing the images caused error messages.

Although manually shortening the image name may somehow resolve the issue, however, the user cannot shorten to just any name but, as you mentioned above, needs “S2A_OPER_LIC”. The user should be made aware of that (without reading this forum first).

I will now try the work-around as proposed in the Manual (point to a Network drive), but I believe a lot of trouble can be avoided if informative error messages would be provided with suggestions for solutions. Even better would be if the software first checks the name, and if too long, e.g. uses internally a temporal shortened name for further processing.

Thanks again for all efforts. I will now finally start using the images.

greetings, Jochem

Hi, for all :smile:Processing to L2A “succeeds” but with issues (1 per post as I can only put one image at a time)

  1. progress meter gets stuck
  1. Band 8 and 10 are missing. I understand band 10 may not be that useful for L2A but band 8 is fundamental…

The product I used was S2A_OPER_MTD_SAFL1C_PDMC_20150813T211530_R027_V20150813T184011_20150813T184011

I only got the four 10m bands out, irrespective of the resolution I choose as a parameter (10, 20, 60m).

However, when I search around in the L2A folder, I can find jp2 files that should be granules of the other bands. Only, they are not geocoded. SNAP does not appear to recognize them.

Same for me, if I select 10m it is calculating all the resolutions and all the .jp2 files are there, but SNAP only shows the 10m bands.

One more remark about the ‘large file name problem in Windows’. I followed the instructions as proposed in the Manual, p 32, by trying to map a folder to a network drive.

I guess both my work pc (W7) and my laptop (W10) must be a special case, because in both cases that “workaround” did not work…

In the beta-7 version of the L2A reader the resolution is not asked and only bands of highest resolution are displayed, meaning if the product was processed at 20m only 20m bands are displayed. On the next update there will be choice of resolution. Until then processed images can be opened by opening the jp2 files.

Dear Uwe,

Sorry for bothering you one more time.

I followed the naming instructions as you suggested and effectively it was able to write away the image correctly. Also I changed DN_Scale to 2000. Thanks for the suggestions.

The BOA reflectance map seems to make sense, as you can see in the screenshot below. Only, I am not sure how to interpret the values. As you know, reflectance is expressed as a factor, typically scaled between 0 and 1. In that scale it is also shown in your Manual, see Figure 2-10. However, the obtained L2 maps provides values a factor 1000 bigger, and somethimes ranging far above 1000 in case of clouds. So this makes me wondering, to which factor I have to divide the image in order that the reflectance values make physically sense? This is important in order to be able correctly interpret the image and apply further processing.

Thanks!
Jochem

Hi Jochem,

The L1C bands are encoded with 12 bit unsigned integer , so in theory the bands can have values between 0 and a maximum of 4059
In the L1C Metadata xml on User Level you will find the following entry:

  <QUANTIFICATION_VALUE unit="none">1000</QUANTIFICATION_VALUE>

This means, that for the current used satellite images the digital numbers of the bands between 0 and 1000 represent reflectance values between 0 and 1 as you expect. Values > 1000 are also present and you will find them primary as you remarked for clouds and high reflecting structures like roof and greenhouses. For the L2A correction these saturated values will not taken into account.

For the moment, the L2A output you will receive will have still 2x the output value of the L1C data. This has historical reasons. At current I am preparing a fixed version which then will have the same scaling for the L2A output, i.e. 0 : 1000 then represents also a reflectance value of 0 : 1 for the L2A data. For the moment you need to divide the L2A output data by 2000. The fix will be available soon.

Cheers,
Uwe

Hi Uwe,

Thanks for the clarification. It seems we are getting there in processing the images into sth interesting, e.g. vegetation products. :smile:

Although probably beyond the responsability of the developers, I am only a bit worried that dividing by 2000 will lead to extreme low vegetation spectra. In reality vegetation reflectance in the NIR (B8A; 865 nm) is typically around 0.3-0.6. If I would divide the image by 2000, refletance will at most reach up to 0.25. That is considerably lower than what is typically observed by spectrometers or models. Dividing by 1000 seems to lead to more realistic values when it comes to vegetation. Anyway, I will divide by 2000 and see what comes out when processing against a canopy radiative transfer model.

Thanks again,
Jochem

ps: It would be great if SNAP automatically recognizes RGB bands for L2A in the same way as L1C. At L2A SNAP does not know which RGB bands to choose.

Dear Uwe,
Any reason why bands are sometime missing from L2A when I request 60m option? Specifically Band 8 …

I will follow your suggestion to use 2000 to decale data although it seems the BOA reflectance values over forests are perhaps too low.

Thanks
R

Hi, the 10 m resolution Band 8 is not used in the 60 m calculation. Instead, B8A is used. Same is true for 20 m resolution. In the 10 m resolution (which of course takes time) then all four 10m bands 2,3,4,8 are generated. The 10 m cirrus band is in generally not included, as it is only an input band used for processing, but there are no L2A related outputs on this band. The exact processing parameters of all the band for the three different resolutions are specified via the ATBD document.

I tried the Sen2cor Plugin now in the SNAP toolbox for Linux (Ubuntu 14.04), and it tells my to change the working directory. But if try to do that, the options dialog looks like this:

Any idea what could be wrong?

It is the first time we see that and we’ll need your help to understand what’s wrong.

  • If you hide Sen2Cor window and show it again does anything change? (it could be a refresh problem)
  • If you repeat the operation do you have the exact same result?
  • Could you go to “Tools/Manage External Tools” menu and press the “New” button on the bottom? Do you have the same result?
  • Could you send us the log file in ~/.snap/var/log/messages.log?

Hi Nicolas,

-Hiding/showing the window does not seem to change anything
-Same result everytime i try it
-Tools/Manage External Tools works, but the “New” button leads to the same results.

I found out that if I click the location where the input fields are, they start appearing, but there are no captions, buttons etc. so I can’t save any settings or something. Additionally, my PC seems to become really really slow.

Log file:
messages.log (403.9 KB)

BR
Michael

Dear Uwe, developers,

Any idea when an updated version of SEN2COR with fixes will be released? Please keep us informed so we can start processing reliable L2A images.

Thanks! Jochem