Skip to content

Commit 424147c

Browse files
committed
(feat) pandas=3.0 working toward pandas 3.0 compatibility. Remaining failing tests are for modflow-setup which is being updated and gridgen binaries failing on Mac OS
1 parent 4aedfab commit 424147c

12 files changed

Lines changed: 167 additions & 2260 deletions

installation/environment.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ channels:
44
- nodefaults
55
dependencies:
66
# required
7-
- python=3.12
7+
- python=3.14
88
- pip
99

1010
- numpy

notebooks/part0_python_intro/10b_Rasterio_advanced.ipynb

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -960,27 +960,11 @@
960960
"source": [
961961
"glaciers.sort_values(by=\"mean_el_change_m\").head()"
962962
]
963-
},
964-
{
965-
"cell_type": "code",
966-
"execution_count": null,
967-
"id": "4ca0883e",
968-
"metadata": {},
969-
"outputs": [],
970-
"source": []
971-
},
972-
{
973-
"cell_type": "code",
974-
"execution_count": null,
975-
"id": "d3b23f72",
976-
"metadata": {},
977-
"outputs": [],
978-
"source": []
979963
}
980964
],
981965
"metadata": {
982966
"kernelspec": {
983-
"display_name": "Python 3 (ipykernel)",
967+
"display_name": "pyclass",
984968
"language": "python",
985969
"name": "python3"
986970
}

notebooks/part1_flopy/03_Loading_and_visualizing_models.ipynb

Lines changed: 10 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1091,6 +1091,15 @@
10911091
"Note: This works best if the in and out columns are aligned, such that ``STO-SY_IN`` and ``STO-SY_OUT`` are both colored orange, for example."
10921092
]
10931093
},
1094+
{
1095+
"cell_type": "code",
1096+
"execution_count": null,
1097+
"metadata": {},
1098+
"outputs": [],
1099+
"source": [
1100+
"flux"
1101+
]
1102+
},
10941103
{
10951104
"cell_type": "code",
10961105
"execution_count": null,
@@ -1100,6 +1109,7 @@
11001109
"fig, ax = plt.subplots(figsize=(10, 5))\n",
11011110
"in_cols = ['STO-SS_IN', 'STO-SY_IN', 'WEL_IN', 'RCHA_IN', 'CHD_IN', 'SFR_IN', 'LAK_IN']\n",
11021111
"out_cols = [c.replace('_IN', '_OUT') for c in in_cols]\n",
1112+
"flux = flux.asfreq('ME')\n",
11031113
"flux[in_cols].plot.bar(stacked=True, ax=ax)\n",
11041114
"(-flux[out_cols]).plot.bar(stacked=True, ax=ax)\n",
11051115
"ax.legend(loc='lower left', bbox_to_anchor=(1, 0))\n",
@@ -1117,32 +1127,13 @@
11171127
"\n",
11181128
"Fienen, M. N., Haserodt, M. J., and Leaf, A. T. (2021). MODFLOW models used to simulate groundwater flow in the Wisconsin Central Sands Study Area, 2012-2018. New York: U.S. Geological Survey Data Release. doi:10.5066/P9BVFSGJ"
11191129
]
1120-
},
1121-
{
1122-
"cell_type": "code",
1123-
"execution_count": null,
1124-
"metadata": {},
1125-
"outputs": [],
1126-
"source": []
11271130
}
11281131
],
11291132
"metadata": {
11301133
"kernelspec": {
11311134
"display_name": "pyclass",
11321135
"language": "python",
11331136
"name": "python3"
1134-
},
1135-
"language_info": {
1136-
"codemirror_mode": {
1137-
"name": "ipython",
1138-
"version": 3
1139-
},
1140-
"file_extension": ".py",
1141-
"mimetype": "text/x-python",
1142-
"name": "python",
1143-
"nbconvert_exporter": "python",
1144-
"pygments_lexer": "ipython3",
1145-
"version": "3.12.11"
11461137
}
11471138
},
11481139
"nbformat": 4,

