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

Add "tillage" to bgc-crop model #112

Closed
ekluzek opened this issue Dec 16, 2017 · 14 comments · Fixed by #2040 or #2311
Closed

Add "tillage" to bgc-crop model #112

ekluzek opened this issue Dec 16, 2017 · 14 comments · Fixed by #2040 or #2311
Labels
enhancement new capability or improved behavior of existing capability priority: low Background task that doesn't need to be done right away. science Enhancement to or bug impacting science

Comments

@ekluzek
Copy link
Collaborator

ekluzek commented Dec 16, 2017

Erik Kluzek < erik > - 2015-02-11 16:14:09 -0700
Bugzilla Id: 2142
Bugzilla CC: dlawren, mvertens, rfisher, sacks, slevis,

Here are the changes from Sam (relative to clm4_5_06).

[erik@yslogin1 clm45bgccltv_0.5deg4506_1973-2004]$ diff -c /glade/p/work/slevis/clm4_5_06/models/lnd/clm/src/clm4_5/main/clmtype.F90 SourceMods/src.clm/
*** /glade/p/work/slevis/clm4_5_06/models/lnd/clm/src/clm4_5/main/clmtype.F90	2013-05-22 17:53:49.764464745 -0600
--- SourceMods/src.clm/clmtype.F90	2013-07-17 11:46:50.777948000 -0600
***************
*** 2361,2366 ****
--- 2361,2367 ----
     real(r8), pointer :: aais_mask(:)    !Antarctic ice sheet mask 
     real(r8), pointer :: aais_area(:)    !Antarctic ice-covered area per gridcell (km^2)
     real(r8), pointer :: tws(:)          !total water storage (mm H2O)
+    real(r8), pointer :: developed(:)
  
  #if (defined CNDV)
     ! dgvm variables defined at the gridcell level
[erik@yslogin1 clm45bgccltv_0.5deg4506_1973-2004]$ diff -c /glade/p/work/slevis/clm4_5_06/models/lnd/clm/src/clm4_5/biogeophys/BalanceCheckMod.F90  SourceMods/src.clm/
*** /glade/p/work/slevis/clm4_5_06/models/lnd/clm/src/clm4_5/biogeophys/BalanceCheckMod.F90	2013-05-22 17:53:50.930877831 -0600
--- SourceMods/src.clm/BalanceCheckMod.F90	2013-07-17 12:01:55.936740000 -0600
***************
*** 549,555 ****
                  endif
               endif
  
!              if (ltype(l) == istsoil .or. ltype(l) == istcrop .or. ltype(l) == istwet ) then
                   if ( do_capsnow(c) ) then
                      snow_sources(c) = frac_sno_eff(c) * (qflx_dew_snow(c) + qflx_dew_grnd(c) ) &
                           + qflx_h2osfc_to_ice(c) + qflx_prec_grnd(c)
--- 549,555 ----
                  endif
               endif
  
!              if (ctype(c) == icol_road_perv .or. ltype(l) == istsoil .or. ltype(l) == istcrop .or. ltype(l) == istwet ) then
                   if ( do_capsnow(c) ) then
                      snow_sources(c) = frac_sno_eff(c) * (qflx_dew_snow(c) + qflx_dew_grnd(c) ) &
                           + qflx_h2osfc_to_ice(c) + qflx_prec_grnd(c) 
[erik@yslogin1 clm45bgccltv_0.5deg4506_1973-2004]$ diff -c /glade/p/work/slevis/clm4_5_06/models/lnd/clm/src/clm4_5/biogeochem/CNDecompCascadeMod_CENTURY.F90  SourceMods/src.clm/
*** /glade/p/work/slevis/clm4_5_06/models/lnd/clm/src/clm4_5/biogeochem/CNDecompCascadeMod_CENTURY.F90	2013-05-22 17:53:47.078278215 -0600
--- SourceMods/src.clm/CNDecompCascadeMod_CENTURY.F90	2013-08-05 17:23:21.163550471 -0600
***************
*** 406,412 ****
  ! !IROUTINE: decomp_rate_constants
  !
  ! !INTERFACE:
! subroutine decomp_rate_constants(lbc, ubc, num_soilc, filter_soilc)
   !
  ! !DESCRIPTION:
  !
--- 406,412 ----
  ! !IROUTINE: decomp_rate_constants
  !
  ! !INTERFACE:
! subroutine decomp_rate_constants(lbc, ubc, num_soilc, filter_soilc, num_soilp, filter_soilp)
   !
  ! !DESCRIPTION:
  !
***************
*** 418,423 ****
--- 418,427 ----
     use shr_const_mod, only : SHR_CONST_PI
     use clm_varcon, only: secspday
     use clm_time_manager, only : get_days_per_year
+    ! slevis additions
+    use clm_time_manager, only : get_curr_calday,is_first_restart_step
+    use fileutils, only : getfil
+    use ncdio_pio
  
     !
  ! !ARGUMENTS:
***************
*** 425,430 ****
--- 429,437 ----
     integer, intent(in) :: lbc, ubc        ! column bounds
     integer, intent(in) :: num_soilc       ! number of soil columns in filter
     integer, intent(in) :: filter_soilc(:) ! filter for soil columns
+    ! slevis additions
+    integer, intent(in) :: num_soilp       ! number of soil pfts in filter
+    integer, intent(in) :: filter_soilp(:) ! filter for soil pfts
  !
  ! !CALLED FROM:
  ! 
***************
*** 491,496 ****
--- 498,509 ----
     real(r8) :: normalization_factor ! factor by which to offset the decomposition rates frm century to a q10 formulation
     real(r8):: days_per_year         ! days per year
  
+    ! slevis additions
+    character(len=256):: locfn ! local file name
+    type(file_desc_t) :: ncid  ! netcdf id
+    logical :: readvar         ! true => variable is on input file 
+    integer :: day, fp, p, g
+    real(r8) :: clteff_scalar(lbc:ubc,1:7) ! plowing modifies decomp_k
  
  #if (defined VERTSOILC)
     real(r8) :: depth_scalar(lbc:ubc,1:nlevdecomp) 
***************
*** 801,818 ****
        end do
     end do
  #endif
!    
  #if (defined VERTSOILC)
     do j = 1,nlevdecomp
        do fc = 1,num_soilc
           c = filter_soilc(fc)
           decomp_k(c,j,i_litr1) = k_l1 * t_scalar(c,j) * w_scalar(c,j) * depth_scalar(c,j) * o_scalar(c,j)
