Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug report: error in vegetation parameter(LAI, albedo, etc) initialization when VEGPARAM_LAI=FALSE #455

Closed
pengbinpeluo opened this issue Apr 3, 2016 · 3 comments
Labels
Milestone

Comments

@pengbinpeluo
Copy link
Contributor

Hi Joe,
I'm afraid that I have found another bug in the released version 4.2.c. When "options.VEGPARAM_LAI" is FALSE, the model will give biased albedo output since the vegetation albedo is not initialized in read_vegparam.c. To fix this bug, the following lines in read_vegparam.c should be moved out of the "if ( options.VEGPARAM_LAI )":

  for ( j = 0; j < MONTHSPERYEAR; j++ ) {
    temp[i].albedo[j] = veg_lib[temp[i].veg_class].albedo[j];
    temp[i].LAI[j] = veg_lib[temp[i].veg_class].LAI[j];
    temp[i].vegcover[j] = veg_lib[temp[i].veg_class].vegcover[j];
    temp[i].Wdmax[j] = veg_lib[temp[i].veg_class].Wdmax[j];
  }

Regards,
Bin Peng(112233pengbin@163.com or pengbin@radi.ac.cn)

@jhamman jhamman added the bug label Apr 3, 2016
@jhamman jhamman added this to the 4.2.d milestone Apr 3, 2016
@jhamman
Copy link
Member

jhamman commented Apr 3, 2016

Thanks for the report. I'm cc'ing @tbohn since he knows this section of the code best.

@pengbinpeluo - would you be willing to submit a bug fix pull request for this?

@tbohn
Copy link
Contributor

tbohn commented Apr 3, 2016

Yes, I see what @pengbinpeluo is referring to. I think the fix should be: move lines 242-247 to immediately before line 217.

@pengbinpeluo
Copy link
Contributor Author

Hi Joe and Ted, I have submitted a bug fix pull request for this issue. Cheers!

jhamman pushed a commit that referenced this issue Apr 5, 2016
Fix the bug of  #455 when `options.VEGPARAM_LAI == FALSE`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants