Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mf6: ModflowGwtic string representation displays layer 1 data for all layers #1043

Closed
dbrakenhoff opened this issue Jan 27, 2021 · 1 comment

Comments

@dbrakenhoff
Copy link
Contributor

A student working with flopy/modflow6 reported this issue to me. The string representation of the ModflowGwtic package shows the data for layer 1 for all layers. Not sure if this is also true for other packages. See the example below.

import numpy as np
import flopy

nlay = 10
nrow = 2
ncol = 2

sim = flopy.mf6.MFSimulation()
gwt = flopy.mf6.ModflowGwt(sim)
dis = flopy.mf6.ModflowGwtdis(gwt, nlay=nlay, nrow=nrow, ncol=ncol)


strt = np.zeros((nlay, nrow, ncol))
for ilay in range(10):
    strt[ilay] = ilay * 10

ic = flopy.mf6.ModflowGwtic(gwt, strt=strt)

print(ic)

The output is:

package_name = ic
filename = model.ic
package_type = ic
model_or_simulation_package = model
model_name = model

Block griddata
--------------------
strt
Layer_1{internal}
(array([[0., 0.],
       [0., 0.]]))
Layer_2{internal}
(array([[0., 0.],
       [0., 0.]]))
Layer_3{internal}
(array([[0., 0.],
       [0., 0.]]))
Layer_4{internal}
(array([[0., 0.],
       [0., 0.]]))
Layer_5{internal}
(array([[0., 0.],
       [0., 0.]]))
Layer_6{internal}
(array([[0., 0.],
       [0., 0.]]))
Layer_7{internal}
(array([[0., 0.],
       [0., 0.]]))
Layer_8{internal}
(array([[0., 0.],
       [0., 0.]]))
Layer_9{internal}
(array([[0., 0.],
       [0., 0.]]))
Layer_10{internal}
(array([[0., 0.],
       [0., 0.]]))
spaulins-usgs added a commit that referenced this issue Jan 29, 2021
…1045)

* Fix(print MFArray): Fixed printing of layered arrays - issue #1043

* refactor(Array string): Cleaned up formatting
@spaulins-usgs
Copy link
Contributor

@dbrakenhoff This should be fixed with the PR I just committed. Please download the latest flopy from the develop branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants