Skip to content

Commit 9a03a77

Browse files
committed
feat(netcdf writing)
1 parent 78cd7ca commit 9a03a77

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

autotest/regression/test_mf6.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -318,6 +318,7 @@ def test_np001(function_tmpdir, example_data_path):
318318
exe_name="mf6",
319319
sim_ws=data_path,
320320
write_headers=False,
321+
use_pandas=False,
321322
)
322323
sim.set_sim_path(ws)
323324
tdis_rc = [(6.0, 2, 1.0), (6.0, 3, 1.0)]
@@ -594,6 +595,8 @@ def test_np001(function_tmpdir, example_data_path):
594595
riv_path = os.path.join(ws, "riv_folder", "riv.txt")
595596
assert os.path.exists(riv_path)
596597

598+
model.export(os.path.join(ws, "np001.nc"))
599+
597600
# run simulation
598601
sim.run_simulation()
599602

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

36063609
# get expected results
36073610
budget_obj = CellBudgetFile(expected_cbc_file_a, precision="auto")

autotest/test_mf6.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2015,12 +2015,12 @@ def test_array(function_tmpdir):
20152015
drn_array = drn.stress_period_data.array
20162016
assert drn_array[0][0][1] == 60.0
20172017
assert drn_array[1][0][1] == 60.0
2018-
assert drn_array[2] is None
2018+
assert drn_array[2] is None or len(drn_array[2]) == 0
20192019
assert drn_array[3][0][1] == 55.0
20202020
drn_gd_0 = drn.stress_period_data.get_data(0)
20212021
assert drn_gd_0[0][1] == 60.0
20222022
drn_gd_1 = drn.stress_period_data.get_data(1)
2023-
assert drn_gd_1 is None
2023+
assert drn_gd_1 is None or len(drn_gd_1[2]) == 0
20242024
drn_gd_2 = drn.stress_period_data.get_data(2)
20252025
assert len(drn_gd_2) == 0
20262026
drn_gd_3 = drn.stress_period_data.get_data(3)

0 commit comments

Comments
 (0)