A discussion forum for old Hydrus-1D users.
-
Mrinella
- Posts: 2
- Joined: Wed Nov 20, 2024 8:35 pm
- Location: USA
Post
by Mrinella » Wed Nov 20, 2024 10:10 pm
I'm using the source code provided on the website. With some combinations of hydraulic parameters, the code sometimes references row 101 of the 100 x nmat matrix htab. No out-of-bounds error message is generated (except in debug mode) and the compiler assigns htab(101,nmat) equal to zero. I've seen a small bit of previous discussion about related topics in the forum, but not specifically this. I want to ensure this isn't an error. Thanks!
-
Jirka
- Posts: 6256
- Joined: Sat Mar 16, 2002 3:47 pm
- Location: USA
- Location: Riverside, CA
Post
by Jirka » Wed Nov 20, 2024 10:46 pm
You can add a line:
if(iT.ge.NTabD-1) iT=NTabD-1
after
iT=int((alog10(-hiM)-alh1)/dlh)+1
and then, it should be OK.
J.
-
Mrinella
- Posts: 2
- Joined: Wed Nov 20, 2024 8:35 pm
- Location: USA
Post
by Mrinella » Wed Nov 20, 2024 10:54 pm
Thank! You!