Skip to content

Conversation

@omshinde
Copy link
Contributor

https://github.com/NASA-IMPACT/active-maap-sprint/issues/1308

Illustrates ESA BIOMASS simulated data access using ESA MAAP long-lasting (offline token) and short-lived (data access token) tokens.

@omshinde omshinde self-assigned this Dec 16, 2025
@omshinde omshinde added the documentation Improvements or additions to documentation label Dec 16, 2025
@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@@ -0,0 +1,524 @@
{
Copy link
Collaborator

@HarshiniGirish HarshiniGirish Dec 17, 2025

Choose a reason for hiding this comment

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

rephrase run this notebook to To access and run this tutorial within MAAP's Algorithm Development Environment (ADE), please refer to the "Getting started with the MAAP" section of our documentation.

Disclaimer: it is highly recommended to run a tutorial within MAAP's ADE, which already includes packages specific to MAAP, such as maap-py. Running the tutorial outside of the MAAP ADE may lead to errors.

Ferrante, Francesco (SERCO) (comma)

maybe tag ESA_CCI_V5_Token_Access page link as additional resource.


Reply via ReviewNB

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

@@ -0,0 +1,524 @@
{
Copy link
Collaborator

@HarshiniGirish HarshiniGirish Dec 17, 2025

Choose a reason for hiding this comment

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

in the ESA_CCI_V5_Token_Access the Token paste is hidden so it won’t show in outputs/screenshots.

Token is saved in a user config folder

Saved token file is locked down so only you can read it


Reply via ReviewNB

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Deleted the print statement.

@@ -0,0 +1,524 @@
{
Copy link
Collaborator

@HarshiniGirish HarshiniGirish Dec 17, 2025

Choose a reason for hiding this comment

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

Line #10.    # Quick sanity check: list a few collections (should include BiomassSimulated variants)

maybe call this part "Testing Data Access"


Reply via ReviewNB

@@ -0,0 +1,524 @@
{
Copy link
Collaborator

@HarshiniGirish HarshiniGirish Dec 17, 2025

Choose a reason for hiding this comment

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

rename to "Discover tiles via ESA STAC"


Reply via ReviewNB

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think it's better to keep as "Testing data Access" following other notebooks.

@@ -0,0 +1,524 @@
{
Copy link
Collaborator

@HarshiniGirish HarshiniGirish Dec 17, 2025

Choose a reason for hiding this comment

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

Line #4.    print("Total items:", items)

maybe just print len(items) to make output less noisy.


Reply via ReviewNB

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

@@ -0,0 +1,524 @@
{
Copy link
Collaborator

@HarshiniGirish HarshiniGirish Dec 17, 2025

Choose a reason for hiding this comment

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

open via rasterio with auth headers passed through GDAL, then read insted of full download even when the file is a COG.


Reply via ReviewNB

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

@@ -0,0 +1,524 @@
{
Copy link
Collaborator

@HarshiniGirish HarshiniGirish Dec 17, 2025

Choose a reason for hiding this comment

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

Line #14.    import os, numpy as np, requests, matplotlib.pyplot as plt, rasterio

move to top under imports.


Reply via ReviewNB

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

@@ -0,0 +1,524 @@
{
Copy link
Collaborator

@HarshiniGirish HarshiniGirish Dec 17, 2025

Choose a reason for hiding this comment

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

successfully. typo


Reply via ReviewNB

Copy link
Contributor Author

Choose a reason for hiding this comment

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

updated.

@HarshiniGirish
Copy link
Collaborator

I made a few minor suggestions, but overall everything looks good. Thank you! @omshinde

@omshinde
Copy link
Contributor Author

Thanks @HarshiniGirish .. I requested re-review after addressing all your comments. Also, pushed another notebook for ESA BIOMASS Level1A data product.

@wildintellect
Copy link
Collaborator

Should we change to focus on the L1b or L2a which are more likely to be COGs?

List from Cristiano

BiomassLevel1a - an SLC (ignore the Sx_SCS__1M data).
BiomassLevel1b - and GRD like, ARD product
BiomassLevel1c - co-registered SLC, only after complete swaths cycles, Swath-1 should be coming soon.
BiomassLevel2a - Forest retrieval products, generated from L1C.

@hrodmn hrodmn self-requested a review January 6, 2026 11:51
@@ -0,0 +1,556 @@
{
Copy link
Contributor

@hrodmn hrodmn Jan 6, 2026

Choose a reason for hiding this comment

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

The ESA STAC API is not protected by any auth scheme so we don't need to provide the token header here!


Reply via ReviewNB

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catch. Thanks.

@@ -0,0 +1,556 @@
{
Copy link
Contributor

@hrodmn hrodmn Jan 6, 2026

Choose a reason for hiding this comment

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

The ESA STAC API has the filter extension enabled which means we can apply the product type filter here instead of sorting through the item ids later. Unfortunately they only enabled it for the GET request model so we need to set method="GET". The ESA STAC API docs provide a similar example.

search = stac.search(
    collections=["BiomassLevel1a"],
    datetime=time_day,
    limit=1000,
    filter="productType='S2_SCS__1S'",
    method="GET",
)

Reply via ReviewNB

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks! Updated it to filter it using the filter extension.

@@ -0,0 +1,556 @@
{
Copy link
Contributor

@hrodmn hrodmn Jan 6, 2026

Choose a reason for hiding this comment

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

Line #30.    r = requests.get(asset_href, headers=headers, stream=True, timeout=180)

code that downloads the actual assets should be the only place where we need the authorization header


Reply via ReviewNB

Copy link
Contributor Author

Choose a reason for hiding this comment

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

thanks

@@ -0,0 +1,556 @@
{
Copy link
Contributor

@hrodmn hrodmn Jan 6, 2026

Choose a reason for hiding this comment

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

It would be helpful to provide suggestions for how to get authenticated here. I tried following the link and logging in with my EDL credentials but got bounced with this message "The ID token issued by the identity provider does not match the configured essential claim. Please contact your administrator."


Reply via ReviewNB

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This seems to be an issue under discussion with ESA team for NASA EDL authentication.

@omshinde
Copy link
Contributor Author

omshinde commented Jan 8, 2026

Should we change to focus on the L1b or L2a which are more likely to be COGs?

Thanks for your comment @wildintellect. I was using L1a which is also COG but I updated it to L1b which seems to be ARD.

@omshinde
Copy link
Contributor Author

omshinde commented Jan 8, 2026

@hrodmn Addressed all of your comments here Requesting re-review

@omshinde omshinde requested a review from hrodmn January 8, 2026 16:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants