From 4669cda3dc34da07b4ece28ec165b03d733e1ed5 Mon Sep 17 00:00:00 2001 From: Fabien Maussion Date: Wed, 16 Apr 2025 11:07:03 +0100 Subject: [PATCH 1/2] a few more fixes --- _config.yml | 8 ++++---- _static/custom.css | 8 ++++---- notebooks/10minutes/machine_learning.ipynb | 2 +- notebooks/tutorials/inversion.ipynb | 4 ++-- notebooks/tutorials/oggm_shop.ipynb | 4 ++-- notebooks/tutorials/rgitopo_rgi6.ipynb | 4 ++-- notebooks/tutorials/rgitopo_rgi7.ipynb | 4 ++-- 7 files changed, 17 insertions(+), 17 deletions(-) diff --git a/_config.yml b/_config.yml index 60412bdb..86123082 100755 --- a/_config.yml +++ b/_config.yml @@ -1,6 +1,6 @@ ####################################################################################### # A default configuration that will be loaded for all jupyter books -# See the documentation for help and more options: +# See the documentation for help and more options: # https://jupyterbook.org/customize/config.html ####################################################################################### @@ -11,7 +11,7 @@ copyright: "2014-2024" # Copyright year to be placed in the footer logo: img/logo.png # A path to the book logo repository: url: https://github.com/OGGM/tutorials - path_to_book: . + path_to_book: . branch: stable launch_buttons: notebook_interface: "jupyterlab" @@ -25,7 +25,7 @@ html: use_edit_page_button: true announcement: |

- 🚧 Scheduled maintenance: the OGGM cluster will be offline April 27 (evening CEST) – April 30 (morning CEST). + 🚧 Scheduled maintenance: the OGGM cluster will be offline April 27 (evening CEST) – April 30 (morning CEST) 2025. Learn more.

