From 3b4a1ff6cf64662dc87780c49249264221faf5dc Mon Sep 17 00:00:00 2001 From: Jessica Scheick Date: Fri, 8 Dec 2023 18:09:56 +0000 Subject: [PATCH 1/3] add earthaccess tutorials to toc and remove spaces in filenames --- book/_toc.yml | 5 +++++ .... Intro-Earthdata-Cloud.md => 1.Intro-Earthdata-Cloud.md} | 0 .../{2. earthdata_search.md => 2.earthdata_search.md} | 0 .../{3. earthaccess.ipynb => 3.earthaccess.ipynb} | 0 .../{4. icepyx.ipynb => 4.icepyx.ipynb} | 0 5 files changed, 5 insertions(+) rename book/tutorials/NASA-Earthdata-Cloud-Access/{1. Intro-Earthdata-Cloud.md => 1.Intro-Earthdata-Cloud.md} (100%) rename book/tutorials/NASA-Earthdata-Cloud-Access/{2. earthdata_search.md => 2.earthdata_search.md} (100%) rename book/tutorials/NASA-Earthdata-Cloud-Access/{3. earthaccess.ipynb => 3.earthaccess.ipynb} (100%) rename book/tutorials/NASA-Earthdata-Cloud-Access/{4. icepyx.ipynb => 4.icepyx.ipynb} (100%) diff --git a/book/_toc.yml b/book/_toc.yml index e4eeb8c..a9a0dc6 100644 --- a/book/_toc.yml +++ b/book/_toc.yml @@ -47,6 +47,11 @@ parts: - file: tutorials/IS2_ATL15_surface_height_anomalies/IS2_ATL15_surface_height_anomalies - file: external/ICESAT2_ATL10-h5coro_large_scale_time_series - file: tutorials/ARCOdata_writingZarrs + sections: + - file: tutorials/NASA-Earthdata-Cloud-Access/1.Intro-Earthdata-Cloud.md + - file: tutorials/NASA-Earthdata-Cloud-Access/2.earthdata_search.md + - file: tutorials/NASA-Earthdata-Cloud-Access/3.earthaccess.ipynb + - file: tutorials/NASA-Earthdata-Cloud-Access/4.icepyx.ipynb - file: tutorials/GrIMP/GrIMP_tutorial_AGU23 - file: tutorials/SlideRule_applications/SlideRule_applications - caption: Contributing diff --git a/book/tutorials/NASA-Earthdata-Cloud-Access/1. Intro-Earthdata-Cloud.md b/book/tutorials/NASA-Earthdata-Cloud-Access/1.Intro-Earthdata-Cloud.md similarity index 100% rename from book/tutorials/NASA-Earthdata-Cloud-Access/1. Intro-Earthdata-Cloud.md rename to book/tutorials/NASA-Earthdata-Cloud-Access/1.Intro-Earthdata-Cloud.md diff --git a/book/tutorials/NASA-Earthdata-Cloud-Access/2. earthdata_search.md b/book/tutorials/NASA-Earthdata-Cloud-Access/2.earthdata_search.md similarity index 100% rename from book/tutorials/NASA-Earthdata-Cloud-Access/2. earthdata_search.md rename to book/tutorials/NASA-Earthdata-Cloud-Access/2.earthdata_search.md diff --git a/book/tutorials/NASA-Earthdata-Cloud-Access/3. earthaccess.ipynb b/book/tutorials/NASA-Earthdata-Cloud-Access/3.earthaccess.ipynb similarity index 100% rename from book/tutorials/NASA-Earthdata-Cloud-Access/3. earthaccess.ipynb rename to book/tutorials/NASA-Earthdata-Cloud-Access/3.earthaccess.ipynb diff --git a/book/tutorials/NASA-Earthdata-Cloud-Access/4. icepyx.ipynb b/book/tutorials/NASA-Earthdata-Cloud-Access/4.icepyx.ipynb similarity index 100% rename from book/tutorials/NASA-Earthdata-Cloud-Access/4. icepyx.ipynb rename to book/tutorials/NASA-Earthdata-Cloud-Access/4.icepyx.ipynb From d88b7db8c8e6077646541b513b4a3197c2d9b87a Mon Sep 17 00:00:00 2001 From: Jessica Scheick Date: Fri, 8 Dec 2023 18:53:38 +0000 Subject: [PATCH 2/3] filter warnings and remove stderr output from rendered notebook --- .../4.icepyx.ipynb | 54 ++++++------------- 1 file changed, 15 insertions(+), 39 deletions(-) diff --git a/book/tutorials/NASA-Earthdata-Cloud-Access/4.icepyx.ipynb b/book/tutorials/NASA-Earthdata-Cloud-Access/4.icepyx.ipynb index e11e3c6..6f46d2c 100644 --- a/book/tutorials/NASA-Earthdata-Cloud-Access/4.icepyx.ipynb +++ b/book/tutorials/NASA-Earthdata-Cloud-Access/4.icepyx.ipynb @@ -739,6 +739,7 @@ "source": [ "import json\n", "import math\n", + "import warnings\n", "\n", "import numpy as np\n", "import matplotlib.pyplot as plt\n", @@ -1414,16 +1415,6 @@ "tags": [] }, "outputs": [ - { - "name": "stderr", - "output_type": "stream", - "text": [ - "/srv/conda/envs/notebook/lib/python3.10/site-packages/icepyx/core/read.py:520: UserWarning: rename 'delta_time' to 'photon_idx' does not create an index anymore. Try using swap_dims instead or use set_index after rename to create an indexed coordinate.\n", - " .rename({\"delta_time\": \"photon_idx\"})\n", - "/srv/conda/envs/notebook/lib/python3.10/site-packages/icepyx/core/read.py:520: UserWarning: rename 'delta_time' to 'photon_idx' does not create an index anymore. Try using swap_dims instead or use set_index after rename to create an indexed coordinate.\n", - " .rename({\"delta_time\": \"photon_idx\"})\n" - ] - }, { "data": { "text/html": [ @@ -2050,7 +2041,10 @@ } ], "source": [ - "ds = reader.load()\n", + "# turn off warnings for load to not show an xarray warning that was resolved in the coming release of icepyx v1.0.0\n", + "with warnings.catch_warnings(record=True): \n", + " ds = reader.load()\n", + "\n", "ds" ] }, @@ -2184,20 +2178,6 @@ "id": "47fc67bb-5eba-4481-8dae-bc7248d09c91", "metadata": {}, "outputs": [ - { - "name": "stderr", - "output_type": "stream", - "text": [ - "/srv/conda/envs/notebook/lib/python3.10/site-packages/icepyx/core/read.py:520: UserWarning: rename 'delta_time' to 'photon_idx' does not create an index anymore. Try using swap_dims instead or use set_index after rename to create an indexed coordinate.\n", - " .rename({\"delta_time\": \"photon_idx\"})\n", - "/srv/conda/envs/notebook/lib/python3.10/site-packages/icepyx/core/read.py:520: UserWarning: rename 'delta_time' to 'photon_idx' does not create an index anymore. Try using swap_dims instead or use set_index after rename to create an indexed coordinate.\n", - " .rename({\"delta_time\": \"photon_idx\"})\n", - "/srv/conda/envs/notebook/lib/python3.10/site-packages/icepyx/core/read.py:520: UserWarning: rename 'delta_time' to 'photon_idx' does not create an index anymore. Try using swap_dims instead or use set_index after rename to create an indexed coordinate.\n", - " .rename({\"delta_time\": \"photon_idx\"})\n", - "/srv/conda/envs/notebook/lib/python3.10/site-packages/icepyx/core/read.py:520: UserWarning: rename 'delta_time' to 'photon_idx' does not create an index anymore. Try using swap_dims instead or use set_index after rename to create an indexed coordinate.\n", - " .rename({\"delta_time\": \"photon_idx\"})\n" - ] - }, { "data": { "text/html": [ @@ -2642,8 +2622,11 @@ } ], "source": [ - "# load the dataset\n", - "ds_photons = reader.load()\n", + "# turn off warnings for load to not show an xarray warning that was resolved in the coming release of icepyx v1.0.0\n", + "with warnings.catch_warnings(record=True):\n", + " # load the dataset\n", + " ds_photons = reader.load()\n", + " \n", "ds_photons" ] }, @@ -2774,16 +2757,6 @@ "id": "25272b20-5b03-4213-af06-1d73799fab70", "metadata": {}, "outputs": [ - { - "name": "stderr", - "output_type": "stream", - "text": [ - "/srv/conda/envs/notebook/lib/python3.10/site-packages/icepyx/core/read.py:520: UserWarning: rename 'delta_time' to 'photon_idx' does not create an index anymore. Try using swap_dims instead or use set_index after rename to create an indexed coordinate.\n", - " .rename({\"delta_time\": \"photon_idx\"})\n", - "/srv/conda/envs/notebook/lib/python3.10/site-packages/icepyx/core/read.py:520: UserWarning: rename 'delta_time' to 'photon_idx' does not create an index anymore. Try using swap_dims instead or use set_index after rename to create an indexed coordinate.\n", - " .rename({\"delta_time\": \"photon_idx\"})\n" - ] - }, { "data": { "text/html": [ @@ -3405,8 +3378,11 @@ } ], "source": [ - "# load the data\n", - "ds_te = reader.load()\n", + "# turn off warnings for load to not show an xarray warning that was resolved in the coming release of icepyx v1.0.0\n", + "with warnings.catch_warnings(record=True):\n", + " # load the data\n", + " ds_te = reader.load()\n", + " \n", "ds_te" ] }, From 3aa157606597b075a667e93d7904908846de7396 Mon Sep 17 00:00:00 2001 From: Jessica Scheick Date: Fri, 8 Dec 2023 18:59:44 +0000 Subject: [PATCH 3/3] fix indentation --- book/_toc.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/book/_toc.yml b/book/_toc.yml index a9a0dc6..5338237 100644 --- a/book/_toc.yml +++ b/book/_toc.yml @@ -47,11 +47,11 @@ parts: - file: tutorials/IS2_ATL15_surface_height_anomalies/IS2_ATL15_surface_height_anomalies - file: external/ICESAT2_ATL10-h5coro_large_scale_time_series - file: tutorials/ARCOdata_writingZarrs - sections: - - file: tutorials/NASA-Earthdata-Cloud-Access/1.Intro-Earthdata-Cloud.md - - file: tutorials/NASA-Earthdata-Cloud-Access/2.earthdata_search.md - - file: tutorials/NASA-Earthdata-Cloud-Access/3.earthaccess.ipynb - - file: tutorials/NASA-Earthdata-Cloud-Access/4.icepyx.ipynb + sections: + - file: tutorials/NASA-Earthdata-Cloud-Access/1.Intro-Earthdata-Cloud + - file: tutorials/NASA-Earthdata-Cloud-Access/2.earthdata_search + - file: tutorials/NASA-Earthdata-Cloud-Access/3.earthaccess + - file: tutorials/NASA-Earthdata-Cloud-Access/4.icepyx - file: tutorials/GrIMP/GrIMP_tutorial_AGU23 - file: tutorials/SlideRule_applications/SlideRule_applications - caption: Contributing