Skip to content

Commit

Permalink
fix error and warnings in notebook 07
Browse files Browse the repository at this point in the history
  • Loading branch information
jmccreight committed Oct 26, 2024
1 parent f3c292a commit abd4b79
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions examples/07_mmr_to_mf6_chf_dfw.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,7 @@
" inflow_dir=inflow_dir,\n",
" )\n",
"\n",
" dfw.write()\n",
" success, buff = dfw.run(silent=False, report=True)\n",
" assert success"
]
Expand Down Expand Up @@ -354,7 +355,9 @@
"n_substeps = int(ndays_run * 24 * 60 * 60 / tdis_perlen * tdis_nstp)\n",
"substep_len = np.timedelta64(int(tdis_perlen / tdis_nstp), \"s\")\n",
"sim_end_time = sim_start_time + n_substeps * substep_len\n",
"sim_times = np.arange(sim_start_time, sim_end_time, substep_len)\n",
"sim_times = np.arange(sim_start_time, sim_end_time, substep_len).astype(\n",
" \"datetime64[ns]\"\n",
") # ns to avoid xarray warnings\n",
"perioddata = tdis.perioddata.get_data()\n",
"assert len(sim_times) == len(perioddata) * perioddata[0][1]"
]
Expand Down Expand Up @@ -567,10 +570,11 @@
"outputs": [],
"source": [
"# Subset to points of interest (poi), known flow gages\n",
"poi_id = np.chararray(\n",
" prms_mf6_ds[\"prms streamflow\"].nhm_seg.shape, unicode=True, itemsize=15\n",
")\n",
"empty_str = \" \" * 15\n",
"poi_id = np.full(\n",
" prms_mf6_ds[\"prms streamflow\"].nhm_seg.shape, empty_str, dtype=\"<U15\"\n",
")\n",
"\n",
"poi_id[:] = empty_str\n",
"for ii, jj in enumerate(params.parameters[\"poi_gage_segment\"].tolist()):\n",
" poi_id[jj] = params.parameters[\"poi_gage_id\"][ii]\n",
Expand Down

0 comments on commit abd4b79

Please sign in to comment.