SNAP using S2Agri atmospheric corrections

Thanks a lot for this precious help, Omar.
Olivier

Hi everyone,

As Jonathan, I would like to compute FAPAR in SNAP based on L2A products coming from Sen2Agri. Is there any step forward in SNAP to work with S2A images without having to adapt the L2A from S2A (update metadata XML file…)?
Is the last message from obarrilero still the best workaround?

Thank you for your help,
Christophe

Hi Christophe,

I made a little tutorial for using a MUSCATE product as input for the biophysical processor, I copy it below.

Currently the Muscate reader is in development, but there is a workaround to be able to run the biophysical processor by preprocessing the MUSCATE images within SNAP. The objective is to get a product with the bands needed by the operator at identical resolution (B3, B4, B5, B6, B7, B8A, B11, B12, view_zenith_mean, view_azimuth_mean, sun_zenith and sun_azimuth).

  1. Open all the needed reflectance bands in SNAP, all of them should be at 20m except B3 and B4, which are at 10m.

  2. Resample the bands to the desired resolution. In this example, the desired resolution is going to be 20 m, so we have to resample only the B3 and B4.
    Menu->Raster->Geometric Operation->Resampling
    In the resampling parameters, we choose ‘By pixel resolution (in m): 20”

  1. Create a product containing all the reflectance bands by using “Band Math…”
  • We choose a master product between the current opened products, in this example we are going to use the B3_resampled

  • Compute reflectance: if we see the pixel values of any band, the values are not the reflectance, they have to be divided by 10000 to get the reflectance. (This could be different depending on the input?) To carry out the conversion, using BandMath, we create a new band (no virtual) by dividing the band by 10000. We call it B3, and we define its wavelength in nm: 560

  • Add the rest of the band to this master product using Band Math for each band. Remember to select Non-Virtual, to introduce the corresponding wavelength and to divide by 10000 to get the reflectance.

  1. Add the angle bands:
  • Open the equivalent L1C or S2A in format SAFE in SNAP to be able to get the angle bands.
  • Resample the product to the desired resolution
  • Using band math, add the following bands (with identical name!!):
    i. view_azimuth_mean
    ii. view_zenith_mean
    iii. sun_azimuth
    iv. sun_zenith

  1. Save the master product in BEAM-DIMAP (if you want)
  2. Make a subset to the region of interest (if you want)
  3. Run the biophysical processor Menu->Optical-> Thematic Land Processing -> Biophysical Processor…

I hope this helps until the muscate reader is ready.

2 Likes

Hi Olivier,

I have a question regarding the S2A L2A product specification you have provided. I have some sen2agri products which don’t seem to fit the specifications. They have a CLD instead of an CLM file and also the bit coding inside the file seems different. Do I have files processed with an older version?

The information from the HDR file is as follows:
MACCS_L2_NOMINAL_CHAIN
<Creator_Version>5.1.5</Creator_Version>

Thanks in advance,
Jan

Hi Jan,
Sen2Agri has its own file format, with minor changes. Please ask the Sen2agri support.
There is a forum, (which was not operational this morning) on Sen2agri site (http://www.esa-sen2agri.org/), and you might also ask questions on the github page : https://github.com/Sen2Agri/Sen2Agri-System

Best regards,
Olivier

Hello.

The Sen2Agri forum moved to http://forum.esa-sen2agri.org. If you had an account on www.esa-sen2agri.org, that will do to access it.

Cosmin.

Hi Omar

thanks for your tutorial.
In order to include the angles bands, do I have to download the L1C product as well (in addition to the Muscate L2A product) ?
Or can i retrieve those bands separately, or generate them ?

I hope the “double download” is not mandatory because my bandwidth is quite low.

Hy Omar
I asked you some time ago how to launch the biophysical processor; and we agreed on the fact to erase all the masks

Is it no longer necessary ? : it seems you do not include band masks
This tutorial is excellent ,as usual ,

I have another problem :I try to export the LAI file in geotiff file format and I get somthing unreadable : very whitish
Have you any solution to export files that could be opened in ,say GrassGis ,and not all white ?

Many thanks
Bruno

1 Like