Skip to content

Commit

Permalink
update notebooks
Browse files Browse the repository at this point in the history
  • Loading branch information
cehbrecht committed Nov 3, 2021
1 parent 120cf2a commit 77ee4cf
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
11 changes: 6 additions & 5 deletions notebooks/demo/demo-intake-catalog.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@
"metadata": {},
"outputs": [],
"source": [
"# cat_url = \"https://raw.githubusercontent.com/cp4cds/c3s_34g_manifests/master/intake/catalogs/c3s.yaml\"\n",
"cat_url = \"https://github.com/cehbrecht/c3s_34g_manifests/raw/fix-intake-catalog/intake/catalogs/c3s.yaml\"\n",
"cat_url = \"https://raw.githubusercontent.com/cp4cds/c3s_34g_manifests/master/intake/catalogs/c3s.yaml\"\n",
"cat = intake.open_catalog(cat_url)\n"
]
},
Expand Down Expand Up @@ -166,6 +165,8 @@
" end = end or \"2500-12-31\"\n",
" \n",
" sdf = df.fillna({'start_time': '1000-01-01T12:00:00', 'end_time': '3000-12-31T12:00:00'})\n",
" sdf['start_time'].where(~(sdf.start_time == 'undefined'), other='1000-01-01T12:00:00', inplace=True)\n",
" sdf['end_time'].where(~(sdf.end_time == 'undefined'), other='1000-01-01T12:00:00', inplace=True)\n",
"\n",
" result = sdf.loc[(sdf.ds_id == collection) & (sdf.end_time >= start) & (sdf.start_time <= end)]\n",
" return list(result.path.sort_values().to_dict().values())\n",
Expand All @@ -190,7 +191,7 @@
"result = search(\n",
" df, \n",
" collection=\"c3s-cmip6.CMIP.SNU.SAM0-UNICON.historical.r1i1p1f1.day.pr.gn.v20190323\",\n",
" time=\"2000-01-01/2001-12-31\")\n",
" time=\"2000-01-01/2000-12-31\")\n",
"result"
]
},
Expand Down Expand Up @@ -219,7 +220,7 @@
"metadata": {},
"outputs": [],
"source": [
"collection = df.iloc[29].ds_id\n",
"collection = df.iloc[948].ds_id\n",
"collection"
]
},
Expand All @@ -230,7 +231,7 @@
"metadata": {},
"outputs": [],
"source": [
"result = search(df, collection=collection, time=\"2000-01-01/2010-12-31\")\n",
"result = search(df, collection=collection, time=\"2000-01-01/2000-12-31\")\n",
"result"
]
},
Expand Down
6 changes: 3 additions & 3 deletions notebooks/demo/rook-dashboard.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@
"name": "stdout",
"output_type": "stream",
"text": [
"http://rook4.cloud.dkrz.de:80/outputs/rook/cb4c62f2-e560-11eb-abf2-fa163e1098db/dashboard.html\n"
"http://rook4.cloud.dkrz.de:80/outputs/rook/60f6842a-3c9d-11ec-a6ab-fa163e1098db/dashboard.html\n"
]
}
],
"source": [
"rooki = Rooki(\"http://rook.dkrz.de/wps\", mode='sync')\n",
"resp = rooki.dashboard(site=\"dkrz\", time=\"2021-06-01/\")\n",
"resp = rooki.dashboard(site=\"dkrz\", time=\"2021-10-01/\")\n",
"url = resp.response.processOutputs[0].reference\n",
"print(url)"
]
Expand All @@ -48,7 +48,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.6"
"version": "3.9.7"
}
},
"nbformat": 4,
Expand Down

0 comments on commit 77ee4cf

Please sign in to comment.