"invalid string position" error

Section for FAQs regarding i-Tree Hydro

Moderators: i-Tree Support, i-Tree Team

Post Reply
MattLeconey
Posts: 5
Joined: Mon Nov 02, 2020 3:34 pm

"invalid string position" error

Post by MattLeconey » Mon Nov 02, 2020 6:06 pm

I'm trying to sort out why I'm running into this error using a 10m cell size DEM from USGS using iTree Hydro v6. Based on the output text, it seems there is an issue with the TI output that is generated from the DEM. I made sure the raster was projected correctly and exported properly to the .dat file. The DEM is for a city area portion (Jersey City, NJ), so perhaps the strange topography is causing issues?

Any suggestions for a potential solution are greatly appreciated.

Thanks,
Matt

C:\Users\mleconey\AppData\Local\Temp\HydroFiles\Scenario1
===
Reading DEM file

DEM stats:
Rows: 178 Cols: 100 cell size: 10 NODATA: -9999
DEM file read.

Starting the Topographic Index calculation.
Computing the slope of each folder.
Computing the flow direction of each folder.
Computing the specfic contributing area of each folder.
Computing the topographic index value of each folder.
Generating the Topographic Index histogram.
Outputing the topography files.

invalid string position
===
James.Kruegler
Posts: 10
Joined: Wed Sep 18, 2019 10:26 am

Re: "invalid string position" error

Post by James.Kruegler » Tue Nov 03, 2020 11:44 am

Hello Matt,

Based on the output text you provided it looks to me like Hydro was able to read your DEM and create a TI file without issue. If you have a local working directory established for your Hydro project (Help > Options > Use Specified Working Directory for Hydro Model Processing), or if your model's output is still available in your AppData\Local\Temp\HydroFiles\Scenario1 folder, you can check if a TI file was created successfully in that directory. The TI file name will end in "TI.dat", and after two header rows it should contain two columns of 30 entries each. There should be no negative values in these entries, and unless your DEM was perfectly flat there should be no duplicate values in the second column.

The "invalid string position" error message often appears when one or more of a project's time-series inputs (weather and streamflow) does not match the simulation period chosen in Step 1 of the Hydro project setup. If your TI file looks good based on the description above, I would then recommend you compare your simulation period with the first and last date-time values in your weather and streamflow input files. If they do not match, you will need to adjust your simulation period or manually remove rows from your time-series files as necessary.

If these suggestions don't resolve the issue, you can reach out to i-Tree technical support at info@itreetools.org and we can continue troubleshooting from there.

Best,
James
A member of the i-Tree Team

Please provide feedback on our technical support services by clicking here to take our 5 minute survey
MattLeconey
Posts: 5
Joined: Mon Nov 02, 2020 3:34 pm

Re: "invalid string position" error

Post by MattLeconey » Tue Nov 03, 2020 5:33 pm

Hey James,

Thank you, you pointed me in the right direction to a solution. I stopped worrying about any issues with the DEM as the TI file was generated and looked good. I was using the preloaded weather data with no gage data for calibration. When I started from a clean file, it was able to get it to work with the exact same settings I had in the previous file. There must have been some time series that got stuck in the model incorrectly at some step when I was altering it.

Thanks again,
Matt
MattLeconey
Posts: 5
Joined: Mon Nov 02, 2020 3:34 pm

Re: "invalid string position" error

Post by MattLeconey » Wed Nov 04, 2020 12:47 pm

Thanks James,

The TI file looked good, so you pointed me away from a rabbit hole of unneeded troubleshooting. I ended up starting from a new file entirely and when I put in the same settings, it ended up working for some reason. I was using the preloaded weather data at Teterboro with no stream gage data and had played around with the time interval, so perhaps that caused some issue with it storing an incorrect time interval that resulted in a mismatch. If I run into any other issues I'll reach out to the support email.

Thanks again,
Matt
Post Reply