kthyng / tracpy

Fortran core of Tracmass + Python wrapping around the outside.
MIT License
28 stars 19 forks source link

errors when running with do3d=1 and zpar=fromMSL #6

Closed dcherian closed 10 years ago

dcherian commented 10 years ago

When trying to run with do3d=1 and zpar='fromMSL', python complains because find is not defined. I'm not sure what find should contain.

Line 329 of tracpy_class.py:

ka[i] = find(ind)[-1] # find value that is just shallower than starting vertical position

I had to fix some issues in lines 275-296 too because the sizes weren't correct for uf, vf, etc. Will send in a pull request.

kthyng commented 10 years ago

The tracking algorithm itself is fully capable of doing 3d tracking, but I haven't used it that way for quite awhile, so I suspect you'll find a lot of issues using it at this point. I hope to do some better code development on the 3D side of things in the next half a year, though. If you're interested in working on the kinks and issues, that would be great.

find is a Python function that returns the index of the condition inside the parentheses.

dcherian commented 10 years ago

I see.

I fixed the find issue by using np.argmax instead but it now blows up in tracmass.step(). I'll see what I can find and send in a pull request later.