!          decomp_k(c,j,i_litr2) = k_l2_l3 * t_scalar(c,j) * w_scalar(c,j) * depth_scalar(c,j) * o_scalar(c,j)
!          decomp_k(c,j,i_litr3) = k_l2_l3 * 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)
!          decomp_k(c,j,i_soil1) = k_s1 * t_scalar(c,j) * w_scalar(c,j) * depth_scalar(c,j) * o_scalar(c,j)
!          decomp_k(c,j,i_soil2) = k_s2 * t_scalar(c,j) * w_scalar(c,j) * depth_scalar(c,j) * o_scalar(c,j)
!          decomp_k(c,j,i_soil3) = k_s3 * t_scalar(c,j) * w_scalar(c,j) * depth_scalar(c,j) * o_scalar(c,j)
        end do
     end do
  #else
--- 814,968 ----
        end do
     end do
  #endif
! 
!    ! -----------------------------------------------------
!    ! slevis adding effect of cultivation (e.g., plowing)
!    !        on soil C decomposition
!    ! -----------------------------------------------------
!    ! 1) hardwired read of Melannie Hartmann's file
!    ! -----------------------------------------------------
! 
!    day = get_curr_calday()
! 
!    call getfil('/glade/scratch/slevis/clm45bgccltv_0.5deg4506_1972/run/dev_countries_0-360.nc', locfn, 0 )
!    call ncd_pio_openfile (ncid, trim(locfn), 0)
!    call ncd_io(ncid=ncid, varname='DEVELOPED', flag='read', data=clm3%g%developed, dim1name=grlnd, readvar=readvar)
!    if (.not. readvar) call endrun('ERROR: DEVELOPED not on dev_countries file')
! 
!    do fp = 1,num_soilp
!       p = filter_soilp(fp)
!       c = clm3%g%l%c%p%column(p)
!       g = clm3%g%l%c%p%gridcell(p)
!       ! -----------------------------------------------------
!       ! 2) error check
!       ! -----------------------------------------------------
!       if (clm3%g%developed(g) > 1._r8 .or. &
!           clm3%g%developed(g) < 0._r8) then
!          write(iulog,*) 'ERROR: this variable - developed - should not take on this value:'
!          write(iulog,*) clm3%g%developed(g), g
!          call endrun()
! 
!       ! -----------------------------------------------------
!       ! 3) assigning cultivation practices and mapping to the
!       !    effect on soil C decomposition
!       ! -----------------------------------------------------
!       ! About the next two ELSE IFs:
!       ! CLM does not know the day of planting before it happens because the
!       ! CLM calculates day of planting from indexes that respond to
!       ! environmental conditions at every time step. Hence,
!       ! I see two options:
!       ! a) start DAYCENT's farming practices on the day of planting
!       !    rather than 30 d before planting OR
!       ! b) start DAYCENT's farming practices on April 15th, which assumes
!       !    planting on May 15th. This option seems simpler for now. Later we
!       !    may test whether choice a or b makes much difference.
!       else if (clm3%g%developed(g) > 0._r8) then ! == 1
!          ! More developed country; info from DAYCENT (Melannie Hartman CSU)
!          ! temp. cereals: I 30 d bef, D on day of planting
!          ! corn, soy    : I           D           & ROW 30 d aftr planting
! 
!          if (day < 105) then
!             clteff_scalar(c,:) = 1._r8
!          else if (day >= 105 .and. day < 135) then ! April 15
!             clteff_scalar(c,:) = 1._r8
!             if (clm3%g%l%c%p%itype(p) >= 17) then
!                clteff_scalar(c,i_litr2) = 6.67_r8
!                clteff_scalar(c,i_litr3) = 6.67_r8
!                clteff_scalar(c,i_soil1) = 6.67_r8
!                clteff_scalar(c,i_soil2) = 6.67_r8
!             end if
!          else if (day >= 135 .and. day < 165) then ! May 15
!             clteff_scalar(c,:) = 1._r8
!             if (clm3%g%l%c%p%itype(p) >= 17) then
!                clteff_scalar(c,i_litr2) = 3.41_r8
!                clteff_scalar(c,i_litr3) = 3.41_r8
!                clteff_scalar(c,i_soil1) = 3.41_r8
!                clteff_scalar(c,i_soil2) = 3.41_r8
!             end if
!          else if (day >= 165 .and. day < 195) then ! June 14
!             clteff_scalar(c,:) = 1._r8
!             if (clm3%g%l%c%p%itype(p) == 17 .or. &
!                 clm3%g%l%c%p%itype(p) == 18 .or. &
!                 clm3%g%l%c%p%itype(p) == 23 .or. &
!                 clm3%g%l%c%p%itype(p) == 24      ) then
!                clteff_scalar(c,i_litr2) = 3.41_r8
!                clteff_scalar(c,i_litr3) = 3.41_r8
!                clteff_scalar(c,i_soil1) = 3.41_r8
!                clteff_scalar(c,i_soil2) = 3.41_r8
!             end if
!          else if (day >= 195) then ! July 14
!             clteff_scalar(c,:) = 1._r8
!          end if
! 
!       else if (clm3%g%developed(g) < 1._r8) then ! == 0
!          ! less developed country; info from DAYCENT (Melannie Hartman CSU)
!          ! temp. cereals: P 30 d bef, C 15 d bef, D on day of planting
!          ! corn, soy    : P           C           D           & HW-7 30 d aftr
! 
!          if (day < 105) then
!             clteff_scalar(c,:) = 1._r8
!          else if (day >= 105 .and. day < 120) then ! April 15
!             clteff_scalar(c,:) = 1._r8
!             if (clm3%g%l%c%p%itype(p) >= 17) then
!                clteff_scalar(c,i_litr2) = 10.00_r8
!                clteff_scalar(c,i_litr3) = 10.00_r8
!                clteff_scalar(c,i_soil1) = 10.00_r8
!                clteff_scalar(c,i_soil2) = 10.00_r8
!             end if
!          else if (day >= 120 .and. day < 135) then ! April 30
!             clteff_scalar(c,:) = 1._r8
!             if (clm3%g%l%c%p%itype(p) >= 17) then
!                clteff_scalar(c,i_litr2) = 2.69_r8
!                clteff_scalar(c,i_litr3) = 2.69_r8
!                clteff_scalar(c,i_soil1) = 2.69_r8
!                clteff_scalar(c,i_soil2) = 2.69_r8
!             end if
!          else if (day >= 135 .and. day < 165) then ! May 15
!             clteff_scalar(c,:) = 1._r8
!             if (clm3%g%l%c%p%itype(p) >= 17) then
!                clteff_scalar(c,i_litr2) = 3.41_r8
!                clteff_scalar(c,i_litr3) = 3.41_r8
!                clteff_scalar(c,i_soil1) = 3.41_r8
!                clteff_scalar(c,i_soil2) = 3.41_r8
!             end if
!          else if (day >= 165 .and. day < 195) then ! June 14
!             clteff_scalar(c,:) = 1._r8
!             if (clm3%g%l%c%p%itype(p) == 17 .or. &
!                 clm3%g%l%c%p%itype(p) == 18 .or. &
!                 clm3%g%l%c%p%itype(p) == 23 .or. &
!                 clm3%g%l%c%p%itype(p) == 24      ) then
!                clteff_scalar(c,i_litr2) = 1.10_r8
!                clteff_scalar(c,i_litr3) = 1.10_r8
!                clteff_scalar(c,i_soil1) = 1.10_r8
!                clteff_scalar(c,i_soil2) = 1.10_r8
!                clteff_scalar(c,i_soil3) = 1.10_r8
!             end if
!          else if (day >= 195) then ! July 14
!             clteff_scalar(c,:) = 1._r8
!          end if
!       end if
!    enddo
! 
!    call ncd_pio_closefile(ncid)
! ! -----------------------------------------------------
! 
  #if (defined VERTSOILC)
     do j = 1,nlevdecomp
        do fc = 1,num_soilc
           c = filter_soilc(fc)
           decomp_k(c,j,i_litr1) = k_l1 * t_scalar(c,j) * w_scalar(c,j) * depth_scalar(c,j) * o_scalar(c,j)
