grass-addons icon indicating copy to clipboard operation
grass-addons copied to clipboard

[WIP] i.sentinel3.import: New addon to import Sentinel-3 data

Open ninsbl opened this issue 3 years ago • 8 comments

The Sentinel-3 data has a really peculiar format that is not supported by GDAL. This module implements import based on numpy and netCDF4. Although it should be working in general, thorough review of the import procedure (and the geometric acceptability) would be very much appreciated. (Optional/additional) import as verctor points would be easy to implement if that would be an advantage...

ninsbl avatar Sep 16 '21 19:09 ninsbl

I pulled your branch and tested with:

python i.sentinel.download.py -l settings=/home/veroandreo/sentinel producttype=S3SL2LST sort=ingestiondate
python i.sentinel.download.py settings=/home/veroandreo/sentinel uuid=5d24b2c1-f7e1-45b4-ba4e-cd87b247e90e output=/home/veroandreo/
python i.sentinel3.import.py -p input=/home/veroandreo/ product=LST basename=S3_LST

and I thought it would import everything, but I get:

ERROR: 
       /home/veroandreo/S3A_SY_2_VG1____20210729T000000_20210729T235959_20210804T144835_SOUTH_AMERICA_____LN2_O_NT_002.zip
       does not contain a a container LST_in.nc with band LST_uncertainty,
       LST

However, the LST_in is there... what am I doing wrong??

Also, seems the user should set the region resolution before hand, right? I get some pretty course pixels in the bands that do get imported... Maybe a full example in the manual would be useful.

veroandreo avatar Sep 26 '21 15:09 veroandreo

Thanks, @veroandreo for reviewing.

ninsbl avatar Oct 04 '21 06:10 ninsbl

However, the LST_in is there... what am I doing wrong??

Nothing, a bug in the code. Thanks for pointing out.

Also, seems the user should set the region resolution before hand, right? I get some pretty course pixels in the bands that do get imported... Maybe a full example in the manual would be useful.

Yes, that is mentioned in the manual. However, the default could also be to use the "native" resolution and extent from the scene (Markus mentioend the irregularities in the raster alignment there so this would be a rough approximation) and an r-flag could limit import to the computational region...

ninsbl avatar Oct 04 '21 10:10 ninsbl

and I thought it would import everything, but I get:

ERROR: 
       /home/veroandreo/S3A_SY_2_VG1____20210729T000000_20210729T235959_20210804T144835_SOUTH_AMERICA_____LN2_O_NT_002.zip
       does not contain a a container LST_in.nc with band LST_uncertainty,
       LST

However, the LST_in is there... what am I doing wrong??

There seems to be Synergy product in the input directory that does not get filtered out: S3A_SY_2_VG1____20210729T000000_20210729T235959_20210804T144835_SOUTH_AMERICA_____LN2_O_NT_002 That does not have a LST_in.nc ... I adjusted the default pattern, so for now only LST products are imported. However, I see that I need to make the module less product specific...

Also, seems the user should set the region resolution before hand, right? I get some pretty course pixels in the bands that do get imported... Maybe a full example in the manual would be useful.

Right, that is mentioned in the manual. But resolution and extent could be grabbed from the data and a temporary region set for import accordingly....

ninsbl avatar Oct 15 '21 23:10 ninsbl

If we want to make it closer to include in the repo, we might need to target the new default branch, grass8.

echoix avatar Dec 22 '23 05:12 echoix

If we want to make it closer to include in the repo, we might need to target the new default branch, grass8.

Using "Edit" next to the PR title would let us change the base to grass8. It then warns:

Are you sure you want to change the base?

Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated. 

Would that be ok?

neteler avatar Dec 22 '23 15:12 neteler

FYI: I am currently re-working the PR / module...

ninsbl avatar Dec 22 '23 21:12 ninsbl

Nice! Mark the PR ready to review when you want us to take a new look on it ;)

echoix avatar Dec 22 '23 22:12 echoix