Applying Sen2cor on a S2 subset?

Hi,

I’am using sen2cor standalone on a linux machine.
Unfortunately, it take quite a while to process a 7.1 GB scene.

I wonder, if I could subset my images to the actual extend of my study site and afterwards I start the sen2cor process.

So, first:
Can I correct subsetted data with sen2cor standalone?

second:
Is anyone knowing an elegant way to subset the S2 images in its raw data format?
I would prefer to do that with python or better in the command line in the linux terminal.
I don’t want to do it manually in Snap.

Would be great if someone could help me!

1 Like

You can perform virtually all SNAP-processing including sen2cor from the command-line by calling gpt (graph procession tool).

You should consult the tutorials to get started:

http://step.esa.int/main/doc/tutorials/

Thanks, I will take a look in the tutorials.

But my main question is not answered.

Is it possible to apply Sen2Cor on a image subset, or is it necessary to correct the entier image first?

Hi, you can not apply sen2co to a subset of a S2 data product. This because sen2cor can only work with S2 data organized in the .SAFE format , while a S2 subset can be saved for example in a .DIM format but it is not possible yet to save a subset with the original S2 format. What you can do is only to process the full S2 product with sen2cor and only after that you can define your subset with atmospheric correction.

I hope I didn’t sat anything wrong @marpet @obarrilero

No, it’s right. But before subsetting, you need to resample to a single resolution.

Yes, I forgot to add this :slight_smile:

Thanks for the answers, even it is not much satisfying.
It takes much more time to correct the entire scene.
So, my steps have to be the following:

  1. Download Data set
  2. Sen2cor: L2A-Process --resolution=10 …
  3. Subset and Export as Tiff
  4. Delete Original Dataset

Yes it is quite time consuming…but it is the only way at the moment. These shoul be the steps :

  1. download the dataset
  2. sen2cor processing
  3. resampling the level2 dataset to 10m
  4. subsetting and export

By the way , if you are working on dataset of europe you can surely download the Level2 product directly instead of the L1C product, it depends on the date of the acquisition. When had the data been acquired ?

Actually I want to download the entire time series which is available for my test sites in North-Eastern of Germany (so, europe).
-> Downloading, pre-processing, checking cloud coverage, applying fancy methods :wink:

As far as I know or checked, the Level2 data are only available for a few randomly chosen images?!

Dear Florian,

Sentinel-2 L2A (BOA) are systematically generated over Europe since April 2017 and available on SciHub, therefore if you need S2 data acquired before that date over Europe you need to run Sen2Cor.

Best Regards,
Fabrizio

Thanks for all the answers.
Now the work begins…
:slight_smile:

I thank you too @Fabrizio_Ramoino, I had not time to search for all these details, and actually they were absolutely necessary for a complete answer.

@Fabrizio_Ramoino
Ok, I still have questions… Sorry!

My search of S2A and S2B data on scihub.copernicus.eu showed the following results:

  • Period: 2015 - Today
  • Study Site:a part of North-Eastern Germany

S2A_L1C | 1047 images | first image 2016-08-09
S2A_L2A | 470 images | first image 2017-04-10

S2B_L1C | 366 images | first image 2017-07-01
S2b_L2A | 73 images | first image 2017-12-18

My Questions:

  1. So, since April 2017 we have 470 available images in L2A for S2A. Does it means, that we have 1047-470 = 577 images available before April 2017 (in L1C)?
  2. Why there are no corrected images (S2B_L2A) between July and December 2017? Is the preprocessing worklow considering something like cloud coverage and it eliminates images with 100 % coverage? Or is there also another explanation?
    Would be aweful, if we don’t have no images at all between July and December 2017.

Dear Florian,

Q1. So, since April 2017 we have 470 available images in L2A for S2A. Does it means, that we have 1047-470 = 577 images available before April 2017 (in L1C)?
A1. Yes, you are right, but pay attention because some S2 data could be replicated due to the re-processing when a new baseline was released, if you have more than one S2 tile acquired on the same day I would suggest to use the ones with the most recent processing date.

Q2. Why there are no corrected images (S2B_L2A) between July and December 2017? Is the preprocessing worklow considering something like cloud coverage and it eliminates images with 100 % coverage? Or is there also another explanation?
A2. You do not find S2B_L2A between July and December 2017 because the systematic processing of S2B_L1C to BOA started in December 2017 after the commissioning phase.

If you need more information on Sentinel-2 data you can have a look on https://sentinel.esa.int/web/sentinel/home or contact EOSupport@Copernicus.esa.int.

I hope that my answer was clear, but do not hesitate to contact us for any further clarification.

Best Regards,
Fabrizio

Thanks @Fabrizio_Ramoino
I thought the comissioning phase of S2B was over in June 2017

Sorry, but I need to understand the selection of available L2A data.
I downloaded all available data from January 2018 for my study site, both L1C and L2A.

I got much more data in L1C and not only more images but also from different dates.

In the image I selcted dates in red, where there are a lot of data in L1C but no data in L2A.
Cloud coverage can’t be the resaon, because in January we don’t have one single image at all without cloud coverage.

So, why the red selected images are not available in L2A?

Still no answer… That’s a pity!

@florianbeyer

Hi Florian,

What is your AOI? As identified here Level-2A products are systematically generated at the ground segment over Europe, but the production will be extended to global by the end of 2018.

Cheers

Jan

S2 MPC/CC Operations Manager

1 Like

Hi Jan,
my study site is in North-East of Germany.

Hi Florian,
Using this as your AOI:
image
And going back to the 1st of April, I make the difference 32 Tiles:
L1C = 1927
L2A = 1895

Interstingly, for April 1st 2018 to May 1st 2018, my search identifies there are 410 L1C Tiles, and 412 L2A Tiles.
Cheers

Jan