badlands-model / badlands

Basin and Landscape Dynamics model

Home Page:https://badlands.readthedocs.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

XML parser barfs if 0 tectonic events are defined

ihowson opened this issue · comments

    <tectonic>
        <disp3d>0</disp3d>
        <events>0</events>
    </tectonic>

crashes with

File "pyBadlands/pyBadlands/forcing/xmlParser.py", line 386, in _get_XmL_Data
    if tmpTime[0,0] > self.tStart:
IndexError:     if tmpTime[0,0] > self.tStart:
index 0 is out of bounds for axis 0 with size 0
IndexError: index 0 is out of bounds for axis 0 with size 0

This issue has been fixed. The user needs to define at least 1 tectonic event in the XmL file otherwise a ValueError is given when parsing the XmL