extra_footer: | @@ -42,7 +42,7 @@ sphinx: html_js_files: - ['https://plausible.oggm.org/js/script.js', {'defer': 'defer', 'data-domain': 'tutorials.oggm.org'}] execute: - execute_notebooks: auto # off (for tests) + execute_notebooks: off # auto # off (for tests) timeout: -1 allow_errors: true exclude_patterns: [.virtual_documents/*,README.md,sandbox/*,ignore/*,ioggm*] diff --git a/_static/custom.css b/_static/custom.css index 420e1bdf..e1d1c1e3 100644 --- a/_static/custom.css +++ b/_static/custom.css @@ -1,11 +1,11 @@ html { - --pst-font-size-h1: 2.2em; /* Default: 2.625 */ - --pst-font-size-h2: 1.6em; /* Default: 2.125 */ - --pst-font-size-h3: 1.2em; /* Default: 1.75 */ + --pst-font-size-h1: 2.2em; /* Default: 2.625 */ + --pst-font-size-h2: 1.7em; /* Default: 2.125 */ + --pst-font-size-h3: 1.3em; /* Default: 1.75 */ + --pst-font-size-h4: 1.0em; /* Default: ? */ } .announcement { - background-color: orange !important; /* You can use a hex or tailwind-inspired shade if preferred */ color: white !important; padding: 0.5em 1em; margin: 0; diff --git a/notebooks/10minutes/machine_learning.ipynb b/notebooks/10minutes/machine_learning.ipynb index 6bfc07fe..07fe5cfa 100644 --- a/notebooks/10minutes/machine_learning.ipynb +++ b/notebooks/10minutes/machine_learning.ipynb @@ -898,7 +898,7 @@ "outputs": [], "source": [ "# Back to 2d and in xarray\n", - "var = ds[vn].data * np.NaN\n", + "var = ds[vn].data * np.nan\n", "var[ds.glacier_mask == 1] = pred_data['thick']\n", "ds['linear_model_thick'] = (('y', 'x'), var)\n", "ds['linear_model_thick'].attrs['description'] = 'Predicted thickness'\n", diff --git a/notebooks/tutorials/inversion.ipynb b/notebooks/tutorials/inversion.ipynb index 4ea6d6c5..d192bbfb 100644 --- a/notebooks/tutorials/inversion.ipynb +++ b/notebooks/tutorials/inversion.ipynb @@ -586,7 +586,7 @@ " vn = 'distributed_thickness'\n", " thick = nc.variables[vn][:]\n", " mask = nc.variables['glacier_mask'][:]\n", - " thick = np.where(mask, thick, np.NaN)\n", + " thick = np.where(mask, thick, np.nan)\n", " # The \"overplot=True\" is key here\n", " # this needs a recent version of salem to run properly\n", " smap.set_data(thick, crs=gdir.grid.center_grid, overplot=True)" @@ -634,7 +634,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.11.4" + "version": "3.12.4" }, "metadata": { "interpreter": { diff --git a/notebooks/tutorials/oggm_shop.ipynb b/notebooks/tutorials/oggm_shop.ipynb index 272c16e5..696dc9ea 100644 --- a/notebooks/tutorials/oggm_shop.ipynb +++ b/notebooks/tutorials/oggm_shop.ipynb @@ -374,7 +374,7 @@ " demfile = os.path.join(gdir.dir, src) + '/dem.tif'\n", " with rioxr.open_rasterio(demfile) as ds:\n", " data = ds.sel(band=1).load() * 1.\n", - " ods[src] = data.where(data > -100, np.NaN)\n", + " ods[src] = data.where(data > -100, np.nan)\n", "\n", " sy, sx = np.gradient(ods[src], gdir.grid.dx, gdir.grid.dx)\n", " ods[src + '_slope'] = ('y', 'x'), np.arctan(np.sqrt(sy**2 + sx**2))\n", @@ -852,7 +852,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.11.4" + "version": "3.12.4" }, "latex_envs": { "LaTeX_envs_menu_present": true, diff --git a/notebooks/tutorials/rgitopo_rgi6.ipynb b/notebooks/tutorials/rgitopo_rgi6.ipynb index d184f02b..34a6df42 100644 --- a/notebooks/tutorials/rgitopo_rgi6.ipynb +++ b/notebooks/tutorials/rgitopo_rgi6.ipynb @@ -261,7 +261,7 @@ " demfile = os.path.join(gdir.dir, src) + '/dem.tif'\n", " with rioxr.open_rasterio(demfile) as ds:\n", " data = ds.sel(band=1).load() * 1.\n", - " ods[src] = data.where(data > -100, np.NaN)\n", + " ods[src] = data.where(data > -100, np.nan)\n", " \n", " sy, sx = np.gradient(ods[src], gdir.grid.dx, gdir.grid.dx)\n", " ods[src + '_slope'] = ('y', 'x'), np.arctan(np.sqrt(sy**2 + sx**2))\n", @@ -706,7 +706,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.11.4" + "version": "3.12.4" }, "latex_envs": { "LaTeX_envs_menu_present": true, diff --git a/notebooks/tutorials/rgitopo_rgi7.ipynb b/notebooks/tutorials/rgitopo_rgi7.ipynb index 7095d0a0..f102c525 100644 --- a/notebooks/tutorials/rgitopo_rgi7.ipynb +++ b/notebooks/tutorials/rgitopo_rgi7.ipynb @@ -271,7 +271,7 @@ " demfile = os.path.join(gdir.dir, src) + '/dem.tif'\n", " with rioxr.open_rasterio(demfile) as ds:\n", " data = ds.sel(band=1).load() * 1.\n", - " ods[src] = data.where(data > -100, np.NaN)\n", + " ods[src] = data.where(data > -100, np.nan)\n", " \n", " sy, sx = np.gradient(ods[src], gdir.grid.dx, gdir.grid.dx)\n", " ods[src + '_slope'] = ('y', 'x'), np.arctan(np.sqrt(sy**2 + sx**2))\n", @@ -718,7 +718,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.11.4" + "version": "3.12.4" }, "latex_envs": { "LaTeX_envs_menu_present": true, From 40a19887b38f6f5c252231dbb1006ed51e20c3ee Mon Sep 17 00:00:00 2001 From: Fabien Maussion Date: Wed, 16 Apr 2025 11:08:05 +0100 Subject: [PATCH 2/2] exec --- _config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_config.yml b/_config.yml index 86123082..e2ab93ae 100755 --- a/_config.yml +++ b/_config.yml @@ -42,7 +42,7 @@ sphinx: html_js_files: - ['https://plausible.oggm.org/js/script.js', {'defer': 'defer', 'data-domain': 'tutorials.oggm.org'}] execute: - execute_notebooks: off # auto # off (for tests) + execute_notebooks: auto # off (for tests) timeout: -1 allow_errors: true exclude_patterns: [.virtual_documents/*,README.md,sandbox/*,ignore/*,ioggm*]