fnc_soil_stok: Soil-list creation from STOKA data

View source: R/fnc_soil_stok.R

fnc_soil_stokR Documentation

Soil-list creation from STOKA data

Description

This function transforms data as currently stored in the LEITPROFIL-database and returns a list of soil data frames as recognised by LWFBrook90R. The list is further processed in fnc_get_soil by adding soil hydraulic information, humus, and fine roots and can then be read by run_multisite_LWFB90.

Usage

fnc_soil_stok(
  df,
  df.LEIT,
  PTF_to_use,
  limit_bodtief,
  incl_GEOLA,
  parallel_processing = F
)

Arguments

df

A data frame containing the columns ID and ID_custom as distinct assignment from the initial df.ids dataframe and the column RST_F, which is created in fnc_get_soil through a spatial join of the coordinates with the STOK-BW shapefile (or, at this stage, the shapefile of test areas).

df.LEIT

a data frame containing LEITPROFILE. At this stage of development, the comprehensive BW-wide database is not complete yet, so the test area needs to be assigned here. However, this is done automatically in fnc_get_soil.

PTF_to_use

which PTF will later be used in fnc_get_soil has an impact on the setting of oc.pct, so this information is passed down from fnc_get_soil here.

limit_bodtief

max soil depth, default is NA and uses max soil depth as defined in df.LEIT. If not NA soil-dfs are created down to the depth specified here as depth in m, negative. Might be used to give room for different maxrootdepth - settings in fnc_get_params. In this case, soil depth may be reduced significantly.

Value

Returns a list of soil data frames.


rhabel/modLWFB90 documentation built on Nov. 21, 2024, 3:28 a.m.