Skip to content

Commit

Permalink
fix(writing tas): fixed writing non-constant tas (#1244) (#1245)
Browse files Browse the repository at this point in the history
* Close #1244
  • Loading branch information
spaulins-usgs authored Sep 22, 2021
1 parent 6c0df00 commit 047c9e6
Show file tree
Hide file tree
Showing 3 changed files with 59 additions and 3,088 deletions.
27 changes: 23 additions & 4 deletions autotest/t505_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -765,12 +765,22 @@ def test_np002():
stress_period_data=[((0, 0, 9), 125.0, 60.0)],
)

rch_package = ModflowGwfrch(
rch_package = ModflowGwfrcha(
model,
print_input=True,
print_flows=True,
maxbound=2,
stress_period_data=[((0, 0, 3), 0.02), ((0, 0, 6), 0.1)],
recharge="TIMEARRAYSERIES rcharray",
)

rch_array = np.zeros((1, 10))
rch_array[0, 3] = 0.02
rch_array[0, 6] = 0.1

rch_package.tas.initialize(
filename="np002_mod.rch.tas",
tas_array={0.0: rch_array, 6.0: rch_array},
time_series_namerecord="rcharray",
interpolation_methodrecord="linear",
)

# write simulation to new location
Expand Down Expand Up @@ -1019,10 +1029,19 @@ def test021_twri():
model,
readasarrays=True,
fixed_cell=True,
recharge={0: 0.00000003},
recharge="TIMEARRAYSERIES rcharray",
auxiliary=[("iface", "conc")],
aux=auxdata,
)
rch_package.tas.initialize(
filename="twri.rch.tas",
tas_array={
0.0: 0.00000003 * np.ones((15, 15)),
86400.0: 0.00000003 * np.ones((15, 15)),
},
time_series_namerecord="rcharray",
interpolation_methodrecord="linear",
)

aux = rch_package.aux.get_data()

Expand Down
Loading

0 comments on commit 047c9e6

Please sign in to comment.