Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Download CMIP6 zarr data from AWS

Description

  • This is a very simple example that demonstrates how to download the same zarr object from AWS using s3 and OSDF protocols, respectively

  • This notebook does not use intake catalogs to get the data or dask to scale up the job

/Users/harshah/venvs/osdf/lib/python3.12/site-packages/xarray/backends/plugins.py:110: RuntimeWarning: Engine 'gini' loading failed:
expected bytes, str found
  external_backend_entrypoints = backends_dict_from_pkg(entrypoints_unique)
Loading...
CPU times: user 64.5 ms, sys: 7.41 ms, total: 71.9 ms
Wall time: 899 ms
Loading...
CPU times: user 34 μs, sys: 0 ns, total: 34 μs
Wall time: 35.8 μs
Loading...

Plot the first time step

CPU times: user 784 ms, sys: 369 ms, total: 1.15 s
Wall time: 2.4 s
<Figure size 640x480 with 2 Axes>
Loading...

Download multiple files

Change ztore/object paths to use osdf protocol!

['osdf:///aws-opendata/us-west-2/cmip6-pds/CMIP6/CMIP/CNRM-CERFACS/CNRM-CM6-1/1pctCO2/r1i1p1f2/Amon/tas/gr/v20180626/', 'osdf:///aws-opendata/us-west-2/cmip6-pds/CMIP6/CMIP/NOAA-GFDL/GFDL-CM4/1pctCO2/r1i1p1f1/Amon/tas/gr1/v20180701/', 'osdf:///aws-opendata/us-west-2/cmip6-pds/CMIP6/CMIP/NOAA-GFDL/GFDL-CM4/abrupt-4xCO2/r1i1p1f1/Amon/tas/gr1/v20180701/', 'osdf:///aws-opendata/us-west-2/cmip6-pds/CMIP6/CMIP/NOAA-GFDL/GFDL-CM4/piControl/r1i1p1f1/Amon/tas/gr1/v20180701/', 'osdf:///aws-opendata/us-west-2/cmip6-pds/CMIP6/CMIP/NOAA-GFDL/GFDL-ESM4/1pctCO2/r1i1p1f1/Amon/tas/gr1/v20180701/']
1160
 Loaded data from 0_th zarr store
 Loaded data from 1_th zarr store
CPU times: user 7.76 s, sys: 3.24 s, total: 11 s
Wall time: 31.7 s