UW-Hydro/VIC

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

Closed this issue · 1 comments

Bug Reports

  • VIC 5.0.1 February 1, 2017 Classic driver

  • Name and version of the C compiler you are using: gcc (9.4.0)

  • Operating system: WSL in Windows 11

  • A description of relevant model settings and summary of the bug or error message:
    Earlier, I was using VIC 4.2d at daily intervals, but I recently decided to move to VIC 5.1.0 at 6 hourly intervals. There is a bug in the classic driver related to reading input atmospheric data. I would like to know if there is any solution to overcome this issue, possibly reflected in read_atmos_data.c:228. I need to execute the model for 2 years with the bugs fixed.

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 full_data_ 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 full_data_ 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 ------------------------------

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.