From 8e67f287ab76b916be46e1071077922af5dbae6a Mon Sep 17 00:00:00 2001 From: Sam Rabin Date: Mon, 21 Aug 2023 17:46:54 -0600 Subject: [PATCH] max_tillage_depth is now a namelist parameter. --- bld/namelist_files/namelist_defaults_ctsm.xml | 1 + bld/namelist_files/namelist_definition_ctsm.xml | 5 +++++ src/soilbiogeochem/TillageMod.F90 | 8 ++++++-- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/bld/namelist_files/namelist_defaults_ctsm.xml b/bld/namelist_files/namelist_defaults_ctsm.xml index f65dc47ce6..d0b29f48f4 100644 --- a/bld/namelist_files/namelist_defaults_ctsm.xml +++ b/bld/namelist_files/namelist_defaults_ctsm.xml @@ -2729,5 +2729,6 @@ use_crop=".true.">lnd/clm2/surfdata_map/ctsm5.1.dev052/landuse.timeseries_mpasa1 off .false. +0.32d00 diff --git a/bld/namelist_files/namelist_definition_ctsm.xml b/bld/namelist_files/namelist_definition_ctsm.xml index 6335953fcc..91e74e347e 100644 --- a/bld/namelist_files/namelist_definition_ctsm.xml +++ b/bld/namelist_files/namelist_definition_ctsm.xml @@ -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 + +Maximum depth to till soil (m). + + diff --git a/src/soilbiogeochem/TillageMod.F90 b/src/soilbiogeochem/TillageMod.F90 index 2d4d61277d..35f487db80 100644 --- a/src/soilbiogeochem/TillageMod.F90 +++ b/src/soilbiogeochem/TillageMod.F90 @@ -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 @@ -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 @@ -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