我一直在尝试使用时间序列、绑定名称和乘数在 Flopy 中分配瞬态充电,如下所示(请注意,我使用的是带顶点的离散化(DISV)):
rch_period = {}
rch_bcs = flopy.mf6.ModflowGwfrch.stress_period_data.empty(gwf, maxbound = disv.ncpl.get_data(),
aux_vars=['MULTIPLIER'],
boundnames='True',timeseries=True)
for ii in range(len(rch_bcs[0])):
if zones[ii] == 4:
rch_zone = 'Rch_bas'
else:
rch_zone = 'Rch_sed'
rch_bcs[0][ii]=((0,ii), 'Rainfall',0.5,rch_zone)
rch_period[0] = list(rch_bcs[0])
pack_rch = flopy.mf6.ModflowGwfrch(gwf, fixed_cell=False, pname='Rainfall',
maxbound = disv.ncpl.get_data(), auxiliary='MULTPLIER',
auxmultname='MULTIPLIER',
boundnames=True, stress_period_data = rch_period)
pack_rch.ts.initialize(filename='tseries_rch.ts', timeseries=ts_data_rain,
time_series_namerecord='Rainfall',
interpolation_methodrecord='stepwise')
这部分代码运行时没有任何错误消息,但是当我使用以下方法查看包压力期数据时:
pack_rch.stress_period_data.get_data()
我得到以下信息:
{0: rec.array([(((0, 0), 'Rainfall', 0.5, 'Rch_sed'), None, nan, None),
(((0, 1), 'Rainfall', 0.5, 'Rch_bas'), None, nan, None),
(((0, 2), 'Rainfall', 0.5, 'Rch_bas'), None, nan, None), ...,
(((0, 24865), 'Rainfall', 0.5, 'Rch_bas'), None, nan, None),
(((0, 24866), 'Rainfall', 0.5, 'Rch_bas'), None, nan, None),
(((0, 24867), 'Rainfall', 0.5, 'Rch_bas'), None, nan, None)],
dtype=[('cellid', 'O'), ('recharge', 'O'), ('MULTPLIER', '<f8'), ('boundname', 'O')])}
它返回一个 rec.array 的压力周期 0 的元组(这是我想要的),但元组是杂乱无章的,如:
(((0, 0), 'Rainfall', 0.5, 'Rch_sed'), None, nan, None)
所有成员都打包在第一个元组成员中,而它应该是:
((0, 0), 'Rainfall', 0.5, 'Rch_sed')
关于我在哪里出错的任何建议?