#!/usr/bin/env python # coding: utf-8 # In[1]: import xarray as xr import rioxarray as rxr import fsspec import rasterio # In[2]: fs = fsspec.filesystem('s3', requester_pays=True) # In[3]: flist = fs.ls('pangeo-data-uswest2/esip/cogs') flist # In[4]: with fs.open(flist[4]) as f: with rasterio.open(f) as dataset: from rasterio.plot import show print(dataset.shape) show(dataset.read()) # In[5]: with fs.open(flist[4]) as f: da = rxr.open_rasterio(f) # In[ ]: with fs.open(flist[5]) as f: da = rxr.open_rasterio(f) print(da.crs) crs = ccrs.AlbersEqualArea(central_longitude=-96, central_latitude=23, standard_parallels=(29.5,45.5)) get_ipython().run_line_magic('opts', "Image [colorbar=True] (cmap='magma')") da[0, 50000:51000, 80000:81000].hvplot(crs=crs) # In[ ]: