How to access binary output of vertical displacement (or in general other variable than head)

14 views
Skip to first unread message

Mostafa Gomaa Daoud

unread,
Nov 18, 2025, 4:38:28 AM (14 days ago) Nov 18
to MODFLOW Users Group

I am using MODFLOW 6 with Flopy. I am stuck with the CSUB package. I want to get the outputs of the binary file of the vertical displacement (as I defined below in the input arguments)

 csub = flopy.mf6.ModflowGwfcsub(gwf, head_based = head_based, observations = csub_obs, packagedata = csub_packagedata, cg_ske_cr = cg_ske_cr,  cg_theta = cg_theta, zdisplacement_filerecord = 'z_displacement.hds')

 However, after the model run is finished, I am not able to open this file using the flopy.utils and received an error (see attached please)


zdispfile = 'z_displacement.hds'.format(modelname)
zdisp = flopy.utils.binaryfile.HeadFile(os.path.join(model_ws, zdispfile) , text = ??)

 Probably, I think I need to change the text to a different name than the default, which is “head”, right? Or, maybe another different way??

I tried to find something similar in the MODFLOW 6 notebook examples (https://modflow6-examples.readthedocs.io/en/latest/notebook_examples.html), but didn’t find such thing. I also checked the flopy utils methods (https://flopy.readthedocs.io/en/stable/source/flopy.utils.binaryfile.html), but also didn’t find anything related.

Hopefully, if you have an idea how to solve this issue, I will greatly appreciate it.
Many thanks in advance
Mostafa

csub_binary_error.png
Reply all
Reply to author
Forward
0 new messages