Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Global Cropland Production V2 - Few S2 valid acquisiton #71

Open
savmickael opened this issue Nov 14, 2022 · 9 comments
Open

Global Cropland Production V2 - Few S2 valid acquisiton #71

savmickael opened this issue Nov 14, 2022 · 9 comments
Assignees
Labels
bug Something isn't working

Comments

@savmickael
Copy link
Contributor

Some block inside tiles exhibits very few S2 valid acquisition:

22HCH
60HTG
27RYL 

cf. https://github.com/WorldCereal/wc-classification/issues/31 and https://github.com/WorldCereal/wc-classification/issues/29

@savmickael
Copy link
Contributor Author

22NBM block 13 is also concern by this issue

@savmickael savmickael changed the title Global Production V2 - Few S2 valid acquisiton Global Cropland Production V2 - Few S2 valid acquisiton Nov 15, 2022
@savmickael savmickael added the bug Something isn't working label Nov 15, 2022
@savmickael savmickael self-assigned this Nov 15, 2022
@savmickael
Copy link
Contributor Author

associated issue WorldCereal/ewoc_classif#73

@savmickael
Copy link
Contributor Author

For 22HCH:

  • overview:
    22HCH
  • local with OSM
    22HCH_local
  • local with GSAT
    22HCH_local_GSAT
    The tile is mainly covered by water. The land area don"t cover by other tiles is very small.

This tile is covered by 157 observation during the season year = 2021. Some of them are partial due to the fact that the orbit ended in the north of the tile. An example below
22HCH_20211225-20211223

@kvantricht and @jdegerickx , I propose to test this tile with 1.0.10 and see if the last improvements solved this type of issue. If it is not the case, we can see if we keep this tile or not.

@kvantricht
Copy link

If you like us to test it with 1.0.10, please send us the optical and SAR collection CSVs so we can test locally.

@savmickael
Copy link
Contributor Author

For 60HTG:
60HTG_overview
60HTG_local
60HTG_local_gsat

This tile is covered by 185 observation during the season year = 2021.

@savmickael
Copy link
Contributor Author

If you like us to test it with 1.0.10, please send us the optical and SAR collection CSVs so we can test locally.

Please find the results below with the new image:

2022-11-16 09:09:25.236 | WARNING  | 140380331534144:worldcereal.worldcereal_products:_log_run_block:466 - Less than 3 off-swath acquisitions found -> safe to skip block
2022-11-16 09:09:25.596 | SUCCESS  | 140380331534144:satio.utils.logs:wrapper_exitlog:84 - Processing of 22NBM_013 completed in 0.37 minutes.
2022-11-16 09:09:25.597 | SUCCESS  | 140380331534144:worldcereal.worldcereal_products:run_tile:530 - Finished!
2022-11-16 09:09:25.598 | INFO     | 140380331534144:ewoc_classif.classif:process_blocks:129 - Skipped block, return code: 1
Uploaded 0 files to bucket | placeholder
2022-11-16 09:09:25.598 | INFO     | 140380331534144:ewoc_classif.classif:run_classif:359 - Cleaning the output folder /tmp/22NBM_33f9f3

@kvantricht
Copy link

Looks like a successful run. I imaging block 13 will be largely over sea. We've seen similar issues before where normally this is off-swath or masked consistently for another reason, but in one or two cases, there's some valid pixels slipping in. Looks like situation is now handled correctly.

@savmickael
Copy link
Contributor Author

@kvantricht can you indicate me if in this case we expected a empty cropland block or not. I am quite lost

@kvantricht
Copy link

kvantricht commented Nov 16, 2022

It looks like the upper part of this tile is never covered by data (cfr screenshot from EObrowser). So this will be reflected in your MASK in off-swath value 255. Normally this should then happen consistently in all acquisitions. It used to result in SkipBlockError here: https://github.com/WorldCereal/wc-classification/blob/8f9a034407db68bf25c1df292f4c2ed08e4d5b60/src/worldcereal/collections.py#L366

What happens in rare circumstances is that one or two acquisitions suddenly have a within-swath value. So the SkipBlockError was not raised, while actually there was then only one acquisition left. It resulted in unexpected issues downstream. I had reported those findings here: https://github.com/WorldCereal/wc-classification/issues/29#issuecomment-1243454126

I now check this off-swath differently and look for how many acquisitions have off-swath pixels in the block (https://github.com/WorldCereal/wc-classification/blob/develop/src/worldcereal/collections.py#L370). The default minimum to proceed is now 3 (only then, there is code-wise no issues downstream).

Looking at the location of block 13 in this tile, I would say yes it's supposed to be in the off-swath region of the tile. Note that the root cause is that in a rare case there's suddenly within-wath pixel values in a normally off-swath block. But I think the case is now handled correctly. This block should be skipped.

image

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants