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

Allow Stress Periods Beyond Nper (#694) and Allow Setting Simulation Name File Options on Init (#704) #705

Merged
merged 4 commits into from
Nov 1, 2019

Conversation

spaulins-usgs
Copy link
Contributor

feat(#694): When stress packages have data for periods beyond nper flopy now issues a warning message (flopy use to raise an exception).

feat(#704): Allow user to set simulation name file options while initializing a simulation.

@coveralls
Copy link

coveralls commented Oct 31, 2019

Coverage Status

Coverage decreased (-13.3%) to 56.747% when pulling a66d49d on scottrp:develop into 151625a on modflowpy:develop.

@spaulins-usgs
Copy link
Contributor Author

Travis failed because of the the intermittent problems we have been seeing with deepcopy on python 3.5. I am looking into this problem now. The problem is very intermittent so I am not 100% sure I found the cause, though it looks like it has to do with MFChildPackages overriding getattribute and getattr. I have had problems with deepcopy and getattribute in the past. I am not sure I can reproduce the current dynamic interface without getattribute though I will try to find another way to do this.

@langevin-usgs
Copy link
Contributor

What happens if there is trash at the end of the file, such as comments or other information that the user does not expect to have read? Will this cause flopy to crash? MODFLOW won't read that information.

@spaulins-usgs
Copy link
Contributor Author

As long as the trash at the end of the file is outside of any block (not between a "begin" and "end" keyword) flopy will ignore it and not crash. If the trash is within a block or contains a line that starts with the "begin" keyword, flopy may report an error depending on the situation.

@langevin-usgs
Copy link
Contributor

Then that will mean that flopy would die reading a file that MODFLOW can read.

@spaulins-usgs
Copy link
Contributor Author

I tested flopy and it will only report an error if "begin" is at the beginning of a line and is followed by a valid block name in the trash text. So for,

begin period trash text
ewifojweoj fewoijfewoij

flopy will report an error while for,

begin trash text
ewfiojfewio ewf

flopy will not report an error. I can fix the error though this is a really unlikely scenario where the user explicitly defines a specific block type as part of junk text. In cases like this I would think the majority of the time this would be a result of the end of the user's file getting messed up and the user should be notified of this.

@langevin-usgs langevin-usgs merged commit 4a9ea1a into modflowpy:develop Nov 1, 2019
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

Successfully merging this pull request may close these issues.

3 participants