From d3218b65a49e3f9e068c750c493d7ad398f902ec Mon Sep 17 00:00:00 2001 From: Mostafa Farrag Date: Sun, 8 Dec 2024 22:07:27 +0100 Subject: [PATCH] update notebooks --- .../02spatial-operation-methods.ipynb | 75 +++++++++---------- examples/notebooks/03convert-longitude.ipynb | 18 +---- examples/notebooks/south-america.ipynb | 31 +++----- 3 files changed, 51 insertions(+), 73 deletions(-) diff --git a/examples/notebooks/02spatial-operation-methods.ipynb b/examples/notebooks/02spatial-operation-methods.ipynb index e30f2ecb..f95870d2 100644 --- a/examples/notebooks/02spatial-operation-methods.ipynb +++ b/examples/notebooks/02spatial-operation-methods.ipynb @@ -91,13 +91,14 @@ { "cell_type": "code", "source": [ + "# NBVAL_IGNORE_OUTPUT\n", "dataset.plot(vmin=0, title=\"Rhine River Basin\", cbar_label=\"Elevation(m)\")" ], "metadata": { "collapsed": false, "ExecuteTime": { - "end_time": "2024-12-08T20:50:05.700719Z", - "start_time": "2024-12-08T20:50:03.463903Z" + "end_time": "2024-12-08T21:02:22.273555Z", + "start_time": "2024-12-08T21:02:22.076044Z" } }, "outputs": [ @@ -114,15 +115,15 @@ { "data": { "text/plain": [ - "" + "" ] }, - "execution_count": 4, + "execution_count": 21, "metadata": {}, "output_type": "execute_result" } ], - "execution_count": 4 + "execution_count": 21 }, { "cell_type": "markdown", @@ -174,12 +175,15 @@ { "metadata": { "ExecuteTime": { - "end_time": "2024-12-08T20:50:15.333156Z", - "start_time": "2024-12-08T20:50:15.066208Z" + "end_time": "2024-12-08T21:02:18.361024Z", + "start_time": "2024-12-08T21:02:18.020663Z" } }, "cell_type": "code", - "source": "dataset_8km.plot(vmin=0, title=\"Rhine River Basin (resampled to 8 km)\", cbar_label=\"Elevation(m)\")", + "source": [ + "# NBVAL_IGNORE_OUTPUT\n", + "dataset_8km.plot(vmin=0, title=\"Rhine River Basin (resampled to 8 km)\", cbar_label=\"Elevation(m)\")" + ], "outputs": [ { "data": { @@ -194,15 +198,15 @@ { "data": { "text/plain": [ - "" + "" ] }, - "execution_count": 7, + "execution_count": 20, "metadata": {}, "output_type": "execute_result" } ], - "execution_count": 7 + "execution_count": 20 }, { "cell_type": "markdown", @@ -295,13 +299,14 @@ { "cell_type": "code", "source": [ + "# NBVAL_IGNORE_OUTPUT\n", "resampled_dataset.plot(vmin=0, title=\"Rhine River Basin (reprojected to WGS 84)\", cbar_label=\"Elevation(m)\")" ], "metadata": { "collapsed": false, "ExecuteTime": { - "end_time": "2024-12-08T20:50:24.411253Z", - "start_time": "2024-12-08T20:50:24.198997Z" + "end_time": "2024-12-08T21:02:37.650093Z", + "start_time": "2024-12-08T21:02:37.469037Z" } }, "outputs": [ @@ -318,15 +323,15 @@ { "data": { "text/plain": [ - "" + "" ] }, - "execution_count": 11, + "execution_count": 22, "metadata": {}, "output_type": "execute_result" } ], - "execution_count": 11 + "execution_count": 22 }, { "cell_type": "markdown", @@ -393,12 +398,13 @@ { "metadata": { "ExecuteTime": { - "end_time": "2024-12-08T20:50:33.665217Z", - "start_time": "2024-12-08T20:50:33.283836Z" + "end_time": "2024-12-08T21:03:01.840130Z", + "start_time": "2024-12-08T21:03:01.668195Z" } }, "cell_type": "code", "source": [ + "# NBVAL_IGNORE_OUTPUT\n", "glyph = meteo_data.plot(\n", " band=0, figsize=(10, 5), title=\"Noah daily Precipitation 1979-01-01\", cbar_label=\"Raindall mm/day\", vmax=30,\n", " cbar_length=0.85\n", @@ -416,7 +422,7 @@ "output_type": "display_data" } ], - "execution_count": 14 + "execution_count": 23 }, { "metadata": { @@ -433,13 +439,14 @@ { "cell_type": "code", "source": [ + "# NBVAL_IGNORE_OUTPUT\n", "meteo_data_r.plot(band=0)" ], "metadata": { "collapsed": false, "ExecuteTime": { - "end_time": "2024-12-08T20:50:42.402277Z", - "start_time": "2024-12-08T20:50:42.160878Z" + "end_time": "2024-12-08T21:03:22.350554Z", + "start_time": "2024-12-08T21:03:22.149101Z" } }, "outputs": [ @@ -456,15 +463,15 @@ { "data": { "text/plain": [ - "" + "" ] }, - "execution_count": 16, + "execution_count": 24, "metadata": {}, "output_type": "execute_result" } ], - "execution_count": 16 + "execution_count": 24 }, { "cell_type": "code", @@ -483,14 +490,12 @@ }, { "cell_type": "code", - "source": [ - "rhine_meteo_data.plot(band=0)" - ], + "source": "rhine_glyph = rhine_meteo_data.plot(band=0)", "metadata": { "collapsed": false, "ExecuteTime": { - "end_time": "2024-12-08T20:50:47.295641Z", - "start_time": "2024-12-08T20:50:47.064249Z" + "end_time": "2024-12-08T21:03:49.401907Z", + "start_time": "2024-12-08T21:03:49.190520Z" } }, "outputs": [ @@ -503,19 +508,9 @@ }, "metadata": {}, "output_type": "display_data" - }, - { - "data": { - "text/plain": [ - "" - ] - }, - "execution_count": 18, - "metadata": {}, - "output_type": "execute_result" } ], - "execution_count": 18 + "execution_count": 25 }, { "cell_type": "code", diff --git a/examples/notebooks/03convert-longitude.ipynb b/examples/notebooks/03convert-longitude.ipynb index 1dafc0d7..6eb185a6 100644 --- a/examples/notebooks/03convert-longitude.ipynb +++ b/examples/notebooks/03convert-longitude.ipynb @@ -196,7 +196,7 @@ { "cell_type": "code", "source": [ - "new_dataset.plot(\n", + "new_glyph = new_dataset.plot(\n", " band=0, figsize=(10, 5), title=\"NOAH daily Precipitation 1979-01-01\", cbar_label=\"RainFall mm/day\", vmax=30,\n", " cbar_length=0.85\n", ")" @@ -204,8 +204,8 @@ "metadata": { "collapsed": false, "ExecuteTime": { - "end_time": "2024-12-08T20:51:46.309972Z", - "start_time": "2024-12-08T20:51:46.088502Z" + "end_time": "2024-12-08T21:04:41.180834Z", + "start_time": "2024-12-08T21:04:40.953862Z" } }, "outputs": [ @@ -218,19 +218,9 @@ }, "metadata": {}, "output_type": "display_data" - }, - { - "data": { - "text/plain": [ - "" - ] - }, - "execution_count": 7, - "metadata": {}, - "output_type": "execute_result" } ], - "execution_count": 7 + "execution_count": 11 }, { "cell_type": "code", diff --git a/examples/notebooks/south-america.ipynb b/examples/notebooks/south-america.ipynb index 39dd7df4..b96f8694 100644 --- a/examples/notebooks/south-america.ipynb +++ b/examples/notebooks/south-america.ipynb @@ -63,12 +63,12 @@ { "metadata": { "ExecuteTime": { - "end_time": "2024-12-08T20:53:39.803546Z", - "start_time": "2024-12-08T20:53:38.893215Z" + "end_time": "2024-12-08T21:05:11.703489Z", + "start_time": "2024-12-08T21:05:11.457171Z" } }, "cell_type": "code", - "source": "dataset.plot()", + "source": "glyph = dataset.plot()", "id": "faf1ea9faa725890", "outputs": [ { @@ -80,19 +80,9 @@ }, "metadata": {}, "output_type": "display_data" - }, - { - "data": { - "text/plain": [ - "" - ] - }, - "execution_count": 3, - "metadata": {}, - "output_type": "execute_result" } ], - "execution_count": 3 + "execution_count": 36 }, { "metadata": {}, @@ -1158,12 +1148,15 @@ { "metadata": { "ExecuteTime": { - "end_time": "2024-12-08T20:54:35.252771Z", - "start_time": "2024-12-08T20:54:35.247254Z" + "end_time": "2024-12-08T21:06:17.538866Z", + "start_time": "2024-12-08T21:06:17.534382Z" } }, "cell_type": "code", - "source": "arr", + "source": [ + "# NBVAL_IGNORE_OUTPUT\n", + "arr" + ], "id": "c7db63cf1b26288b", "outputs": [ { @@ -1179,12 +1172,12 @@ " dtype=float32)" ] }, - "execution_count": 30, + "execution_count": 37, "metadata": {}, "output_type": "execute_result" } ], - "execution_count": 30 + "execution_count": 37 }, { "metadata": {