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

Evaluate the latest CMR python library to determine if it meets the needs of icepyx #169

Open
asteiker opened this issue Feb 3, 2021 · 5 comments

Comments

@asteiker
Copy link
Collaborator

asteiker commented Feb 3, 2021

The CMR team has recently published a basic python library that can search collections and granules using the CMR API behind the scenes: https://github.com/nasa/eo-metadata-tools/tree/master/CMR/python

This has relatively limited functionality as an initial release but it may be worth evaluating if this type of library could suit the needs of icepyx in the future, and/or if any CMR code that has been developed under icepyx could be contributed to the CMR library so that the icepyx code becomes more simplified with less dependencies.

This basic notebook demonstrating granule search may be helpful to examine if/how we could leverage the library: https://github.com/nasa/eo-metadata-tools/blob/master/CMR/python/demos/notebooks/granules.ipynb

@JessicaS11
Copy link
Member

Thanks for sharing this great resource, @asteiker! @alexdibella, maybe we can dive into this a little during an upcoming hack!

@alexdibella
Copy link
Contributor

Good idea @JessicaS11!! Won't be there today, but we can hack it out next week :)

@wenjieji86
Copy link
Contributor

Hi @JessicaS11 @asteiker this may be the wrong place to ask this question but I don't know where else to go so I will just go ahead and ask here...
The CMR API allows temporal search/subsetting, but it does so by combining date and time. This means subsetting via time only is impossible (e.g. I may be interested only in night-time data from July to December 2020)? Is there a way that I can do this without downloading all available data from July to December 2020 then subsetting locally?

Thanks.

@JessicaS11
Copy link
Member

@wenjieji86 Apologies that this comment slipped under the radar. Unfortunately, I suspect the best approach is going to be to loop through a set of dates and place an order (and download) for each one. Then the temporal subsetting you're after will be accomplished. I'm not sure there's another way you could go about this, but my understanding of CMR is limited so I could be totally off base. Some discussion on automated login (which you'd probably want to use for this) is here.

@amy I looked into the CMR library a bit more, and I certainly think we could change out our current requests and manual formatting of url-based workflow to utilize this library. I probably won't have dev time to do so in the near future, but I suspect it could be a pretty quick transition for someone more familiar with CMR and access routes/using it in general, and I'd be happy to chat with someone about the needs on our side of things.

@JessicaS11
Copy link
Member

@alexdibella In follow up to your question today, see the second part of the most recent post. So if you are able to access Sentinel data through CMR and want to make the transition, go ahead, but it's not yet a planned dev step for icepyx.

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

No branches or pull requests

4 participants