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

binaryfile returns a nan array if totim not found #8

Closed
langevin-usgs opened this issue Jan 28, 2015 · 0 comments
Closed

binaryfile returns a nan array if totim not found #8

langevin-usgs opened this issue Jan 28, 2015 · 0 comments

Comments

@langevin-usgs
Copy link
Contributor

Email from Jeremy White identifying the problem and possible solutions:

Looks like the problem is that there are not entries in the hds file for totim == 1.0. If you use the binaryfile.HeadFile.list_records() method, you can see that the first (and only) totim is 10,000.0.

Now, the reason that mfbinaryfile works is that it searches through the listed totims in file until it finds a totim that is greater than or equal to the requested totim. binaryfile doesn't do that, it requires an exact match for the requested totim.

Chris - we should probably do something about this. To me, the options are:

1.) replicate the user-friendly (but could-be-dangerous) way the mfbinaryfile does it. Maybe we could issue warning if an exact match isn't found

2.) raise an exception if the totim isn't found.

I'm leaning towards 1 because it seems to be the most friendly.

jtwhite79 added a commit that referenced this issue Mar 23, 2017
…elop

# By aleaf (18) and others
# Via aleaf (12) and others
* 'develop' of https://github.com/modflowpy/flopy: (47 commits)
  Update docs in mflpf.py
  Fixed supported packages markdown table
  bug fix: segment renumbering when seg data changes by stress period
  update to make_release instructions
  Updates to README.md
  Updates to a few files
  A few updates to the make release document
  First commit for version 3.2.7
  Updates to version information
  Delete AGU2015CodeSprint.md
  Revised a number of flopy. imports to relative imports. Updates to and rerun of all notebooks.
  Possible fix to sfr issue in t009.
  Fixed a bug I introduced in two auto tests.
  bug fix: renumber sfr channel data
  Minor change to CellBudget
  get_transmissivities & shapefile features doc
  shapefile_features notebook
  Updates to hob
  Updates to a few more notebooks. Fixed a few issues is swi2 (obs extension) and uzf (zero based observation row col locs).
  Added trap for case where TOTIM is not found in a layer file.  Now terminates with an exception instead of returning nan’s.  Close #8.
  ...

Conflicts:
	flopy/modflow/mfhob.py
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

1 participant