import earthaccess
import fsspec
import xarray as xr
Xarray with zarr and kerchunk
def load_data():
= "earthaccess_data/20020601090000-JPL-L4_GHRSST-SSTfnd-MUR-GLOB-v02.0-fv04.1.json"
src = ["analysed_sst"]
variable
earthaccess.login()= earthaccess.get_s3fs_session(daac="PODAAC")
s3_fs = s3_fs.storage_options.copy()
storage_options = {
fsspec_caching "cache_type": "none",
}= fsspec.filesystem("reference", fo=src, **fsspec_caching)
fs = fs.get_mapper("")
m = xr.open_dataset(
da
m,="kerchunk",
engine={},
chunks=storage_options,
storage_options
)[variable]return da.load()
if __name__ == "__main__":
= load_data() da