Replies: 2 comments 2 replies
-
I like the idea. I hadn't thought about Earthdata Search URLs, but I was recently thinking about translation from CMR search URLs to
|
Beta Was this translation helpful? Give feedback.
-
Something to note: I knew the short name of the dataset (OPERA_L3_DSWX-HLS_V1), so that's the first thing I searched by, by pasting it into the search box. That showed up as the So, my example would likely be translated by Earthdata search to:
earthaccess search: import earthaccess
auth = earthaccess.login()
results = earthaccess.search_data(
concept_id='C2617126679-POCLOUD',
bounding_box=[-95.19, 30.59, -94.99, 30.79],
temporal=('2024-04-30T00:00:00.000Z', '2024-05-05T23:59:59.999Z'),
)
print(len(results)) 🤔 As an aside, Python CMR seems to use |
Beta Was this translation helpful? Give feedback.
-
It's common in many contexts to jump between GUI search and discovery to programmatic search and discovery.
Earthdata Search encodes all the necessary query parameters in the search URL to derive the associated CMR query and, therefore, the associated
earthaccess
options.For example, this Earthdata Search:
which I've separated into its parameters here:
Can be directly translated into the associated CMR Query:
https://cmr.earthdata.nasa.gov/search/granules.umm_json?short_name=OPERA_L3_DSWX-HLS_V1&bounding_box=-95.19,30.59,-94.99,30.79&temporal[]=2024-04-30T00:00:00.000Z,2024-05-05T23:59:59.999Z
And the same search in
earthaccess
would be:The "work" here would just be defining a mapping from the abbreviated parameter names used by Earthdata Search into the CMR query parameter names.
I'd love something like this (function names TBD):
And maybe:
Likewise, once we have this mapping, we could also go the other way around and translate search options into CMR or Earthata Search URLs.
Beta Was this translation helpful? Give feedback.
All reactions