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

Should SSM require data be specified in the first stress period? #754

Closed
emorway-usgs opened this issue Dec 10, 2019 · 1 comment
Closed

Comments

@emorway-usgs
Copy link
Contributor

Discovered this issue while trying to get to the bottom of #743.

To demonstrate this issue, I took the 'flopy3_multi-component_SSM.ipynb' notebook and made two scripts out of it. The first script ('test_script_works.txt') is the same as the aforementioned notebook - all appears to work OK.  The second script ('test_script_breaks.txt'), which is the same as the first but with some minor edits (see below), fails with an error that I suspect is related to the issue I'm seeing in the SSM load issue (#743). The following summarizes the difference between the two attached scripts (note the stress period index on ssm_data[]):

Works:  

ghb_data[0] = [(4, 4, 4, 0.1, 1.5)]
ssm_data[0] = [(4, 4, 4, 1.0, itype['GHB'], 1.0, 100.0)]
...
for k in range(nlay):
    for i in range(nrow):
        ghb_data[0].append((k, i, 0, 0.0, 100.0))
        ssm_data[0].append((k, i, 0, 0.0, itype['GHB'], 0.0, 0.0))

Doesn't Work:

ghb_data[2] = [(4, 4, 4, 0.1, 1.5)]
ssm_data[2] = [(4, 4, 4, 1.0, itype['GHB'], 1.0, 100.0)]
...
for k in range(nlay):
    for i in range(nrow):
        ghb_data[2].append((k, i, 0, 0.0, 100.0))
        ssm_data[2].append((k, i, 0, 0.0, itype['GHB'], 0.0, 0.0))

Note that the attached script demonstrating the issue ('test_script_breaks.txt') can be made to work if stress period 1 is added. For example, augment the broken script with ssm_data[0] as shown below and it'll work without errors:

# define some boundary conditions
ghb_data = {}
ghb_data[0] = [(4, 4, 4, 0.1, 1.5)]                      #added to the broken script
ssm_data[0] = [(4, 4, 4, 1.0, itype['GHB'], 0.0, 0.0)]   #added to the broken script
ghb_data[2] = [(4, 4, 4, 0.1, 1.5)]
ssm_data[2] = [(4, 4, 4, 1.0, itype['GHB'], 1.0, 100.0)]
ghb_data[5] = [(4, 4, 4, 0.25, 1.5)]
ssm_data[5] = [(4, 4, 4, 0.5, itype['GHB'], 0.5, 200.0)]

for k in range(nlay):
    for i in range(nrow):
        ghb_data[0].append((k, i, 0, 0.0, 100.0))                    #added to the broken script
        ssm_data[0].append((k, i, 0, 0.0, itype['GHB'], 0.0, 0.0))   #added to the broken script
        ghb_data[2].append((k, i, 0, 0.0, 100.0))
        ssm_data[2].append((k, i, 0, 0.0, itype['GHB'], 0.0, 0.0))

test_script_breaks.txt
test_script_works.txt

@emorway-usgs
Copy link
Contributor Author

fixed with PR #756

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