I think the add_record method of Mflist does not work as it is supposed to. The input seems to be reshaped in the wrong way somehow. For example:
ml = flopy.modflow.Modflow()
flopy.modflow.ModflowWel(ml)
ml.wel.stress_period_data.add_record(0,[0,0,1],[1.0])
print(ml.wel.stress_period_data[0])
produces 4 wells instead of 1:
[[(0, 0, 1, 1.) (0, 0, 1, 1.) (0, 0, 1, 1.) (0, 0, 1, 1.)]]
When I want to add a record to an already existing wel-object:
ml = flopy.modflow.Modflow()
flopy.modflow.ModflowWel(ml,stress_period_data={0:[[0,0,0,1.0],[0,0,1,2.0]]})
ml.wel.stress_period_data.add_record(0,[0,0,2],[3.0])
I get the following error:
IndexError: tuple index out of range
Am I using this method in a wrong way, or shall I try to fix it in a pull request?
I think the add_record method of Mflist does not work as it is supposed to. The input seems to be reshaped in the wrong way somehow. For example:
produces 4 wells instead of 1:
[[(0, 0, 1, 1.) (0, 0, 1, 1.) (0, 0, 1, 1.) (0, 0, 1, 1.)]]When I want to add a record to an already existing wel-object:
I get the following error:
IndexError: tuple index out of rangeAm I using this method in a wrong way, or shall I try to fix it in a pull request?