Last active
August 26, 2024 15:01
-
-
Save ghidalgo3/3c7152147a6d25773615a783968abd67 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ! pip install xarray adlfs zarr planetary_computer matplotlib | |
from adlfs import AzureBlobFileSystem | |
import xarray as xr | |
import planetary_computer | |
signed_url = planetary_computer.sign("https://azureopendatastorage.blob.core.windows.net/noaa/conus404.zarr/") | |
_, sas_token = signed_url.split("?", 1) | |
fs = AzureBlobFileSystem(account_name="azureopendatastorage", sas_token=sas_token) | |
ds = xr.open_zarr(fs.get_mapper("az://noaa/conus404.zarr")) | |
ds # In a notebook, print this out to see all 200+ variables | |
print(f"{ds.nbytes / 1e15} PB dataset size") | |
ds.SNOWH[0, :, :].plot() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment