Skip to content

Commit 7aafcea

Browse files
authored
Merge pull request #401 from gwmod/dev
Release v0.9.1
2 parents 8f50b55 + aaac138 commit 7aafcea

35 files changed

+715
-158
lines changed

.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ cython_debug/
145145
nlmod/bin/*
146146
!nlmod/bin/
147147
!nlmod/bin/mp7_2_002_provisional
148-
flowchartnlmod.pptx
148+
nlmod/data/bofek/*
149149

150150
tests/data/*
151151
!tests/data/**/

.readthedocs.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ version: 2
77

88
# Set the version of Python and other tools you might need
99
build:
10-
os: ubuntu-22.04
10+
os: ubuntu-lts-latest
1111
tools:
12-
python: "3.10"
12+
python: "3.11"
1313

1414
# Build documentation in the docs/ directory with Sphinx
1515
sphinx:

docs/examples/03_local_grid_refinement.ipynb

+6-8
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@
260260
"plan_weg_gdf.plot(ax=ax, color=\"r\", label=\"Planetenweg\")\n",
261261
"ax.set_xlim(100000, 103000)\n",
262262
"ax.set_ylim(495000, 497500)\n",
263-
"ax.legend()"
263+
"ax.legend();"
264264
]
265265
},
266266
{
@@ -292,9 +292,7 @@
292292
"metadata": {},
293293
"outputs": [],
294294
"source": [
295-
"ds[\"vertices\"] = nlmod.grid.get_vertices(ds)\n",
296-
"\n",
297-
"fig, axes = nlmod.plot.get_map(extent, nrows=2, ncols=2, figsize=(14, 11))\n",
295+
"fig, axes = nlmod.plot.get_map(extent, nrows=2, ncols=2, figsize=14)\n",
298296
"\n",
299297
"nlmod.plot.data_array(ds[\"ahn\"], ds, ax=axes[0][0])\n",
300298
"nlmod.plot.data_array(ds[\"botm\"][0], ds, ax=axes[0][1])\n",
@@ -305,7 +303,7 @@
305303
"nlmod.plot.data_array(ds[\"bathymetry\"], ds, ax=axes[0][0])\n",
306304
"nlmod.plot.data_array(ds[\"northsea\"], ds, ax=axes[0][1])\n",
307305
"nlmod.plot.data_array(ds[\"kh\"][1], ds, ax=axes[1][0])\n",
308-
"nlmod.plot.data_array(ds[\"recharge\"][0], ds, ax=axes[1][1])"
306+
"nlmod.plot.data_array(ds[\"recharge\"][0], ds, ax=axes[1][1]);"
309307
]
310308
},
311309
{
@@ -324,7 +322,7 @@
324322
"x = np.mean(extent[:2])\n",
325323
"line = [(x, extent[2]), (x, extent[3])]\n",
326324
"\n",
327-
"ds[\"heads\"] = nlmod.gwf.get_heads_da(ds)\n",
325+
"head = nlmod.gwf.get_heads_da(ds)\n",
328326
"\n",
329327
"f, ax = plt.subplots(figsize=(10, 6))\n",
330328
"dcs = nlmod.plot.DatasetCrossSection(ds, line, ax=ax, zmin=-30.0, zmax=5.0)\n",
@@ -343,9 +341,9 @@
343341
"f.tight_layout(pad=0.0)\n",
344342
"\n",
345343
"anim = dcs.animate(\n",
346-
" ds[\"heads\"],\n",
344+
" head,\n",
347345
" cmap=\"Spectral_r\",\n",
348-
" head=ds[\"heads\"],\n",
346+
" head=head,\n",
349347
" plot_title=f\"doorsnede at x={int(x)}\",\n",
350348
" date_fmt=\"%Y-%m-%d\",\n",
351349
")\n",

docs/examples/10_modpath.ipynb

+2-2
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@
155155
" ax.plot(pf[\"x\"], pf[\"y\"], color=\"k\", linewidth=0.5)\n",
156156
"ax.plot(pf[\"x\"], pf[\"y\"], color=\"k\", linewidth=0.5, label=\"pathline\")\n",
157157
"\n",
158-
"cids = [nlmod.grid.xy_to_icell2d(xy, ds) for xy in xy_start]\n",
158+
"cids = [nlmod.grid.get_icell2d_from_xy(xy[0], xy[1], ds) for xy in xy_start]\n",
159159
"ax.plot(\n",
160160
" ds.x[cids],\n",
161161
" ds.y[cids],\n",
@@ -256,7 +256,7 @@
256256
" ax.plot(pf[\"x\"], pf[\"y\"], color=\"k\", linewidth=0.5)\n",
257257
" ax.plot(pf[\"x\"], pf[\"y\"], color=\"k\", linewidth=0.5, label=\"pathline\")\n",
258258
"\n",
259-
" cids = [nlmod.grid.xy_to_icell2d(xy, ds) for xy in xy_start]\n",
259+
" cids = [nlmod.grid.get_icell2d_from_xy(xy[0], xy[1], ds) for xy in xy_start]\n",
260260
" ax.plot(\n",
261261
" ds.x[cids],\n",
262262
" ds.y[cids],\n",

docs/examples/12_layer_generation.ipynb

+3-3
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@
7171
"outputs": [],
7272
"source": [
7373
"f, ax = nlmod.plot.get_map(extent, figsize=5)\n",
74-
"nlmod.plot.data_array(regis[\"top\"], edgecolor=\"k\")"
74+
"nlmod.plot.data_array(regis[\"top\"], edgecolor=\"k\");"
7575
]
7676
},
7777
{
@@ -133,7 +133,7 @@
133133
"outputs": [],
134134
"source": [
135135
"f, ax = nlmod.plot.get_map(extent, figsize=5)\n",
136-
"nlmod.plot.data_array(ds[\"top\"], ds=ds, edgecolor=\"k\")"
136+
"nlmod.plot.data_array(ds[\"top\"], ds=ds, edgecolor=\"k\");"
137137
]
138138
},
139139
{
@@ -173,7 +173,7 @@
173173
"outputs": [],
174174
"source": [
175175
"f, ax = nlmod.plot.get_map(extent, figsize=5)\n",
176-
"nlmod.plot.data_array(ds[\"top\"], ds=ds, edgecolor=\"k\")"
176+
"nlmod.plot.data_array(ds[\"top\"], ds=ds, edgecolor=\"k\");"
177177
]
178178
}
179179
],

docs/examples/13_plot_methods.ipynb

+7-3
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,9 @@
171171
"id": "fba12db0",
172172
"metadata": {},
173173
"source": [
174-
"With the DatasetCrossSection in `nlmod` it is also possible to plot the layers according to the official colors of REGIS, to plot the layer names on the plot, or to plot the model grid in the cross-section. An example is shown in the plot below."
174+
"With the DatasetCrossSection in `nlmod` it is also possible to plot the layers according to the official colors of REGIS, to plot the layer names on the plot, or to plot the model grid in the cross-section. An example is shown in the plot below.\n",
175+
"\n",
176+
"The location of the cross-section and the cross-section labels can be added using `nlmod.plot.inset_map()` and `nlmod.plot.add_xsec_line_and_labels()`."
175177
]
176178
},
177179
{
@@ -185,7 +187,9 @@
185187
"dcs = DatasetCrossSection(ds, line=line, zmin=-200, zmax=10, ax=ax)\n",
186188
"colors = nlmod.read.regis.get_legend()\n",
187189
"dcs.plot_layers(colors=colors, min_label_area=1000)\n",
188-
"dcs.plot_grid(vertical=False, linewidth=0.5);"
190+
"dcs.plot_grid(vertical=False, linewidth=0.5)\n",
191+
"mapax = nlmod.plot.inset_map(ax, ds.extent)\n",
192+
"nlmod.plot.add_xsec_line_and_labels(line, ax, mapax)"
189193
]
190194
},
191195
{
@@ -244,7 +248,7 @@
244248
"metadata": {},
245249
"outputs": [],
246250
"source": [
247-
"df.plot(figsize=(10, 10))"
251+
"df.plot(figsize=(10, 10));"
248252
]
249253
}
250254
],

docs/examples/15_geotop.ipynb

+1-1
Original file line numberDiff line numberDiff line change
@@ -388,7 +388,7 @@
388388
"var = \"kh\"\n",
389389
"norm = matplotlib.colors.Normalize(0.0, 40.0)\n",
390390
"\n",
391-
"f, axes = nlmod.plot.get_map(extent, nrows=2, figsize=(16, 8))\n",
391+
"f, axes = nlmod.plot.get_map(extent, nrows=2)\n",
392392
"pc = nlmod.plot.data_array(regis[var].loc[layer], ax=axes[0], norm=norm)\n",
393393
"nlmod.plot.colorbar_inside(pc, bounds=[0.02, 0.05, 0.02, 0.9], ax=axes[0])\n",
394394
"nlmod.plot.title_inside(\"REGIS\", ax=axes[0])\n",

docs/examples/16_groundwater_transport.ipynb

+1
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,7 @@
173173
"vaklodingen = nlmod.read.jarkus.get_dataset_jarkus(\n",
174174
" extent_hbossche,\n",
175175
" kind=\"vaklodingen\",\n",
176+
" time=\"2020\",\n",
176177
" cachedir=cachedir,\n",
177178
" cachename=\"vaklodingen.nc\",\n",
178179
")\n",

nlmod/bin/mp7_2_002_provisional

-120 KB
Binary file not shown.

0 commit comments

Comments
 (0)