diff --git a/bld/CLMBuildNamelist.pm b/bld/CLMBuildNamelist.pm index 76f20523f0..5a4b5e13fa 100755 --- a/bld/CLMBuildNamelist.pm +++ b/bld/CLMBuildNamelist.pm @@ -2103,13 +2103,16 @@ sub setup_logic_irrigate { my ($opts, $nl_flags, $definition, $defaults, $nl) = @_; add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'irrigate', - 'use_crop'=>$nl_flags->{'use_crop'}, 'use_cndv'=>$nl_flags->{'use_cndv'}, + 'use_crop'=>$nl_flags->{'use_crop'}, 'use_cndv'=>$nl_flags->{'use_cndv'}, 'use_fates'=>$nl_flags->{'use_fates'}, 'sim_year'=>$nl_flags->{'sim_year'}, 'sim_year_range'=>$nl_flags->{'sim_year_range'}, ); if ( &value_is_true($nl->get_value('irrigate') ) ) { $nl_flags->{'irrigate'} = ".true."; if ( $nl_flags->{'sim_year'} eq "PtVg" ) { $log->fatal_error("irrigate=TRUE does NOT make sense with the Potential Vegetation dataset, leave irrigate=FALSE"); } + if (&value_is_true($nl_flags->{'use_fates'})) { + $log->fatal_error("irrigate=TRUE is NOT possible with use_fates=TRUE, leave irrigate=FALSE"); + } } else { $nl_flags->{'irrigate'} = ".false."; } diff --git a/bld/namelist_files/namelist_defaults_ctsm.xml b/bld/namelist_files/namelist_defaults_ctsm.xml index c555b511d2..ca5d550882 100644 --- a/bld/namelist_files/namelist_defaults_ctsm.xml +++ b/bld/namelist_files/namelist_defaults_ctsm.xml @@ -200,10 +200,11 @@ attributes from the config_cache.xml file (with keys converted to upper-case). 1700 -.false. -.true. -.true. -.false. +.false. +.false. +.true. +.true. +.false. .false. diff --git a/src/main/clm_driver.F90 b/src/main/clm_driver.F90 index 947531bcac..c6a95739de 100644 --- a/src/main/clm_driver.F90 +++ b/src/main/clm_driver.F90 @@ -119,6 +119,7 @@ subroutine clm_drv(doalb, nextsw_cday, declinp1, declin, rstwr, nlend, rdate, ro use FATESFireFactoryMod , only : scalar_lightning use FatesInterfaceTypesMod, only : fates_dispersal_cadence_none use CIsoAtmTimeseriesMod, only : C14BombSpike, C13TimeSeries + use shr_log_mod, only : errMsg => shr_log_errMsg ! ! !ARGUMENTS: implicit none @@ -821,6 +822,12 @@ subroutine clm_drv(doalb, nextsw_cday, declinp1, declin, rstwr, nlend, rdate, ro if (irrigate) then + if (use_fates) then + call endrun(msg=' ERROR: Cannot have ' // & + 'use_fates = .true. and irrigate = .true. ' // & + 'Set one of them to .false. in your user_nl_clm. ' // & + errMsg(sourcefile, __LINE__)) + endif ! ============================================================================ ! Determine irrigation needed for future time steps ! ============================================================================