Skip to content

Extract water budget using binaryfile #2047

Closed Answered by langevin-usgs
hjia1005 asked this question in Q&A
Discussion options

You must be logged in to vote

It's true that the multi-package support from CellBudgetFile can be tricky. But the get_data() method with text should give you back all the records for a specific package type.

This example is adapted from the front page of the flopy site to use two constant head packages.

import flopy
ws = './temp'
name = 'temp'
sim = flopy.mf6.MFSimulation(sim_name=name, sim_ws=ws, exe_name='mf6')
tdis = flopy.mf6.ModflowTdis(sim)
ims = flopy.mf6.ModflowIms(sim)
gwf = flopy.mf6.ModflowGwf(sim, modelname=name, save_flows=True)
dis = flopy.mf6.ModflowGwfdis(gwf, nrow=10, ncol=10)
ic = flopy.mf6.ModflowGwfic(gwf)
npf = flopy.mf6.ModflowGwfnpf(gwf, save_specific_discharge=True)
chd1 = flopy.mf6.ModflowGwfc…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@hjia1005
Comment options

Answer selected by hjia1005
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants