flopy icon indicating copy to clipboard operation
flopy copied to clipboard

bug: get_transmissivities() does not work with MODFLOW 6 models

Open cneyens opened this issue 1 year ago • 2 comments

Describe the bug

flopy.utils.get_transmissivities() does not work with MODFLOW 6 models.

To Reproduce Pick any MODFLOW 6 example and call flopy.utils.get_transmissivities() which throws an error about missing LPF or UPW package:

import flopy

ws = './mymodel'
name = 'mymodel'
sim = flopy.mf6.MFSimulation(sim_name=name, sim_ws=ws, exe_name='mf6')
gwf = flopy.mf6.ModflowGwf(sim, modelname=name, save_flows=True)
dis = flopy.mf6.ModflowGwfdis(gwf, nrow=10, ncol=10, nlay=1, top = 0, botm = -10)
npf = flopy.mf6.ModflowGwfnpf(gwf, k=10.0, save_specific_discharge=True)

flopy.utils.get_transmissivities(heads=dis.top, m=gwf, r=5, c=5, sctop=-2, scbot=-8)

Expected behavior flopy.utils.get_transmissivities() recognizes that its m argument is a gwf MODFLOW 6 object and computes the transmissivity from there. Also, the r and c arguments are only required with structured grids.

Additionally, as a feature request: a missing head argument (None) might mean that the system is fully saturated? Right now, we're creating dummy head values equal to the model top to pass as the heads argument to do this.

  • OS: Windows 10
  • Flopy v3.6.0

cneyens avatar Apr 29 '24 12:04 cneyens

@cneyens MF6 DIS and DISV should work now. I punted DISU.

This should stay open until all grid types are supported.

wpbonelli avatar Sep 29 '25 18:09 wpbonelli

Thanks @wpbonelli

cneyens avatar Sep 30 '25 06:09 cneyens