Skip to content

Instantly share code, notes, and snippets.

@cisaacstern
Created October 27, 2021 17:06
Show Gist options
  • Save cisaacstern/de5b5d0a17bc3dadb372997f43e79a42 to your computer and use it in GitHub Desktop.
Save cisaacstern/de5b5d0a17bc3dadb372997f43e79a42 to your computer and use it in GitHub Desktop.
Display the source blob
Display the rendered blob
Raw
{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"id": "a2144e43-6e63-4cbf-a33e-16e3f4e7fa0b",
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"# Uncomment and install `ipfsspec`\n",
"# !pip install git+https://github.com/d70-t/ipfsspec"
]
},
{
"cell_type": "code",
"execution_count": 2,
"id": "538ac416-984e-497c-9b8d-bc378d05b3ed",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"<xarray.Dataset>\n",
"Dimensions: (time: 14532, zlev: 1, lat: 720, lon: 1440)\n",
"Coordinates:\n",
" * lat (lat) float32 -89.88 -89.62 -89.38 -89.12 ... 89.38 89.62 89.88\n",
" * lon (lon) float32 0.125 0.375 0.625 0.875 ... 359.1 359.4 359.6 359.9\n",
" * time (time) datetime64[ns] 1981-09-01T12:00:00 ... 2021-06-14T12:00:00\n",
" * zlev (zlev) float32 0.0\n",
"Data variables:\n",
" anom (time, zlev, lat, lon) float32 dask.array<chunksize=(20, 1, 720, 1440), meta=np.ndarray>\n",
" err (time, zlev, lat, lon) float32 dask.array<chunksize=(20, 1, 720, 1440), meta=np.ndarray>\n",
" ice (time, zlev, lat, lon) float32 dask.array<chunksize=(20, 1, 720, 1440), meta=np.ndarray>\n",
" sst (time, zlev, lat, lon) float32 dask.array<chunksize=(20, 1, 720, 1440), meta=np.ndarray>\n",
"Attributes: (12/37)\n",
" Conventions: CF-1.6, ACDD-1.3\n",
" cdm_data_type: Grid\n",
" comment: Data was converted from NetCDF-3 to NetCDF-4 ...\n",
" creator_email: oisst-help@noaa.gov\n",
" creator_url: https://www.ncei.noaa.gov/\n",
" date_created: 2020-05-08T19:05:13Z\n",
" ... ...\n",
" source: ICOADS, NCEP_GTS, GSFC_ICE, NCEP_ICE, Pathfin...\n",
" standard_name_vocabulary: CF Standard Name Table (v40, 25 January 2017)\n",
" summary: NOAAs 1/4-degree Daily Optimum Interpolation ...\n",
" time_coverage_end: 1981-09-01T23:59:59Z\n",
" time_coverage_start: 1981-09-01T00:00:00Z\n",
" title: NOAA/NCEI 1/4 Degree Daily Optimum Interpolat...\n",
"CPU times: user 4.71 s, sys: 735 ms, total: 5.44 s\n",
"Wall time: 4min 32s\n"
]
}
],
"source": [
"%%time\n",
"\n",
"import xarray as xr\n",
"\n",
"path = (\n",
" \"ipfs://QmfLZZBXj46yz6WHfnQErBkMj65GrbrQcUUBjgr1sbfUBT\"\n",
" \"/noaa_oisst/v2.1-avhrr.zarr\"\n",
")\n",
"ds = xr.open_zarr(path, consolidated=True)\n",
"print(ds)"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "ea34ec5c-e096-4a51-8b0d-68119eeb4423",
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "pangeo-forge3.8",
"language": "python",
"name": "pangeo-forge3.8"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.8"
}
},
"nbformat": 4,
"nbformat_minor": 5
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment