USEPA/WNTR

INABILITY TO READ IN OBERLIN NETWORK USING WNTR

uthmankareem opened this issue · 6 comments

Summary
Describe your question.
I am trying to read in an inp file for oberlin network on python jupyter. I have used the same command to read in modena network and it worked. However, when I try to read in oberlin network, it gives attribute error: None type has no attribute 'factor'

Attached is the error screenshot.
error1
error2

Thank you.

Environment
[Optional] Provide information on your computing environment.

  • Operating system: Windows OS 10
  • Python version:
  • WNTR version: 2.2

Does the INP file include flow units (i.e. GPM)? EPANET might assume default units, but it looks like WNTR requires that field. One way to populate the INP file with default values is to load the file into the EPANET GUI and resave the file.

@dbhart it would be helpful to update io.py to catch this issue before flow_units is used elsewhere.

That is correct, loading the INP file into the EPANET GUI, then saving it under a new name should add the missing default entries. The comment about io.py was for one of our developers.

dbhart commented

Does the INP file include flow units (i.e. GPM)? EPANET might assume default units, but it looks like WNTR requires that field. One way to populate the INP file with default values is to load the file into the EPANET GUI and resave the file.

@dbhart it would be helpful to update io.py to catch this issue before flow_units is used elsewhere.

Yes, it would, I will try to catch that.