LSRathore / vic-auto

A script to generate input files i.e. soil, vegetation parameter file, elevation band file and meteorological forcing files for Variable Infiltration Capacity (VIC) hydrologic Model.
10 stars 4 forks source link

Difficulties running the vic_auto script #15

Open WalterVIC opened 2 years ago

WalterVIC commented 2 years ago

Hello there, thanks for the script, it might help me a lot in preprocessing the VIC-data :) However, when running the vic_auto script, I get the following warning in the soil part and therefore a bad soil parameter file:

WARNING 000916: The input feature class does not appear to contain projected data.

Any suggestions on how to fix this? The input features seem to me to have a projection, all GCS WGS1984. The temp_soil csv contains all the data correctly but when it writes it to the soil_parameter_new file, it goes wrong.

Next to that I have a small second issue: in the vegetation parameter file preparation, I get the following error:

ValueError: labels ['OID'] not contained in axis in line 187

I am sure that the OID column is present, I can see that in the temp_lulc csv file. When replacing the OID label with the column index in the script, it does remove the column, but then the remainder of the script does not function anymore because the index values change. Thank already for helping me out!

LSRathore commented 2 years ago

Your first error seems to be because of the projection of the input files. Make sure that none of your input files have a projection (or they should have a geographic coordinate system). If the temp_soil.csv file is generated without any error then the final file should be generated too. If it does not work, you can modify the temp_soil.csv file following lines 162-171. It is just basic pandas and python.

Regarding the second issue, can you check the file named temp_lulc.csv in your workspace? Check if the column OID exists there. If not, then there must be the ID column with a different name. Replace that column name with the OID in the code (line 185 temp_l=temp_l.drop(["OID"],axis=1))