notebooks/part1_flopy/04_Modelgrid_and_intersection.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1492,7 +1492,7 @@
14921492
],
14931493
"metadata": {
14941494
"kernelspec": {
1495-
"display_name": "Python 3 (ipykernel)",
1495+
"display_name": "pyclass",
14961496
"language": "python",
14971497
"name": "python3"
14981498
}

notebooks/part1_flopy/07-stream_capture_voronoi.ipynb

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -661,7 +661,7 @@
661661
"for gage_num in range(2):\n",
662662
" for lay_num in range(3):\n",
663663
" cax = ax[ax_num]\n",
664-
" data = drf.loc[lay_num][f'Gage{gage_num+1}'].values\n",
664+
" data = drf.loc[lay_num][f'Gage{gage_num+1}'].to_numpy(copy=True)\n",
665665
" data[data<0] =0\n",
666666
" mm = fp.plot.PlotMapView(model= base_m, ax=cax)\n",
667667
" mm.plot_bc('SFR', plotAll=True, color='blue')\n",
@@ -676,27 +676,11 @@
676676
" ax_num += 1\n",
677677
" "
678678
]
679-
},
680-
{
681-
"cell_type": "code",
682-
"execution_count": null,
683-
"id": "4410a94c-541e-470c-acb3-b44a5ad29a68",
684-
"metadata": {},
685-
"outputs": [],
686-
"source": []
687-
},
688-
{
689-
"cell_type": "code",
690-
"execution_count": null,
691-
"id": "db1828c3",
692-
"metadata": {},
693-
"outputs": [],
694-
"source": []
695679
}
696680
],
697681
"metadata": {
698682
"kernelspec": {
699-
"display_name": "Python 3 (ipykernel)",
683+
"display_name": "pyclass",
700684
"language": "python",
701685
"name": "python3"
702686
}

notebooks/part1_flopy/08_Modflow-setup-demo.ipynb

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -793,18 +793,6 @@
793793
"display_name": "pyclass",
794794
"language": "python",
795795
"name": "python3"
796-
},
797-
"language_info": {
798-
"codemirror_mode": {
799-
"name": "ipython",
800-
"version": 3
801-
},
802-
"file_extension": ".py",
803-
"mimetype": "text/x-python",
804-
"name": "python",
805-
"nbconvert_exporter": "python",
806-
"pygments_lexer": "ipython3",
807-
"version": "3.12.11"
808796
}
809797
},
810798
"nbformat": 4,

notebooks/part1_flopy/09-gwt-voronoi-demo.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -471,7 +471,7 @@
471471
],
472472
"metadata": {
473473
"kernelspec": {
474-
"display_name": "Python 3 (ipykernel)",
474+
"display_name": "pyclass",
475475
"language": "python",
476476
"name": "python3"
477477
}
0 Bytes
Binary file not shown.

notebooks/part1_flopy/solutions/02-Building-Post-Processing-MODFLOW6__solutions.ipynb

Lines changed: 47 additions & 274 deletions
Large diffs are not rendered by default.

notebooks/part1_flopy/solutions/03_Loading_and_visualizing_models-solutions.ipynb

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1021,7 +1021,7 @@
10211021
"metadata": {},
10221022
"outputs": [],
10231023
"source": [
1024-
"pd.read_csv(sim_ws / 'external/chd_001.dat', delim_whitespace=True)"
1024+
"pd.read_csv(sim_ws / 'external/chd_001.dat', sep=r'\\s+')"
10251025
]
10261026
},
10271027
{
@@ -1130,6 +1130,7 @@
11301130
"fig, ax = plt.subplots(figsize=(10, 5))\n",
11311131
"in_cols = ['STO-SS_IN', 'STO-SY_IN', 'WEL_IN', 'RCHA_IN', 'CHD_IN', 'SFR_IN', 'LAK_IN']\n",
11321132
"out_cols = [c.replace('_IN', '_OUT') for c in in_cols]\n",
1133+
"flux = flux.asfreq('ME')\n",
11331134
"flux[in_cols].plot.bar(stacked=True, ax=ax)\n",
11341135
"(-flux[out_cols]).plot.bar(stacked=True, ax=ax)\n",
11351136
"ax.legend(loc='lower left', bbox_to_anchor=(1, 0))\n",
@@ -1147,13 +1148,6 @@
11471148
"\n",
11481149
"Fienen, M. N., Haserodt, M. J., and Leaf, A. T. (2021). MODFLOW models used to simulate groundwater flow in the Wisconsin Central Sands Study Area, 2012-2018. New York: U.S. Geological Survey Data Release. doi:10.5066/P9BVFSGJ"
11491150
]
1150-
},
1151-
{
1152-
"cell_type": "code",
1153-
"execution_count": null,
1154-
"metadata": {},
1155-
"outputs": [],
1156-
"source": []
11571151
}
11581152
],
11591153
"metadata": {
@@ -1172,7 +1166,7 @@
11721166
"name": "python",
11731167
"nbconvert_exporter": "python",
11741168
"pygments_lexer": "ipython3",
1175-
"version": "3.12.11"
1169+
"version": "3.14.2"
11761170
}
11771171
},
11781172
"nbformat": 4,

0 commit comments

Comments
 (0)