Skip to content

Commit

Permalink
add hillslope_fsat_equals_zero
Browse files Browse the repository at this point in the history
  • Loading branch information
swensosc committed Jun 14, 2024
1 parent a943377 commit 39798ea
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 3 deletions.
1 change: 1 addition & 0 deletions bld/CLMBuildNamelist.pm
Original file line number Diff line number Diff line change
Expand Up @@ -3525,6 +3525,7 @@ sub setup_logic_hillslope {
add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'hillslope_pft_distribution_method' );
add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'hillslope_soil_profile_method' );
add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'use_hillslope_routing', 'use_hillslope'=>$nl_flags->{'use_hillslope'} );
add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'hillslope_fsat_equals_zero', 'use_hillslope'=>$nl_flags->{'use_hillslope'} );
my $use_hillslope = $nl->get_value('use_hillslope');
my $use_hillslope_routing = $nl->get_value('use_hillslope_routing');
if ( (! &value_is_true($use_hillslope)) && &value_is_true($use_hillslope_routing) ) {
Expand Down
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 @@ -596,6 +596,7 @@ attributes from the config_cache.xml file (with keys converted to upper-case).
<hillslope_pft_distribution_method >Standard</hillslope_pft_distribution_method>
<hillslope_soil_profile_method >Uniform</hillslope_soil_profile_method>
<downscale_hillslope_meteorology >.true.</downscale_hillslope_meteorology>
<hillslope_fsat_equals_zero >.true.</hillslope_fsat_equals_zero>

<!-- Plant hydraulic stress -->
<use_hydrstress >.false.</use_hydrstress>
Expand Down
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 @@ -828,6 +828,11 @@ Toggle to turn on meteorological downscaling in hillslope model
Toggle to turn on surface water routing in the hillslope hydrology model
</entry>

<entry id="hillslope_fsat_equals_zero" type="logical" category="physics"
group="clm_inparm" valid_values="" value=".true.">
If true, set fsat to zero for hillslope columns
</entry>

<entry id="hillslope_head_gradient_method" type="char*256" category="physics"
group="hillslope_hydrology_inparm" valid_values="Kinematic,Darcy">
Method for calculating hillslope saturated head gradient
Expand Down
17 changes: 15 additions & 2 deletions src/biogeophys/SaturatedExcessRunoffMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ module SaturatedExcessRunoffMod
use shr_log_mod , only : errMsg => shr_log_errMsg
use decompMod , only : bounds_type
use abortutils , only : endrun
use clm_varctl , only : iulog, use_vichydro, crop_fsat_equals_zero
use clm_varcon , only : spval
use clm_varctl , only : iulog, use_vichydro, crop_fsat_equals_zero, hillslope_fsat_equals_zero
use clm_varcon , only : spval,ispval
use LandunitType , only : landunit_type
use landunit_varcon , only : istcrop
use ColumnType , only : column_type
Expand Down Expand Up @@ -266,6 +266,19 @@ subroutine SaturatedExcessRunoff (this, bounds, num_hydrologyc, filter_hydrology
end do
endif

! ------------------------------------------------------------------------
! Set fsat to zero for upland hillslope columns
! ------------------------------------------------------------------------
if (hillslope_fsat_equals_zero) then
do fc = 1, num_hydrologyc
c = filter_hydrologyc(fc)
if(col%is_hillslope_column(c) .and. col%active(c)) then
! Set fsat to zero for upland columns
if (col%cold(c) /= ispval) fsat(c) = 0._r8
endif
end do
endif

! ------------------------------------------------------------------------
! Compute qflx_sat_excess_surf
!
Expand Down
2 changes: 2 additions & 0 deletions src/main/clm_varctl.F90
Original file line number Diff line number Diff line change
Expand Up @@ -414,6 +414,8 @@ module clm_varctl
logical, public :: use_hillslope = .false. ! true => use multi-column hillslope hydrology
logical, public :: downscale_hillslope_meteorology = .false. ! true => downscale meteorological forcing in hillslope model
logical, public :: use_hillslope_routing = .false. ! true => use surface water routing in hillslope hydrology
logical, public :: hillslope_fsat_equals_zero = .false. ! set saturated excess runoff to zero for hillslope columns


!----------------------------------------------------------
! excess ice physics switch
Expand Down
7 changes: 6 additions & 1 deletion src/main/controlMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,8 @@ subroutine control_init(dtime)

namelist /clm_inparm/ use_hillslope_routing

namelist /clm_inparm/ hillslope_fsat_equals_zero

namelist /clm_inparm/ use_hydrstress

namelist /clm_inparm/ use_dynroot
Expand Down Expand Up @@ -840,6 +842,8 @@ subroutine control_spmd()

call mpi_bcast (use_hillslope_routing, 1, MPI_LOGICAL, 0, mpicom, ier)

call mpi_bcast (hillslope_fsat_equals_zero, 1, MPI_LOGICAL, 0, mpicom, ier)

call mpi_bcast (use_hydrstress, 1, MPI_LOGICAL, 0, mpicom, ier)

call mpi_bcast (use_dynroot, 1, MPI_LOGICAL, 0, mpicom, ier)
Expand Down Expand Up @@ -1124,8 +1128,9 @@ subroutine control_print ()

write(iulog,*) ' land-ice albedos (unitless 0-1) = ', albice
write(iulog,*) ' hillslope hydrology = ', use_hillslope
write(iulog,*) ' downscale hillslope meteorology = ', downscale_hillslope_meteorology
write(iulog,*) ' downscale hillslope meteorology = ', downscale_hillslope_meteorology
write(iulog,*) ' hillslope routing = ', use_hillslope_routing
write(iulog,*) ' hillslope_fsat_equals_zero = ', hillslope_fsat_equals_zero
write(iulog,*) ' pre-defined soil layer structure = ', soil_layerstruct_predefined
write(iulog,*) ' user-defined soil layer structure = ', soil_layerstruct_userdefined
write(iulog,*) ' user-defined number of soil layers = ', soil_layerstruct_userdefined_nlevsoi
Expand Down

0 comments on commit 39798ea

Please sign in to comment.