timcera / wdmtoolbox

Command line script and Python package to work with Hydrological Simulation Programs-FORTRAN (HSPF) Watershed Data Management (WDM) files.
Other
10 stars 6 forks source link

Unformatted read error #48

Closed soperjj closed 5 months ago

soperjj commented 8 months ago

I am testing the wdmtoolbox.listdsns method on an example EPA wdm file (https://www3.epa.gov/ceampubl/basins/met_data/MA190049.zip).

Running this:

from wdmtoolbox import wdmtoolbox
file = "./MA190049.wdm"
wdmtoolbox.listdsns(file)

Yields the following:

FIO-F-217/unformatted read/unit=55/attempt to read past end of file.
 File name = ./MA190049.wdm    unformatted, direct access   record = 1
 In source file wdm_support/UTWDMD.f, at line number 89

I have successfully read the same file with hspf_reader so I don't think the input data format is an issue?

I am running python=3.10, wdmtoolbox=14.0.1, and hspf_reader=1.0.4.

timcera commented 5 months ago

Tried with the latest wdmtoolbox (16.0.8) and this WDM works now.