Skip to content

Commit 6b9eedd

Browse files
authored
a few more fixes (#139)
* a few more fixes * exec
1 parent 88ee9ef commit 6b9eedd

File tree

7 files changed

+16
-16
lines changed

7 files changed

+16
-16
lines changed

_config.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#######################################################################################
22
# A default configuration that will be loaded for all jupyter books
3-
# See the documentation for help and more options:
3+
# See the documentation for help and more options:
44
# https://jupyterbook.org/customize/config.html
55

66
#######################################################################################
@@ -11,7 +11,7 @@ copyright: "2014-2024" # Copyright year to be placed in the footer
1111
logo: img/logo.png # A path to the book logo
1212
repository:
1313
url: https://github.com/OGGM/tutorials
14-
path_to_book: .
14+
path_to_book: .
1515
branch: stable
1616
launch_buttons:
1717
notebook_interface: "jupyterlab"
@@ -25,7 +25,7 @@ html:
2525
use_edit_page_button: true
2626
announcement: |
2727
<p class="announcement">
28-
🚧 <strong>Scheduled maintenance:</strong> the OGGM cluster will be offline <strong>April 27 (evening CEST) – April 30 (morning CEST)</strong>.
28+
🚧 <strong>Scheduled maintenance:</strong> the OGGM cluster will be offline <strong>April 27 (evening CEST) – April 30 (morning CEST) 2025</strong>.
2929
<a href="https://oggm.org/2025/04/15/service-maintenance/">Learn more</a>.
3030
</p>
3131
extra_footer: |

_static/custom.css

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
html {
2-
--pst-font-size-h1: 2.2em; /* Default: 2.625 */
3-
--pst-font-size-h2: 1.6em; /* Default: 2.125 */
4-
--pst-font-size-h3: 1.2em; /* Default: 1.75 */
2+
--pst-font-size-h1: 2.2em; /* Default: 2.625 */
3+
--pst-font-size-h2: 1.7em; /* Default: 2.125 */
4+
--pst-font-size-h3: 1.3em; /* Default: 1.75 */
5+
--pst-font-size-h4: 1.0em; /* Default: ? */
56
}
67

78
.announcement {
8-
background-color: orange !important; /* You can use a hex or tailwind-inspired shade if preferred */
99
color: white !important;
1010
padding: 0.5em 1em;
1111
margin: 0;

notebooks/10minutes/machine_learning.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -898,7 +898,7 @@
898898
"outputs": [],
899899
"source": [
900900
"# Back to 2d and in xarray\n",
901-
"var = ds[vn].data * np.NaN\n",
901+
"var = ds[vn].data * np.nan\n",
902902
"var[ds.glacier_mask == 1] = pred_data['thick']\n",
903903
"ds['linear_model_thick'] = (('y', 'x'), var)\n",
904904
"ds['linear_model_thick'].attrs['description'] = 'Predicted thickness'\n",

notebooks/tutorials/inversion.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -586,7 +586,7 @@
586586
" vn = 'distributed_thickness'\n",
587587
" thick = nc.variables[vn][:]\n",
588588
" mask = nc.variables['glacier_mask'][:]\n",
589-
" thick = np.where(mask, thick, np.NaN)\n",
589+
" thick = np.where(mask, thick, np.nan)\n",
590590
" # The \"overplot=True\" is key here\n",
591591
" # this needs a recent version of salem to run properly\n",
592592
" smap.set_data(thick, crs=gdir.grid.center_grid, overplot=True)"
@@ -634,7 +634,7 @@
634634
"name": "python",
635635
"nbconvert_exporter": "python",
636636
"pygments_lexer": "ipython3",
637-
"version": "3.11.4"
637+
"version": "3.12.4"
638638
},
639639
"metadata": {
640640
"interpreter": {

notebooks/tutorials/oggm_shop.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,7 @@
374374
" demfile = os.path.join(gdir.dir, src) + '/dem.tif'\n",
375375
" with rioxr.open_rasterio(demfile) as ds:\n",
376376
" data = ds.sel(band=1).load() * 1.\n",
377-
" ods[src] = data.where(data > -100, np.NaN)\n",
377+
" ods[src] = data.where(data > -100, np.nan)\n",
378378
"\n",
379379
" sy, sx = np.gradient(ods[src], gdir.grid.dx, gdir.grid.dx)\n",
380380
" ods[src + '_slope'] = ('y', 'x'), np.arctan(np.sqrt(sy**2 + sx**2))\n",
@@ -852,7 +852,7 @@
852852
"name": "python",
853853
"nbconvert_exporter": "python",
854854
"pygments_lexer": "ipython3",
855-
"version": "3.11.4"
855+
"version": "3.12.4"
856856
},
857857
"latex_envs": {
858858
"LaTeX_envs_menu_present": true,

notebooks/tutorials/rgitopo_rgi6.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@
261261
" demfile = os.path.join(gdir.dir, src) + '/dem.tif'\n",
262262
" with rioxr.open_rasterio(demfile) as ds:\n",
263263
" data = ds.sel(band=1).load() * 1.\n",
264-
" ods[src] = data.where(data > -100, np.NaN)\n",
264+
" ods[src] = data.where(data > -100, np.nan)\n",
265265
" \n",
266266
" sy, sx = np.gradient(ods[src], gdir.grid.dx, gdir.grid.dx)\n",
267267
" ods[src + '_slope'] = ('y', 'x'), np.arctan(np.sqrt(sy**2 + sx**2))\n",
@@ -706,7 +706,7 @@
706706
"name": "python",
707707
"nbconvert_exporter": "python",
708708
"pygments_lexer": "ipython3",
709-
"version": "3.11.4"
709+
"version": "3.12.4"
710710
},
711711
"latex_envs": {
712712
"LaTeX_envs_menu_present": true,

notebooks/tutorials/rgitopo_rgi7.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@
271271
" demfile = os.path.join(gdir.dir, src) + '/dem.tif'\n",
272272
" with rioxr.open_rasterio(demfile) as ds:\n",
273273
" data = ds.sel(band=1).load() * 1.\n",
274-
" ods[src] = data.where(data > -100, np.NaN)\n",
274+
" ods[src] = data.where(data > -100, np.nan)\n",
275275
" \n",
276276
" sy, sx = np.gradient(ods[src], gdir.grid.dx, gdir.grid.dx)\n",
277277
" ods[src + '_slope'] = ('y', 'x'), np.arctan(np.sqrt(sy**2 + sx**2))\n",
@@ -718,7 +718,7 @@
718718
"name": "python",
719719
"nbconvert_exporter": "python",
720720
"pygments_lexer": "ipython3",
721-
"version": "3.11.4"
721+
"version": "3.12.4"
722722
},
723723
"latex_envs": {
724724
"LaTeX_envs_menu_present": true,

0 commit comments

Comments
 (0)