Skip to content

Update sentinel 2 to sentinel 2 collection#582

Merged
nanaboamah89 merged 10 commits intomainfrom
s2c1
Jun 12, 2025
Merged

Update sentinel 2 to sentinel 2 collection#582
nanaboamah89 merged 10 commits intomainfrom
s2c1

Conversation

@nanaboamah89
Copy link
Contributor

Proposed changes

change s2_l2a to s2_l2a_c1.

Checklist (replace [ ] with [x] to check off)

  • Remove any unused Python packages from Load packages
  • Remove any unused/empty code cells
  • Remove any guidance cells (e.g. General advice)
  • Ensure that all code cells follow the PEP8 standard for code. The jupyterlab_code_formatter tool can be used to format code cells to a consistent style: select each code cell, then click Edit and then one of the Apply X Formatter options (YAPF or Black are recommended)
  • Include relevant tags in the first notebook cell and re-use tags if possible
  • Ensure appropriate colour schemes have been used to maximise accessibility for vision impairment. Test your images or learn more with Coblis or TPGI
  • Clear all outputs, run notebook from start to finish, and save the notebook in the state where all cells have been sequentially evaluated

Closes issues (optional)

  • Closes Issue #000

@nanaboamah89 nanaboamah89 requested a review from mickwelli April 8, 2025 13:37
@mickwelli
Copy link
Contributor

Thanks @nanaboamah89,

There are some changes required before we can merge the Datasets notebook.

  • s2_l2a_c1 includes an offset of -1000. We will need this to be included in the odc metadata so it shows up in the add_offset field.
  • We will need to show users how to apply this offset when using dc.load
  • PR load_ard changes #512 deals with the offset in the proposed changes to load_ard. We will need this PR to be merged before we merge the Datasets notebook.

@mickwelli
Copy link
Contributor

mickwelli commented Jun 5, 2025

Setting dtype=native in load_ard returns strange values of 64536 for masked pixels. I suspect this is because the native nodata value is the max value for unit16 65536 Element84/earth-search#23. 1000 is subtracted in the re-scaling process. Therefore we should not set dtype=native in load_ard()

@mickwelli
Copy link
Contributor

Hi @nanaboamah89, it looks like there are two notebooks that don't perform as well with the change:

  1. Mangrove analysis - might need to revert this to s2_l2a until data gaps are resolved. Looks like data gaps in 2017 are affecting visualisation.
  2. Water_extent_sentinel_2 - we could look at removing mask_filters=[("opening", 3),("dilation", 2)] from load_ard(), otherwise there is too much cloud masking on the dates of interest.

@nanaboamah89
Copy link
Contributor Author

  • Mangrove analysis - might need to revert this to s2_l2a until data gaps are resolved. Looks like data gaps in 2017 are affecting visualisation.
  • Water_extent_sentinel_2 - we could look at removing mask_filters=[("opening", 3),("dilation", 2)] from load_ard(), otherwise there is too much cloud masking on the dates of interest.

I am reverting the two notebooks back to s2_l2a for now, till the gap is work on.

Copy link
Contributor

@mickwelli mickwelli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @nanaboamah89

@nanaboamah89 nanaboamah89 merged commit e7ea7f4 into main Jun 12, 2025
1 check passed
@mickwelli mickwelli deleted the s2c1 branch September 23, 2025 09:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants