Created
May 25, 2021 01:41
-
-
Save cisaacstern/59b39cb86308fa62c9d0da17b1f8630b to your computer and use it in GitHub Desktop.
This file contains 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
{ | |
"cells": [ | |
{ | |
"cell_type": "code", | |
"execution_count": 1, | |
"id": "specific-broadway", | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"import s3fs\n", | |
"import xarray as xr" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 2, | |
"id": "welcome-timing", | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"endpoint_url = 'https://ncsa.osn.xsede.org'\n", | |
"fs_osn = s3fs.S3FileSystem(anon=True, client_kwargs={'endpoint_url': endpoint_url},)" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 3, | |
"id": "alone-giving", | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"name": "stdout", | |
"output_type": "stream", | |
"text": [ | |
"<xarray.Dataset>\n", | |
"Dimensions: (lat: 615, lon: 503, time: 696)\n", | |
"Coordinates:\n", | |
" * time (time) object 0020-02-02 01:00:00 ... 0020-03-02 00:00:00\n", | |
"Dimensions without coordinates: lat, lon\n", | |
"Data variables:\n", | |
" latitude (lat) float32 dask.array<chunksize=(615,), meta=np.ndarray>\n", | |
" longitude (lon) float32 dask.array<chunksize=(503,), meta=np.ndarray>\n", | |
" ssh (time, lat, lon) float32 dask.array<chunksize=(24, 615, 503), meta=np.ndarray>\n", | |
" sss (time, lat, lon) float32 dask.array<chunksize=(24, 615, 503), meta=np.ndarray>\n", | |
" sst (time, lat, lon) float32 dask.array<chunksize=(24, 615, 503), meta=np.ndarray>\n", | |
" tauewd (time, lat, lon) float32 dask.array<chunksize=(24, 615, 503), meta=np.ndarray>\n", | |
" taunwd (time, lat, lon) float32 dask.array<chunksize=(24, 615, 503), meta=np.ndarray>\n", | |
" uu1 (time, lat, lon) float32 dask.array<chunksize=(24, 615, 503), meta=np.ndarray>\n", | |
" vv1 (time, lat, lon) float32 dask.array<chunksize=(24, 615, 503), meta=np.ndarray>\n" | |
] | |
}, | |
{ | |
"name": "stderr", | |
"output_type": "stream", | |
"text": [ | |
"/srv/conda/envs/notebook/lib/python3.8/site-packages/xarray/coding/times.py:527: SerializationWarning: Unable to decode time axis into full numpy.datetime64 objects, continuing using cftime.datetime objects instead, reason: dates out of range\n", | |
" dtype = _decode_cf_datetime_dtype(data, units, calendar, self.use_cftime)\n", | |
"/srv/conda/envs/notebook/lib/python3.8/site-packages/numpy/core/_asarray.py:102: SerializationWarning: Unable to decode time axis into full numpy.datetime64 objects, continuing using cftime.datetime objects instead, reason: dates out of range\n", | |
" return array(a, dtype, copy=False, order=order)\n" | |
] | |
} | |
], | |
"source": [ | |
"root_path = 's3://Pangeo/pangeo-forge/swot_adac/HYCOM50/surf_01.zarr'\n", | |
"zarr_dataset = xr.open_zarr(fs_osn.get_mapper(root_path), consolidated=True)\n", | |
"print(zarr_dataset)" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": null, | |
"id": "overhead-valuation", | |
"metadata": {}, | |
"outputs": [], | |
"source": [] | |
} | |
], | |
"metadata": { | |
"kernelspec": { | |
"display_name": "Python [conda env:notebook] *", | |
"language": "python", | |
"name": "conda-env-notebook-py" | |
}, | |
"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.6" | |
} | |
}, | |
"nbformat": 4, | |
"nbformat_minor": 5 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment