From 9a03a77840b0b20029b204b06e23f7892a29f562 Mon Sep 17 00:00:00 2001 From: scottrp <45947939+scottrp@users.noreply.github.com> Date: Thu, 11 Apr 2024 13:35:00 -0700 Subject: [PATCH] feat(netcdf writing) --- autotest/regression/test_mf6.py | 5 ++++- autotest/test_mf6.py | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/autotest/regression/test_mf6.py b/autotest/regression/test_mf6.py index 8d1e9bedc9..44235fefc3 100644 --- a/autotest/regression/test_mf6.py +++ b/autotest/regression/test_mf6.py @@ -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)] @@ -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() @@ -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") diff --git a/autotest/test_mf6.py b/autotest/test_mf6.py index 0e09c8258b..384a60c945 100644 --- a/autotest/test_mf6.py +++ b/autotest/test_mf6.py @@ -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)