Skip to content

Commit

Permalink
Temporary fix to allow transient %cft in transient pft runs
Browse files Browse the repository at this point in the history
Fix associated with issue ESCOMP#538.
Minor code mods that allow %cft to advance beyond 1850 in transient pft
simulations.
  • Loading branch information
slevis-lmwg authored and ekluzek committed Oct 29, 2018
1 parent c6d6791 commit 0385833
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
10 changes: 5 additions & 5 deletions src/dyn_subgrid/dynSubgridControlMod.F90
Expand Up @@ -165,7 +165,7 @@ subroutine read_namelist( NLFilename )
dyn_subgrid_control_inst = dyn_subgrid_control_type( &
flanduse_timeseries = flanduse_timeseries, &
do_transient_pfts = do_transient_pfts, &
do_transient_crops = do_transient_crops, &
do_transient_crops = do_transient_pfts, &
do_harvest = do_harvest, &
for_testing_allow_non_annual_changes = for_testing_allow_non_annual_changes, &
for_testing_zero_dynbal_fluxes = for_testing_zero_dynbal_fluxes)
Expand Down Expand Up @@ -225,10 +225,10 @@ subroutine check_namelist_consistency
end if

if (dyn_subgrid_control_inst%do_transient_crops) then
if (.not. use_crop) then
write(iulog,*) 'ERROR: do_transient_crops can only be true if use_crop is true'
call endrun(msg=errMsg(sourcefile, __LINE__))
end if
! if (.not. use_crop) then
! write(iulog,*) 'ERROR: do_transient_crops can only be true if use_crop is true'
! call endrun(msg=errMsg(sourcefile, __LINE__))
! end if
if (use_fates) then
! NOTE(wjs, 2017-01-13) ED / FATES does not currently have a mechanism for
! changing its column areas, with the consequent changes in aboveground biomass
Expand Down
5 changes: 4 additions & 1 deletion src/dyn_subgrid/dyncropFileMod.F90
Expand Up @@ -125,6 +125,7 @@ subroutine dyncrop_interp(bounds,crop_inst)
use CropType , only : crop_type
use landunit_varcon , only : istcrop
use clm_varpar , only : cft_lb, cft_ub
use clm_varctl , only : use_crop
use surfrdUtilsMod , only : collapse_crop_types
use subgridWeightsMod , only : set_landunit_weight
!
Expand Down Expand Up @@ -164,7 +165,9 @@ subroutine dyncrop_interp(bounds,crop_inst)
allocate(fertcft_cur(bounds%begg:bounds%endg, cft_lb:cft_ub))
call fertcft%get_current_data(fertcft_cur)

call collapse_crop_types(wtcft_cur, fertcft_cur, bounds%begg, bounds%endg, verbose = .false.)
if (use_crop) then
call collapse_crop_types(wtcft_cur, fertcft_cur, bounds%begg, bounds%endg, verbose = .false.)
end if

allocate(col_set(bounds%begc:bounds%endc))
col_set(:) = .false.
Expand Down

0 comments on commit 0385833

Please sign in to comment.