Reputation: 99
I'm trying to add rivers to my model but this warning happens to be there when after I run it:
WARNING: Unable to resolve dimension of ('gwf6', 'riv', 'period', 'stress_period_data', 'cellid') based on shape "ncelldim"
What I'm doing is I get the data from a raster, in order to obtain the cell position (row and column) and the values stage and river bed. This is the only way so far I've come to do this with less error (at least I am not getting an exception or something similar, yet). Below is the code I'm using.
df = pd.DataFrame({'Layer': data[0], 'Row': data[1], 'Column': data[2], 'RiverStage': data[3], 'RiverBed': data[4]})
cellid = (dataset['Layer'], dataset['Row'],dataset['Column'])
stress_period_data = [((cellid), dataset['RiverStage'], 10., dataset['RiverBed'])]
river = flopy.mf6.ModflowGwfriv(gwf, stress_period_data = stress_period_data)
Also, I have two additional questions; if my model is steady state do I need to add CHD package? Also, I stated my period (again, since it's steady) as 1.0, 1, 1.0. Does anything of what I mentioned has to do with that previous warning?
Any help is very much appreciated.
Upvotes: 0
Views: 226
Reputation: 486
You are creating a tuple of 1-d arrays for the cellid
variable instead of a list of tuples.
You want to have 1 tuple for each river cell describing the layer, row, and column for each, like this:
cellid = [(0, 0, 0), (0, 1, 1), (0, 1, 2), ...]
Not an tuple with 1-d arrays of layer, row, column values which is what you have:
cellid = (array[0 0 0 0 0 0 0 ...], array[0 1 1 1 1 1 1 1 ...], array[0 1 2 3 4 5 ...])
Upvotes: 1