diff --git a/tutorial/examples/notebooks/save_to_cesnet_bucket_zarr-without_find.ipynb b/tutorial/examples/notebooks/save_to_cesnet_bucket_zarr-without_find.ipynb new file mode 100644 index 0000000..2cb0c5a --- /dev/null +++ b/tutorial/examples/notebooks/save_to_cesnet_bucket_zarr-without_find.ipynb @@ -0,0 +1,825 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "id": "several-banking", + "metadata": {}, + "source": [ + "# Save files to EOSC (CESNET)\n", + "\n", + "\n", + "- This example show you how to save your zarr file to object storage https://object-store.cloud.muni.cz" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "id": "another-shelf", + "metadata": { + "tags": [] + }, + "outputs": [], + "source": [ + "import s3fs\n", + "import xarray as xr\n", + "import zarr" + ] + }, + { + "cell_type": "markdown", + "id": "simple-uzbekistan", + "metadata": {}, + "source": [ + "## Get a sample file" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "id": "heard-queen", + "metadata": {}, + "outputs": [], + "source": [ + "ds = xr.tutorial.open_dataset(\"air_temperature.nc\").rename({\"air\": \"Tair\"})" + ] + }, + { + "cell_type": "markdown", + "id": "quick-style", + "metadata": {}, + "source": [ + "## Save your results to Remote object storage\n", + "- If not done, create your credentials by follwoing [this link](../EOSC_to_bucket.md)\n", + "- Verify your credentials in `$HOME/.aws/credentials` \n", + "It should look like \n", + "\n", + "```\n", + "[default]\n", + "aws_access_key_id=xxxxx\n", + "aws_secret_access_key=yyyy\n", + "aws_endpoint_url=https://object-store.cloud.muni.cz\n", + "```\n" + ] + }, + { + "cell_type": "markdown", + "id": "ecef7710-dd4b-4bb4-9d26-f56921645181", + "metadata": {}, + "source": [ + "
<xarray.Dataset>\n", + "Dimensions: (time: 2920, lat: 25, lon: 53)\n", + "Coordinates:\n", + " * lat (lat) float32 75.0 72.5 70.0 67.5 65.0 ... 25.0 22.5 20.0 17.5 15.0\n", + " * lon (lon) float32 200.0 202.5 205.0 207.5 ... 322.5 325.0 327.5 330.0\n", + " * time (time) datetime64[ns] 2013-01-01 ... 2014-12-31T18:00:00\n", + "Data variables:\n", + " Tair (time, lat, lon) float32 dask.array<chunksize=(730, 13, 27), meta=np.ndarray>\n", + "Attributes:\n", + " Conventions: COARDS\n", + " description: Data is from NMC initialized reanalysis\\n(4x/day). These a...\n", + " platform: Model\n", + " references: http://www.esrl.noaa.gov/psd/data/gridded/data.ncep.reanaly...\n", + " title: 4x daily NMC reanalysis (1948)
<xarray.Dataset>\n", + "Dimensions: (time: 2920, lat: 25, lon: 53)\n", + "Coordinates:\n", + " * lat (lat) float32 75.0 72.5 70.0 67.5 65.0 ... 25.0 22.5 20.0 17.5 15.0\n", + " * lon (lon) float32 200.0 202.5 205.0 207.5 ... 322.5 325.0 327.5 330.0\n", + " * time (time) datetime64[ns] 2013-01-01 ... 2014-12-31T18:00:00\n", + "Data variables:\n", + " Tair (time, lat, lon) float32 dask.array<chunksize=(730, 13, 27), meta=np.ndarray>\n", + "Attributes:\n", + " Conventions: COARDS\n", + " description: Data is from NMC initialized reanalysis\\n(4x/day). These a...\n", + " platform: Model\n", + " references: http://www.esrl.noaa.gov/psd/data/gridded/data.ncep.reanaly...\n", + " title: 4x daily NMC reanalysis (1948)