ACOLITE Generic - outputs not all in 10 m and no a, bbp, kd products in L2W

Technical questions about ACOLITE
Post Reply
hnthang
Posts: 25
Joined: Fri Oct 12, 2018 11:24 am

ACOLITE Generic - outputs not all in 10 m and no a, bbp, kd products in L2W

Post by hnthang »

Hi Quinten,

I processed a Sentinel - 2 scene with the desired outputs as:

Code: Select all

## output l2w parameters
l2w_parameters=Rrs_*, a442_qaasw, a492_qaasw, a559_qaasw, a665_qaasw, bbp442_qaasw, bbp492_qaasw, bbp559_qaasw, bbp665_qaasw, kd442_qaasw, kd492_qaasw, kd559_qaasw, kd665_qaasw
but there is only Rrs_* products after the processing.

In addition, old version of ACOLITE resamples bands to 10 m (usually I need the band 443 nm to use with blue, green, and red bands) with the following settings:

Code: Select all

##
s2_target_res=10
l8_output_bt=False
l8_output_lt_tirs=False
resolved_geometry=False
resolved_geometry_write=False
but the Generic ACOLITE only produces 3 bands of blue, green, and red at 10 m and the band 443 is still in 60 m.

Do I miss something in the current version?

Many thanks,
Thang
quinten
Posts: 1019
Joined: Tue Mar 03, 2015 8:13 am

Re: ACOLITE Generic - outputs not all in 10 m and no a, bbp, kd products in L2W

Post by quinten »

Hi Thang

I have changed a bit the naming of the QAA outputs, this will be included in an update to the manual. In the current version of the GitHub code you can request qaa, qaa5, qaa6 or any of the individual parameters:

Code: Select all

qaa_rrs_443
qaa_u_443
qaa_rrs_490
qaa_u_490
qaa_rrs_560
qaa_u_560
qaa_rrs_665
qaa_u_665
qaa_v5_a_560
qaa_v5_bbp_560
qaa_v5_bbp_443
qaa_v5_a_443
qaa_v5_Kd_443
qaa_v5_bbp_490
qaa_v5_a_490
qaa_v5_Kd_490
qaa_v5_Kd_560
qaa_v5_bbp_665
qaa_v5_a_665
qaa_v5_Kd_665
qaa_v5_KdPAR_Nechad
qaa_v6_a_665
qaa_v6_bbp_665
qaa_v6_bbp_443
qaa_v6_a_443
qaa_v6_Kd_443
qaa_v6_bbp_490
qaa_v6_a_490
qaa_v6_Kd_490
qaa_v6_bbp_560
qaa_v6_a_560
qaa_v6_Kd_560
qaa_v6_Kd_665
qaa_v6_KdPAR_Nechad
qaa_v6_KdPAR_Lee
qaa_v6_Zeu_Lee
ACOLITE only produces the NetCDF files for S2 at either 10, 20, or 60 metres, so all bands should be at the same resolution. Could you check again?

Quinten
hnthang
Posts: 25
Joined: Fri Oct 12, 2018 11:24 am

Re: ACOLITE Generic - outputs not all in 10 m and no a, bbp, kd products in L2W

Post by hnthang »

Hi Quinten,

Sorry for a late reply. I had field trips recently :D :D

Yes, the exported NC format keep all bands at the spatial resolution of 10 m. Unfortunately, the exported GTiff format only keep 10 m of spatial resolution in the bands 490, 556, and 665. You designed the GTiff like that or do I miss something?

Ah, thank you for your suggestion. I can export a, bbp, and Kd products using your new names.

Thang
quinten
Posts: 1019
Joined: Tue Mar 03, 2015 8:13 am

Re: ACOLITE Generic - outputs not all in 10 m and no a, bbp, kd products in L2W

Post by quinten »

Hi Thang

The GeoTIFFs have the same data as the NetCDF files, and all bands are exported using the same GeoTransform and Projection. So if you set the output resolution to 10 metres, all bands will be output at 10 metres both in NetCDF and GeoTIFF.

MSI only has 4 bands at 10 metres, so for the other bands pixels are replicated to construct a 10 metre dataset. There is no procedure for "sharpening" the 20 and 60 metre bands, so they will appear to have a coarser resolution, but pixels are actually replicated 4 and 36 times to form the 10 metre dataset.

Here is an example of 10 metre outputs for Oostende, Belgium:
443 nm (60 m band, resampled to 10 m)
S2A_MSI_2021_03_29_11_06_54_T31UDS_L2R_rhot_443_band_1.png
S2A_MSI_2021_03_29_11_06_54_T31UDS_L2R_rhot_443_band_1.png (5.71 KiB) Viewed 3355 times
492 nm (10 m band)
S2A_MSI_2021_03_29_11_06_54_T31UDS_L2R_rhot_492_band_1.png
S2A_MSI_2021_03_29_11_06_54_T31UDS_L2R_rhot_492_band_1.png (74.69 KiB) Viewed 3355 times
Both datasets are 303x301 pixels in this example, but data from B1 (443 nm) has been replicated to fill 6x6 10 metre pixels.

I hope this is clear!

Quinten
hnthang
Posts: 25
Joined: Fri Oct 12, 2018 11:24 am

Re: ACOLITE Generic - outputs not all in 10 m and no a, bbp, kd products in L2W

Post by hnthang »

Hi Quiten,

Thank you for your detail explanation. However, the Rrs_443 is still in 60 m (please see attached image).

Also attached the Rrs 443 in GTiff format if you need to check the file.

File Rrs_443 60 m:
https://drive.google.com/file/d/1NyK5wc ... sp=sharing

Many thanks,
Thang
Attachments
Rrs443_60m.png
Rrs443_60m.png (470.1 KiB) Viewed 3328 times
quinten
Posts: 1019
Joined: Tue Mar 03, 2015 8:13 am

Re: ACOLITE Generic - outputs not all in 10 m and no a, bbp, kd products in L2W

Post by quinten »

Hi Thang

The file you shared has 10 metre pixel resolution! The GeoTIFF ModelPixelScaleTag is (10, 10, 0), indicating a pixel size of 10 metres. The dimensions are 2559 x 2205 pixels for a cropped ROI, which is higher than the native full MGRS tile size at 60 metres of 1830x1830 pixels.

The file may appear to the eye to be 60 metres, since to form the 10 metre image, the pixels are replicated 6x6 from the original data recorded at 60 metres. When you measure the side of one of those "big" pixels you would get 60 metres, but if you look closely each 60 metre pixel is made up of 6x6 10 metre pixels:
Screenshot 2021-06-29 at 09.13.00.png
Screenshot 2021-06-29 at 09.13.00.png (29.75 KiB) Viewed 3326 times
There is no sharpening/smoothing procedure applied when resampling the 60 metres band to 10 metres. Each pixel is just replicated 36 times, or "cut up" into 10 metre pieces.

I hope this is clear!

Quinten
hnthang
Posts: 25
Joined: Fri Oct 12, 2018 11:24 am

Re: ACOLITE Generic - outputs not all in 10 m and no a, bbp, kd products in L2W

Post by hnthang »

Yes, you are right. It is a bit different when measuring the pixel size in QGIS and SNAP. Zoom in the pixel in SNAP, we see the "sub-pixels" in one pixel :lol: :lol:

Many thanks to your feedback.

Thang
Post Reply