Data and code from: Topographic wetness index as a proxy for soil moisture in a hillslope catena: flow algorithms and map generalization

<p>This dataset contains all data and code necessary to reproduce the analysis presented in the manuscript:</p>
<p>Winzeler, H.E., Owens, P.R., Read Q.D.., Libohova, Z., Ashworth, A., Sauer, T. 2022. 2022. Topographic wetness index as a proxy for soil moisture in a hillslope catena: flow algorithms and map generalization. <em>Land</em> 11:2018. DOI: 10.3390/land11112018.</p>
<p>There are several steps to this analysis. The relevant scripts for each are listed below. The first step is to use the raw digital elevation data (DEM) to produce different versions of the topographic wetness index (TWI) for the study region (<strong>Calculating TWI</strong>). Then, these TWI output files are processed, along with soil moisture (volumetric water content or VWC) time series data from a number of sensors located within the study region, to create analysis-ready data objects (<strong>Processing TWI and VWC</strong>). Next, models are fit relating TWI to soil moisture (<strong>Model fitting</strong>) and results are plotted (<strong>Visualizing main results</strong>). A number of additional analyses were also done (<strong>Additional analyses</strong>).</p>
<h2>Input data</h2>
<p>The DEM of the study region is archived in this dataset as <code>SourceDem.zip</code>. This contains the DEM of the study region (<code>DEM1.sgrd</code>) and associated auxiliary files all called <code>DEM1.*</code> with different extensions. In addition, the DEM is provided as a .tif file called <code>USGS_one_meter_x39y400_AR_R6_WashingtonCO_2015.tif</code>.</p>
<p>The remaining data and code files are archived in the repository created with a GitHub release on 2022-10-11, <code>twi-moisture-0.1.zip</code>. The data are found in a subfolder called <code>data</code>.</p>
<ul>
<li><code>2017_LoggerData_HEW.csv</code> through <code>2021_HEW.csv</code>: Soil moisture (VWC) logger data for each year 2017-2021 (5 files total).</li>
<li><code>2882174.csv</code>: weather data from a nearby station.</li>
<li><code>DryPeriods2017-2021.csv</code>: starting and ending days for dry periods 2017-2021.</li>
<li><code>LoggerLocations.csv</code>: Geographic locations and metadata for each VWC logger.</li>
<li><code>Logger_Locations_TWI_2017-2021.xlsx</code>: 546 topographic wetness indexes calculated at each VWC logger location. <em>note</em>: This is intermediate input created in the first step of the pipeline.</li>
</ul>
<h2>Code pipeline</h2>
<p>To reproduce the analysis in the manuscript run these scripts in the following order. The scripts are all found in the root directory of the repository. See the manuscript for more details on the methods.</p>
<h3>Calculating TWI</h3>
<ul>
<li><code>TerrainAnalysis.R</code>: Taking the DEM file as input, calculates 546 different topgraphic wetness indexes using a variety of different algorithms. Each algorithm is run multiple times with different input parameters, as described in more detail in the manuscript. After performing this step, it is necessary to use the SAGA-GIS GUI to extract the TWI values for each of the sensor locations. The output generated in this way is included in this repository as <code>Logger_Locations_TWI_2017-2021.xlsx</code>. Therefore it is not necessary to rerun this step of the analysis but the code is provided for completeness.</li>
</ul>
<h3>Processing TWI and VWC</h3>
<ul>
<li><code>read_process_data.R</code>: Takes raw TWI and moisture data files and processes them into analysis-ready format, saving the results as CSV.</li>
<li><code>qc_avg_moisture.R</code>: Does additional quality control on the moisture data and averages it across different time periods.</li>
</ul>
<h3>Model fitting</h3>
<p>Models were fit regressing soil moisture (average VWC for a certain time period) against a TWI index, with and without <strong>soil depth as a covariate</strong>. In each case, for both the model without depth and the model with depth, prediction performance was calculated with and without <strong>spatially-blocked cross-validation</strong>. Where cross validation wasn't used, we simply used the predictions from the model fit to all the data. </p>
<ul>
<li><code>fit_combos.R</code>: Models were fit to each combination of soil moisture averaged over 57 months (all months from April 2017-December 2021) and 546 TWI indexes. In addition models were fit to soil moisture averaged over years, and to the grand mean across the full study period.</li>
<li><code>fit_dryperiods.R</code>: Models were fit to soil moisture averaged over previously identified dry periods within the study period (each 1 or 2 weeks in length), again for each of the 546 indexes.</li>
<li><code>fit_summer.R</code>: Models were fit to the soil moisture average for the months of June-September for each of the five years, again for each of the 546 indexes.</li>
</ul>
<h3>Visualizing main results</h3>
<p>Preliminary visualization of results was done in a series of RMarkdown notebooks. All the notebooks follow the same general format, plotting model performance (observed-predicted correlation) across different combinations of time period and characteristics of the TWI indexes being compared. The indexes are grouped by SWI versus TWI, DEM filter used, flow algorithm, and any other parameters that varied.</p>
<p>The notebooks show the model performance metrics with and without the soil depth covariate, and with and without spatially-blocked cross-validation. Crossing those two factors, there are four values for model performance for each combination of time period and TWI index presented.</p>
<ul>
<li><code>performance_plots_bymonth.Rmd</code>: Using the results from the models fit to each month of data separately, prediction performance was averaged by month across the five years of data to show within-year trends.</li>
<li><code>performance_plots_byyear.Rmd</code>: Using the results from the models fit to each month of data separately, prediction performance was averaged by year to show trends across multiple years.</li>
<li><code>performance_plots_dry_periods.Rmd</code>: Prediction performance was presented for the models fit to the previously identified dry periods.</li>
<li><code>performance_plots_summer.Rmd</code>: Prediction performance was presented for the models fit to the June-September moisture averages.</li>
</ul>
<h3>Additional analyses</h3>
<p>Some additional analyses were done that may not be published in the final manuscript but which are included here for completeness. </p>
<ul>
<li><code>2019dryperiod.Rmd</code>: analysis, done separately for each day, of a specific dry period in 2019.</li>
<li><code>alldryperiodsbyday.Rmd</code>: analysis, done separately for each day, of the same dry periods discussed above.</li>
<li><code>best_indices.R</code>: after fitting models, this script was used to quickly identify some of the best-performing indexes for closer scrutiny.</li>
<li><code>wateryearfigs.R</code>: exploratory figures showing median and quantile interval of VWC for sensors in low and high TWI locations for each water year.
<div><br>Resources in this dataset:</div><br><ul><li><p>Resource Title: Digital elevation model of study region.</p> <p>File Name: SourceDEM.zip</p><p>Resource Description: .zip archive containing digital elevation model files for the study region. See dataset description for more details.</p></li><br><li><p>Resource Title: twi-moisture-0.1: Archived git repository containing all other necessary data and code .</p> <p>File Name: twi-moisture-0.1.zip</p><p>Resource Description: .zip archive containing all data and code, other than the digital elevation model archived as a separate file. This file was generated by a GitHub release made on 2022-10-11 of the git repository hosted at <a href="https://github.com/qdread/twi-moisture" target="_blank">https://github.com/qdread/twi-moisture</a> (private repository). See dataset description and README file contained within this archive for more details.</p></li></ul></li>
</ul><p></p>

Tags: ars, data-gov, earth-science-land-surface-soils-soil-moisture-water-content, earth-science-land-surface-topography-surface-roughness, np215
Organization: Department of Agriculture