From eb67f2c16e3df8fd80f01de4796081f8075be911 Mon Sep 17 00:00:00 2001 From: Daniel Schlaepfer Date: Thu, 22 Dec 2022 07:21:51 -0500 Subject: [PATCH] Update SOILWAT2 with new SWRC functionality - SOILWAT2 has now multiple soil water release curves (SWRC) implemented - updated SOILWAT2 submodule on branch release/devel_v7.0.0 to commit a6c367aef07b746a43b459067ee0ef0139f9f60b "Merge pull request #322 from DrylandEcology/feature_swrc" -> new SOILWAT2 inputs include: swrc_name (to select a SWRC), ptf_name (to select a pedotransfer function if used), has_swrcp (logical to determine if SWRC parameters are used from new input file or calculated at run-time with selected PTF), and swrc_params (per soil layer parameters of the selected SWRC if used) -> default values (swrc_name = Campbell1974, ptf_name = Cosby1984AndOthers, has_swrcp = FALSE) re-created previous behavior (except for a small fix for when soil moisture values occur above field capacity and below saturation levels) --- sw_src | 2 +- .../Input/sxw/Input/siteparam.in | 24 ++++++++++++ .../Input/sxw/Input/swrc_params.in | 39 +++++++++++++++++++ .../Input/sxw/files_SOILWAT2.in | 1 + 4 files changed, 65 insertions(+), 1 deletion(-) create mode 100644 testing.sagebrush.master/Stepwat_Inputs/Input/sxw/Input/swrc_params.in diff --git a/sw_src b/sw_src index 9789a380..a6c367ae 160000 --- a/sw_src +++ b/sw_src @@ -1 +1 @@ -Subproject commit 9789a380849864c535226ffe64a2dd5d07121fb5 +Subproject commit a6c367aef07b746a43b459067ee0ef0139f9f60b diff --git a/testing.sagebrush.master/Stepwat_Inputs/Input/sxw/Input/siteparam.in b/testing.sagebrush.master/Stepwat_Inputs/Input/sxw/Input/siteparam.in index 2d1e1b9f..b70d2e20 100644 --- a/testing.sagebrush.master/Stepwat_Inputs/Input/sxw/Input/siteparam.in +++ b/testing.sagebrush.master/Stepwat_Inputs/Input/sxw/Input/siteparam.in @@ -77,6 +77,30 @@ RCP85 # Are inputs of density representing bulk soil (type 1) or the matric component (type 0)? 0 + + +#--- Soil water retention curve (SWRC) ------ +# +# Implemented options (`swrc_name`/`ptf_name`, see `swrc2str[]`/`ptf2str[]`): +# - ptf_name = : SWRC parameters must be provided via "swrc_params.in" +# - swrc_name = "Campbell1974" (Campbell 1974) +# * ptf_name = "Cosby1984AndOthers" (Cosby et al. 1984 but `swc_sat` by Saxton et al. 2006) +# * ptf_name = "Cosby1984" (Cosby et al. 1984) +# - swrc_name = "vanGenuchten1980" (van Genuchten 1980) +# - swrc_name = "FXW" (Fredlund and Xing 1994, Wang et al. 2018) +# +# Note: option "Campbell1974"/"Cosby1984AndOthers" was hard-coded < v7.0.0 +# Note: `rSOILWAT2` may implement additional PTFs + +Campbell1974 # Specify soil water retention curve +Cosby1984AndOthers # Specify pedotransfer function + # (if not implemented, then provide SWRC parameters via "swrc_params.in") + +0 # Has SWRC parameters (see `has_swrcp`)? + # 0: Estimate with specified pedotransfer function + # 1: Use values from "swrc_params.in" + + # ---- Transpiration regions ---- # ndx : 1=shallow, 2=medium, 3=deep, 4=very deep # layer: deepest layer number of the region. diff --git a/testing.sagebrush.master/Stepwat_Inputs/Input/sxw/Input/swrc_params.in b/testing.sagebrush.master/Stepwat_Inputs/Input/sxw/Input/swrc_params.in new file mode 100644 index 00000000..abd633a9 --- /dev/null +++ b/testing.sagebrush.master/Stepwat_Inputs/Input/sxw/Input/swrc_params.in @@ -0,0 +1,39 @@ +#------ Input for Soil Water Retention Curves (by soil layer) ------ + +# A table with up to `MAX_LAYERS` rows (soil layers) and 6 columns: +# - the soil layers must match `soils.in` +# - the interpretation of columns (SWRC parameters) depends on the +# selected SWRC (see `siteparam.in`) +# - unused columns are ignored (if selected SWRC uses fewer than 6 parameters) + +# swrc = "Campbell1974" (default values below, from "Cosby1984") +# * param1 = air-entry suction [cm] +# * param2 = saturated volumetric water content for the matric component [cm/cm] +# * param3 = b, slope of the linear log-log retention curve [-] +# * param4 = saturated hydraulic conductivity [cm/day] + +# swrc = "vanGenuchten1980" +# * param1 = residual volumetric water content for the matric component [cm/cm] +# * param2 = saturated volumetric water content for the matric component [cm/cm] +# * param3 = alpha, related to the inverse of air entry suction [cm-1] +# * param4 = n, measure of the pore-size distribution [-] +# * param5 = saturated hydraulic conductivity [cm/day] + +# swrc = "FXW" +# * param1 = saturated volumetric water content of the matric component [cm/cm] +# * param2 = alpha, shape parameter [cm-1] +# * param3 = n, shape parameter [-] +# * param4 = m, shape parameter [-] +# * param5 = saturated hydraulic conductivity [cm / day] +# * param6 = L, tortuosity/connectivity parameter [-] + + +# param1 param2 param3 param4 param5 param6 + 0.0000 0.00000 0.0000 0.000000 0.0000 0.0000 + 0.0000 0.00000 0.0000 0.000000 0.0000 0.0000 + 0.0000 0.00000 0.0000 0.000000 0.0000 0.0000 + 0.0000 0.00000 0.0000 0.000000 0.0000 0.0000 + 0.0000 0.00000 0.0000 0.000000 0.0000 0.0000 + 0.0000 0.00000 0.0000 0.000000 0.0000 0.0000 + 0.0000 0.00000 0.0000 0.000000 0.0000 0.0000 + 0.0000 0.00000 0.0000 0.000000 0.0000 0.0000 diff --git a/testing.sagebrush.master/Stepwat_Inputs/Input/sxw/files_SOILWAT2.in b/testing.sagebrush.master/Stepwat_Inputs/Input/sxw/files_SOILWAT2.in index 4e4533a4..f5da5170 100644 --- a/testing.sagebrush.master/Stepwat_Inputs/Input/sxw/files_SOILWAT2.in +++ b/testing.sagebrush.master/Stepwat_Inputs/Input/sxw/files_SOILWAT2.in @@ -8,6 +8,7 @@ Output/logfile.log # errors or important info (can also be stdout) #Site Input/siteparam.in # site parameters Input/soils.in # soil layer definitions +Input/swrc_params.in # Input for soil water retention curve (used if pdf_type = 0, i.e., pedotransfer functions are not used) #Weather & climate Input/weathsetup.in # weather parameters