Skip to content

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

@emorway-usgs

Description

@emorway-usgs

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions