badlands-model / badlands

Basin and Landscape Dynamics model

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

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

TypeError: 'float' object has no attribute '__getitem__' when adding the the strata mesh with disp3d=1

tyszwh opened this issue · comments

commented

Dear Dr Tristan Salles, ihowson

I found an error when I try to add the strata mesh with disp3d=1. It may related to the variable scum from the below message.

`---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
in ()
----> 1 model.run_to_time(250000)

/root/build/pybadlands/pyBadlands/model.pyc in run_to_time(self, tEnd, profile, verbose)
265 self.recGrid.tinMesh, self.elevation, self.cumdiff, fcum, scum, Ke, Th = self.force.apply_XY_dispacements(
266 self.recGrid.areaDel, self.fixIDs, self.elevation, self.cumdiff, tflex=flexiso, scum=sload, Te=vTh,
--> 267 Ke=vKe, flexure=fflex, strat=fstrat, ero=fero)
268 # Update relevant parameters in deformed TIN
269 if fflex == 1:

/root/build/pybadlands/pyBadlands/forcing/forceSim.pyc in apply_XY_dispacements(self, area, fixIDs, telev, tcum, tflex, scum, Te, Ke, flexure, strat, ero)
772 cumfvals = cumf[ids]
773 if strat == 1:
--> 774 scumvals = stcum[ids]
775 if ero == 1:
776 Tevals = numpy.zeros((len(zvals),lay))

TypeError: 'float' object has no attribute 'getitem'
`

Hi Lynn,

Would you be able to send me your input files (displacement file/XmL input/initial surface...) So I can have a try at reproducing the error on my local computer.

Cheers
Tristan

commented

Hi Dr Tristan Salles,

Ok, I have sent these files to you.

Hi Lynn,

Thanks for reporting the problem. I found the issue and committed the changes to fix it on the master branch.
Your model looks pretty cool!

rift

commented

Dear Dr Tristan Salles,
Thanks for your great work.