diff --git a/talks/FrevaZarrStreaming/LoadData.ipynb b/talks/FrevaZarrStreaming/LoadData.ipynb index 4a7f6bd..72eaaa7 100644 --- a/talks/FrevaZarrStreaming/LoadData.ipynb +++ b/talks/FrevaZarrStreaming/LoadData.ipynb @@ -61,7 +61,7 @@ }, { "cell_type": "code", - "execution_count": 24, + "execution_count": 1, "id": "de5c74e7-c522-4e1d-87c0-71dbca2f5be5", "metadata": { "editable": true, @@ -72,10 +72,11 @@ }, "outputs": [], "source": [ - "search_params = {\"file\": \"/home/*\", \"project\": \"cmip6\"} # Define our search parameters\n", + "search_params = {\"dataset\": \"cmip6-fs\", \"project\": \"cmip6\"} # Define our search parameters\n", "url = \"http://localhost:7777\" # URL of our test server.\n", "from getpass import getpass\n", "import requests\n", + "from tempfile import NamedTemporaryFile\n", "import xarray as xr" ] }, @@ -95,7 +96,7 @@ }, { "cell_type": "code", - "execution_count": 22, + "execution_count": 2, "id": "8ae9d0dc-5a4c-4a48-9f4d-063bf6911ad2", "metadata": { "editable": true, @@ -108,11 +109,11 @@ { "data": { "text/plain": [ - "['/home/wilfred/workspace/databrowser/freva-rest/src/databrowser_api/tests/mock/data/model/global/cmip6/CMIP6/CMIP/MPI-M/MPI-ESM1-2-LR/amip/r2i1p1f1/Amon/ua/gn/v20190815/ua_mon_MPI-ESM1-2-LR_amip_r2i1p1f1_gn_197901-199812.nc',\n", - " '/home/wilfred/workspace/databrowser/freva-rest/src/databrowser_api/tests/mock/data/model/global/cmip6/CMIP6/CMIP/CSIRO-ARCCSS/ACCESS-CM2/amip/r1i1p1f1/Amon/ua/gn/v20201108/ua_Amon_ACCESS-CM2_amip_r1i1p1f1_gn_197901-201412.nc']" + "['/home/wilfred/workspace/freva-nextgen/freva-rest/src/databrowser_api/mock/data/model/global/cmip6/CMIP6/CMIP/MPI-M/MPI-ESM1-2-LR/amip/r2i1p1f1/Amon/ua/gn/v20190815/ua_mon_MPI-ESM1-2-LR_amip_r2i1p1f1_gn_197901-199812.nc',\n", + " '/home/wilfred/workspace/freva-nextgen/freva-rest/src/databrowser_api/mock/data/model/global/cmip6/CMIP6/CMIP/CSIRO-ARCCSS/ACCESS-CM2/amip/r1i1p1f1/Amon/ua/gn/v20201108/ua_Amon_ACCESS-CM2_amip_r1i1p1f1_gn_197901-201412.nc']" ] }, - "execution_count": 22, + "execution_count": 2, "metadata": {}, "output_type": "execute_result" } @@ -144,7 +145,7 @@ }, { "cell_type": "code", - "execution_count": 28, + "execution_count": 3, "id": "722d3bec-4cf2-44b2-9f3e-4f8bd81b9287", "metadata": { "editable": true, @@ -158,14 +159,14 @@ "name": "stdin", "output_type": "stream", "text": [ - "Password: ········\n" + "Password: ········\n" ] } ], "source": [ "auth = requests.post(\n", " f\"{url}/api/auth/v2/token\",\n", - " data={\"username\": \"janedoe\", \"password\":getpass(\"Password:\")}\n", + " data={\"username\": \"janedoe\", \"password\":getpass(\"Password: \")}\n", ").json()" ] }, @@ -186,7 +187,7 @@ }, { "cell_type": "code", - "execution_count": 29, + "execution_count": 4, "id": "b2fe0507-014a-4f0a-ac6f-5881d16af761", "metadata": { "editable": true, @@ -201,8 +202,8 @@ " f\"{url}/api/databrowser/load/freva\", \n", " params=search_params, \n", " headers={\n", - " \"Authorization\": f\"Bearer {auth['access_token']\n", - " }\"},\n", + " \"Authorization\": f\"Bearer {auth['access_token']}\"\n", + " },\n", " stream=True\n", ")" ] @@ -223,7 +224,7 @@ }, { "cell_type": "code", - "execution_count": 30, + "execution_count": 5, "id": "d10716a7-a784-4418-82b3-469070a4d5b6", "metadata": { "editable": true, @@ -236,11 +237,11 @@ { "data": { "text/plain": [ - "['http://localhost:7777/api/freva-data-portal/zarr/16ac2b17-6a0d-551e-9b1c-abcbfc41f4dd.zarr',\n", - " 'http://localhost:7777/api/freva-data-portal/zarr/e39716b7-abde-56f7-8cde-4e9d9f2e4ea8.zarr']" + "['http://localhost:7777/api/freva-data-portal/zarr/dcb608a0-9d77-5045-b656-f21dfb5e9acf.zarr',\n", + " 'http://localhost:7777/api/freva-data-portal/zarr/f56264e3-d713-5c27-bc4e-c97f15b5fe86.zarr']" ] }, - "execution_count": 30, + "execution_count": 5, "metadata": {}, "output_type": "execute_result" } @@ -268,7 +269,7 @@ }, { "cell_type": "code", - "execution_count": 32, + "execution_count": 6, "id": "a2273537-3666-4abf-880a-ab5fd9594bed", "metadata": { "editable": true, @@ -670,23 +671,23 @@ " license: CMIP6 model data produced by MPI-M is licensed und...\n", " cmor_version: 3.5.0\n", " tracking_id: hdl:21.14100/0898c2ad-5382-4d0c-8adb-2ca96387fb54\n", - " CDO: Climate Data Operators version 2.0.6 (https://mpim...