Skip to content

Commit 7d5f2d4

Browse files
committed
Fix tiny bug printing the index of the for loop and not the index of the experiment
1 parent a61baa1 commit 7d5f2d4

1 file changed

Lines changed: 16 additions & 13 deletions

File tree

docs/examples/example_idealised_flow.ipynb

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,10 @@
2828
"import parcels\n",
2929
"\n",
3030
"# Plotting imports\n",
31-
"import matplotlib.pyplot as plt"
31+
"import matplotlib.pyplot as plt\n",
32+
"\n",
33+
"import warnings\n",
34+
"warnings.filterwarnings(\"ignore\")"
3235
]
3336
},
3437
{
@@ -341,7 +344,7 @@
341344
"output_type": "stream",
342345
"text": [
343346
"INFO: Output files are stored in example_idealised_flow_experiment_1.zarr.\n",
344-
"100%|██████████| 345600.0/345600.0 [00:38<00:00, 8911.29it/s]\n"
347+
"100%|██████████| 345600.0/345600.0 [00:44<00:00, 7791.01it/s]\n"
345348
]
346349
}
347350
],
@@ -421,7 +424,7 @@
421424
"output_type": "stream",
422425
"text": [
423426
"INFO: Output files are stored in example_idealised_flow_experiment_2.zarr.\n",
424-
"100%|██████████| 345600.0/345600.0 [00:47<00:00, 7258.52it/s]\n"
427+
"100%|██████████| 345600.0/345600.0 [00:55<00:00, 6278.37it/s]\n"
425428
]
426429
}
427430
],
@@ -501,7 +504,7 @@
501504
"output_type": "stream",
502505
"text": [
503506
"INFO: Output files are stored in example_idealised_flow_experiment_3.zarr.\n",
504-
"100%|██████████| 345600.0/345600.0 [00:55<00:00, 6218.34it/s]\n"
507+
"100%|██████████| 345600.0/345600.0 [01:00<00:00, 5742.26it/s]\n"
505508
]
506509
}
507510
],
@@ -581,7 +584,7 @@
581584
"output_type": "stream",
582585
"text": [
583586
"INFO: Output files are stored in example_idealised_flow_experiment_4.zarr.\n",
584-
"100%|██████████| 345600.0/345600.0 [00:49<00:00, 7013.46it/s]\n"
587+
"100%|██████████| 345600.0/345600.0 [00:53<00:00, 6502.73it/s]\n"
585588
]
586589
}
587590
],
@@ -661,7 +664,7 @@
661664
"output_type": "stream",
662665
"text": [
663666
"INFO: Output files are stored in example_idealised_flow_experiment_5.zarr.\n",
664-
"100%|██████████| 345600.0/345600.0 [01:07<00:00, 5152.07it/s]\n"
667+
"100%|██████████| 345600.0/345600.0 [01:21<00:00, 4246.80it/s]\n"
665668
]
666669
}
667670
],
@@ -719,7 +722,7 @@
719722
"name": "stdout",
720723
"output_type": "stream",
721724
"text": [
722-
"Final depth range of particles in experiment 0: 557.2360 to 557.2360 m\n"
725+
"Final depth range of particles in experiment 1: 557.2360 to 557.2360 m\n"
723726
]
724727
},
725728
{
@@ -736,7 +739,7 @@
736739
"name": "stdout",
737740
"output_type": "stream",
738741
"text": [
739-
"Final depth range of particles in experiment 1: 0.0000 to 0.0000 m\n"
742+
"Final depth range of particles in experiment 2: 0.0000 to 0.0000 m\n"
740743
]
741744
},
742745
{
@@ -753,7 +756,7 @@
753756
"name": "stdout",
754757
"output_type": "stream",
755758
"text": [
756-
"Final depth range of particles in experiment 2: 554.3013 to 554.3013 m\n"
759+
"Final depth range of particles in experiment 3: 554.3013 to 554.3013 m\n"
757760
]
758761
},
759762
{
@@ -770,7 +773,7 @@
770773
"name": "stdout",
771774
"output_type": "stream",
772775
"text": [
773-
"Final depth range of particles in experiment 3: 557.2427 to 557.3295 m\n"
776+
"Final depth range of particles in experiment 4: 557.2427 to 557.3295 m\n"
774777
]
775778
},
776779
{
@@ -787,7 +790,7 @@
787790
"name": "stdout",
788791
"output_type": "stream",
789792
"text": [
790-
"Final depth range of particles in experiment 4: 557.2427 to 557.3296 m\n"
793+
"Final depth range of particles in experiment 5: 557.2427 to 557.3296 m\n"
791794
]
792795
}
793796
],
@@ -815,7 +818,7 @@
815818
" plt.title(f'Experiment {i+1}')\n",
816819
" plt.show()\n",
817820
"\n",
818-
" print(f'Final depth range of particles in experiment {i}: {format(np.nanmin(pfile[\"z\"].values[:,-1]), '.4f')} to {format(np.nanmax(pfile[\"z\"].values[:,-1]), '.4f')} m')"
821+
" print(f'Final depth range of particles in experiment {i+1}: {format(np.nanmin(pfile[\"z\"].values[:,-1]), '.4f')} to {format(np.nanmax(pfile[\"z\"].values[:,-1]), '.4f')} m')"
819822
]
820823
}
821824
],
@@ -835,7 +838,7 @@
835838
"name": "python",
836839
"nbconvert_exporter": "python",
837840
"pygments_lexer": "ipython3",
838-
"version": "undefined.undefined.undefined"
841+
"version": "3.12.5"
839842
}
840843
},
841844
"nbformat": 4,

0 commit comments

Comments
 (0)