From 038583358cc7f7a2100ac145ece9494bb58072e3 Mon Sep 17 00:00:00 2001 From: Samuel Levis Date: Thu, 18 Oct 2018 16:40:07 -0600 Subject: [PATCH] Temporary fix to allow transient %cft in transient pft runs Fix associated with issue #538. Minor code mods that allow %cft to advance beyond 1850 in transient pft simulations. --- src/dyn_subgrid/dynSubgridControlMod.F90 | 10 +++++----- src/dyn_subgrid/dyncropFileMod.F90 | 5 ++++- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/src/dyn_subgrid/dynSubgridControlMod.F90 b/src/dyn_subgrid/dynSubgridControlMod.F90 index 58e3a40359..665f98277c 100644 --- a/src/dyn_subgrid/dynSubgridControlMod.F90 +++ b/src/dyn_subgrid/dynSubgridControlMod.F90 @@ -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) @@ -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 diff --git a/src/dyn_subgrid/dyncropFileMod.F90 b/src/dyn_subgrid/dyncropFileMod.F90 index 9921ab5954..931839c295 100644 --- a/src/dyn_subgrid/dyncropFileMod.F90 +++ b/src/dyn_subgrid/dyncropFileMod.F90 @@ -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 ! @@ -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.