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

sim.write_simulation() dropping headers on external files #2233

Open
wkitlasten opened this issue Jun 14, 2024 · 0 comments
Open

sim.write_simulation() dropping headers on external files #2233

wkitlasten opened this issue Jun 14, 2024 · 0 comments
Assignees
Labels
Milestone

Comments

@wkitlasten
Copy link
Contributor

wkitlasten commented Jun 14, 2024

Describe the bug

Headers on external files are being dropped after calling sim.write_simulation() with sim.set_all_data_external() .

To Reproduce
Create external files with a # header:

# k i j elev cond
1 1 90 247.7714385986328 900000.0
1 1 95 65.20931243896484 900000.0
...

Add the package to model:

flopy.mf6.ModflowGwfdrn(gwf, maxbound=nvals, pname='drn', 
                                        stress_period_data={0: {'filename': fname}})
sim.set_all_data_external()

At this point the external file still has the header. But after sim.write_simulation() the header disappears. This happens with external files in the DRN, GHB, and WEL packages, but does not appear to happen with reach or connection data in the SFR package.

Expected behavior
I expect the original external file to remain unchanged by flopy to preserve any pre or post processing that may rely on the headers, as is the case with the SFR reach data and SFR connection data.

Desktop (please complete the following information):

  • OS: Windows
  • flopy version 3.8.0.dev0
@wkitlasten wkitlasten added the bug label Jun 14, 2024
@wpbonelli wpbonelli added this to the 3.8.0 milestone Jun 17, 2024
@wpbonelli wpbonelli assigned wpbonelli and unassigned spaulins-usgs Aug 5, 2024
@wpbonelli wpbonelli modified the milestones: 3.8.0, 3.8.1 Aug 5, 2024
@wpbonelli wpbonelli modified the milestones: 3.8.1, 3.9.1 Sep 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants