-
Notifications
You must be signed in to change notification settings - Fork 349
Closed
Description
The following script shows the problem
import numpy as np
import flopy
ws = './mymodel'
name = 'mymodel'
sim = flopy.mf6.MFSimulation(sim_name=name, sim_ws=ws, exe_name='mf6')
tdis = flopy.mf6.ModflowTdis(sim, perioddata=((1.0, 2, 1.0),))
ims = flopy.mf6.ModflowIms(sim)
gwf = flopy.mf6.ModflowGwf(sim, modelname=name, save_flows=True)
dis = flopy.mf6.ModflowGwfdis(gwf, nrow=10, ncol=10)
ic = flopy.mf6.ModflowGwfic(gwf)
npf = flopy.mf6.ModflowGwfnpf(gwf, save_specific_discharge=True)
chd = flopy.mf6.ModflowGwfchd(gwf, stress_period_data=[[(0, 0, 0), 1.],
[(0, 9, 9), 0.]])
rch = flopy.mf6.ModflowGwfrcha(gwf, recharge="TIMEARRAYSERIES rcharray")
rch.tas.initialize(filename='mymodel.rch.tas',
tas_array={0.: 0., 1.: 0.001 * np.ones((10, 10))},
time_series_namerecord='rcharray',
interpolation_methodrecord='linear')
sim.write_simulation()
sim.run_simulation()
The file mymodel.rch.tas does not have a correct entry for time 1.0. The file shows:
# File generated by Flopy version 3.3.5 on 09/17/2021 at 11:11:23.
BEGIN attributes
NAME rcharray
METHOD linear
END attributes
BEGIN time 0.00000000
CONSTANT 0.00000000
END time 0.00000000
BEGIN time 1.00000000
INTERNAL FACTOR 1.0
1.00000000
END time 1.00000000
So it looks like time array series works for constant arrays but not for actual arrays. Need a fix and probably a test or two.
Metadata
Metadata
Assignees
Labels
No labels