Skip to content

Commit

Permalink
bugfixes on c23cf02 -> eebdf4d merge
Browse files Browse the repository at this point in the history
  • Loading branch information
ckoven committed Jun 29, 2016
1 parent eebdf4d commit 853f006
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 17 deletions.
7 changes: 1 addition & 6 deletions components/clm/bld/CLMBuildNamelist.pm
Original file line number Diff line number Diff line change
Expand Up @@ -2399,13 +2399,8 @@ sub setup_logic_bgc_shared {

if ( $physv->as_long() >= $physv->as_long("clm4_5")) {
if ( $nl_flags->{'bgc_mode'} ne "sp" ) {
add_default($test_files, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'constrain_stress_deciduous_onset', 'phys'=>$physv->as_string() );
}
# FIXME(bja, 201606) the logic around ed / bgc_mode /
# use_century_decomp is confusing and messed up. This is a hack
# workaround.
if ($nl_flags->{'use_century_decomp'} == '.true.') {
add_default($test_files, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'decomp_depth_efolding', 'phys'=>$physv->as_string() );
add_default($test_files, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'constrain_stress_deciduous_onset', 'phys'=>$physv->as_string() );
}

}
Expand Down
2 changes: 1 addition & 1 deletion components/clm/src/biogeochem/CNVegetationFacade.F90
Original file line number Diff line number Diff line change
Expand Up @@ -95,12 +95,12 @@ module CNVegetationFacade
! FIXME(bja, 2016-06) These need to be public for use when ED is
! turned on. Should either be moved out of here or create some ED
! version of the facade....
type(cnveg_state_type) :: cnveg_state_inst
type(cnveg_carbonstate_type) :: cnveg_carbonstate_inst
type(cnveg_carbonflux_type) :: cnveg_carbonflux_inst

!X!private

type(cnveg_state_type) :: cnveg_state_inst
type(cnveg_carbonstate_type) :: c13_cnveg_carbonstate_inst
type(cnveg_carbonstate_type) :: c14_cnveg_carbonstate_inst
type(cnveg_carbonflux_type) :: c13_cnveg_carbonflux_inst
Expand Down
3 changes: 0 additions & 3 deletions components/clm/src/biogeochem/EDBGCDynMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,8 @@ module EDBGCDynMod
use decompMod , only : bounds_type
use perf_mod , only : t_startf, t_stopf
use clm_varctl , only : use_century_decomp, use_nitrif_denitrif
use CNVegStateType , only : cnveg_state_type
use CNVegCarbonStateType , only : cnveg_carbonstate_type
use CNVegCarbonFluxType , only : cnveg_carbonflux_type
use CNVegNitrogenStateType , only : cnveg_nitrogenstate_type
use CNVegNitrogenFluxType , only : cnveg_nitrogenflux_type
use SoilBiogeochemStateType , only : soilbiogeochem_state_type
use SoilBiogeochemCarbonStateType , only : soilbiogeochem_carbonstate_type
use SoilBiogeochemCarbonFluxType , only : soilbiogeochem_carbonflux_type
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -741,10 +741,12 @@ subroutine decomp_rate_constants_bgc(bounds, num_soilc, filter_soilc, &
spinup_geogterm_l23(c) = 1._r8
endif
!
if ( abs(spinup_factor(i_cwd) - 1._r8) .gt. .000001_r8) then
spinup_geogterm_cwd(c) = spinup_factor(i_cwd) * get_spinup_latitude_term(grc%latdeg(col%gridcell(c)))
else
spinup_geogterm_cwd(c) = 1._r8
if ( .not. use_ed ) then
if ( abs(spinup_factor(i_cwd) - 1._r8) .gt. .000001_r8) then
spinup_geogterm_cwd(c) = spinup_factor(i_cwd) * get_spinup_latitude_term(grc%latdeg(col%gridcell(c)))
else
spinup_geogterm_cwd(c) = 1._r8
endif
endif
!
if ( abs(spinup_factor(i_soil1) - 1._r8) .gt. .000001_r8) then
Expand Down Expand Up @@ -1045,20 +1047,20 @@ subroutine decomp_rate_constants_bgc(bounds, num_soilc, filter_soilc, &
end do
end if

! do the same for cwd, but only if ed is not enabled (because ED handles CWD on its own structure
! do the same for cwd, but only if ed is not enabled, because ED handles CWD on its own structure.
if (.not. use_ed) then
if (use_vertsoilc) then
do j = 1,nlevdecomp
do fc = 1,num_soilc
c = filter_soilc(fc)
decomp_k(c,j,i_cwd) = k_frag * t_scalar(c,j) * w_scalar(c,j) * depth_scalar(c,j) * o_scalar(c,j)
decomp_k(c,j,i_cwd) = k_frag * t_scalar(c,j) * w_scalar(c,j) * depth_scalar(c,j) * o_scalar(c,j) * spinup_geogterm_cwd(c)
end do
end do
else
do j = 1,nlevdecomp
do fc = 1,num_soilc
c = filter_soilc(fc)
decomp_k(c,j,i_cwd) = k_frag * t_scalar(c,j) * w_scalar(c,j) * o_scalar(c,j)
decomp_k(c,j,i_cwd) = k_frag * t_scalar(c,j) * w_scalar(c,j) * o_scalar(c,j) * spinup_geogterm_cwd(c)
end do
end do
end if
Expand Down

0 comments on commit 853f006

Please sign in to comment.