!          decomp_k(c,j,i_litr2) = k_l2_l3 * t_scalar(c,j) * w_scalar(c,j) * depth_scalar(c,j) * o_scalar(c,j) * clteff_scalar(c,i_litr2)
!          decomp_k(c,j,i_litr3) = k_l2_l3 * t_scalar(c,j) * w_scalar(c,j) * depth_scalar(c,j) * o_scalar(c,j) * clteff_scalar(c,i_litr3)
           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_soil1) = k_s1 * t_scalar(c,j) * w_scalar(c,j) * depth_scalar(c,j) * o_scalar(c,j) * clteff_scalar(c,i_soil1)
!          decomp_k(c,j,i_soil2) = k_s2 * t_scalar(c,j) * w_scalar(c,j) * depth_scalar(c,j) * o_scalar(c,j) * clteff_scalar(c,i_soil2)
!          decomp_k(c,j,i_soil3) = k_s3 * t_scalar(c,j) * w_scalar(c,j) * depth_scalar(c,j) * o_scalar(c,j) * clteff_scalar(c,i_soil3)
!          if (c==115688) then ! begin slevis diag
!          write(iulog,*) 'day, clteff_scalar'
!          write(iulog,*) day, clteff_scalar(c,:)
!          write(iulog,*) 'i_litr1,i_litr2,i_litr3,i_cwd,i_soil1,i_soil2,i_soil3'
!          write(iulog,*) i_litr1,i_litr2,i_litr3,i_cwd,i_soil1,i_soil2,i_soil3
!          end if ! end slevis diag
        end do
     end do
  #else
[erik@yslogin1 clm45bgccltv_0.5deg4506_1973-2004]$ diff -c /glade/p/work/slevis/clm4_5_06/models/lnd/clm/src/clm4_5/biogeochem/CNDecompMod.F90  SourceMods/src.clm/*** /glade/p/work/slevis/clm4_5_06/models/lnd/clm/src/clm4_5/biogeochem/CNDecompMod.F90	2013-05-22 17:53:47.061045089 -0600
--- SourceMods/src.clm/CNDecompMod.F90	2013-07-17 11:46:50.863425000 -0600
***************
*** 188,194 ****
     
     
     
!    call decomp_rate_constants(lbc, ubc, num_soilc, filter_soilc)
     
     
     ! set initial values for potential C and N fluxes
--- 188,194 ----
     
     
     
!    call decomp_rate_constants(lbc, ubc, num_soilc, filter_soilc, num_soilp, filter_soilp)
     
     
     ! set initial values for potential C and N fluxes
[erik@yslogin1 clm45bgccltv_0.5deg4506_1973-2004]$ diff -c /glade/p/work/slevis/clm4_5_06/models/lnd/clm/src/clm4_5/main/clmtypeInitMod.F90  SourceMods/src.clm/
*** /glade/p/work/slevis/clm4_5_06/models/lnd/clm/src/clm4_5/main/clmtypeInitMod.F90	2013-05-22 17:53:49.720922909 -0600
--- SourceMods/src.clm/clmtypeInitMod.F90	2013-07-17 11:46:50.800493000 -0600
***************
*** 553,563 ****
--- 553,565 ----
     allocate(g%aais_mask(beg:end))
     allocate(g%aais_area(beg:end))
     allocate(g%tws(beg:end))
+    allocate(g%developed(beg:end))
     g%gris_mask(beg:end) = nan
     g%gris_area(beg:end) = nan
     g%aais_mask(beg:end) = nan
     g%aais_area(beg:end) = nan
     g%tws(beg:end) = nan
+    g%developed(beg:end) = nan
  
    end subroutine init_gridcell_type
@ekluzek ekluzek added this to the future milestone Dec 16, 2017
@ekluzek ekluzek added enhancement new capability or improved behavior of existing capability priority: low Background task that doesn't need to be done right away. labels Dec 16, 2017
@ekluzek
Copy link
Collaborator Author

ekluzek commented Dec 16, 2017

Erik Kluzek < erik > - 2015-02-11 16:14:29 -0700

Namelist changes are:

hist_mfilt = 1,1
hist_nhtfrq = 0,0
hist_fincl2 = 'TLAI','TSAI','HTOP','HBOT','NPP'
hist_dov2xy = .true.,.false.
finidat='/glade/scratch/slevis/clm45bgccrop_0.5deg4506_1972/run/clm45bgccrop_0.5deg4506_1972.clm2.r.0301-01-01-00000.nc'
fsurdat='/glade/p/work/slevis/clm4_5_06/models/lnd/clm/tools/clm4_5/mksurfdata_map/surfdata_360x720cru_simyr2000_c130523.nc'
fpftdyn=''
stream_year_first_ndep = 1972
stream_year_last_ndep = 2005
stream_year_first_popdens = 1972
stream_year_last_popdens = 2005

@ekluzek
Copy link
Collaborator Author

ekluzek commented Dec 16, 2017

Erik Kluzek < erik > - 2015-02-11 16:18:29 -0700

Sam's case:

create_newcase -case /glade/u/home/slevis/clm45bgccrop_0.5deg4506_1972 -mach yellowstone -compset 1850_DATM%QIA_CLM45%BGC_SICE_SOCN_RTM_SGLC_SWAV -res a%360x720cru_l%360x720cru_oi%360x720cru_r%r05_m%360x720cru_g%null_w%null

@ekluzek
Copy link
Collaborator Author

ekluzek commented Dec 16, 2017

Erik Kluzek < erik > - 2015-02-11 16:28:40 -0700

Surface dataset difference (versus standard surfdata_360x720cru_simyr2000_c130418.nc:

 <               :Lai_raw_data_file_name = "mksrf_lai24pftnontrop_c120712.nc" ;
 ---
 >               :Lai_raw_data_file_name = "mksrf_lai_global_c090506.nc" ;
 298c298
 <               :Vegetation_type_raw_data_filename = "mksrf_24pftirrNT_landuse_rc2000_c120712.nc" ;
 ---
>               :Vegetation_type_raw_data_filename = "mksrf_landuse_rc2000_c090630.nc" ;

@ekluzek
Copy link
Collaborator Author

ekluzek commented Dec 16, 2017

Erik Kluzek < erik > - 2015-02-12 10:07:29 -0700

Here's the difference for the file called: CNDecompCascadeMod_CENTURY.F90fromYumaPlow
I think it might be from a different base version of CLM.

[erik@yslogin2 biogeochem]$ cp ~slevis/archivedRUNS.mvHereToUse/levisetal2014gmd/clm45bgccltv_0.5deg4506_1973-2004/SourceMods/src.clm/CNDecompCascadeMod_CENTURY.F90fromYumaPlow CNDecompCascadeMod_CENTURY.F90 
[erik@yslogin2 biogeochem]$ svn diff
Index: CNDecompCascadeMod_CENTURY.F90
===================================================================
--- CNDecompCascadeMod_CENTURY.F90	(revision 68110)
+++ CNDecompCascadeMod_CENTURY.F90	(working copy)
@@ -16,9 +16,9 @@
 ! !USES:
    use shr_kind_mod , only: r8 => shr_kind_r8
    use shr_const_mod, only: SHR_CONST_TKFRZ
-   use clm_varpar   , only: nlevsoi, nlevgrnd, nlevdecomp, ndecomp_cascade_transitions, ndecomp_pools, nsompools 
+   use clm_varpar   , only: nlevsoi,nlevgrnd,nlevdecomp,ndecomp_cascade_transitions,ndecomp_pools 
    use clm_varpar   , only: i_met_lit, i_cel_lit, i_lig_lit, i_cwd
-   use clm_varctl   , only: iulog, spinup_state
+   use clm_varctl   , only: iulog
    use clm_varcon   , only: zsoi
 #ifdef LCH4
    use clm_varctl   , only: anoxia
@@ -46,9 +46,6 @@
    real(r8), public :: froz_q10 = 1.5_r8                     ! separate q10 for frozen soil respiration rates.  default to same as above zero rates
    integer, public :: nlev_soildecomp_standard               ! used here and in ch4Mod
 
-   !! parameters for AD spinup
-   real(r8), public, parameter :: spinup_vector(nsompools) = (/ 1.0_r8, 15.0_r8, 675.0_r8 /) ! multipliers for soil decomp during accelerated spinup
-
 !EOP
 !-----------------------------------------------------------------------
 
@@ -72,6 +69,8 @@
    use clmtype
    use clm_time_manager    , only : get_step_size
 
+   use clm_varcon, only: spinup_vector
+
 ! !ARGUMENTS:
    implicit none
 !
@@ -406,7 +405,7 @@
 ! !IROUTINE: decomp_rate_constants
 !
 ! !INTERFACE:
-subroutine decomp_rate_constants(lbc, ubc, num_soilc, filter_soilc, num_soilp, filter_soilp)
+subroutine decomp_rate_constants(lbc, ubc, num_soilc, filter_soilc)
  !
 ! !DESCRIPTION:
 !
@@ -416,12 +415,10 @@
 ! !USES:
    use clmtype
    use shr_const_mod, only : SHR_CONST_PI
-   use clm_varcon, only: secspday
+   use clm_varcon, only: spinup_vector, secspday
    use clm_time_manager, only : get_days_per_year
-   ! slevis additions
-   use clm_time_manager, only : get_curr_calday,is_first_restart_step
-   use fileutils, only : getfil
-   use ncdio_pio
+   use clm_time_manager, only : get_curr_date, get_curr_calday ! slevis adding
+   use spmdMod, only : masterproc                  ! for hardwired read statmt
 
    !
 ! !ARGUMENTS:
@@ -429,9 +426,6 @@
    integer, intent(in) :: lbc, ubc        ! column bounds
    integer, intent(in) :: num_soilc       ! number of soil columns in filter
    integer, intent(in) :: filter_soilc(:) ! filter for soil columns
-   ! slevis additions
-   integer, intent(in) :: num_soilp       ! number of soil pfts in filter
-   integer, intent(in) :: filter_soilp(:) ! filter for soil pfts
 !
 ! !CALLED FROM:
 ! 
@@ -446,7 +440,11 @@
 
    real(r8), pointer :: dz(:,:)           ! soil layer thickness (m)
    real(r8), pointer :: t_soisno(:,:)     ! soil temperature (Kelvin)  (-nlevsno+1:nlevgrnd)
-   real(r8), pointer :: sucsat(:,:)      ! minimum soil suction (mm)
+#ifndef STNDRD_BSW_FOR_SOILPSI_CALC
+   real(r8), pointer :: psisat(:,:)       ! soil water potential at saturation for CN code (MPa)
+#else
+    real(r8), pointer :: sucsat(:,:)      ! minimum soil suction (mm)
+#endif
    real(r8), pointer :: soilpsi(:,:)      ! soil water potential in each soil layer (MPa)
 #ifdef LCH4
    real(r8), pointer :: o2stress_unsat(:,:) ! Ratio of oxygen available to that demanded by roots, aerobes, & methanotrophs (nlevsoi)
@@ -483,6 +481,16 @@
    real(r8):: cwdc_loss             ! fragmentation rate for CWD carbon (gC/m2/s)
    real(r8):: cwdn_loss             ! fragmentation rate for CWD nitrogen (gN/m2/s)
 
+   integer :: yr, mon, day, tod      ! slevis needs tod (time of day in sec) +
+   integer :: iostatcropschedule     ! error code for hardwired read statement
+   integer :: year = 0               ! init year+jday (julian day) here; then
+   integer :: jday = 0               ! read from cropschedule file and
+   real(r8) :: clteff_scalar(1:7)    ! modify decomp_k in response to plowing...
+   character :: clteffcode = 'Z'     ! ...according to cultivation effect code
+   integer :: yearold = 0
+   integer :: jdayold = 0
+   data clteff_scalar /7*1._r8/      ! initialize all 7 slots incl. unused ones
+   character :: clteffcodeold = 'Z'  ! end slevis variable declarations
    integer :: i_litr1
    integer :: i_litr2
    integer :: i_litr3
@@ -498,12 +506,6 @@
    real(r8) :: normalization_factor ! factor by which to offset the decomposition rates frm century to a q10 formulation
    real(r8):: days_per_year         ! days per year
 
-   ! slevis additions
-   character(len=256):: locfn ! local file name
-   type(file_desc_t) :: ncid  ! netcdf id
-   logical :: readvar         ! true => variable is on input file 
-   integer :: day, fp, p, g
-   real(r8) :: clteff_scalar(lbc:ubc,1:7) ! plowing modifies decomp_k
 
 #if (defined VERTSOILC)
    real(r8) :: depth_scalar(lbc:ubc,1:nlevdecomp) 
@@ -514,7 +516,11 @@
 
    ! Assign local pointers to derived type arrays
    t_soisno              => clm3%g%l%c%ces%t_soisno
+#ifndef STNDRD_BSW_FOR_SOILPSI_CALC
+   psisat                => clm3%g%l%c%cps%psisat
+#else
    sucsat            => clm3%g%l%c%cps%sucsat
+#endif
    soilpsi               => clm3%g%l%c%cps%soilpsi
    dz                    => clm3%g%l%c%cps%dz
    t_scalar           => clm3%g%l%c%ccf%t_scalar
@@ -565,11 +571,11 @@
    catanf_30 = catanf(30._r8)
    ! The following code implements the acceleration part of the AD spinup algorithm
 
-if ( spinup_state .eq. 1 ) then
+#if (defined AD_SPINUP)
    k_s1 = k_s1 * spinup_vector(1)
    k_s2 = k_s2 * spinup_vector(2)
    k_s3 = k_s3 * spinup_vector(3)
-endif
+#endif
 
    i_litr1 = 1
    i_litr2 = 2
@@ -654,7 +660,12 @@
          do fc = 1,num_soilc
             c = filter_soilc(fc)
             if (j==1) w_scalar(c,:) = 0._r8
+
+#ifndef STNDRD_BSW_FOR_SOILPSI_CALC
+            maxpsi = psisat(c,j)
+#else
             maxpsi = sucsat(c,j) * (-9.8e-6_r8)
+#endif
             psi = min(soilpsi(c,j),maxpsi)
             ! decomp only if soilpsi is higher than minpsi
             if (psi > minpsi) then
@@ -751,7 +762,11 @@
       do j = 1,nlevdecomp
          do fc = 1,num_soilc
             c = filter_soilc(fc)
+#ifndef STNDRD_BSW_FOR_SOILPSI_CALC
+            maxpsi = psisat(c,j)
+#else
             maxpsi = sucsat(c,j) * (-9.8e-6_r8)
+#endif
             psi = min(soilpsi(c,j),maxpsi)
             ! decomp only if soilpsi is higher than minpsi
             if (psi > minpsi) then
@@ -815,154 +830,129 @@
    end do
 #endif
 
-   ! -----------------------------------------------------
-   ! slevis adding effect of cultivation (e.g., plowing)
-   !        on soil C decomposition
-   ! -----------------------------------------------------
-   ! 1) hardwired read of Melannie Hartmann's file
-   ! -----------------------------------------------------
+   if (masterproc) then ! slevis adds hardwired read statmt; see also pftvarcon
 
-   day = get_curr_calday()
+      call get_curr_date( yr, mon, day, tod )
+      day = get_curr_calday() ! replace day of the month with julian day
 
-   call getfil('/glade/scratch/slevis/clm45bgccltv_0.5deg4506_1972/run/dev_countries_0-360.nc', locfn, 0 )
-   call ncd_pio_openfile (ncid, trim(locfn), 0)
-   call ncd_io(ncid=ncid, varname='DEVELOPED', flag='read', data=clm3%g%developed, dim1name=grlnd, readvar=readvar)
-   if (.not. readvar) call endrun('ERROR: DEVELOPED not on dev_countries file')
+! Apply plowing event
+! In the same timestep, the read statmt below loads info about the next event
+! Hence I use yearold, jdayold, and clteffcodeold in the following "if"
 
-   do fp = 1,num_soilp
-      p = filter_soilp(fp)
-      c = clm3%g%l%c%p%column(p)
-      g = clm3%g%l%c%p%gridcell(p)
-      ! -----------------------------------------------------
-      ! 2) error check
-      ! -----------------------------------------------------
-      if (clm3%g%developed(g) > 1._r8 .or. &
-          clm3%g%developed(g) < 0._r8) then
-         write(iulog,*) 'ERROR: this variable - developed - should not take on this value:'
-         write(iulog,*) clm3%g%developed(g), g
-         call endrun()
-
-      ! -----------------------------------------------------
-      ! 3) assigning cultivation practices and mapping to the
-      !    effect on soil C decomposition
-      ! -----------------------------------------------------
-      ! About the next two ELSE IFs:
-      ! CLM does not know the day of planting before it happens because the
-      ! CLM calculates day of planting from indexes that respond to
-      ! environmental conditions at every time step. Hence,
-      ! I see two options:
-      ! a) start DAYCENT's farming practices on the day of planting
-      !    rather than 30 d before planting OR
-      ! b) start DAYCENT's farming practices on April 15th, which assumes
-      !    planting on May 15th. This option seems simpler for now. Later we
-      !    may test whether choice a or b makes much difference.
-      else if (clm3%g%developed(g) > 0._r8) then ! == 1
-         ! More developed country; info from DAYCENT (Melannie Hartman CSU)
-         ! temp. cereals: I 30 d bef, D on day of planting
-         ! corn, soy    : I           D           & ROW 30 d aftr planting
-
-         if (day < 105) then
-            clteff_scalar(c,:) = 1._r8
-         else if (day >= 105 .and. day < 135) then ! April 15
-            clteff_scalar(c,:) = 1._r8
-            if (clm3%g%l%c%p%itype(p) >= 17) then
-               clteff_scalar(c,i_litr2) = 6.67_r8
-               clteff_scalar(c,i_litr3) = 6.67_r8
-               clteff_scalar(c,i_soil1) = 6.67_r8
-               clteff_scalar(c,i_soil2) = 6.67_r8
-            end if
-         else if (day >= 135 .and. day < 165) then ! May 15
-            clteff_scalar(c,:) = 1._r8
-            if (clm3%g%l%c%p%itype(p) >= 17) then
-               clteff_scalar(c,i_litr2) = 3.41_r8
-               clteff_scalar(c,i_litr3) = 3.41_r8
-               clteff_scalar(c,i_soil1) = 3.41_r8
-               clteff_scalar(c,i_soil2) = 3.41_r8
-            end if
-         else if (day >= 165 .and. day < 195) then ! June 14
-            clteff_scalar(c,:) = 1._r8
-            if (clm3%g%l%c%p%itype(p) == 17 .or. &
-                clm3%g%l%c%p%itype(p) == 18 .or. &
-                clm3%g%l%c%p%itype(p) == 23 .or. &
-                clm3%g%l%c%p%itype(p) == 24      ) then
-               clteff_scalar(c,i_litr2) = 3.41_r8
-               clteff_scalar(c,i_litr3) = 3.41_r8
-               clteff_scalar(c,i_soil1) = 3.41_r8
-               clteff_scalar(c,i_soil2) = 3.41_r8
-            end if
-         else if (day >= 195) then ! July 14
-            clteff_scalar(c,:) = 1._r8
+      if (yr==yearold .and. day>=jdayold .and. day<jdayold+30) then
+         if (clteffcodeold=='Z') then
+            clteff_scalar(i_litr2) = 1._r8 ! no effect
+            clteff_scalar(i_litr3) = 1._r8 ! no effect
+            clteff_scalar(i_soil1) = 1._r8 ! no effect
+            clteff_scalar(i_soil2) = 1._r8 ! no effect
+            clteff_scalar(i_soil3) = 1._r8 ! no effect
+         else if (clteffcodeold=='A') then
+            clteff_scalar(i_litr2) = 1.100_r8
+            clteff_scalar(i_litr3) = 1.100_r8
+            clteff_scalar(i_soil1) = 1.000_r8
+            clteff_scalar(i_soil2) = 2.554_r8
+            clteff_scalar(i_soil3) = 2.554_r8
+         else if (clteffcodeold=='B') then
+            clteff_scalar(i_litr2) = 1.200_r8
+            clteff_scalar(i_litr3) = 1.200_r8
+            clteff_scalar(i_soil1) = 1.000_r8
+            clteff_scalar(i_soil2) = 2.815_r8
+            clteff_scalar(i_soil3) = 2.815_r8
+         else if (clteffcodeold=='C') then
+            clteff_scalar(i_litr2) = 1.241_r8
+            clteff_scalar(i_litr3) = 1.241_r8
+            clteff_scalar(i_soil1) = 1.041_r8
+            clteff_scalar(i_soil2) = 3.041_r8
+            clteff_scalar(i_soil3) = 3.041_r8
+         else if (clteffcodeold=='D') then
+            clteff_scalar(i_litr2) = 1.50_r8
+            clteff_scalar(i_litr3) = 1.50_r8
+            clteff_scalar(i_soil1) = 1.00_r8
+            clteff_scalar(i_soil2) = 3.50_r8
+            clteff_scalar(i_soil3) = 3.50_r8
+         else if (clteffcodeold=='E') then
+            clteff_scalar(i_litr2) = 1.600_r8
+            clteff_scalar(i_litr3) = 1.600_r8
+            clteff_scalar(i_soil1) = 1.100_r8
+            clteff_scalar(i_soil2) = 3.691_r8
+            clteff_scalar(i_soil3) = 3.691_r8
+         else if (clteffcodeold=='F') then
+            clteff_scalar(i_litr2) = 1.649_r8
+            clteff_scalar(i_litr3) = 1.649_r8
+            clteff_scalar(i_soil1) = 1.149_r8
+            clteff_scalar(i_soil2) = 3.849_r8
+            clteff_scalar(i_soil3) = 3.849_r8
+         else if (clteffcodeold=='G') then
+            clteff_scalar(i_litr2) = 1.735_r8
+            clteff_scalar(i_litr3) = 1.735_r8
+            clteff_scalar(i_soil1) = 1.235_r8
+            clteff_scalar(i_soil2) = 4.435_r8
+            clteff_scalar(i_soil3) = 4.435_r8
+         else if (clteffcodeold=='H') then
+            clteff_scalar(i_litr2) = 1.8_r8
+            clteff_scalar(i_litr3) = 1.8_r8
+            clteff_scalar(i_soil1) = 1.2_r8
+            clteff_scalar(i_soil2) = 4.8_r8
+            clteff_scalar(i_soil3) = 4.8_r8
+         else if (clteffcodeold=='I') then
+            clteff_scalar(i_litr2) = 2.034_r8
+            clteff_scalar(i_litr3) = 2.034_r8
+            clteff_scalar(i_soil1) = 1.234_r8
+            clteff_scalar(i_soil2) = 5.434_r8
+            clteff_scalar(i_soil3) = 5.434_r8
+         else if (clteffcodeold=='J') then
+            clteff_scalar(i_litr2) = 3.396_r8
+            clteff_scalar(i_litr3) = 3.396_r8
+            clteff_scalar(i_soil1) = 1.396_r8
+            clteff_scalar(i_soil2) = 7.396_r8
+            clteff_scalar(i_soil3) = 7.396_r8
+         else if (clteffcodeold=='K') then
+            clteff_scalar(i_litr2) = 3.5_r8
+            clteff_scalar(i_litr3) = 3.5_r8
+            clteff_scalar(i_soil1) = 8.0_r8
+            clteff_scalar(i_soil2) = 8.0_r8
+            clteff_scalar(i_soil3) = 8.0_r8
+         else
+            write(iulog,*) 'clteffcodeold=', clteffcodeold
+            call endrun( 'decomp_rate_constants ERROR: unexpected clteffcode.' )
          end if
+      else
+         clteff_scalar(i_litr2) = 1._r8 ! no effect
+         clteff_scalar(i_litr3) = 1._r8 ! no effect
+         clteff_scalar(i_soil1) = 1._r8 ! no effect
+         clteff_scalar(i_soil2) = 1._r8 ! no effect
+         clteff_scalar(i_soil3) = 1._r8 ! no effect
+      end if
+      write(iulog,*) 'yr,day,clteffcodeold,clteff_scalar=',yr,day,clteffcodeold,clteff_scalar
 
-      else if (clm3%g%developed(g) < 1._r8) then ! == 0
-         ! less developed country; info from DAYCENT (Melannie Hartman CSU)
-         ! temp. cereals: P 30 d bef, C 15 d bef, D on day of planting
-         ! corn, soy    : P           C           D           & HW-7 30 d aftr
+! read next plowing event while applying the previous one
 
-         if (day < 105) then
-            clteff_scalar(c,:) = 1._r8
-         else if (day >= 105 .and. day < 120) then ! April 15
-            clteff_scalar(c,:) = 1._r8
-            if (clm3%g%l%c%p%itype(p) >= 17) then
-               clteff_scalar(c,i_litr2) = 10.00_r8
-               clteff_scalar(c,i_litr3) = 10.00_r8
-               clteff_scalar(c,i_soil1) = 10.00_r8
-               clteff_scalar(c,i_soil2) = 10.00_r8
+      do while (yr>=year .and. day>=jday)
+         if (tod == 0) then ! time of day = 0 at the beginning of every day
+            yearold = year
+            jdayold = jday
+            clteffcodeold = clteffcode
+            read(unit=42, fmt='(i4,1x,i3,1x,a1)', iostat=iostatcropschedule) year, jday, clteffcode
+            if (iostatcropschedule.ne.0) then
+               call endrun( 'decomp_rate_constants ERROR: failed to read cropschedule.' )
+            else
+               write(iulog,*) 'Successfully read cropschedule'
             end if
-         else if (day >= 120 .and. day < 135) then ! April 30
-            clteff_scalar(c,:) = 1._r8
-            if (clm3%g%l%c%p%itype(p) >= 17) then
-               clteff_scalar(c,i_litr2) = 2.69_r8
-               clteff_scalar(c,i_litr3) = 2.69_r8
-               clteff_scalar(c,i_soil1) = 2.69_r8
-               clteff_scalar(c,i_soil2) = 2.69_r8
-            end if
-         else if (day >= 135 .and. day < 165) then ! May 15
-            clteff_scalar(c,:) = 1._r8
-            if (clm3%g%l%c%p%itype(p) >= 17) then
-               clteff_scalar(c,i_litr2) = 3.41_r8
-               clteff_scalar(c,i_litr3) = 3.41_r8
-               clteff_scalar(c,i_soil1) = 3.41_r8
-               clteff_scalar(c,i_soil2) = 3.41_r8
-            end if
-         else if (day >= 165 .and. day < 195) then ! June 14
-            clteff_scalar(c,:) = 1._r8
-            if (clm3%g%l%c%p%itype(p) == 17 .or. &
-                clm3%g%l%c%p%itype(p) == 18 .or. &
-                clm3%g%l%c%p%itype(p) == 23 .or. &
-                clm3%g%l%c%p%itype(p) == 24      ) then
-               clteff_scalar(c,i_litr2) = 1.10_r8
-               clteff_scalar(c,i_litr3) = 1.10_r8
-               clteff_scalar(c,i_soil1) = 1.10_r8
-               clteff_scalar(c,i_soil2) = 1.10_r8
-               clteff_scalar(c,i_soil3) = 1.10_r8
-            end if
-         else if (day >= 195) then ! July 14
-            clteff_scalar(c,:) = 1._r8
          end if
-      end if
-   enddo
-
-   call ncd_pio_closefile(ncid)
-! -----------------------------------------------------
-
+      end do
+   end if ! end slevis adding hardwired read statmt
+   
 #if (defined VERTSOILC)
    do j = 1,nlevdecomp
       do fc = 1,num_soilc
          c = filter_soilc(fc)
          decomp_k(c,j,i_litr1) = k_l1 * t_scalar(c,j) * w_scalar(c,j) * depth_scalar(c,j) * o_scalar(c,j)
-         decomp_k(c,j,i_litr2) = k_l2_l3 * t_scalar(c,j) * w_scalar(c,j) * depth_scalar(c,j) * o_scalar(c,j) * clteff_scalar(c,i_litr2)
-         decomp_k(c,j,i_litr3) = k_l2_l3 * t_scalar(c,j) * w_scalar(c,j) * depth_scalar(c,j) * o_scalar(c,j) * clteff_scalar(c,i_litr3)
+         decomp_k(c,j,i_litr2) = k_l2_l3 * t_scalar(c,j) * w_scalar(c,j) * depth_scalar(c,j) * o_scalar(c,j) * clteff_scalar(i_litr2)
+         decomp_k(c,j,i_litr3) = k_l2_l3 * t_scalar(c,j) * w_scalar(c,j) * depth_scalar(c,j) * o_scalar(c,j) * clteff_scalar(i_litr3)
          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_soil1) = k_s1 * t_scalar(c,j) * w_scalar(c,j) * depth_scalar(c,j) * o_scalar(c,j) * clteff_scalar(c,i_soil1)
-         decomp_k(c,j,i_soil2) = k_s2 * t_scalar(c,j) * w_scalar(c,j) * depth_scalar(c,j) * o_scalar(c,j) * clteff_scalar(c,i_soil2)
-         decomp_k(c,j,i_soil3) = k_s3 * t_scalar(c,j) * w_scalar(c,j) * depth_scalar(c,j) * o_scalar(c,j) * clteff_scalar(c,i_soil3)
-         if (c==115688) then ! begin slevis diag
-         write(iulog,*) 'day, clteff_scalar'
-         write(iulog,*) day, clteff_scalar(c,:)
-         write(iulog,*) 'i_litr1,i_litr2,i_litr3,i_cwd,i_soil1,i_soil2,i_soil3'
-         write(iulog,*) i_litr1,i_litr2,i_litr3,i_cwd,i_soil1,i_soil2,i_soil3
-         end if ! end slevis diag
+         decomp_k(c,j,i_soil1) = k_s1 * t_scalar(c,j) * w_scalar(c,j) * depth_scalar(c,j) * o_scalar(c,j) * clteff_scalar(i_soil1)
+         decomp_k(c,j,i_soil2) = k_s2 * t_scalar(c,j) * w_scalar(c,j) * depth_scalar(c,j) * o_scalar(c,j) * clteff_scalar(i_soil2)
+         decomp_k(c,j,i_soil3) = k_s3 * t_scalar(c,j) * w_scalar(c,j) * depth_scalar(c,j) * o_scalar(c,j) * clteff_scalar(i_soil3)
       end do
    end do
 #else
@@ -970,12 +960,12 @@
       do fc = 1,num_soilc
          c = filter_soilc(fc)
          decomp_k(c,j,i_litr1) = k_l1 * t_scalar(c,j) * w_scalar(c,j) * o_scalar(c,j)
-         decomp_k(c,j,i_litr2) = k_l2_l3 * t_scalar(c,j) * w_scalar(c,j) * o_scalar(c,j)
-         decomp_k(c,j,i_litr3) = k_l2_l3 * t_scalar(c,j) * w_scalar(c,j) * o_scalar(c,j)
+         decomp_k(c,j,i_litr2) = k_l2_l3 * t_scalar(c,j) * w_scalar(c,j) * o_scalar(c,j) * clteff_scalar(i_litr2)
+         decomp_k(c,j,i_litr3) = k_l2_l3 * t_scalar(c,j) * w_scalar(c,j) * o_scalar(c,j) * clteff_scalar(i_litr3)
          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_soil1) = k_s1 * t_scalar(c,j) * w_scalar(c,j) * o_scalar(c,j)
-         decomp_k(c,j,i_soil2) = k_s2 * t_scalar(c,j) * w_scalar(c,j) * o_scalar(c,j)
-         decomp_k(c,j,i_soil3) = k_s3 * t_scalar(c,j) * w_scalar(c,j) * o_scalar(c,j)
+         decomp_k(c,j,i_soil1) = k_s1 * t_scalar(c,j) * w_scalar(c,j) * o_scalar(c,j) * clteff_scalar(i_soil1)
+         decomp_k(c,j,i_soil2) = k_s2 * t_scalar(c,j) * w_scalar(c,j) * o_scalar(c,j) * clteff_scalar(i_soil2)
+         decomp_k(c,j,i_soil3) = k_s3 * t_scalar(c,j) * w_scalar(c,j) * o_scalar(c,j) * clteff_scalar(i_soil3)
       end do
    end do
 #endif

@ekluzek
Copy link
Collaborator Author

ekluzek commented Dec 16, 2017

Erik Kluzek < erik > - 2015-02-12 10:10:45 -0700

I've put this work on a branch...

https://svn-ccsm-models.cgd.ucar.edu/clm2/branches/tillage

@ekluzek
Copy link
Collaborator Author

ekluzek commented Dec 16, 2017

Sam Levis < slevis > - 2015-02-12 11:26:01 -0700

(In reply to Erik Kluzek from comment #4)

Here's the difference for the file called:
CNDecompCascadeMod_CENTURY.F90fromYumaPlow
I think it might be from a different base version of CLM.
[...]

Gordon wanted the global version of my tillage mods. The *YumaPlow file was used in 1x1 runs for a county named Yuma, CO.

@ekluzek
Copy link
Collaborator Author

ekluzek commented Dec 16, 2017

Erik Kluzek < erik > - 2015-02-13 12:06:20 -0700

OK, I was able to exactly reproduce Sam's case with the branch I've checked in. Now, I'll try it with the change using GDP and see what happens...

@ekluzek
Copy link
Collaborator Author

ekluzek commented Dec 16, 2017

Sam Levis < slevis > - 2015-02-17 08:47:43 -0700

Found this in my "enhanced decomposition by cultivation" notes:

In future implementations apply enhanced decomp. to top 5 layers only!

@ekluzek
Copy link
Collaborator Author

ekluzek commented Dec 16, 2017

David Lawrence < dlawren > - 2015-02-17 17:11:55 -0700

In response to Sam's prior comment, about only tilling first 5 layers. Since the vertical resolution of the model could change, this should be implemented as tilling only to a certain depth. First 5 layers is about 0.25m.

@ekluzek
Copy link
Collaborator Author

ekluzek commented Dec 16, 2017

Erik Kluzek < erik > - 2015-02-18 11:30:03 -0700

OK to implement the reduction in number of layers applied over. At initialization for cultivation, zsoi can be examined for the first layer that is above 0.25, and the index stored as ncult_layers. Then in CNDecompCascade_CENTURY a loop would be separated out for cultivation that loops over ncult_layers and applies clteff_scalar to only the top ncult_layers.

@billsacks billsacks added type: science enhancement and removed enhancement new capability or improved behavior of existing capability labels Jan 25, 2018
@billsacks billsacks added tag: en - major new science enhancement new capability or improved behavior of existing capability and removed type: enhance - science labels May 24, 2019
@ekluzek ekluzek removed this from the future milestone Aug 26, 2019
@ekluzek
Copy link
Collaborator Author

ekluzek commented Aug 26, 2019

I think this is being worked on by @danicalombardozzi and Michael Graham.

@ekluzek
Copy link
Collaborator Author

ekluzek commented Apr 27, 2022

@danicalombardozzi is this still being worked on? I'm wondering about it in regard to the ctsm5.2 surface datasets. If any datasets could be done as streams files that would decouple it from the ctsm5.2 process.

@danicalombardozzi
Copy link
Contributor

@ekluzek, yes we do have tillage code that has been developed based on Sam's original work that can/will be integrated into CTSM. However, there are currently no files associated with this new code.

@ekluzek
Copy link
Collaborator Author

ekluzek commented May 3, 2022

Thanks @danicalombardozzi . I checked his code on the branch you sent me to make sure there aren't surface dataset requirements. And there are not! What the code does it uses a threshold for GDP (which is used by the fire code) to determine if a gridcell is "developed" or not. If that's still a valid approach it means that there would be no requirements for datasets in bringing the code into the model. It sounds like in the short term it would be unlikely that a new dataset could be created. As such it looks like we won't need any new datasets for this work to be added to the ctsm5.2 process.

samsrabin pushed a commit to samsrabin/CTSM that referenced this issue Apr 19, 2024
…ests

This PR initializes fields to 1 that are used in the stream->model map creation. This resolves failures for the following two tests:
SMS_D_Ld3_Vnuopc.f10_f10_mg37.I1850Clm50BgcCrop.cheyenne_intel.clm-default
ERI_D_Ld9_Vnuopc.ne30_g17.I2000Clm50BgcCru.cheyenne_intel.clm-vrtlay
@samsrabin samsrabin added the science Enhancement to or bug impacting science label Aug 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement new capability or improved behavior of existing capability priority: low Background task that doesn't need to be done right away. science Enhancement to or bug impacting science
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants