KMarkert / servir-vic-training

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

How to fix error "Sum of snow band area fraction does not equal 1 (1.000)" #21

Closed giaMSU closed 4 years ago

giaMSU commented 4 years ago

Hi Mark, I am using the Nyando example and your scripts to run the VIC model. I reached to step where the first forcing file was opened and read. However, the model stops and give me a warning as below

"/home/giamsu/VIC_running/data/input/snow.param" has been opened for reading.

Cell: 43, lat: 0.0208, long: 35.0306

"/home/giamsu/VIC_running/data/input/forcing/forcing_0.0208_35.0306" has been opened for reading. "/home/giamsu/VIC_running/data/output/fluxes//fluxes_0.0208_35.0306" has been truncated or created for writing. WARNING: Sum of the snow band area fractions does not equal 1 (1.000000), dividing each fraction by the sum Warning: average band elevation 431.506256 not equal to grid_cell average elevation 1769.400024; setting grid cell elevation to average band elevation. Model run-time error... Snow band precipitation fraction (0.000100) should be 0 when the area fraction is 0. (band = 4) ...now exiting to system...####

Although I don't know how to fix it, I think this error may relate to a previous error when I created forcing files. However, it still created forcing files in the forcing folder

giamsu@giamsu-VirtualBox:~/VIC_running/scripts$ python format_meteo_forcing.py ../data/input/gis/Nyando_grid.tif ../data/input/forcing/raw/ ../data/input/forcing/ 2005 2013

Processing time: {0} Traceback (most recent call last): File "format_meteo_forcing.py", line 172, in main() File "format_meteo_forcing.py", line 166, in main print ('Processing time: {0}').format(dt) AttributeError: 'NoneType' object has no attribute 'format'##

Best regards

giaMSU commented 4 years ago

Hi all, I fixed this issue by below steps 1/ Open snow.param file in excel 2/ Sum all fraction values (from col 2 - col 12). If sum #1, edit these fraction values to make Sum = 1 3/Update snow.param file.

XiaoXiaoLeisure commented 2 years ago

Hi,

I met the same problem.

WARNING: Sum of the snow band area fractions does not equal 1 (1.000000), dividing each fraction by the sum Warning: average band elevation 431.506256 not equal to grid_cell average elevation 1769.400024; setting grid cell elevation to average band elevation. Model run-time error... Snow band precipitation fraction (0.000100) should be 0 when the area fraction is 0. (band = 4) ...now exiting to system...

But I don't understand your solution. "2/ Sum all fraction values (from col 2 - col 12). If sum#1, edit these fraction values to make Sum = 1"

Actually, my snow.param file have 62 columns.