nsidc / earthaccess

Python Library for NASA Earthdata APIs
https://earthaccess.readthedocs.io/
MIT License
393 stars 79 forks source link

OpenDAP support #250

Open betolink opened 1 year ago

betolink commented 1 year ago

A lot of the most popular NASA datasets are backed by OpenDAP and it would be very handy to have a workflow to support this access pattern. Something like this could also facilitate the usability of legacy data formats such as HDF-EOS

import earthaccess
earthaccess.login()

URL = LEGACY_HDF4_DATA_GRANULE

store = earthaccess.get_opendap_store(URL)

ds = xr.open_dataset(store)

ans that's it...

jgallagher59701 commented 1 year ago

I agree, that would be wonderful. I'm very interested in the earthaccess package.

In the above, when you say _LEGACY_HDF4_DATAGRANULE are you thinking about data that now reside in a web object store like S3 (e.g., as part of NASA's effort to move to a cloud-based infrastructure)? Or are you thinking about a more general case?

betolink commented 1 year ago

@jgallagher59701 that would be the primary use case but not limited to that. Regardless of where these remote HDF4 files are stored, having OpenDAP serving it could bypass the issues of trying to use pyhdf where things were designed for local filesystems.

asteiker commented 1 year ago

@betolink I wonder about integration with the zarr-eosdis-store library? @jgallagher59701 Maybe this is something we could think about working together on for a future hackfest?