Variables soilalb_wet, soilalb_dry and soilalb_moy are only needed if alb_bg_modis=FALSE. Protect there reading and writing in restart file in if statement.