|
48 | 48 | DEFAULT_EXIT_SOLVE_TOL, |
49 | 49 | ) |
50 | 50 |
|
51 | | -simname = "prtfmi01" |
52 | | -cases = [simname, f"{simname}saws", f"{simname}bprp"] |
| 51 | +simname = "prtfmi" |
| 52 | +cases = [simname, f"{simname}saws", f"{simname}bprp", f"{simname}noext"] |
53 | 53 |
|
54 | 54 |
|
55 | 55 | def build_prt_sim(name, gwf_ws, prt_ws, mf6): |
@@ -123,6 +123,7 @@ def build_prt_sim(name, gwf_ws, prt_ws, mf6): |
123 | 123 | stop_at_weak_sink="saws" in prt_name, |
124 | 124 | boundnames=True, |
125 | 125 | exit_solve_tolerance=DEFAULT_EXIT_SOLVE_TOL, |
| 126 | + extend_tracking="noext" not in prt_name, |
126 | 127 | ) |
127 | 128 |
|
128 | 129 | # create output control package |
@@ -346,28 +347,32 @@ def check_output(idx, test): |
346 | 347 | plt.show() |
347 | 348 | plt.savefig(gwf_ws / f"test_{simname}.png") |
348 | 349 |
|
349 | | - # convert mf6 pathlines to mp7 format |
350 | | - mf6_pls = to_mp7_pathlines(mf6_pls) |
351 | | - |
352 | | - # sort both dataframes by particleid and time |
353 | | - mf6_pls.sort_values(by=["particleid", "time"], inplace=True) |
354 | | - mp7_pls.sort_values(by=["particleid", "time"], inplace=True) |
355 | | - |
356 | | - # drop columns for which there is no direct correspondence between mf6 and mp7 |
357 | | - del mf6_pls["sequencenumber"] |
358 | | - del mf6_pls["particleidloc"] |
359 | | - del mf6_pls["xloc"] |
360 | | - del mf6_pls["yloc"] |
361 | | - del mf6_pls["zloc"] |
362 | | - del mp7_pls["sequencenumber"] |
363 | | - del mp7_pls["particleidloc"] |
364 | | - del mp7_pls["xloc"] |
365 | | - del mp7_pls["yloc"] |
366 | | - del mp7_pls["zloc"] |
367 | | - |
368 | | - # compare mf6 / mp7 pathline data |
369 | | - assert mf6_pls.shape == mp7_pls.shape |
370 | | - assert np.allclose(mf6_pls, mp7_pls, atol=1e-3) |
| 350 | + if "noext" in name: |
| 351 | + # maximum tracking time should be simulation stop time |
| 352 | + assert mf6_pls.t.max() == FlopyReadmeCase.nper * FlopyReadmeCase.perlen |
| 353 | + else: |
| 354 | + # convert mf6 pathlines to mp7 format |
| 355 | + mf6_pls = to_mp7_pathlines(mf6_pls) |
| 356 | + |
| 357 | + # sort both dataframes by particleid and time |
| 358 | + mf6_pls.sort_values(by=["particleid", "time"], inplace=True) |
| 359 | + mp7_pls.sort_values(by=["particleid", "time"], inplace=True) |
| 360 | + |
| 361 | + # drop columns for which there is no direct correspondence between mf6 and mp7 |
| 362 | + del mf6_pls["sequencenumber"] |
| 363 | + del mf6_pls["particleidloc"] |
| 364 | + del mf6_pls["xloc"] |
| 365 | + del mf6_pls["yloc"] |
| 366 | + del mf6_pls["zloc"] |
| 367 | + del mp7_pls["sequencenumber"] |
| 368 | + del mp7_pls["particleidloc"] |
| 369 | + del mp7_pls["xloc"] |
| 370 | + del mp7_pls["yloc"] |
| 371 | + del mp7_pls["zloc"] |
| 372 | + |
| 373 | + # compare mf6 / mp7 pathline data |
| 374 | + assert mf6_pls.shape == mp7_pls.shape |
| 375 | + assert np.allclose(mf6_pls, mp7_pls, atol=1e-3) |
371 | 376 |
|
372 | 377 |
|
373 | 378 | @pytest.mark.parametrize("idx, name", enumerate(cases)) |
|
0 commit comments