KMarkert / servir-vic-training

Training materials for the VIC hydrologic model setup developed for the @SERVIR program
GNU General Public License v3.0
36 stars 32 forks source link

Got "IndexError" when running format_meto_forcing.py #26

Open HurriCaneBQL opened 4 years ago

HurriCaneBQL commented 4 years ago

Hi all I meet this error when running format_meto_forcing.py. Could you please help to fix it? servir-vic@vicTraining-VirtualBox:~/Documents/Ebinur_basin_vic_training/scripts$ python format_meteo_forcing.py ../data/input/gis/Ebinur_grid.tif ../data/input/forcing/raw/ ../data/input/forcing/ 2005 2013 Traceback (most recent call last): File "format_meteo_forcing.py", line 172, in main() File "format_meteo_forcing.py", line 164, in main format_meteo_forcing(sys.argv[1],sys.argv[2],sys.argv[3],sys.argv[4],sys.argv[5]) File "format_meteo_forcing.py", line 122, in format_meteo_forcing tmaxval = np.max(tmax[cnt1:cnt2+1,idx[0],idx[1]]-273.15) File "netCDF4/_netCDF4.pyx", line 3753, in netCDF4._netCDF4.Variable.getitem (netCDF4/_netCDF4.c:40527) File "netCDF4/_netCDF4.pyx", line 4470, in netCDF4._netCDF4.Variable._get (netCDF4/_netCDF4.c:51227) IndexError

HurriCaneBQL commented 4 years ago

I can provide you with data files and script files, could you check where is wrong? thank!!!

HurriCaneBQL commented 4 years ago

One thing to add, when I use format_meto_forcing.py to run the sample data, there is no output error. It may be a problem with my own data, but it hasn’t happened so far.

motasemmtsm commented 1 year ago

does anyone knows how to fix this error? it happens with me as well ?