Skip to content

bug: flopy.utils.binaryfile.HeadUFile.get_ts() gives error for idx= 0 #1519

@giovannifi

Description

@giovannifi

I am trying to run this script:

import flopy
import flopy.utils.binaryfile as bf

path_exe = r'C:\modflow'
path_model = r'c:\models'
modelname = 'mymodel'

heads = bf.HeadUFile(path_model + '\\' + modelname + '.hds')  # hds file generated with the software mf-usg

print(heads.get_ts(idx=0))

and I get the following error message:

{IndexError}index -682005 is out of bounds for axis 0 with size XXXX

If I use any number between 1 and (XXXX - 1), I get a timeseries without any problem. I have the feeling that the command does not read node 0.

PS I am running flopy v 3.3.5 on a python 3.9 environment.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions