UW-Hydro / VIC

The Variable Infiltration Capacity (VIC) Macroscale Hydrologic Model
http://vic.readthedocs.io
MIT License
260 stars 383 forks source link

Bug in classic driver in VIC 5.1.0, not able to read forcing data #945

Closed wantu12 closed 3 months ago

wantu12 commented 3 months ago

Bug Reports

On executing the model for two years (1-Jan-2001 to 31-Dec-2001, 730 days, 6 hourly interval, 7 atmospheric variables, 2920 row entries in fulldata files) with the following model settings in global parameter file: STARTYEAR 2001
STARTMONTH 01 STARTDAY 01
ENDYEAR 2002 ENDMONTH 12
ENDDAY 31

... is showing the following error report Traceback (most recent call last): /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0x80) [0x7f0ffb90ce40] /lib/x86_64-linux-gnu/libc.so.6(+0x29d90) [0x7f0ffb90cd90] ./drivers/classic/vic_classic.exe(+0x50a47) [0x55c6f65d0a47] ./drivers/classic/vic_classic.exe(+0x67d31) [0x55c6f65e7d31] ./drivers/classic/vic_classic.exe(+0x5cadd) [0x55c6f65dcadd] ./drivers/classic/vic_classic.exe(+0x4fa44) [0x55c6f65cfa44] [ERROR] ./src/read_atmos_data.c:228: errno: None: Not enough records in forcing file 1 (1461 21600.000000 = 31557600.000000) to run the number of records defined in the global file (2920 21600.000000 = 63072000.000000). Check forcing file time step, and global file

However, with the same input for 2 years in fulldata forcing, if the settings are reduced to 1 year instead of 2 years: STARTYEAR 2001
STARTMONTH 01 STARTDAY 01
ENDYEAR 2001 ENDMONTH 12
ENDDAY 31

The model is executed successfully with the following message while producing daily flux files, which is highly doubtful: Global Param File : ./Ghana/ctlfiles/globalsimfile5 Start Date : 2001-01-01-00000 Stop Date : 2001-12-31 Nrecs : 1460 Model Timestep (seconds) : 21600 Snow Timestep (seconds) : 21600 Runoff Timestep (seconds) : 21600 Atmos Timestep (seconds) : 3600

Overall Metrics

Model Cost       : 3.51192e-05 pe-hrs/simulated_year
Model Throughput : 683387 simulated_years/day
Timing Table: ------------ ---------------------- ---------------------- ---------------------- ---------------------- Timer Wall Time (secs) CPU Time (secs) Wall Time (secs/day) CPU Time (secs/day)
Init Time 0.0333979 0.002377 9.15011e-05 6.51233e-06
Run Time 0.089602 0.018952 0.000245485 5.19233e-05
Final Time 0.00341702 0.000265 9.36169e-06 7.26027e-07
Total Time 0.126429 0.021597 0.000346381 5.91699e-05
------------ ---------------------- ---------------------- ---------------------- ----------------------

------------------------------ END VIC TIMING PROFILE ------------------------------

wantu12 commented 3 months ago

Looks like there is no bug in the related topic. However, users need to know that unlike VIC 4, the upgraded VIC 5 does not allow creating datafiles with the number of columns less than the maximum number. For example, if anyone considers only variables PREC, and TMAX in VIC 4, only two columns in data files are sufficient, but in VIC 5 you have to prepare all 8 columns whether one wants to skip those in the model or not. My execution was successful only after adding another column for a variable that was supposed to be skipped and missing in the initial tries.