-
Notifications
You must be signed in to change notification settings - Fork 319
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
Initializing itype as spval for fates patches #2935
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,6 +18,7 @@ module clm_driver | |
use clm_time_manager , only : get_nstep, is_beg_curr_day, is_beg_curr_year | ||
use clm_time_manager , only : get_prev_date, is_first_step | ||
use clm_varpar , only : nlevsno, nlevgrnd | ||
use clm_varcon , only : spval | ||
use clm_varorb , only : obliqr | ||
use spmdMod , only : masterproc, mpicom | ||
use decompMod , only : get_proc_clumps, get_clump_bounds, get_proc_bounds, bounds_type | ||
|
@@ -704,16 +705,23 @@ subroutine clm_drv(doalb, nextsw_cday, declinp1, declin, rstwr, nlend, rdate, ro | |
! bugs. | ||
allocate(downreg_patch(bounds_clump%begp:bounds_clump%endp)) | ||
allocate(leafn_patch(bounds_clump%begp:bounds_clump%endp)) | ||
downreg_patch = bgc_vegetation_inst%get_downreg_patch(bounds_clump) | ||
leafn_patch = bgc_vegetation_inst%get_leafn_patch(bounds_clump) | ||
|
||
allocate(froot_carbon(bounds_clump%begp:bounds_clump%endp)) | ||
allocate(croot_carbon(bounds_clump%begp:bounds_clump%endp)) | ||
froot_carbon = bgc_vegetation_inst%get_froot_carbon_patch( & | ||
bounds_clump, canopystate_inst%tlai_patch(bounds_clump%begp:bounds_clump%endp)) | ||
croot_carbon = bgc_vegetation_inst%get_croot_carbon_patch( & | ||
bounds_clump, canopystate_inst%tlai_patch(bounds_clump%begp:bounds_clump%endp)) | ||
|
||
if(use_fates)then | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'd add a comment to this about why this is being done. Also try using nan rather than spval. |
||
downreg_patch(:) = spval | ||
leafn_patch(:) = spval | ||
froot_carbon(:) = spval | ||
croot_carbon(:) = spval | ||
else | ||
downreg_patch = bgc_vegetation_inst%get_downreg_patch(bounds_clump) | ||
leafn_patch = bgc_vegetation_inst%get_leafn_patch(bounds_clump) | ||
froot_carbon = bgc_vegetation_inst%get_froot_carbon_patch( & | ||
bounds_clump, canopystate_inst%tlai_patch(bounds_clump%begp:bounds_clump%endp)) | ||
croot_carbon = bgc_vegetation_inst%get_croot_carbon_patch( & | ||
bounds_clump, canopystate_inst%tlai_patch(bounds_clump%begp:bounds_clump%endp)) | ||
end if | ||
|
||
call CanopyFluxes(bounds_clump, & | ||
filter(nc)%num_exposedvegp, filter(nc)%exposedvegp, & | ||
clm_fates,nc, & | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -930,7 +930,7 @@ subroutine init(this, bounds_proc, flandusepftdat) | |
c = this%f2hmap(nc)%fcolumn(s) | ||
pi = col%patchi(c)+1 | ||
pf = col%patchf(c) | ||
! patch%itype(pi:pf) = ispval | ||
patch%itype(pi:pf) = ispval | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Add a note about why this is being done, and what it will do. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. actually, the comments on 925-927 explain what is going on already. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. let me update the text a little though, its not as clear as it could be |
||
patch%is_fates(pi:pf) = .true. | ||
end do | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ahh, so this is another place where this caught this pattern that was being done for FATES, and now you have it only done outside of FATES.