Skip to content

Commit

Permalink
max_tillage_depth is now a namelist parameter.
Browse files Browse the repository at this point in the history
  • Loading branch information
samsrabin committed Aug 21, 2023
1 parent 69451e2 commit 8e67f28
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
1 change: 1 addition & 0 deletions bld/namelist_files/namelist_defaults_ctsm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2729,5 +2729,6 @@ use_crop=".true.">lnd/clm2/surfdata_map/ctsm5.1.dev052/landuse.timeseries_mpasa1

<tillage_mode>off</tillage_mode>
<use_original_tillage>.false.</use_original_tillage>
<max_tillage_depth>0.32d00</max_tillage_depth>

</namelist_defaults>
5 changes: 5 additions & 0 deletions bld/namelist_files/namelist_definition_ctsm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2895,4 +2895,9 @@ Whether to till crop soil, and if so, with what intensity.
Toggle to use original tillage logic, with bug for seasons crossing into a new calendar year
</entry>

<entry id="max_tillage_depth" type="real" category="physics"
group="tillage_inparm" valid_values="" value="0.32d00">
Maximum depth to till soil (m).
</entry>

</namelist_definition>
8 changes: 6 additions & 2 deletions src/soilbiogeochem/TillageMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ module TillageMod
logical :: use_original_tillage ! Use get_tillage_multipliers_orig?
real(r8), pointer :: tillage_mults_allphases(:,:) ! (ndecomp_pools, ntill_stages_max)
integer, parameter :: ntill_stages_max = 3 ! How many different tillage phases are there? (Not including all-1 phases.)
real(r8), parameter :: max_tillage_depth = 0.32_r8 ! Maximum depth to till (m)
real(r8) :: max_tillage_depth ! Maximum depth to till (m)

!==============================================================================
contains
Expand All @@ -53,11 +53,13 @@ subroutine readParams_namelist()

namelist /tillage_inparm/ &
tillage_mode, &
use_original_tillage
use_original_tillage, &
max_tillage_depth

! Default values
tillage_mode = 'off'
use_original_tillage = .false.
max_tillage_depth = 0.32_r8

! Read tillage namelist
if (masterproc) then
Expand All @@ -75,12 +77,14 @@ subroutine readParams_namelist()
endif
call shr_mpi_bcast(tillage_mode, mpicom)
call shr_mpi_bcast(use_original_tillage , mpicom)
call shr_mpi_bcast(max_tillage_depth, mpicom)

if (masterproc) then
write(iulog,*) ' '
write(iulog,*) 'tillage settings:'
write(iulog,*) ' tillage_mode = ',tillage_mode
write(iulog,*) ' use_original_tillage = ',use_original_tillage
write(iulog,*) ' max_tillage_depth = ',max_tillage_depth
endif

! Assign these
Expand Down

0 comments on commit 8e67f28

Please sign in to comment.