Skip to content

Commit

Permalink
feat(netcdf writing)
Browse files Browse the repository at this point in the history
  • Loading branch information
scottrp committed Apr 11, 2024
1 parent 78cd7ca commit 9a03a77
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 4 additions & 1 deletion autotest/regression/test_mf6.py
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,7 @@ def test_np001(function_tmpdir, example_data_path):
exe_name="mf6",
sim_ws=data_path,
write_headers=False,
use_pandas=False,
)
sim.set_sim_path(ws)
tdis_rc = [(6.0, 2, 1.0), (6.0, 3, 1.0)]
Expand Down Expand Up @@ -594,6 +595,8 @@ def test_np001(function_tmpdir, example_data_path):
riv_path = os.path.join(ws, "riv_folder", "riv.txt")
assert os.path.exists(riv_path)

model.export(os.path.join(ws, "np001.nc"))

# run simulation
sim.run_simulation()

Expand Down Expand Up @@ -3601,7 +3604,7 @@ def test001a_tharmonic(function_tmpdir, example_data_path):
# run simulation
success, buff = sim.run_simulation()
print(sim.name)
assert success, f"simulation {sim.name} did not run"
assert success, f"simulation {sim.name} did not run ({sim.sim_path})"

# get expected results
budget_obj = CellBudgetFile(expected_cbc_file_a, precision="auto")
Expand Down
4 changes: 2 additions & 2 deletions autotest/test_mf6.py
Original file line number Diff line number Diff line change
Expand Up @@ -2015,12 +2015,12 @@ def test_array(function_tmpdir):
drn_array = drn.stress_period_data.array
assert drn_array[0][0][1] == 60.0
assert drn_array[1][0][1] == 60.0
assert drn_array[2] is None
assert drn_array[2] is None or len(drn_array[2]) == 0
assert drn_array[3][0][1] == 55.0
drn_gd_0 = drn.stress_period_data.get_data(0)
assert drn_gd_0[0][1] == 60.0
drn_gd_1 = drn.stress_period_data.get_data(1)
assert drn_gd_1 is None
assert drn_gd_1 is None or len(drn_gd_1[2]) == 0
drn_gd_2 = drn.stress_period_data.get_data(2)
assert len(drn_gd_2) == 0
drn_gd_3 = drn.stress_period_data.get_data(3)
Expand Down

0 comments on commit 9a03a77

Please sign in to comment.