From 98a1abe1cc62ed45098e92214fdaf9a4d244dba0 Mon Sep 17 00:00:00 2001 From: "K.Tolstygin" Date: Mon, 7 Sep 2026 14:23:22 +0300 Subject: [PATCH] feat: add Lal et al. (1979) --- docs/src/ptf-catalog/sources/index.md | 1 + docs/src/ptf-catalog/sources/lal1979.md | 1262 ++++++++ docs/src/reference/c/functions.md | 41 + docs/src/reference/c/headers/lal1979.md | 931 ++++++ docs/src/reference/c/headers/ptfkit.md | 1 + docs/src/reference/c/index.md | 1 + docs/src/reference/cpp/functions.md | 41 + docs/src/reference/cpp/index.md | 1 + docs/src/reference/cpp/modules/lal1979.md | 975 +++++++ docs/src/reference/cpp/modules/ptfkit.md | 1 + docs/src/reference/python/index.md | 1 + docs/src/reference/python/lal1979.md | 8 + specs/functions/lal1979.yaml | 721 +++++ specs/units.yaml | 2 +- targets/ptfkit-native/cpp/lal1979.cppm | 834 ++++++ targets/ptfkit-native/cpp/ptfkit.cppm | 1 + .../ptfkit-native/include/ptfkit/lal1979.h | 793 +++++ targets/ptfkit-native/include/ptfkit/ptfkit.h | 1 + targets/ptfkit-native/tests/c/lal1979.c | 214 ++ targets/ptfkit-native/tests/cpp/lal1979.cpp | 243 ++ targets/ptfkit-py/src/ptfkit/_ptfkit.pyi | 41 + targets/ptfkit-py/src/ptfkit/lal1979.c | 1961 +++++++++++++ targets/ptfkit-py/src/ptfkit/lal1979.py | 1918 ++++++++++++ targets/ptfkit-py/src/ptfkit/ptfkit.c | 5 + targets/ptfkit-py/tests/test_lal1979.py | 2587 +++++++++++++++++ targets/ptfkit-rs/src/lal1979.rs | 1814 ++++++++++++ 26 files changed, 14398 insertions(+), 1 deletion(-) create mode 100644 docs/src/ptf-catalog/sources/lal1979.md create mode 100644 docs/src/reference/c/headers/lal1979.md create mode 100644 docs/src/reference/cpp/modules/lal1979.md create mode 100644 docs/src/reference/python/lal1979.md create mode 100644 specs/functions/lal1979.yaml create mode 100644 targets/ptfkit-native/cpp/lal1979.cppm create mode 100644 targets/ptfkit-native/include/ptfkit/lal1979.h create mode 100644 targets/ptfkit-native/tests/c/lal1979.c create mode 100644 targets/ptfkit-native/tests/cpp/lal1979.cpp create mode 100644 targets/ptfkit-py/src/ptfkit/lal1979.c create mode 100644 targets/ptfkit-py/src/ptfkit/lal1979.py create mode 100644 targets/ptfkit-py/tests/test_lal1979.py create mode 100644 targets/ptfkit-rs/src/lal1979.rs diff --git a/docs/src/ptf-catalog/sources/index.md b/docs/src/ptf-catalog/sources/index.md index 2f9117c..e1cc90d 100644 --- a/docs/src/ptf-catalog/sources/index.md +++ b/docs/src/ptf-catalog/sources/index.md @@ -21,6 +21,7 @@ Each page describes the source, scope, inputs, outputs, status, and limitations | [Point water-retention regressions for tropical Sri Lankan soils.](./gunarathna2019.md) | Tropical Sri Lanka. | 11 | | [Hodnett & Tomasella (2002), tropical-soil regressions for four van Genuchten parameters.](./hodnett2002.md) | Tropical soils between approximately 25 degrees N and 25 degrees S. | 1 | | [Jabro (1992), United States.](./jabro1992.md) | USA | 1 | +| [Moisture retention and plasticity regressions for two groups of Nigerian soils.](./lal1979.md) | Nigeria | 49 | | [Li et al. (2007), Fengqiu County, North China Plain, China.](./li2007.md) | Fengqiu County soils in the North China Plain, China | 1 | | [Mayr and Jarvis (1999) modified Brooks-Corey water-retention parameter PTFs.](./mayr1999.md) | England and Wales | 1 | | [Oosterveld and Chang (1980), soil-moisture retention from texture and depth.](./oosterveld1980.md) | Southern Alberta, Canada | 5 | diff --git a/docs/src/ptf-catalog/sources/lal1979.md b/docs/src/ptf-catalog/sources/lal1979.md new file mode 100644 index 0000000..34277ba --- /dev/null +++ b/docs/src/ptf-catalog/sources/lal1979.md @@ -0,0 +1,1262 @@ +--- +# @generated by ptfkit-codegen; DO NOT EDIT. + +title: PTF source lal1979 +nav-title: lal1979 +--- + +# Moisture retention and plasticity regressions for two groups of Nigerian soils. + +## Source + +Lal, R. (1979). Physical properties and moisture retention characteristics of some Nigerian soils. Geoderma, 21, 209-223. + +[DOI: 10.1016/0016-7061(78)90028-9](https://doi.org/10.1016/0016-7061(78)90028-9) + +## Scope + +**Territory:** Nigeria + +**Dataset:** 119 genetic-horizon samples from 23 profiles in two parent-material groups. + +## Functions + +### `calc_ptf_lal1979_group_i_water_0bar_from_clay` + +Estimate gravimetric moisture retention at saturation for Group I. + +**Status:** `ready-for-implementation` + +**Prediction target:** Gravimetric moisture retention at saturation + +#### Inputs + +| Name | Type | Unit | Domain | Description | +| --- | --- | --- | --- | --- | +| `clay` | `number` | % | — | Clay smaller than 0.002 mm; percentage of the fine earth. Full calibration bounds are not reported. | + +#### Outputs + +| Name | Unit | Domain | Description | +| --- | --- | --- | --- | +| `water_0bar` | g g⁻¹ | — | Gravimetric moisture retention at saturation expressed per unit dry soil mass. | + +!!! note + + Table IV, Group I, clay predictor, water_0bar response. + +### `calc_ptf_lal1979_group_i_water_0bar_from_sand` + +Estimate gravimetric moisture retention at saturation for Group I. + +**Status:** `ready-for-implementation` + +**Prediction target:** Gravimetric moisture retention at saturation + +#### Inputs + +| Name | Type | Unit | Domain | Description | +| --- | --- | --- | --- | --- | +| `sand` | `number` | % | — | Sand from 0.02 to 2 mm; percentage of the fine earth. Full calibration bounds are not reported. | + +#### Outputs + +| Name | Unit | Domain | Description | +| --- | --- | --- | --- | +| `water_0bar` | g g⁻¹ | — | Gravimetric moisture retention at saturation expressed per unit dry soil mass. | + +!!! note + + Table IV, Group I, sand predictor, water_0bar response. + +### `calc_ptf_lal1979_group_ii_water_0bar_from_clay` + +Estimate gravimetric moisture retention at saturation for Group II. + +**Status:** `ready-for-implementation` + +**Prediction target:** Gravimetric moisture retention at saturation + +#### Inputs + +| Name | Type | Unit | Domain | Description | +| --- | --- | --- | --- | --- | +| `clay` | `number` | % | — | Clay smaller than 0.002 mm; percentage of the fine earth. Full calibration bounds are not reported. | + +#### Outputs + +| Name | Unit | Domain | Description | +| --- | --- | --- | --- | +| `water_0bar` | g g⁻¹ | — | Gravimetric moisture retention at saturation expressed per unit dry soil mass. | + +!!! note + + Table IV, Group II, clay predictor, water_0bar response. + +### `calc_ptf_lal1979_group_ii_water_0bar_from_sand` + +Estimate gravimetric moisture retention at saturation for Group II. + +**Status:** `ready-for-implementation` + +**Prediction target:** Gravimetric moisture retention at saturation + +#### Inputs + +| Name | Type | Unit | Domain | Description | +| --- | --- | --- | --- | --- | +| `sand` | `number` | % | — | Sand from 0.02 to 2 mm; percentage of the fine earth. Full calibration bounds are not reported. | + +#### Outputs + +| Name | Unit | Domain | Description | +| --- | --- | --- | --- | +| `water_0bar` | g g⁻¹ | — | Gravimetric moisture retention at saturation expressed per unit dry soil mass. | + +!!! note + + Table IV, Group II, sand predictor, water_0bar response. + +### `calc_ptf_lal1979_group_i_water_01bar_from_clay` + +Estimate gravimetric moisture retention at 0.1 bar suction for Group I. + +**Status:** `ready-for-implementation` + +**Prediction target:** Gravimetric moisture retention at 0.1 bar suction + +#### Inputs + +| Name | Type | Unit | Domain | Description | +| --- | --- | --- | --- | --- | +| `clay` | `number` | % | — | Clay smaller than 0.002 mm; percentage of the fine earth. Full calibration bounds are not reported. | + +#### Outputs + +| Name | Unit | Domain | Description | +| --- | --- | --- | --- | +| `water_01bar` | g g⁻¹ | — | Gravimetric moisture retention at 0.1 bar suction expressed per unit dry soil mass. | + +!!! note + + Table V, Group I, clay predictor, water_01bar response. + +### `calc_ptf_lal1979_group_i_water_03bar_from_clay` + +Estimate gravimetric moisture retention at 0.3 bar suction for Group I. + +**Status:** `ready-for-implementation` + +**Prediction target:** Gravimetric moisture retention at 0.3 bar suction + +#### Inputs + +| Name | Type | Unit | Domain | Description | +| --- | --- | --- | --- | --- | +| `clay` | `number` | % | — | Clay smaller than 0.002 mm; percentage of the fine earth. Full calibration bounds are not reported. | + +#### Outputs + +| Name | Unit | Domain | Description | +| --- | --- | --- | --- | +| `water_03bar` | g g⁻¹ | — | Gravimetric moisture retention at 0.3 bar suction expressed per unit dry soil mass. | + +!!! note + + Table V, Group I, clay predictor, water_03bar response. + +### `calc_ptf_lal1979_group_i_water_01bar_from_sand` + +Estimate gravimetric moisture retention at 0.1 bar suction for Group I. + +**Status:** `ready-for-implementation` + +**Prediction target:** Gravimetric moisture retention at 0.1 bar suction + +#### Inputs + +| Name | Type | Unit | Domain | Description | +| --- | --- | --- | --- | --- | +| `sand` | `number` | % | — | Sand from 0.02 to 2 mm; percentage of the fine earth. Full calibration bounds are not reported. | + +#### Outputs + +| Name | Unit | Domain | Description | +| --- | --- | --- | --- | +| `water_01bar` | g g⁻¹ | — | Gravimetric moisture retention at 0.1 bar suction expressed per unit dry soil mass. | + +!!! note + + Table V, Group I, sand predictor, water_01bar response. + +### `calc_ptf_lal1979_group_i_water_03bar_from_sand` + +Estimate gravimetric moisture retention at 0.3 bar suction for Group I. + +**Status:** `ready-for-implementation` + +**Prediction target:** Gravimetric moisture retention at 0.3 bar suction + +#### Inputs + +| Name | Type | Unit | Domain | Description | +| --- | --- | --- | --- | --- | +| `sand` | `number` | % | — | Sand from 0.02 to 2 mm; percentage of the fine earth. Full calibration bounds are not reported. | + +#### Outputs + +| Name | Unit | Domain | Description | +| --- | --- | --- | --- | +| `water_03bar` | g g⁻¹ | — | Gravimetric moisture retention at 0.3 bar suction expressed per unit dry soil mass. | + +!!! note + + Table V, Group I, sand predictor, water_03bar response. + +### `calc_ptf_lal1979_group_ii_water_01bar_from_clay` + +Estimate gravimetric moisture retention at 0.1 bar suction for Group II. + +**Status:** `ready-for-implementation` + +**Prediction target:** Gravimetric moisture retention at 0.1 bar suction + +#### Inputs + +| Name | Type | Unit | Domain | Description | +| --- | --- | --- | --- | --- | +| `clay` | `number` | % | — | Clay smaller than 0.002 mm; percentage of the fine earth. Full calibration bounds are not reported. | + +#### Outputs + +| Name | Unit | Domain | Description | +| --- | --- | --- | --- | +| `water_01bar` | g g⁻¹ | — | Gravimetric moisture retention at 0.1 bar suction expressed per unit dry soil mass. | + +!!! note + + Table V, Group II, clay predictor, water_01bar response. + +### `calc_ptf_lal1979_group_ii_water_03bar_from_clay` + +Estimate gravimetric moisture retention at 0.3 bar suction for Group II. + +**Status:** `ready-for-implementation` + +**Prediction target:** Gravimetric moisture retention at 0.3 bar suction + +#### Inputs + +| Name | Type | Unit | Domain | Description | +| --- | --- | --- | --- | --- | +| `clay` | `number` | % | — | Clay smaller than 0.002 mm; percentage of the fine earth. Full calibration bounds are not reported. | + +#### Outputs + +| Name | Unit | Domain | Description | +| --- | --- | --- | --- | +| `water_03bar` | g g⁻¹ | — | Gravimetric moisture retention at 0.3 bar suction expressed per unit dry soil mass. | + +!!! note + + Table V, Group II, clay predictor, water_03bar response. + +### `calc_ptf_lal1979_group_ii_water_01bar_from_sand` + +Estimate gravimetric moisture retention at 0.1 bar suction for Group II. + +**Status:** `ready-for-implementation` + +**Prediction target:** Gravimetric moisture retention at 0.1 bar suction + +#### Inputs + +| Name | Type | Unit | Domain | Description | +| --- | --- | --- | --- | --- | +| `sand` | `number` | % | — | Sand from 0.02 to 2 mm; percentage of the fine earth. Full calibration bounds are not reported. | + +#### Outputs + +| Name | Unit | Domain | Description | +| --- | --- | --- | --- | +| `water_01bar` | g g⁻¹ | — | Gravimetric moisture retention at 0.1 bar suction expressed per unit dry soil mass. | + +!!! note + + Table V, Group II, sand predictor, water_01bar response. + +### `calc_ptf_lal1979_group_ii_water_03bar_from_sand` + +Estimate gravimetric moisture retention at 0.3 bar suction for Group II. + +**Status:** `ready-for-implementation` + +**Prediction target:** Gravimetric moisture retention at 0.3 bar suction + +#### Inputs + +| Name | Type | Unit | Domain | Description | +| --- | --- | --- | --- | --- | +| `sand` | `number` | % | — | Sand from 0.02 to 2 mm; percentage of the fine earth. Full calibration bounds are not reported. | + +#### Outputs + +| Name | Unit | Domain | Description | +| --- | --- | --- | --- | +| `water_03bar` | g g⁻¹ | — | Gravimetric moisture retention at 0.3 bar suction expressed per unit dry soil mass. | + +!!! note + + Table V, Group II, sand predictor, water_03bar response. + +### `calc_ptf_lal1979_group_i_water_15bar_from_clay` + +Estimate gravimetric moisture retention at 15 bar suction for Group I. + +**Status:** `ready-for-implementation` + +**Prediction target:** Gravimetric moisture retention at 15 bar suction + +#### Inputs + +| Name | Type | Unit | Domain | Description | +| --- | --- | --- | --- | --- | +| `clay` | `number` | % | — | Clay smaller than 0.002 mm; percentage of the fine earth. Full calibration bounds are not reported. | + +#### Outputs + +| Name | Unit | Domain | Description | +| --- | --- | --- | --- | +| `water_15bar` | g g⁻¹ | — | Gravimetric moisture retention at 15 bar suction expressed per unit dry soil mass. | + +!!! note + + Table VI, Group I, clay predictor, water_15bar response. + +### `calc_ptf_lal1979_group_i_water_15bar_from_sand` + +Estimate gravimetric moisture retention at 15 bar suction for Group I. + +**Status:** `ready-for-implementation` + +**Prediction target:** Gravimetric moisture retention at 15 bar suction + +#### Inputs + +| Name | Type | Unit | Domain | Description | +| --- | --- | --- | --- | --- | +| `sand` | `number` | % | — | Sand from 0.02 to 2 mm; percentage of the fine earth. Full calibration bounds are not reported. | + +#### Outputs + +| Name | Unit | Domain | Description | +| --- | --- | --- | --- | +| `water_15bar` | g g⁻¹ | — | Gravimetric moisture retention at 15 bar suction expressed per unit dry soil mass. | + +!!! note + + Table VI, Group I, sand predictor, water_15bar response. + +### `calc_ptf_lal1979_group_i_water_15bar_from_silt` + +Estimate gravimetric moisture retention at 15 bar suction for Group I. + +**Status:** `ready-for-implementation` + +**Prediction target:** Gravimetric moisture retention at 15 bar suction + +#### Inputs + +| Name | Type | Unit | Domain | Description | +| --- | --- | --- | --- | --- | +| `silt` | `number` | % | — | Silt from 0.002 to 0.02 mm; percentage of the fine earth. Full calibration bounds are not reported. | + +#### Outputs + +| Name | Unit | Domain | Description | +| --- | --- | --- | --- | +| `water_15bar` | g g⁻¹ | — | Gravimetric moisture retention at 15 bar suction expressed per unit dry soil mass. | + +!!! note + + Table VI, Group I, silt predictor, water_15bar response. + +### `calc_ptf_lal1979_group_ii_water_15bar_from_clay` + +Estimate gravimetric moisture retention at 15 bar suction for Group II. + +**Status:** `ready-for-implementation` + +**Prediction target:** Gravimetric moisture retention at 15 bar suction + +#### Inputs + +| Name | Type | Unit | Domain | Description | +| --- | --- | --- | --- | --- | +| `clay` | `number` | % | — | Clay smaller than 0.002 mm; percentage of the fine earth. Full calibration bounds are not reported. | + +#### Outputs + +| Name | Unit | Domain | Description | +| --- | --- | --- | --- | +| `water_15bar` | g g⁻¹ | — | Gravimetric moisture retention at 15 bar suction expressed per unit dry soil mass. | + +!!! note + + Table VI, Group II, clay predictor, water_15bar response. + +### `calc_ptf_lal1979_group_ii_water_15bar_from_sand` + +Estimate gravimetric moisture retention at 15 bar suction for Group II. + +**Status:** `ready-for-implementation` + +**Prediction target:** Gravimetric moisture retention at 15 bar suction + +#### Inputs + +| Name | Type | Unit | Domain | Description | +| --- | --- | --- | --- | --- | +| `sand` | `number` | % | — | Sand from 0.02 to 2 mm; percentage of the fine earth. Full calibration bounds are not reported. | + +#### Outputs + +| Name | Unit | Domain | Description | +| --- | --- | --- | --- | +| `water_15bar` | g g⁻¹ | — | Gravimetric moisture retention at 15 bar suction expressed per unit dry soil mass. | + +!!! note + + Table VI, Group II, sand predictor, water_15bar response. + +### `calc_ptf_lal1979_group_i_moisture_equivalent_from_clay` + +Estimate gravimetric moisture equivalent measured at 1000 times gravity for Group I. + +**Status:** `ready-for-implementation` + +**Prediction target:** Gravimetric moisture equivalent measured at 1000 times gravity + +#### Inputs + +| Name | Type | Unit | Domain | Description | +| --- | --- | --- | --- | --- | +| `clay` | `number` | % | — | Clay smaller than 0.002 mm; percentage of the fine earth. Full calibration bounds are not reported. | + +#### Outputs + +| Name | Unit | Domain | Description | +| --- | --- | --- | --- | +| `moisture_equivalent` | g g⁻¹ | — | Gravimetric moisture equivalent measured at 1000 times gravity expressed per unit dry soil mass. | + +!!! note + + Table VII, Group I, clay predictor, moisture_equivalent response. + +### `calc_ptf_lal1979_group_i_moisture_equivalent_from_sand` + +Estimate gravimetric moisture equivalent measured at 1000 times gravity for Group I. + +**Status:** `ready-for-implementation` + +**Prediction target:** Gravimetric moisture equivalent measured at 1000 times gravity + +#### Inputs + +| Name | Type | Unit | Domain | Description | +| --- | --- | --- | --- | --- | +| `sand` | `number` | % | — | Sand from 0.02 to 2 mm; percentage of the fine earth. Full calibration bounds are not reported. | + +#### Outputs + +| Name | Unit | Domain | Description | +| --- | --- | --- | --- | +| `moisture_equivalent` | g g⁻¹ | — | Gravimetric moisture equivalent measured at 1000 times gravity expressed per unit dry soil mass. | + +!!! note + + Table VII, Group I, sand predictor, moisture_equivalent response. + +### `calc_ptf_lal1979_group_ii_moisture_equivalent_from_clay` + +Estimate gravimetric moisture equivalent measured at 1000 times gravity for Group II. + +**Status:** `ready-for-implementation` + +**Prediction target:** Gravimetric moisture equivalent measured at 1000 times gravity + +#### Inputs + +| Name | Type | Unit | Domain | Description | +| --- | --- | --- | --- | --- | +| `clay` | `number` | % | — | Clay smaller than 0.002 mm; percentage of the fine earth. Full calibration bounds are not reported. | + +#### Outputs + +| Name | Unit | Domain | Description | +| --- | --- | --- | --- | +| `moisture_equivalent` | g g⁻¹ | — | Gravimetric moisture equivalent measured at 1000 times gravity expressed per unit dry soil mass. | + +!!! note + + Table VII, Group II, clay predictor, moisture_equivalent response. + +### `calc_ptf_lal1979_group_ii_moisture_equivalent_from_sand` + +Estimate gravimetric moisture equivalent measured at 1000 times gravity for Group II. + +**Status:** `ready-for-implementation` + +**Prediction target:** Gravimetric moisture equivalent measured at 1000 times gravity + +#### Inputs + +| Name | Type | Unit | Domain | Description | +| --- | --- | --- | --- | --- | +| `sand` | `number` | % | — | Sand from 0.02 to 2 mm; percentage of the fine earth. Full calibration bounds are not reported. | + +#### Outputs + +| Name | Unit | Domain | Description | +| --- | --- | --- | --- | +| `moisture_equivalent` | g g⁻¹ | — | Gravimetric moisture equivalent measured at 1000 times gravity expressed per unit dry soil mass. | + +!!! note + + Table VII, Group II, sand predictor, moisture_equivalent response. + +### `calc_ptf_lal1979_group_ii_moisture_equivalent_from_silt` + +Estimate gravimetric moisture equivalent measured at 1000 times gravity for Group II. + +**Status:** `ready-for-implementation` + +**Prediction target:** Gravimetric moisture equivalent measured at 1000 times gravity + +#### Inputs + +| Name | Type | Unit | Domain | Description | +| --- | --- | --- | --- | --- | +| `silt` | `number` | % | — | Silt from 0.002 to 0.02 mm; percentage of the fine earth. Full calibration bounds are not reported. | + +#### Outputs + +| Name | Unit | Domain | Description | +| --- | --- | --- | --- | +| `moisture_equivalent` | g g⁻¹ | — | Gravimetric moisture equivalent measured at 1000 times gravity expressed per unit dry soil mass. | + +!!! note + + Table VII, Group II, silt predictor, moisture_equivalent response. + +### `calc_ptf_lal1979_group_i_water_01bar_from_water_0bar` + +Estimate gravimetric moisture retention at 0.1 bar suction for Group I. + +**Status:** `blocked` + +**Prediction target:** Gravimetric moisture retention at 0.1 bar suction + +#### Inputs + +| Name | Type | Unit | Domain | Description | +| --- | --- | --- | --- | --- | +| `water_0bar` | `number` | g/g | — | Gravimetric moisture retention at 0 bar suction on disturbed soil. | + +#### Outputs + +| Name | Unit | Domain | Description | +| --- | --- | --- | --- | +| `water_01bar` | g g⁻¹ | — | Gravimetric moisture retention at 0.1 bar suction expressed per unit dry soil mass. | + +!!! note + + Table VIII, Group I, water_0bar predictor, water_01bar response. + +!!! note + + Printed regression slope m = 1.00; intercept b = 0.20. + +!!! warning + + Blocked: the printed dependent/independent labels and coefficients predict increasing water content with increasing suction. Confirm regression direction and intercept sign from authoritative evidence; no reversal or sign correction is assumed. + +### `calc_ptf_lal1979_group_i_water_03bar_from_water_0bar` + +Estimate gravimetric moisture retention at 0.3 bar suction for Group I. + +**Status:** `blocked` + +**Prediction target:** Gravimetric moisture retention at 0.3 bar suction + +#### Inputs + +| Name | Type | Unit | Domain | Description | +| --- | --- | --- | --- | --- | +| `water_0bar` | `number` | g/g | — | Gravimetric moisture retention at 0 bar suction on disturbed soil. | + +#### Outputs + +| Name | Unit | Domain | Description | +| --- | --- | --- | --- | +| `water_03bar` | g g⁻¹ | — | Gravimetric moisture retention at 0.3 bar suction expressed per unit dry soil mass. | + +!!! note + + Table VIII, Group I, water_0bar predictor, water_03bar response. + +!!! note + + Printed regression slope m = 1.05; intercept b = 0.22. + +!!! warning + + Blocked: the printed dependent/independent labels and coefficients predict increasing water content with increasing suction. Confirm regression direction and intercept sign from authoritative evidence; no reversal or sign correction is assumed. + +### `calc_ptf_lal1979_group_i_water_15bar_from_water_0bar` + +Estimate gravimetric moisture retention at 15 bar suction for Group I. + +**Status:** `blocked` + +**Prediction target:** Gravimetric moisture retention at 15 bar suction + +#### Inputs + +| Name | Type | Unit | Domain | Description | +| --- | --- | --- | --- | --- | +| `water_0bar` | `number` | g/g | — | Gravimetric moisture retention at 0 bar suction on disturbed soil. | + +#### Outputs + +| Name | Unit | Domain | Description | +| --- | --- | --- | --- | +| `water_15bar` | g g⁻¹ | — | Gravimetric moisture retention at 15 bar suction expressed per unit dry soil mass. | + +!!! note + + Table VIII, Group I, water_0bar predictor, water_15bar response. + +!!! note + + Printed regression slope m = 1.19; intercept b = 0.28. + +!!! warning + + Blocked: the printed dependent/independent labels and coefficients predict increasing water content with increasing suction. Confirm regression direction and intercept sign from authoritative evidence; no reversal or sign correction is assumed. + +### `calc_ptf_lal1979_group_i_water_03bar_from_water_01bar` + +Estimate gravimetric moisture retention at 0.3 bar suction for Group I. + +**Status:** `blocked` + +**Prediction target:** Gravimetric moisture retention at 0.3 bar suction + +#### Inputs + +| Name | Type | Unit | Domain | Description | +| --- | --- | --- | --- | --- | +| `water_01bar` | `number` | g/g | — | Gravimetric moisture retention at 0.1 bar suction on disturbed soil. | + +#### Outputs + +| Name | Unit | Domain | Description | +| --- | --- | --- | --- | +| `water_03bar` | g g⁻¹ | — | Gravimetric moisture retention at 0.3 bar suction expressed per unit dry soil mass. | + +!!! note + + Table VIII, Group I, water_01bar predictor, water_03bar response. + +!!! note + + Printed regression slope m = 1.05; intercept b = 0.10. + +!!! warning + + Blocked: the printed dependent/independent labels and coefficients predict increasing water content with increasing suction. Confirm regression direction and intercept sign from authoritative evidence; no reversal or sign correction is assumed. + +### `calc_ptf_lal1979_group_ii_water_01bar_from_water_0bar` + +Estimate gravimetric moisture retention at 0.1 bar suction for Group II. + +**Status:** `blocked` + +**Prediction target:** Gravimetric moisture retention at 0.1 bar suction + +#### Inputs + +| Name | Type | Unit | Domain | Description | +| --- | --- | --- | --- | --- | +| `water_0bar` | `number` | g/g | — | Gravimetric moisture retention at 0 bar suction on disturbed soil. | + +#### Outputs + +| Name | Unit | Domain | Description | +| --- | --- | --- | --- | +| `water_01bar` | g g⁻¹ | — | Gravimetric moisture retention at 0.1 bar suction expressed per unit dry soil mass. | + +!!! note + + Table VIII, Group II, water_0bar predictor, water_01bar response. + +!!! note + + Printed regression slope m = 0.94; intercept b = 0.238. + +!!! warning + + Blocked: the printed dependent/independent labels and coefficients predict increasing water content with increasing suction. Confirm regression direction and intercept sign from authoritative evidence; no reversal or sign correction is assumed. + +### `calc_ptf_lal1979_group_ii_water_03bar_from_water_0bar` + +Estimate gravimetric moisture retention at 0.3 bar suction for Group II. + +**Status:** `blocked` + +**Prediction target:** Gravimetric moisture retention at 0.3 bar suction + +#### Inputs + +| Name | Type | Unit | Domain | Description | +| --- | --- | --- | --- | --- | +| `water_0bar` | `number` | g/g | — | Gravimetric moisture retention at 0 bar suction on disturbed soil. | + +#### Outputs + +| Name | Unit | Domain | Description | +| --- | --- | --- | --- | +| `water_03bar` | g g⁻¹ | — | Gravimetric moisture retention at 0.3 bar suction expressed per unit dry soil mass. | + +!!! note + + Table VIII, Group II, water_0bar predictor, water_03bar response. + +!!! note + + Printed regression slope m = 0.91; intercept b = 0.281. + +!!! warning + + Blocked: the printed dependent/independent labels and coefficients predict increasing water content with increasing suction. Confirm regression direction and intercept sign from authoritative evidence; no reversal or sign correction is assumed. + +### `calc_ptf_lal1979_group_ii_water_15bar_from_water_0bar` + +Estimate gravimetric moisture retention at 15 bar suction for Group II. + +**Status:** `blocked` + +**Prediction target:** Gravimetric moisture retention at 15 bar suction + +#### Inputs + +| Name | Type | Unit | Domain | Description | +| --- | --- | --- | --- | --- | +| `water_0bar` | `number` | g/g | — | Gravimetric moisture retention at 0 bar suction on disturbed soil. | + +#### Outputs + +| Name | Unit | Domain | Description | +| --- | --- | --- | --- | +| `water_15bar` | g g⁻¹ | — | Gravimetric moisture retention at 15 bar suction expressed per unit dry soil mass. | + +!!! note + + Table VIII, Group II, water_0bar predictor, water_15bar response. + +!!! note + + Printed regression slope m = 1.45; intercept b = 0.277. + +!!! warning + + Blocked: the printed dependent/independent labels and coefficients predict increasing water content with increasing suction. Confirm regression direction and intercept sign from authoritative evidence; no reversal or sign correction is assumed. + +### `calc_ptf_lal1979_group_ii_water_03bar_from_water_01bar` + +Estimate gravimetric moisture retention at 0.3 bar suction for Group II. + +**Status:** `ready-for-implementation` + +**Prediction target:** Gravimetric moisture retention at 0.3 bar suction + +#### Inputs + +| Name | Type | Unit | Domain | Description | +| --- | --- | --- | --- | --- | +| `water_01bar` | `number` | g/g | — | Gravimetric moisture retention at 0.1 bar suction on disturbed soil. | + +#### Outputs + +| Name | Unit | Domain | Description | +| --- | --- | --- | --- | +| `water_03bar` | g g⁻¹ | — | Gravimetric moisture retention at 0.3 bar suction expressed per unit dry soil mass. | + +!!! note + + Table VIII, Group II, water_01bar predictor, water_03bar response. + +### `calc_ptf_lal1979_group_ii_water_15bar_from_water_01bar` + +Estimate gravimetric moisture retention at 15 bar suction for Group II. + +**Status:** `ready-for-implementation` + +**Prediction target:** Gravimetric moisture retention at 15 bar suction + +#### Inputs + +| Name | Type | Unit | Domain | Description | +| --- | --- | --- | --- | --- | +| `water_01bar` | `number` | g/g | — | Gravimetric moisture retention at 0.1 bar suction on disturbed soil. | + +#### Outputs + +| Name | Unit | Domain | Description | +| --- | --- | --- | --- | +| `water_15bar` | g g⁻¹ | — | Gravimetric moisture retention at 15 bar suction expressed per unit dry soil mass. | + +!!! note + + Table VIII, Group II, water_01bar predictor, water_15bar response. + +### `calc_ptf_lal1979_group_i_upper_plastic_limit_from_organic_carbon` + +Estimate upper plastic limit for Group I. + +**Status:** `ready-for-implementation` + +**Prediction target:** Upper plastic limit + +#### Inputs + +| Name | Type | Unit | Domain | Description | +| --- | --- | --- | --- | --- | +| `organic_carbon` | `number` | % | — | Organic carbon measured by Walkley and Black wet combustion; percentage of the fine earth. Full calibration bounds are not reported. | + +#### Outputs + +| Name | Unit | Domain | Description | +| --- | --- | --- | --- | +| `upper_plastic_limit` | % | — | Upper plastic limit expressed as percentage of oven-dry soil mass. | + +!!! note + + Table IX, Group I, organic_carbon predictor, upper_plastic_limit response. + +### `calc_ptf_lal1979_group_i_lower_plastic_limit_from_organic_carbon` + +Estimate lower plastic limit for Group I. + +**Status:** `ready-for-implementation` + +**Prediction target:** Lower plastic limit + +#### Inputs + +| Name | Type | Unit | Domain | Description | +| --- | --- | --- | --- | --- | +| `organic_carbon` | `number` | % | — | Organic carbon measured by Walkley and Black wet combustion; percentage of the fine earth. Full calibration bounds are not reported. | + +#### Outputs + +| Name | Unit | Domain | Description | +| --- | --- | --- | --- | +| `lower_plastic_limit` | % | — | Lower plastic limit expressed as percentage of oven-dry soil mass. | + +!!! note + + Table IX, Group I, organic_carbon predictor, lower_plastic_limit response. + +### `calc_ptf_lal1979_group_i_plasticity_index_from_organic_carbon` + +Estimate plasticity index (upper minus lower plastic limit) for Group I. + +**Status:** `ready-for-implementation` + +**Prediction target:** Plasticity index (upper minus lower plastic limit) + +#### Inputs + +| Name | Type | Unit | Domain | Description | +| --- | --- | --- | --- | --- | +| `organic_carbon` | `number` | % | — | Organic carbon measured by Walkley and Black wet combustion; percentage of the fine earth. Full calibration bounds are not reported. | + +#### Outputs + +| Name | Unit | Domain | Description | +| --- | --- | --- | --- | +| `plasticity_index` | % | — | Plasticity index (upper minus lower plastic limit) expressed as percentage of oven-dry soil mass. | + +!!! note + + Table IX, Group I, organic_carbon predictor, plasticity_index response. + +### `calc_ptf_lal1979_group_i_upper_plastic_limit_from_clay` + +Estimate upper plastic limit for Group I. + +**Status:** `ready-for-implementation` + +**Prediction target:** Upper plastic limit + +#### Inputs + +| Name | Type | Unit | Domain | Description | +| --- | --- | --- | --- | --- | +| `clay` | `number` | % | — | Clay smaller than 0.002 mm; percentage of the fine earth. Full calibration bounds are not reported. | + +#### Outputs + +| Name | Unit | Domain | Description | +| --- | --- | --- | --- | +| `upper_plastic_limit` | % | — | Upper plastic limit expressed as percentage of oven-dry soil mass. | + +!!! note + + Table IX, Group I, clay predictor, upper_plastic_limit response. + +### `calc_ptf_lal1979_group_i_lower_plastic_limit_from_clay` + +Estimate lower plastic limit for Group I. + +**Status:** `ready-for-implementation` + +**Prediction target:** Lower plastic limit + +#### Inputs + +| Name | Type | Unit | Domain | Description | +| --- | --- | --- | --- | --- | +| `clay` | `number` | % | — | Clay smaller than 0.002 mm; percentage of the fine earth. Full calibration bounds are not reported. | + +#### Outputs + +| Name | Unit | Domain | Description | +| --- | --- | --- | --- | +| `lower_plastic_limit` | % | — | Lower plastic limit expressed as percentage of oven-dry soil mass. | + +!!! note + + Table IX, Group I, clay predictor, lower_plastic_limit response. + +### `calc_ptf_lal1979_group_i_plasticity_index_from_clay` + +Estimate plasticity index (upper minus lower plastic limit) for Group I. + +**Status:** `ready-for-implementation` + +**Prediction target:** Plasticity index (upper minus lower plastic limit) + +#### Inputs + +| Name | Type | Unit | Domain | Description | +| --- | --- | --- | --- | --- | +| `clay` | `number` | % | — | Clay smaller than 0.002 mm; percentage of the fine earth. Full calibration bounds are not reported. | + +#### Outputs + +| Name | Unit | Domain | Description | +| --- | --- | --- | --- | +| `plasticity_index` | % | — | Plasticity index (upper minus lower plastic limit) expressed as percentage of oven-dry soil mass. | + +!!! note + + Table IX, Group I, clay predictor, plasticity_index response. + +### `calc_ptf_lal1979_group_i_upper_plastic_limit_from_sand` + +Estimate upper plastic limit for Group I. + +**Status:** `blocked` + +**Prediction target:** Upper plastic limit + +#### Inputs + +| Name | Type | Unit | Domain | Description | +| --- | --- | --- | --- | --- | +| `sand` | `number` | % | — | Sand from 0.02 to 2 mm; percentage of the fine earth. Full calibration bounds are not reported. | + +#### Outputs + +| Name | Unit | Domain | Description | +| --- | --- | --- | --- | +| `upper_plastic_limit` | % | — | Upper plastic limit expressed as percentage of oven-dry soil mass. | + +!!! note + + Table IX, Group I, sand predictor, upper_plastic_limit response. + +!!! note + + Printed regression slope m = -0.40; intercept b = -46.20. + +!!! warning + + Blocked: printed intercept -46.20 with slope -0.40 produces a negative upper plastic limit for nonnegative sand. Confirm the intercept sign; no correction is assumed. + +### `calc_ptf_lal1979_group_i_lower_plastic_limit_from_sand` + +Estimate lower plastic limit for Group I. + +**Status:** `ready-for-implementation` + +**Prediction target:** Lower plastic limit + +#### Inputs + +| Name | Type | Unit | Domain | Description | +| --- | --- | --- | --- | --- | +| `sand` | `number` | % | — | Sand from 0.02 to 2 mm; percentage of the fine earth. Full calibration bounds are not reported. | + +#### Outputs + +| Name | Unit | Domain | Description | +| --- | --- | --- | --- | +| `lower_plastic_limit` | % | — | Lower plastic limit expressed as percentage of oven-dry soil mass. | + +!!! note + + Table IX, Group I, sand predictor, lower_plastic_limit response. + +### `calc_ptf_lal1979_group_i_plasticity_index_from_sand` + +Estimate plasticity index (upper minus lower plastic limit) for Group I. + +**Status:** `ready-for-implementation` + +**Prediction target:** Plasticity index (upper minus lower plastic limit) + +#### Inputs + +| Name | Type | Unit | Domain | Description | +| --- | --- | --- | --- | --- | +| `sand` | `number` | % | — | Sand from 0.02 to 2 mm; percentage of the fine earth. Full calibration bounds are not reported. | + +#### Outputs + +| Name | Unit | Domain | Description | +| --- | --- | --- | --- | +| `plasticity_index` | % | — | Plasticity index (upper minus lower plastic limit) expressed as percentage of oven-dry soil mass. | + +!!! note + + Table IX, Group I, sand predictor, plasticity_index response. + +### `calc_ptf_lal1979_group_ii_upper_plastic_limit_from_organic_carbon` + +Estimate upper plastic limit for Group II. + +**Status:** `ready-for-implementation` + +**Prediction target:** Upper plastic limit + +#### Inputs + +| Name | Type | Unit | Domain | Description | +| --- | --- | --- | --- | --- | +| `organic_carbon` | `number` | % | — | Organic carbon measured by Walkley and Black wet combustion; percentage of the fine earth. Full calibration bounds are not reported. | + +#### Outputs + +| Name | Unit | Domain | Description | +| --- | --- | --- | --- | +| `upper_plastic_limit` | % | — | Upper plastic limit expressed as percentage of oven-dry soil mass. | + +!!! note + + Table IX, Group II, organic_carbon predictor, upper_plastic_limit response. + +### `calc_ptf_lal1979_group_ii_plasticity_index_from_organic_carbon` + +Estimate plasticity index (upper minus lower plastic limit) for Group II. + +**Status:** `ready-for-implementation` + +**Prediction target:** Plasticity index (upper minus lower plastic limit) + +#### Inputs + +| Name | Type | Unit | Domain | Description | +| --- | --- | --- | --- | --- | +| `organic_carbon` | `number` | % | — | Organic carbon measured by Walkley and Black wet combustion; percentage of the fine earth. Full calibration bounds are not reported. | + +#### Outputs + +| Name | Unit | Domain | Description | +| --- | --- | --- | --- | +| `plasticity_index` | % | — | Plasticity index (upper minus lower plastic limit) expressed as percentage of oven-dry soil mass. | + +!!! note + + Table IX, Group II, organic_carbon predictor, plasticity_index response. + +### `calc_ptf_lal1979_group_ii_upper_plastic_limit_from_clay` + +Estimate upper plastic limit for Group II. + +**Status:** `ready-for-implementation` + +**Prediction target:** Upper plastic limit + +#### Inputs + +| Name | Type | Unit | Domain | Description | +| --- | --- | --- | --- | --- | +| `clay` | `number` | % | — | Clay smaller than 0.002 mm; percentage of the fine earth. Full calibration bounds are not reported. | + +#### Outputs + +| Name | Unit | Domain | Description | +| --- | --- | --- | --- | +| `upper_plastic_limit` | % | — | Upper plastic limit expressed as percentage of oven-dry soil mass. | + +!!! note + + Table IX, Group II, clay predictor, upper_plastic_limit response. + +### `calc_ptf_lal1979_group_ii_lower_plastic_limit_from_clay` + +Estimate lower plastic limit for Group II. + +**Status:** `ready-for-implementation` + +**Prediction target:** Lower plastic limit + +#### Inputs + +| Name | Type | Unit | Domain | Description | +| --- | --- | --- | --- | --- | +| `clay` | `number` | % | — | Clay smaller than 0.002 mm; percentage of the fine earth. Full calibration bounds are not reported. | + +#### Outputs + +| Name | Unit | Domain | Description | +| --- | --- | --- | --- | +| `lower_plastic_limit` | % | — | Lower plastic limit expressed as percentage of oven-dry soil mass. | + +!!! note + + Table IX, Group II, clay predictor, lower_plastic_limit response. + +### `calc_ptf_lal1979_group_ii_upper_plastic_limit_from_sand` + +Estimate upper plastic limit for Group II. + +**Status:** `ready-for-implementation` + +**Prediction target:** Upper plastic limit + +#### Inputs + +| Name | Type | Unit | Domain | Description | +| --- | --- | --- | --- | --- | +| `sand` | `number` | % | — | Sand from 0.02 to 2 mm; percentage of the fine earth. Full calibration bounds are not reported. | + +#### Outputs + +| Name | Unit | Domain | Description | +| --- | --- | --- | --- | +| `upper_plastic_limit` | % | — | Upper plastic limit expressed as percentage of oven-dry soil mass. | + +!!! note + + Table IX, Group II, sand predictor, upper_plastic_limit response. + +### `calc_ptf_lal1979_group_ii_lower_plastic_limit_from_sand` + +Estimate lower plastic limit for Group II. + +**Status:** `ready-for-implementation` + +**Prediction target:** Lower plastic limit + +#### Inputs + +| Name | Type | Unit | Domain | Description | +| --- | --- | --- | --- | --- | +| `sand` | `number` | % | — | Sand from 0.02 to 2 mm; percentage of the fine earth. Full calibration bounds are not reported. | + +#### Outputs + +| Name | Unit | Domain | Description | +| --- | --- | --- | --- | +| `lower_plastic_limit` | % | — | Lower plastic limit expressed as percentage of oven-dry soil mass. | + +!!! note + + Table IX, Group II, sand predictor, lower_plastic_limit response. + +### `calc_ptf_lal1979_group_ii_upper_plastic_limit_from_silt` + +Estimate upper plastic limit for Group II. + +**Status:** `ready-for-implementation` + +**Prediction target:** Upper plastic limit + +#### Inputs + +| Name | Type | Unit | Domain | Description | +| --- | --- | --- | --- | --- | +| `silt` | `number` | % | — | Silt from 0.002 to 0.02 mm; percentage of the fine earth. Full calibration bounds are not reported. | + +#### Outputs + +| Name | Unit | Domain | Description | +| --- | --- | --- | --- | +| `upper_plastic_limit` | % | — | Upper plastic limit expressed as percentage of oven-dry soil mass. | + +!!! note + + Table IX, Group II, silt predictor, upper_plastic_limit response. + +### `calc_ptf_lal1979_group_ii_lower_plastic_limit_from_silt` + +Estimate lower plastic limit for Group II. + +**Status:** `ready-for-implementation` + +**Prediction target:** Lower plastic limit + +#### Inputs + +| Name | Type | Unit | Domain | Description | +| --- | --- | --- | --- | --- | +| `silt` | `number` | % | — | Silt from 0.002 to 0.02 mm; percentage of the fine earth. Full calibration bounds are not reported. | + +#### Outputs + +| Name | Unit | Domain | Description | +| --- | --- | --- | --- | +| `lower_plastic_limit` | % | — | Lower plastic limit expressed as percentage of oven-dry soil mass. | + +!!! note + + Table IX, Group II, silt predictor, lower_plastic_limit response. + +### `calc_ptf_lal1979_group_ii_plasticity_index_from_silt` + +Estimate plasticity index (upper minus lower plastic limit) for Group II. + +**Status:** `ready-for-implementation` + +**Prediction target:** Plasticity index (upper minus lower plastic limit) + +#### Inputs + +| Name | Type | Unit | Domain | Description | +| --- | --- | --- | --- | --- | +| `silt` | `number` | % | — | Silt from 0.002 to 0.02 mm; percentage of the fine earth. Full calibration bounds are not reported. | + +#### Outputs + +| Name | Unit | Domain | Description | +| --- | --- | --- | --- | +| `plasticity_index` | % | — | Plasticity index (upper minus lower plastic limit) expressed as percentage of oven-dry soil mass. | + +!!! note + + Table IX, Group II, silt predictor, plasticity_index response. diff --git a/docs/src/reference/c/functions.md b/docs/src/reference/c/functions.md index 786e3f7..a7e2b99 100644 --- a/docs/src/reference/c/functions.md +++ b/docs/src/reference/c/functions.md @@ -88,6 +88,47 @@ title: C function index | [`calc_ptf_gunarathna2019_vwc1500_set4`](headers/gunarathna2019.md#function-calc_ptf_gunarathna2019_vwc1500_set4) | Estimate volumetric water content at -1500 kPa using Set 4. | [``](headers/gunarathna2019.md) | | [`calc_ptf_hodnett2002`](headers/hodnett2002.md#function-calc_ptf_hodnett2002) | Estimate four van Genuchten water-retention parameters for tropical soils. | [``](headers/hodnett2002.md) | | [`calc_ptf_jabro1992`](headers/jabro1992.md#function-calc_ptf_jabro1992) | Estimate saturated hydraulic conductivity from silt, clay, and bulk density. | [``](headers/jabro1992.md) | +| [`calc_ptf_lal1979_group_i_lower_plastic_limit_from_clay`](headers/lal1979.md#function-calc_ptf_lal1979_group_i_lower_plastic_limit_from_clay) | Estimate lower plastic limit for Group I. | [``](headers/lal1979.md) | +| [`calc_ptf_lal1979_group_i_lower_plastic_limit_from_organic_carbon`](headers/lal1979.md#function-calc_ptf_lal1979_group_i_lower_plastic_limit_from_organic_carbon) | Estimate lower plastic limit for Group I. | [``](headers/lal1979.md) | +| [`calc_ptf_lal1979_group_i_lower_plastic_limit_from_sand`](headers/lal1979.md#function-calc_ptf_lal1979_group_i_lower_plastic_limit_from_sand) | Estimate lower plastic limit for Group I. | [``](headers/lal1979.md) | +| [`calc_ptf_lal1979_group_i_moisture_equivalent_from_clay`](headers/lal1979.md#function-calc_ptf_lal1979_group_i_moisture_equivalent_from_clay) | Estimate gravimetric moisture equivalent measured at 1000 times gravity for Group I. | [``](headers/lal1979.md) | +| [`calc_ptf_lal1979_group_i_moisture_equivalent_from_sand`](headers/lal1979.md#function-calc_ptf_lal1979_group_i_moisture_equivalent_from_sand) | Estimate gravimetric moisture equivalent measured at 1000 times gravity for Group I. | [``](headers/lal1979.md) | +| [`calc_ptf_lal1979_group_i_plasticity_index_from_clay`](headers/lal1979.md#function-calc_ptf_lal1979_group_i_plasticity_index_from_clay) | Estimate plasticity index (upper minus lower plastic limit) for Group I. | [``](headers/lal1979.md) | +| [`calc_ptf_lal1979_group_i_plasticity_index_from_organic_carbon`](headers/lal1979.md#function-calc_ptf_lal1979_group_i_plasticity_index_from_organic_carbon) | Estimate plasticity index (upper minus lower plastic limit) for Group I. | [``](headers/lal1979.md) | +| [`calc_ptf_lal1979_group_i_plasticity_index_from_sand`](headers/lal1979.md#function-calc_ptf_lal1979_group_i_plasticity_index_from_sand) | Estimate plasticity index (upper minus lower plastic limit) for Group I. | [``](headers/lal1979.md) | +| [`calc_ptf_lal1979_group_i_upper_plastic_limit_from_clay`](headers/lal1979.md#function-calc_ptf_lal1979_group_i_upper_plastic_limit_from_clay) | Estimate upper plastic limit for Group I. | [``](headers/lal1979.md) | +| [`calc_ptf_lal1979_group_i_upper_plastic_limit_from_organic_carbon`](headers/lal1979.md#function-calc_ptf_lal1979_group_i_upper_plastic_limit_from_organic_carbon) | Estimate upper plastic limit for Group I. | [``](headers/lal1979.md) | +| [`calc_ptf_lal1979_group_i_water_0bar_from_clay`](headers/lal1979.md#function-calc_ptf_lal1979_group_i_water_0bar_from_clay) | Estimate gravimetric moisture retention at saturation for Group I. | [``](headers/lal1979.md) | +| [`calc_ptf_lal1979_group_i_water_0bar_from_sand`](headers/lal1979.md#function-calc_ptf_lal1979_group_i_water_0bar_from_sand) | Estimate gravimetric moisture retention at saturation for Group I. | [``](headers/lal1979.md) | +| [`calc_ptf_lal1979_group_i_water_01bar_from_clay`](headers/lal1979.md#function-calc_ptf_lal1979_group_i_water_01bar_from_clay) | Estimate gravimetric moisture retention at 0.1 bar suction for Group I. | [``](headers/lal1979.md) | +| [`calc_ptf_lal1979_group_i_water_01bar_from_sand`](headers/lal1979.md#function-calc_ptf_lal1979_group_i_water_01bar_from_sand) | Estimate gravimetric moisture retention at 0.1 bar suction for Group I. | [``](headers/lal1979.md) | +| [`calc_ptf_lal1979_group_i_water_03bar_from_clay`](headers/lal1979.md#function-calc_ptf_lal1979_group_i_water_03bar_from_clay) | Estimate gravimetric moisture retention at 0.3 bar suction for Group I. | [``](headers/lal1979.md) | +| [`calc_ptf_lal1979_group_i_water_03bar_from_sand`](headers/lal1979.md#function-calc_ptf_lal1979_group_i_water_03bar_from_sand) | Estimate gravimetric moisture retention at 0.3 bar suction for Group I. | [``](headers/lal1979.md) | +| [`calc_ptf_lal1979_group_i_water_15bar_from_clay`](headers/lal1979.md#function-calc_ptf_lal1979_group_i_water_15bar_from_clay) | Estimate gravimetric moisture retention at 15 bar suction for Group I. | [``](headers/lal1979.md) | +| [`calc_ptf_lal1979_group_i_water_15bar_from_sand`](headers/lal1979.md#function-calc_ptf_lal1979_group_i_water_15bar_from_sand) | Estimate gravimetric moisture retention at 15 bar suction for Group I. | [``](headers/lal1979.md) | +| [`calc_ptf_lal1979_group_i_water_15bar_from_silt`](headers/lal1979.md#function-calc_ptf_lal1979_group_i_water_15bar_from_silt) | Estimate gravimetric moisture retention at 15 bar suction for Group I. | [``](headers/lal1979.md) | +| [`calc_ptf_lal1979_group_ii_lower_plastic_limit_from_clay`](headers/lal1979.md#function-calc_ptf_lal1979_group_ii_lower_plastic_limit_from_clay) | Estimate lower plastic limit for Group II. | [``](headers/lal1979.md) | +| [`calc_ptf_lal1979_group_ii_lower_plastic_limit_from_sand`](headers/lal1979.md#function-calc_ptf_lal1979_group_ii_lower_plastic_limit_from_sand) | Estimate lower plastic limit for Group II. | [``](headers/lal1979.md) | +| [`calc_ptf_lal1979_group_ii_lower_plastic_limit_from_silt`](headers/lal1979.md#function-calc_ptf_lal1979_group_ii_lower_plastic_limit_from_silt) | Estimate lower plastic limit for Group II. | [``](headers/lal1979.md) | +| [`calc_ptf_lal1979_group_ii_moisture_equivalent_from_clay`](headers/lal1979.md#function-calc_ptf_lal1979_group_ii_moisture_equivalent_from_clay) | Estimate gravimetric moisture equivalent measured at 1000 times gravity for Group II. | [``](headers/lal1979.md) | +| [`calc_ptf_lal1979_group_ii_moisture_equivalent_from_sand`](headers/lal1979.md#function-calc_ptf_lal1979_group_ii_moisture_equivalent_from_sand) | Estimate gravimetric moisture equivalent measured at 1000 times gravity for Group II. | [``](headers/lal1979.md) | +| [`calc_ptf_lal1979_group_ii_moisture_equivalent_from_silt`](headers/lal1979.md#function-calc_ptf_lal1979_group_ii_moisture_equivalent_from_silt) | Estimate gravimetric moisture equivalent measured at 1000 times gravity for Group II. | [``](headers/lal1979.md) | +| [`calc_ptf_lal1979_group_ii_plasticity_index_from_organic_carbon`](headers/lal1979.md#function-calc_ptf_lal1979_group_ii_plasticity_index_from_organic_carbon) | Estimate plasticity index (upper minus lower plastic limit) for Group II. | [``](headers/lal1979.md) | +| [`calc_ptf_lal1979_group_ii_plasticity_index_from_silt`](headers/lal1979.md#function-calc_ptf_lal1979_group_ii_plasticity_index_from_silt) | Estimate plasticity index (upper minus lower plastic limit) for Group II. | [``](headers/lal1979.md) | +| [`calc_ptf_lal1979_group_ii_upper_plastic_limit_from_clay`](headers/lal1979.md#function-calc_ptf_lal1979_group_ii_upper_plastic_limit_from_clay) | Estimate upper plastic limit for Group II. | [``](headers/lal1979.md) | +| [`calc_ptf_lal1979_group_ii_upper_plastic_limit_from_organic_carbon`](headers/lal1979.md#function-calc_ptf_lal1979_group_ii_upper_plastic_limit_from_organic_carbon) | Estimate upper plastic limit for Group II. | [``](headers/lal1979.md) | +| [`calc_ptf_lal1979_group_ii_upper_plastic_limit_from_sand`](headers/lal1979.md#function-calc_ptf_lal1979_group_ii_upper_plastic_limit_from_sand) | Estimate upper plastic limit for Group II. | [``](headers/lal1979.md) | +| [`calc_ptf_lal1979_group_ii_upper_plastic_limit_from_silt`](headers/lal1979.md#function-calc_ptf_lal1979_group_ii_upper_plastic_limit_from_silt) | Estimate upper plastic limit for Group II. | [``](headers/lal1979.md) | +| [`calc_ptf_lal1979_group_ii_water_0bar_from_clay`](headers/lal1979.md#function-calc_ptf_lal1979_group_ii_water_0bar_from_clay) | Estimate gravimetric moisture retention at saturation for Group II. | [``](headers/lal1979.md) | +| [`calc_ptf_lal1979_group_ii_water_0bar_from_sand`](headers/lal1979.md#function-calc_ptf_lal1979_group_ii_water_0bar_from_sand) | Estimate gravimetric moisture retention at saturation for Group II. | [``](headers/lal1979.md) | +| [`calc_ptf_lal1979_group_ii_water_01bar_from_clay`](headers/lal1979.md#function-calc_ptf_lal1979_group_ii_water_01bar_from_clay) | Estimate gravimetric moisture retention at 0.1 bar suction for Group II. | [``](headers/lal1979.md) | +| [`calc_ptf_lal1979_group_ii_water_01bar_from_sand`](headers/lal1979.md#function-calc_ptf_lal1979_group_ii_water_01bar_from_sand) | Estimate gravimetric moisture retention at 0.1 bar suction for Group II. | [``](headers/lal1979.md) | +| [`calc_ptf_lal1979_group_ii_water_03bar_from_clay`](headers/lal1979.md#function-calc_ptf_lal1979_group_ii_water_03bar_from_clay) | Estimate gravimetric moisture retention at 0.3 bar suction for Group II. | [``](headers/lal1979.md) | +| [`calc_ptf_lal1979_group_ii_water_03bar_from_sand`](headers/lal1979.md#function-calc_ptf_lal1979_group_ii_water_03bar_from_sand) | Estimate gravimetric moisture retention at 0.3 bar suction for Group II. | [``](headers/lal1979.md) | +| [`calc_ptf_lal1979_group_ii_water_03bar_from_water_01bar`](headers/lal1979.md#function-calc_ptf_lal1979_group_ii_water_03bar_from_water_01bar) | Estimate gravimetric moisture retention at 0.3 bar suction for Group II. | [``](headers/lal1979.md) | +| [`calc_ptf_lal1979_group_ii_water_15bar_from_clay`](headers/lal1979.md#function-calc_ptf_lal1979_group_ii_water_15bar_from_clay) | Estimate gravimetric moisture retention at 15 bar suction for Group II. | [``](headers/lal1979.md) | +| [`calc_ptf_lal1979_group_ii_water_15bar_from_sand`](headers/lal1979.md#function-calc_ptf_lal1979_group_ii_water_15bar_from_sand) | Estimate gravimetric moisture retention at 15 bar suction for Group II. | [``](headers/lal1979.md) | +| [`calc_ptf_lal1979_group_ii_water_15bar_from_water_01bar`](headers/lal1979.md#function-calc_ptf_lal1979_group_ii_water_15bar_from_water_01bar) | Estimate gravimetric moisture retention at 15 bar suction for Group II. | [``](headers/lal1979.md) | | [`calc_ptf_li2007`](headers/li2007.md#function-calc_ptf_li2007) | Estimate van Genuchten parameters and saturated hydraulic conductivity for Fengqiu County soils. | [``](headers/li2007.md) | | [`calc_ptf_mayr1999`](headers/mayr1999.md#function-calc_ptf_mayr1999) | Estimate modified Brooks-Corey a, b, and saturated water content from texture, bulk density, and organic carbon. | [``](headers/mayr1999.md) | | [`calc_ptf_oosterveld1980_available_water`](headers/oosterveld1980.md#function-calc_ptf_oosterveld1980_available_water) | Estimate available gravimetric soil moisture between field capacity and wilting point. | [``](headers/oosterveld1980.md) | diff --git a/docs/src/reference/c/headers/lal1979.md b/docs/src/reference/c/headers/lal1979.md new file mode 100644 index 0000000..c89cbc8 --- /dev/null +++ b/docs/src/reference/c/headers/lal1979.md @@ -0,0 +1,931 @@ +--- +title: "lal1979.h" +--- + + + +# `` + +```c +#include +``` + +Moisture retention and plasticity regressions for two groups of Nigerian soils. + +## Source + +Lal, R. (1979). Physical properties and moisture retention characteristics of some Nigerian soils. Geoderma, 21, 209-223. + +[DOI: 10.1016/0016-7061(78)90028-9](https://doi.org/10.1016/0016-7061(78)90028-9) + +## Scope + +**Territory:** Nigeria + +**Dataset:** 119 genetic-horizon samples from 23 profiles in two parent-material groups. + +[PTF catalog page](../../../ptf-catalog/sources/lal1979.md) + +## Functions + +### `calc_ptf_lal1979_group_i_water_0bar_from_clay` {#function-calc_ptf_lal1979_group_i_water_0bar_from_clay} + +Estimate gravimetric moisture retention at saturation for Group I. + +```c +static inline double calc_ptf_lal1979_group_i_water_0bar_from_clay(double clay); +``` + +#### Parameters + +| Name | Direction | Description | +| --- | --- | --- | +| `clay` | in | Clay smaller than 0.002 mm; percentage of the fine earth. Full calibration bounds are not reported. (%) | + +#### Returns + +Gravimetric moisture retention at saturation expressed per unit dry soil mass. (g g⁻¹) + +!!! note + + Table IV, Group I, clay predictor, water_0bar response. + +### `calc_ptf_lal1979_group_i_water_0bar_from_sand` {#function-calc_ptf_lal1979_group_i_water_0bar_from_sand} + +Estimate gravimetric moisture retention at saturation for Group I. + +```c +static inline double calc_ptf_lal1979_group_i_water_0bar_from_sand(double sand); +``` + +#### Parameters + +| Name | Direction | Description | +| --- | --- | --- | +| `sand` | in | Sand from 0.02 to 2 mm; percentage of the fine earth. Full calibration bounds are not reported. (%) | + +#### Returns + +Gravimetric moisture retention at saturation expressed per unit dry soil mass. (g g⁻¹) + +!!! note + + Table IV, Group I, sand predictor, water_0bar response. + +### `calc_ptf_lal1979_group_ii_water_0bar_from_clay` {#function-calc_ptf_lal1979_group_ii_water_0bar_from_clay} + +Estimate gravimetric moisture retention at saturation for Group II. + +```c +static inline double calc_ptf_lal1979_group_ii_water_0bar_from_clay(double clay); +``` + +#### Parameters + +| Name | Direction | Description | +| --- | --- | --- | +| `clay` | in | Clay smaller than 0.002 mm; percentage of the fine earth. Full calibration bounds are not reported. (%) | + +#### Returns + +Gravimetric moisture retention at saturation expressed per unit dry soil mass. (g g⁻¹) + +!!! note + + Table IV, Group II, clay predictor, water_0bar response. + +### `calc_ptf_lal1979_group_ii_water_0bar_from_sand` {#function-calc_ptf_lal1979_group_ii_water_0bar_from_sand} + +Estimate gravimetric moisture retention at saturation for Group II. + +```c +static inline double calc_ptf_lal1979_group_ii_water_0bar_from_sand(double sand); +``` + +#### Parameters + +| Name | Direction | Description | +| --- | --- | --- | +| `sand` | in | Sand from 0.02 to 2 mm; percentage of the fine earth. Full calibration bounds are not reported. (%) | + +#### Returns + +Gravimetric moisture retention at saturation expressed per unit dry soil mass. (g g⁻¹) + +!!! note + + Table IV, Group II, sand predictor, water_0bar response. + +### `calc_ptf_lal1979_group_i_water_01bar_from_clay` {#function-calc_ptf_lal1979_group_i_water_01bar_from_clay} + +Estimate gravimetric moisture retention at 0.1 bar suction for Group I. + +```c +static inline double calc_ptf_lal1979_group_i_water_01bar_from_clay(double clay); +``` + +#### Parameters + +| Name | Direction | Description | +| --- | --- | --- | +| `clay` | in | Clay smaller than 0.002 mm; percentage of the fine earth. Full calibration bounds are not reported. (%) | + +#### Returns + +Gravimetric moisture retention at 0.1 bar suction expressed per unit dry soil mass. (g g⁻¹) + +!!! note + + Table V, Group I, clay predictor, water_01bar response. + +### `calc_ptf_lal1979_group_i_water_03bar_from_clay` {#function-calc_ptf_lal1979_group_i_water_03bar_from_clay} + +Estimate gravimetric moisture retention at 0.3 bar suction for Group I. + +```c +static inline double calc_ptf_lal1979_group_i_water_03bar_from_clay(double clay); +``` + +#### Parameters + +| Name | Direction | Description | +| --- | --- | --- | +| `clay` | in | Clay smaller than 0.002 mm; percentage of the fine earth. Full calibration bounds are not reported. (%) | + +#### Returns + +Gravimetric moisture retention at 0.3 bar suction expressed per unit dry soil mass. (g g⁻¹) + +!!! note + + Table V, Group I, clay predictor, water_03bar response. + +### `calc_ptf_lal1979_group_i_water_01bar_from_sand` {#function-calc_ptf_lal1979_group_i_water_01bar_from_sand} + +Estimate gravimetric moisture retention at 0.1 bar suction for Group I. + +```c +static inline double calc_ptf_lal1979_group_i_water_01bar_from_sand(double sand); +``` + +#### Parameters + +| Name | Direction | Description | +| --- | --- | --- | +| `sand` | in | Sand from 0.02 to 2 mm; percentage of the fine earth. Full calibration bounds are not reported. (%) | + +#### Returns + +Gravimetric moisture retention at 0.1 bar suction expressed per unit dry soil mass. (g g⁻¹) + +!!! note + + Table V, Group I, sand predictor, water_01bar response. + +### `calc_ptf_lal1979_group_i_water_03bar_from_sand` {#function-calc_ptf_lal1979_group_i_water_03bar_from_sand} + +Estimate gravimetric moisture retention at 0.3 bar suction for Group I. + +```c +static inline double calc_ptf_lal1979_group_i_water_03bar_from_sand(double sand); +``` + +#### Parameters + +| Name | Direction | Description | +| --- | --- | --- | +| `sand` | in | Sand from 0.02 to 2 mm; percentage of the fine earth. Full calibration bounds are not reported. (%) | + +#### Returns + +Gravimetric moisture retention at 0.3 bar suction expressed per unit dry soil mass. (g g⁻¹) + +!!! note + + Table V, Group I, sand predictor, water_03bar response. + +### `calc_ptf_lal1979_group_ii_water_01bar_from_clay` {#function-calc_ptf_lal1979_group_ii_water_01bar_from_clay} + +Estimate gravimetric moisture retention at 0.1 bar suction for Group II. + +```c +static inline double calc_ptf_lal1979_group_ii_water_01bar_from_clay(double clay); +``` + +#### Parameters + +| Name | Direction | Description | +| --- | --- | --- | +| `clay` | in | Clay smaller than 0.002 mm; percentage of the fine earth. Full calibration bounds are not reported. (%) | + +#### Returns + +Gravimetric moisture retention at 0.1 bar suction expressed per unit dry soil mass. (g g⁻¹) + +!!! note + + Table V, Group II, clay predictor, water_01bar response. + +### `calc_ptf_lal1979_group_ii_water_03bar_from_clay` {#function-calc_ptf_lal1979_group_ii_water_03bar_from_clay} + +Estimate gravimetric moisture retention at 0.3 bar suction for Group II. + +```c +static inline double calc_ptf_lal1979_group_ii_water_03bar_from_clay(double clay); +``` + +#### Parameters + +| Name | Direction | Description | +| --- | --- | --- | +| `clay` | in | Clay smaller than 0.002 mm; percentage of the fine earth. Full calibration bounds are not reported. (%) | + +#### Returns + +Gravimetric moisture retention at 0.3 bar suction expressed per unit dry soil mass. (g g⁻¹) + +!!! note + + Table V, Group II, clay predictor, water_03bar response. + +### `calc_ptf_lal1979_group_ii_water_01bar_from_sand` {#function-calc_ptf_lal1979_group_ii_water_01bar_from_sand} + +Estimate gravimetric moisture retention at 0.1 bar suction for Group II. + +```c +static inline double calc_ptf_lal1979_group_ii_water_01bar_from_sand(double sand); +``` + +#### Parameters + +| Name | Direction | Description | +| --- | --- | --- | +| `sand` | in | Sand from 0.02 to 2 mm; percentage of the fine earth. Full calibration bounds are not reported. (%) | + +#### Returns + +Gravimetric moisture retention at 0.1 bar suction expressed per unit dry soil mass. (g g⁻¹) + +!!! note + + Table V, Group II, sand predictor, water_01bar response. + +### `calc_ptf_lal1979_group_ii_water_03bar_from_sand` {#function-calc_ptf_lal1979_group_ii_water_03bar_from_sand} + +Estimate gravimetric moisture retention at 0.3 bar suction for Group II. + +```c +static inline double calc_ptf_lal1979_group_ii_water_03bar_from_sand(double sand); +``` + +#### Parameters + +| Name | Direction | Description | +| --- | --- | --- | +| `sand` | in | Sand from 0.02 to 2 mm; percentage of the fine earth. Full calibration bounds are not reported. (%) | + +#### Returns + +Gravimetric moisture retention at 0.3 bar suction expressed per unit dry soil mass. (g g⁻¹) + +!!! note + + Table V, Group II, sand predictor, water_03bar response. + +### `calc_ptf_lal1979_group_i_water_15bar_from_clay` {#function-calc_ptf_lal1979_group_i_water_15bar_from_clay} + +Estimate gravimetric moisture retention at 15 bar suction for Group I. + +```c +static inline double calc_ptf_lal1979_group_i_water_15bar_from_clay(double clay); +``` + +#### Parameters + +| Name | Direction | Description | +| --- | --- | --- | +| `clay` | in | Clay smaller than 0.002 mm; percentage of the fine earth. Full calibration bounds are not reported. (%) | + +#### Returns + +Gravimetric moisture retention at 15 bar suction expressed per unit dry soil mass. (g g⁻¹) + +!!! note + + Table VI, Group I, clay predictor, water_15bar response. + +### `calc_ptf_lal1979_group_i_water_15bar_from_sand` {#function-calc_ptf_lal1979_group_i_water_15bar_from_sand} + +Estimate gravimetric moisture retention at 15 bar suction for Group I. + +```c +static inline double calc_ptf_lal1979_group_i_water_15bar_from_sand(double sand); +``` + +#### Parameters + +| Name | Direction | Description | +| --- | --- | --- | +| `sand` | in | Sand from 0.02 to 2 mm; percentage of the fine earth. Full calibration bounds are not reported. (%) | + +#### Returns + +Gravimetric moisture retention at 15 bar suction expressed per unit dry soil mass. (g g⁻¹) + +!!! note + + Table VI, Group I, sand predictor, water_15bar response. + +### `calc_ptf_lal1979_group_i_water_15bar_from_silt` {#function-calc_ptf_lal1979_group_i_water_15bar_from_silt} + +Estimate gravimetric moisture retention at 15 bar suction for Group I. + +```c +static inline double calc_ptf_lal1979_group_i_water_15bar_from_silt(double silt); +``` + +#### Parameters + +| Name | Direction | Description | +| --- | --- | --- | +| `silt` | in | Silt from 0.002 to 0.02 mm; percentage of the fine earth. Full calibration bounds are not reported. (%) | + +#### Returns + +Gravimetric moisture retention at 15 bar suction expressed per unit dry soil mass. (g g⁻¹) + +!!! note + + Table VI, Group I, silt predictor, water_15bar response. + +### `calc_ptf_lal1979_group_ii_water_15bar_from_clay` {#function-calc_ptf_lal1979_group_ii_water_15bar_from_clay} + +Estimate gravimetric moisture retention at 15 bar suction for Group II. + +```c +static inline double calc_ptf_lal1979_group_ii_water_15bar_from_clay(double clay); +``` + +#### Parameters + +| Name | Direction | Description | +| --- | --- | --- | +| `clay` | in | Clay smaller than 0.002 mm; percentage of the fine earth. Full calibration bounds are not reported. (%) | + +#### Returns + +Gravimetric moisture retention at 15 bar suction expressed per unit dry soil mass. (g g⁻¹) + +!!! note + + Table VI, Group II, clay predictor, water_15bar response. + +### `calc_ptf_lal1979_group_ii_water_15bar_from_sand` {#function-calc_ptf_lal1979_group_ii_water_15bar_from_sand} + +Estimate gravimetric moisture retention at 15 bar suction for Group II. + +```c +static inline double calc_ptf_lal1979_group_ii_water_15bar_from_sand(double sand); +``` + +#### Parameters + +| Name | Direction | Description | +| --- | --- | --- | +| `sand` | in | Sand from 0.02 to 2 mm; percentage of the fine earth. Full calibration bounds are not reported. (%) | + +#### Returns + +Gravimetric moisture retention at 15 bar suction expressed per unit dry soil mass. (g g⁻¹) + +!!! note + + Table VI, Group II, sand predictor, water_15bar response. + +### `calc_ptf_lal1979_group_i_moisture_equivalent_from_clay` {#function-calc_ptf_lal1979_group_i_moisture_equivalent_from_clay} + +Estimate gravimetric moisture equivalent measured at 1000 times gravity for Group I. + +```c +static inline double calc_ptf_lal1979_group_i_moisture_equivalent_from_clay(double clay); +``` + +#### Parameters + +| Name | Direction | Description | +| --- | --- | --- | +| `clay` | in | Clay smaller than 0.002 mm; percentage of the fine earth. Full calibration bounds are not reported. (%) | + +#### Returns + +Gravimetric moisture equivalent measured at 1000 times gravity expressed per unit dry soil mass. (g g⁻¹) + +!!! note + + Table VII, Group I, clay predictor, moisture_equivalent response. + +### `calc_ptf_lal1979_group_i_moisture_equivalent_from_sand` {#function-calc_ptf_lal1979_group_i_moisture_equivalent_from_sand} + +Estimate gravimetric moisture equivalent measured at 1000 times gravity for Group I. + +```c +static inline double calc_ptf_lal1979_group_i_moisture_equivalent_from_sand(double sand); +``` + +#### Parameters + +| Name | Direction | Description | +| --- | --- | --- | +| `sand` | in | Sand from 0.02 to 2 mm; percentage of the fine earth. Full calibration bounds are not reported. (%) | + +#### Returns + +Gravimetric moisture equivalent measured at 1000 times gravity expressed per unit dry soil mass. (g g⁻¹) + +!!! note + + Table VII, Group I, sand predictor, moisture_equivalent response. + +### `calc_ptf_lal1979_group_ii_moisture_equivalent_from_clay` {#function-calc_ptf_lal1979_group_ii_moisture_equivalent_from_clay} + +Estimate gravimetric moisture equivalent measured at 1000 times gravity for Group II. + +```c +static inline double calc_ptf_lal1979_group_ii_moisture_equivalent_from_clay(double clay); +``` + +#### Parameters + +| Name | Direction | Description | +| --- | --- | --- | +| `clay` | in | Clay smaller than 0.002 mm; percentage of the fine earth. Full calibration bounds are not reported. (%) | + +#### Returns + +Gravimetric moisture equivalent measured at 1000 times gravity expressed per unit dry soil mass. (g g⁻¹) + +!!! note + + Table VII, Group II, clay predictor, moisture_equivalent response. + +### `calc_ptf_lal1979_group_ii_moisture_equivalent_from_sand` {#function-calc_ptf_lal1979_group_ii_moisture_equivalent_from_sand} + +Estimate gravimetric moisture equivalent measured at 1000 times gravity for Group II. + +```c +static inline double calc_ptf_lal1979_group_ii_moisture_equivalent_from_sand(double sand); +``` + +#### Parameters + +| Name | Direction | Description | +| --- | --- | --- | +| `sand` | in | Sand from 0.02 to 2 mm; percentage of the fine earth. Full calibration bounds are not reported. (%) | + +#### Returns + +Gravimetric moisture equivalent measured at 1000 times gravity expressed per unit dry soil mass. (g g⁻¹) + +!!! note + + Table VII, Group II, sand predictor, moisture_equivalent response. + +### `calc_ptf_lal1979_group_ii_moisture_equivalent_from_silt` {#function-calc_ptf_lal1979_group_ii_moisture_equivalent_from_silt} + +Estimate gravimetric moisture equivalent measured at 1000 times gravity for Group II. + +```c +static inline double calc_ptf_lal1979_group_ii_moisture_equivalent_from_silt(double silt); +``` + +#### Parameters + +| Name | Direction | Description | +| --- | --- | --- | +| `silt` | in | Silt from 0.002 to 0.02 mm; percentage of the fine earth. Full calibration bounds are not reported. (%) | + +#### Returns + +Gravimetric moisture equivalent measured at 1000 times gravity expressed per unit dry soil mass. (g g⁻¹) + +!!! note + + Table VII, Group II, silt predictor, moisture_equivalent response. + +### `calc_ptf_lal1979_group_ii_water_03bar_from_water_01bar` {#function-calc_ptf_lal1979_group_ii_water_03bar_from_water_01bar} + +Estimate gravimetric moisture retention at 0.3 bar suction for Group II. + +```c +static inline double calc_ptf_lal1979_group_ii_water_03bar_from_water_01bar(double water_01bar); +``` + +#### Parameters + +| Name | Direction | Description | +| --- | --- | --- | +| `water_01bar` | in | Gravimetric moisture retention at 0.1 bar suction on disturbed soil. (g/g) | + +#### Returns + +Gravimetric moisture retention at 0.3 bar suction expressed per unit dry soil mass. (g g⁻¹) + +!!! note + + Table VIII, Group II, water_01bar predictor, water_03bar response. + +### `calc_ptf_lal1979_group_ii_water_15bar_from_water_01bar` {#function-calc_ptf_lal1979_group_ii_water_15bar_from_water_01bar} + +Estimate gravimetric moisture retention at 15 bar suction for Group II. + +```c +static inline double calc_ptf_lal1979_group_ii_water_15bar_from_water_01bar(double water_01bar); +``` + +#### Parameters + +| Name | Direction | Description | +| --- | --- | --- | +| `water_01bar` | in | Gravimetric moisture retention at 0.1 bar suction on disturbed soil. (g/g) | + +#### Returns + +Gravimetric moisture retention at 15 bar suction expressed per unit dry soil mass. (g g⁻¹) + +!!! note + + Table VIII, Group II, water_01bar predictor, water_15bar response. + +### `calc_ptf_lal1979_group_i_upper_plastic_limit_from_organic_carbon` {#function-calc_ptf_lal1979_group_i_upper_plastic_limit_from_organic_carbon} + +Estimate upper plastic limit for Group I. + +```c +static inline double calc_ptf_lal1979_group_i_upper_plastic_limit_from_organic_carbon(double organic_carbon); +``` + +#### Parameters + +| Name | Direction | Description | +| --- | --- | --- | +| `organic_carbon` | in | Organic carbon measured by Walkley and Black wet combustion; percentage of the fine earth. Full calibration bounds are not reported. (%) | + +#### Returns + +Upper plastic limit expressed as percentage of oven-dry soil mass. (%) + +!!! note + + Table IX, Group I, organic_carbon predictor, upper_plastic_limit response. + +### `calc_ptf_lal1979_group_i_lower_plastic_limit_from_organic_carbon` {#function-calc_ptf_lal1979_group_i_lower_plastic_limit_from_organic_carbon} + +Estimate lower plastic limit for Group I. + +```c +static inline double calc_ptf_lal1979_group_i_lower_plastic_limit_from_organic_carbon(double organic_carbon); +``` + +#### Parameters + +| Name | Direction | Description | +| --- | --- | --- | +| `organic_carbon` | in | Organic carbon measured by Walkley and Black wet combustion; percentage of the fine earth. Full calibration bounds are not reported. (%) | + +#### Returns + +Lower plastic limit expressed as percentage of oven-dry soil mass. (%) + +!!! note + + Table IX, Group I, organic_carbon predictor, lower_plastic_limit response. + +### `calc_ptf_lal1979_group_i_plasticity_index_from_organic_carbon` {#function-calc_ptf_lal1979_group_i_plasticity_index_from_organic_carbon} + +Estimate plasticity index (upper minus lower plastic limit) for Group I. + +```c +static inline double calc_ptf_lal1979_group_i_plasticity_index_from_organic_carbon(double organic_carbon); +``` + +#### Parameters + +| Name | Direction | Description | +| --- | --- | --- | +| `organic_carbon` | in | Organic carbon measured by Walkley and Black wet combustion; percentage of the fine earth. Full calibration bounds are not reported. (%) | + +#### Returns + +Plasticity index (upper minus lower plastic limit) expressed as percentage of oven-dry soil mass. (%) + +!!! note + + Table IX, Group I, organic_carbon predictor, plasticity_index response. + +### `calc_ptf_lal1979_group_i_upper_plastic_limit_from_clay` {#function-calc_ptf_lal1979_group_i_upper_plastic_limit_from_clay} + +Estimate upper plastic limit for Group I. + +```c +static inline double calc_ptf_lal1979_group_i_upper_plastic_limit_from_clay(double clay); +``` + +#### Parameters + +| Name | Direction | Description | +| --- | --- | --- | +| `clay` | in | Clay smaller than 0.002 mm; percentage of the fine earth. Full calibration bounds are not reported. (%) | + +#### Returns + +Upper plastic limit expressed as percentage of oven-dry soil mass. (%) + +!!! note + + Table IX, Group I, clay predictor, upper_plastic_limit response. + +### `calc_ptf_lal1979_group_i_lower_plastic_limit_from_clay` {#function-calc_ptf_lal1979_group_i_lower_plastic_limit_from_clay} + +Estimate lower plastic limit for Group I. + +```c +static inline double calc_ptf_lal1979_group_i_lower_plastic_limit_from_clay(double clay); +``` + +#### Parameters + +| Name | Direction | Description | +| --- | --- | --- | +| `clay` | in | Clay smaller than 0.002 mm; percentage of the fine earth. Full calibration bounds are not reported. (%) | + +#### Returns + +Lower plastic limit expressed as percentage of oven-dry soil mass. (%) + +!!! note + + Table IX, Group I, clay predictor, lower_plastic_limit response. + +### `calc_ptf_lal1979_group_i_plasticity_index_from_clay` {#function-calc_ptf_lal1979_group_i_plasticity_index_from_clay} + +Estimate plasticity index (upper minus lower plastic limit) for Group I. + +```c +static inline double calc_ptf_lal1979_group_i_plasticity_index_from_clay(double clay); +``` + +#### Parameters + +| Name | Direction | Description | +| --- | --- | --- | +| `clay` | in | Clay smaller than 0.002 mm; percentage of the fine earth. Full calibration bounds are not reported. (%) | + +#### Returns + +Plasticity index (upper minus lower plastic limit) expressed as percentage of oven-dry soil mass. (%) + +!!! note + + Table IX, Group I, clay predictor, plasticity_index response. + +### `calc_ptf_lal1979_group_i_lower_plastic_limit_from_sand` {#function-calc_ptf_lal1979_group_i_lower_plastic_limit_from_sand} + +Estimate lower plastic limit for Group I. + +```c +static inline double calc_ptf_lal1979_group_i_lower_plastic_limit_from_sand(double sand); +``` + +#### Parameters + +| Name | Direction | Description | +| --- | --- | --- | +| `sand` | in | Sand from 0.02 to 2 mm; percentage of the fine earth. Full calibration bounds are not reported. (%) | + +#### Returns + +Lower plastic limit expressed as percentage of oven-dry soil mass. (%) + +!!! note + + Table IX, Group I, sand predictor, lower_plastic_limit response. + +### `calc_ptf_lal1979_group_i_plasticity_index_from_sand` {#function-calc_ptf_lal1979_group_i_plasticity_index_from_sand} + +Estimate plasticity index (upper minus lower plastic limit) for Group I. + +```c +static inline double calc_ptf_lal1979_group_i_plasticity_index_from_sand(double sand); +``` + +#### Parameters + +| Name | Direction | Description | +| --- | --- | --- | +| `sand` | in | Sand from 0.02 to 2 mm; percentage of the fine earth. Full calibration bounds are not reported. (%) | + +#### Returns + +Plasticity index (upper minus lower plastic limit) expressed as percentage of oven-dry soil mass. (%) + +!!! note + + Table IX, Group I, sand predictor, plasticity_index response. + +### `calc_ptf_lal1979_group_ii_upper_plastic_limit_from_organic_carbon` {#function-calc_ptf_lal1979_group_ii_upper_plastic_limit_from_organic_carbon} + +Estimate upper plastic limit for Group II. + +```c +static inline double calc_ptf_lal1979_group_ii_upper_plastic_limit_from_organic_carbon(double organic_carbon); +``` + +#### Parameters + +| Name | Direction | Description | +| --- | --- | --- | +| `organic_carbon` | in | Organic carbon measured by Walkley and Black wet combustion; percentage of the fine earth. Full calibration bounds are not reported. (%) | + +#### Returns + +Upper plastic limit expressed as percentage of oven-dry soil mass. (%) + +!!! note + + Table IX, Group II, organic_carbon predictor, upper_plastic_limit response. + +### `calc_ptf_lal1979_group_ii_plasticity_index_from_organic_carbon` {#function-calc_ptf_lal1979_group_ii_plasticity_index_from_organic_carbon} + +Estimate plasticity index (upper minus lower plastic limit) for Group II. + +```c +static inline double calc_ptf_lal1979_group_ii_plasticity_index_from_organic_carbon(double organic_carbon); +``` + +#### Parameters + +| Name | Direction | Description | +| --- | --- | --- | +| `organic_carbon` | in | Organic carbon measured by Walkley and Black wet combustion; percentage of the fine earth. Full calibration bounds are not reported. (%) | + +#### Returns + +Plasticity index (upper minus lower plastic limit) expressed as percentage of oven-dry soil mass. (%) + +!!! note + + Table IX, Group II, organic_carbon predictor, plasticity_index response. + +### `calc_ptf_lal1979_group_ii_upper_plastic_limit_from_clay` {#function-calc_ptf_lal1979_group_ii_upper_plastic_limit_from_clay} + +Estimate upper plastic limit for Group II. + +```c +static inline double calc_ptf_lal1979_group_ii_upper_plastic_limit_from_clay(double clay); +``` + +#### Parameters + +| Name | Direction | Description | +| --- | --- | --- | +| `clay` | in | Clay smaller than 0.002 mm; percentage of the fine earth. Full calibration bounds are not reported. (%) | + +#### Returns + +Upper plastic limit expressed as percentage of oven-dry soil mass. (%) + +!!! note + + Table IX, Group II, clay predictor, upper_plastic_limit response. + +### `calc_ptf_lal1979_group_ii_lower_plastic_limit_from_clay` {#function-calc_ptf_lal1979_group_ii_lower_plastic_limit_from_clay} + +Estimate lower plastic limit for Group II. + +```c +static inline double calc_ptf_lal1979_group_ii_lower_plastic_limit_from_clay(double clay); +``` + +#### Parameters + +| Name | Direction | Description | +| --- | --- | --- | +| `clay` | in | Clay smaller than 0.002 mm; percentage of the fine earth. Full calibration bounds are not reported. (%) | + +#### Returns + +Lower plastic limit expressed as percentage of oven-dry soil mass. (%) + +!!! note + + Table IX, Group II, clay predictor, lower_plastic_limit response. + +### `calc_ptf_lal1979_group_ii_upper_plastic_limit_from_sand` {#function-calc_ptf_lal1979_group_ii_upper_plastic_limit_from_sand} + +Estimate upper plastic limit for Group II. + +```c +static inline double calc_ptf_lal1979_group_ii_upper_plastic_limit_from_sand(double sand); +``` + +#### Parameters + +| Name | Direction | Description | +| --- | --- | --- | +| `sand` | in | Sand from 0.02 to 2 mm; percentage of the fine earth. Full calibration bounds are not reported. (%) | + +#### Returns + +Upper plastic limit expressed as percentage of oven-dry soil mass. (%) + +!!! note + + Table IX, Group II, sand predictor, upper_plastic_limit response. + +### `calc_ptf_lal1979_group_ii_lower_plastic_limit_from_sand` {#function-calc_ptf_lal1979_group_ii_lower_plastic_limit_from_sand} + +Estimate lower plastic limit for Group II. + +```c +static inline double calc_ptf_lal1979_group_ii_lower_plastic_limit_from_sand(double sand); +``` + +#### Parameters + +| Name | Direction | Description | +| --- | --- | --- | +| `sand` | in | Sand from 0.02 to 2 mm; percentage of the fine earth. Full calibration bounds are not reported. (%) | + +#### Returns + +Lower plastic limit expressed as percentage of oven-dry soil mass. (%) + +!!! note + + Table IX, Group II, sand predictor, lower_plastic_limit response. + +### `calc_ptf_lal1979_group_ii_upper_plastic_limit_from_silt` {#function-calc_ptf_lal1979_group_ii_upper_plastic_limit_from_silt} + +Estimate upper plastic limit for Group II. + +```c +static inline double calc_ptf_lal1979_group_ii_upper_plastic_limit_from_silt(double silt); +``` + +#### Parameters + +| Name | Direction | Description | +| --- | --- | --- | +| `silt` | in | Silt from 0.002 to 0.02 mm; percentage of the fine earth. Full calibration bounds are not reported. (%) | + +#### Returns + +Upper plastic limit expressed as percentage of oven-dry soil mass. (%) + +!!! note + + Table IX, Group II, silt predictor, upper_plastic_limit response. + +### `calc_ptf_lal1979_group_ii_lower_plastic_limit_from_silt` {#function-calc_ptf_lal1979_group_ii_lower_plastic_limit_from_silt} + +Estimate lower plastic limit for Group II. + +```c +static inline double calc_ptf_lal1979_group_ii_lower_plastic_limit_from_silt(double silt); +``` + +#### Parameters + +| Name | Direction | Description | +| --- | --- | --- | +| `silt` | in | Silt from 0.002 to 0.02 mm; percentage of the fine earth. Full calibration bounds are not reported. (%) | + +#### Returns + +Lower plastic limit expressed as percentage of oven-dry soil mass. (%) + +!!! note + + Table IX, Group II, silt predictor, lower_plastic_limit response. + +### `calc_ptf_lal1979_group_ii_plasticity_index_from_silt` {#function-calc_ptf_lal1979_group_ii_plasticity_index_from_silt} + +Estimate plasticity index (upper minus lower plastic limit) for Group II. + +```c +static inline double calc_ptf_lal1979_group_ii_plasticity_index_from_silt(double silt); +``` + +#### Parameters + +| Name | Direction | Description | +| --- | --- | --- | +| `silt` | in | Silt from 0.002 to 0.02 mm; percentage of the fine earth. Full calibration bounds are not reported. (%) | + +#### Returns + +Plasticity index (upper minus lower plastic limit) expressed as percentage of oven-dry soil mass. (%) + +!!! note + + Table IX, Group II, silt predictor, plasticity_index response. diff --git a/docs/src/reference/c/headers/ptfkit.md b/docs/src/reference/c/headers/ptfkit.md index 4f4add9..6e3412e 100644 --- a/docs/src/reference/c/headers/ptfkit.md +++ b/docs/src/reference/c/headers/ptfkit.md @@ -25,6 +25,7 @@ This umbrella header aggregates every public ptfkit source header. Include an in - [``](gunarathna2019.md) — Point water-retention regressions for tropical Sri Lankan soils. - [``](hodnett2002.md) — Hodnett & Tomasella (2002), tropical-soil regressions for four van Genuchten parameters. - [``](jabro1992.md) — Jabro (1992), United States. +- [``](lal1979.md) — Moisture retention and plasticity regressions for two groups of Nigerian soils. - [``](li2007.md) — Li et al. (2007), Fengqiu County, North China Plain, China. - [``](mayr1999.md) — Mayr and Jarvis (1999) modified Brooks-Corey water-retention parameter PTFs. - [``](oosterveld1980.md) — Oosterveld and Chang (1980), soil-moisture retention from texture and depth. diff --git a/docs/src/reference/c/index.md b/docs/src/reference/c/index.md index 4fa6792..df3c833 100644 --- a/docs/src/reference/c/index.md +++ b/docs/src/reference/c/index.md @@ -22,6 +22,7 @@ ptfkit's C API is organized around installed headers. - [``](headers/gunarathna2019.md) — Point water-retention regressions for tropical Sri Lankan soils. - [``](headers/hodnett2002.md) — Hodnett & Tomasella (2002), tropical-soil regressions for four van Genuchten parameters. - [``](headers/jabro1992.md) — Jabro (1992), United States. +- [``](headers/lal1979.md) — Moisture retention and plasticity regressions for two groups of Nigerian soils. - [``](headers/li2007.md) — Li et al. (2007), Fengqiu County, North China Plain, China. - [``](headers/mayr1999.md) — Mayr and Jarvis (1999) modified Brooks-Corey water-retention parameter PTFs. - [``](headers/oosterveld1980.md) — Oosterveld and Chang (1980), soil-moisture retention from texture and depth. diff --git a/docs/src/reference/cpp/functions.md b/docs/src/reference/cpp/functions.md index dbdc0bb..ce6dcf5 100644 --- a/docs/src/reference/cpp/functions.md +++ b/docs/src/reference/cpp/functions.md @@ -88,6 +88,47 @@ title: C++ function index | [`ptfkit::gunarathna2019::calc_ptf_gunarathna2019_vwc1500_set4`](modules/gunarathna2019.md#function-calc_ptf_gunarathna2019_vwc1500_set4) | Estimate volumetric water content at -1500 kPa using Set 4. | [`ptfkit.gunarathna2019`](modules/gunarathna2019.md) | | [`ptfkit::hodnett2002::calc_ptf_hodnett2002`](modules/hodnett2002.md#function-calc_ptf_hodnett2002) | Estimate four van Genuchten water-retention parameters for tropical soils. | [`ptfkit.hodnett2002`](modules/hodnett2002.md) | | [`ptfkit::jabro1992::calc_ptf_jabro1992`](modules/jabro1992.md#function-calc_ptf_jabro1992) | Estimate saturated hydraulic conductivity from silt, clay, and bulk density. | [`ptfkit.jabro1992`](modules/jabro1992.md) | +| [`ptfkit::lal1979::calc_ptf_lal1979_group_i_lower_plastic_limit_from_clay`](modules/lal1979.md#function-calc_ptf_lal1979_group_i_lower_plastic_limit_from_clay) | Estimate lower plastic limit for Group I. | [`ptfkit.lal1979`](modules/lal1979.md) | +| [`ptfkit::lal1979::calc_ptf_lal1979_group_i_lower_plastic_limit_from_organic_carbon`](modules/lal1979.md#function-calc_ptf_lal1979_group_i_lower_plastic_limit_from_organic_carbon) | Estimate lower plastic limit for Group I. | [`ptfkit.lal1979`](modules/lal1979.md) | +| [`ptfkit::lal1979::calc_ptf_lal1979_group_i_lower_plastic_limit_from_sand`](modules/lal1979.md#function-calc_ptf_lal1979_group_i_lower_plastic_limit_from_sand) | Estimate lower plastic limit for Group I. | [`ptfkit.lal1979`](modules/lal1979.md) | +| [`ptfkit::lal1979::calc_ptf_lal1979_group_i_moisture_equivalent_from_clay`](modules/lal1979.md#function-calc_ptf_lal1979_group_i_moisture_equivalent_from_clay) | Estimate gravimetric moisture equivalent measured at 1000 times gravity for Group I. | [`ptfkit.lal1979`](modules/lal1979.md) | +| [`ptfkit::lal1979::calc_ptf_lal1979_group_i_moisture_equivalent_from_sand`](modules/lal1979.md#function-calc_ptf_lal1979_group_i_moisture_equivalent_from_sand) | Estimate gravimetric moisture equivalent measured at 1000 times gravity for Group I. | [`ptfkit.lal1979`](modules/lal1979.md) | +| [`ptfkit::lal1979::calc_ptf_lal1979_group_i_plasticity_index_from_clay`](modules/lal1979.md#function-calc_ptf_lal1979_group_i_plasticity_index_from_clay) | Estimate plasticity index (upper minus lower plastic limit) for Group I. | [`ptfkit.lal1979`](modules/lal1979.md) | +| [`ptfkit::lal1979::calc_ptf_lal1979_group_i_plasticity_index_from_organic_carbon`](modules/lal1979.md#function-calc_ptf_lal1979_group_i_plasticity_index_from_organic_carbon) | Estimate plasticity index (upper minus lower plastic limit) for Group I. | [`ptfkit.lal1979`](modules/lal1979.md) | +| [`ptfkit::lal1979::calc_ptf_lal1979_group_i_plasticity_index_from_sand`](modules/lal1979.md#function-calc_ptf_lal1979_group_i_plasticity_index_from_sand) | Estimate plasticity index (upper minus lower plastic limit) for Group I. | [`ptfkit.lal1979`](modules/lal1979.md) | +| [`ptfkit::lal1979::calc_ptf_lal1979_group_i_upper_plastic_limit_from_clay`](modules/lal1979.md#function-calc_ptf_lal1979_group_i_upper_plastic_limit_from_clay) | Estimate upper plastic limit for Group I. | [`ptfkit.lal1979`](modules/lal1979.md) | +| [`ptfkit::lal1979::calc_ptf_lal1979_group_i_upper_plastic_limit_from_organic_carbon`](modules/lal1979.md#function-calc_ptf_lal1979_group_i_upper_plastic_limit_from_organic_carbon) | Estimate upper plastic limit for Group I. | [`ptfkit.lal1979`](modules/lal1979.md) | +| [`ptfkit::lal1979::calc_ptf_lal1979_group_i_water_0bar_from_clay`](modules/lal1979.md#function-calc_ptf_lal1979_group_i_water_0bar_from_clay) | Estimate gravimetric moisture retention at saturation for Group I. | [`ptfkit.lal1979`](modules/lal1979.md) | +| [`ptfkit::lal1979::calc_ptf_lal1979_group_i_water_0bar_from_sand`](modules/lal1979.md#function-calc_ptf_lal1979_group_i_water_0bar_from_sand) | Estimate gravimetric moisture retention at saturation for Group I. | [`ptfkit.lal1979`](modules/lal1979.md) | +| [`ptfkit::lal1979::calc_ptf_lal1979_group_i_water_01bar_from_clay`](modules/lal1979.md#function-calc_ptf_lal1979_group_i_water_01bar_from_clay) | Estimate gravimetric moisture retention at 0.1 bar suction for Group I. | [`ptfkit.lal1979`](modules/lal1979.md) | +| [`ptfkit::lal1979::calc_ptf_lal1979_group_i_water_01bar_from_sand`](modules/lal1979.md#function-calc_ptf_lal1979_group_i_water_01bar_from_sand) | Estimate gravimetric moisture retention at 0.1 bar suction for Group I. | [`ptfkit.lal1979`](modules/lal1979.md) | +| [`ptfkit::lal1979::calc_ptf_lal1979_group_i_water_03bar_from_clay`](modules/lal1979.md#function-calc_ptf_lal1979_group_i_water_03bar_from_clay) | Estimate gravimetric moisture retention at 0.3 bar suction for Group I. | [`ptfkit.lal1979`](modules/lal1979.md) | +| [`ptfkit::lal1979::calc_ptf_lal1979_group_i_water_03bar_from_sand`](modules/lal1979.md#function-calc_ptf_lal1979_group_i_water_03bar_from_sand) | Estimate gravimetric moisture retention at 0.3 bar suction for Group I. | [`ptfkit.lal1979`](modules/lal1979.md) | +| [`ptfkit::lal1979::calc_ptf_lal1979_group_i_water_15bar_from_clay`](modules/lal1979.md#function-calc_ptf_lal1979_group_i_water_15bar_from_clay) | Estimate gravimetric moisture retention at 15 bar suction for Group I. | [`ptfkit.lal1979`](modules/lal1979.md) | +| [`ptfkit::lal1979::calc_ptf_lal1979_group_i_water_15bar_from_sand`](modules/lal1979.md#function-calc_ptf_lal1979_group_i_water_15bar_from_sand) | Estimate gravimetric moisture retention at 15 bar suction for Group I. | [`ptfkit.lal1979`](modules/lal1979.md) | +| [`ptfkit::lal1979::calc_ptf_lal1979_group_i_water_15bar_from_silt`](modules/lal1979.md#function-calc_ptf_lal1979_group_i_water_15bar_from_silt) | Estimate gravimetric moisture retention at 15 bar suction for Group I. | [`ptfkit.lal1979`](modules/lal1979.md) | +| [`ptfkit::lal1979::calc_ptf_lal1979_group_ii_lower_plastic_limit_from_clay`](modules/lal1979.md#function-calc_ptf_lal1979_group_ii_lower_plastic_limit_from_clay) | Estimate lower plastic limit for Group II. | [`ptfkit.lal1979`](modules/lal1979.md) | +| [`ptfkit::lal1979::calc_ptf_lal1979_group_ii_lower_plastic_limit_from_sand`](modules/lal1979.md#function-calc_ptf_lal1979_group_ii_lower_plastic_limit_from_sand) | Estimate lower plastic limit for Group II. | [`ptfkit.lal1979`](modules/lal1979.md) | +| [`ptfkit::lal1979::calc_ptf_lal1979_group_ii_lower_plastic_limit_from_silt`](modules/lal1979.md#function-calc_ptf_lal1979_group_ii_lower_plastic_limit_from_silt) | Estimate lower plastic limit for Group II. | [`ptfkit.lal1979`](modules/lal1979.md) | +| [`ptfkit::lal1979::calc_ptf_lal1979_group_ii_moisture_equivalent_from_clay`](modules/lal1979.md#function-calc_ptf_lal1979_group_ii_moisture_equivalent_from_clay) | Estimate gravimetric moisture equivalent measured at 1000 times gravity for Group II. | [`ptfkit.lal1979`](modules/lal1979.md) | +| [`ptfkit::lal1979::calc_ptf_lal1979_group_ii_moisture_equivalent_from_sand`](modules/lal1979.md#function-calc_ptf_lal1979_group_ii_moisture_equivalent_from_sand) | Estimate gravimetric moisture equivalent measured at 1000 times gravity for Group II. | [`ptfkit.lal1979`](modules/lal1979.md) | +| [`ptfkit::lal1979::calc_ptf_lal1979_group_ii_moisture_equivalent_from_silt`](modules/lal1979.md#function-calc_ptf_lal1979_group_ii_moisture_equivalent_from_silt) | Estimate gravimetric moisture equivalent measured at 1000 times gravity for Group II. | [`ptfkit.lal1979`](modules/lal1979.md) | +| [`ptfkit::lal1979::calc_ptf_lal1979_group_ii_plasticity_index_from_organic_carbon`](modules/lal1979.md#function-calc_ptf_lal1979_group_ii_plasticity_index_from_organic_carbon) | Estimate plasticity index (upper minus lower plastic limit) for Group II. | [`ptfkit.lal1979`](modules/lal1979.md) | +| [`ptfkit::lal1979::calc_ptf_lal1979_group_ii_plasticity_index_from_silt`](modules/lal1979.md#function-calc_ptf_lal1979_group_ii_plasticity_index_from_silt) | Estimate plasticity index (upper minus lower plastic limit) for Group II. | [`ptfkit.lal1979`](modules/lal1979.md) | +| [`ptfkit::lal1979::calc_ptf_lal1979_group_ii_upper_plastic_limit_from_clay`](modules/lal1979.md#function-calc_ptf_lal1979_group_ii_upper_plastic_limit_from_clay) | Estimate upper plastic limit for Group II. | [`ptfkit.lal1979`](modules/lal1979.md) | +| [`ptfkit::lal1979::calc_ptf_lal1979_group_ii_upper_plastic_limit_from_organic_carbon`](modules/lal1979.md#function-calc_ptf_lal1979_group_ii_upper_plastic_limit_from_organic_carbon) | Estimate upper plastic limit for Group II. | [`ptfkit.lal1979`](modules/lal1979.md) | +| [`ptfkit::lal1979::calc_ptf_lal1979_group_ii_upper_plastic_limit_from_sand`](modules/lal1979.md#function-calc_ptf_lal1979_group_ii_upper_plastic_limit_from_sand) | Estimate upper plastic limit for Group II. | [`ptfkit.lal1979`](modules/lal1979.md) | +| [`ptfkit::lal1979::calc_ptf_lal1979_group_ii_upper_plastic_limit_from_silt`](modules/lal1979.md#function-calc_ptf_lal1979_group_ii_upper_plastic_limit_from_silt) | Estimate upper plastic limit for Group II. | [`ptfkit.lal1979`](modules/lal1979.md) | +| [`ptfkit::lal1979::calc_ptf_lal1979_group_ii_water_0bar_from_clay`](modules/lal1979.md#function-calc_ptf_lal1979_group_ii_water_0bar_from_clay) | Estimate gravimetric moisture retention at saturation for Group II. | [`ptfkit.lal1979`](modules/lal1979.md) | +| [`ptfkit::lal1979::calc_ptf_lal1979_group_ii_water_0bar_from_sand`](modules/lal1979.md#function-calc_ptf_lal1979_group_ii_water_0bar_from_sand) | Estimate gravimetric moisture retention at saturation for Group II. | [`ptfkit.lal1979`](modules/lal1979.md) | +| [`ptfkit::lal1979::calc_ptf_lal1979_group_ii_water_01bar_from_clay`](modules/lal1979.md#function-calc_ptf_lal1979_group_ii_water_01bar_from_clay) | Estimate gravimetric moisture retention at 0.1 bar suction for Group II. | [`ptfkit.lal1979`](modules/lal1979.md) | +| [`ptfkit::lal1979::calc_ptf_lal1979_group_ii_water_01bar_from_sand`](modules/lal1979.md#function-calc_ptf_lal1979_group_ii_water_01bar_from_sand) | Estimate gravimetric moisture retention at 0.1 bar suction for Group II. | [`ptfkit.lal1979`](modules/lal1979.md) | +| [`ptfkit::lal1979::calc_ptf_lal1979_group_ii_water_03bar_from_clay`](modules/lal1979.md#function-calc_ptf_lal1979_group_ii_water_03bar_from_clay) | Estimate gravimetric moisture retention at 0.3 bar suction for Group II. | [`ptfkit.lal1979`](modules/lal1979.md) | +| [`ptfkit::lal1979::calc_ptf_lal1979_group_ii_water_03bar_from_sand`](modules/lal1979.md#function-calc_ptf_lal1979_group_ii_water_03bar_from_sand) | Estimate gravimetric moisture retention at 0.3 bar suction for Group II. | [`ptfkit.lal1979`](modules/lal1979.md) | +| [`ptfkit::lal1979::calc_ptf_lal1979_group_ii_water_03bar_from_water_01bar`](modules/lal1979.md#function-calc_ptf_lal1979_group_ii_water_03bar_from_water_01bar) | Estimate gravimetric moisture retention at 0.3 bar suction for Group II. | [`ptfkit.lal1979`](modules/lal1979.md) | +| [`ptfkit::lal1979::calc_ptf_lal1979_group_ii_water_15bar_from_clay`](modules/lal1979.md#function-calc_ptf_lal1979_group_ii_water_15bar_from_clay) | Estimate gravimetric moisture retention at 15 bar suction for Group II. | [`ptfkit.lal1979`](modules/lal1979.md) | +| [`ptfkit::lal1979::calc_ptf_lal1979_group_ii_water_15bar_from_sand`](modules/lal1979.md#function-calc_ptf_lal1979_group_ii_water_15bar_from_sand) | Estimate gravimetric moisture retention at 15 bar suction for Group II. | [`ptfkit.lal1979`](modules/lal1979.md) | +| [`ptfkit::lal1979::calc_ptf_lal1979_group_ii_water_15bar_from_water_01bar`](modules/lal1979.md#function-calc_ptf_lal1979_group_ii_water_15bar_from_water_01bar) | Estimate gravimetric moisture retention at 15 bar suction for Group II. | [`ptfkit.lal1979`](modules/lal1979.md) | | [`ptfkit::li2007::calc_ptf_li2007`](modules/li2007.md#function-calc_ptf_li2007) | Estimate van Genuchten parameters and saturated hydraulic conductivity for Fengqiu County soils. | [`ptfkit.li2007`](modules/li2007.md) | | [`ptfkit::mayr1999::calc_ptf_mayr1999`](modules/mayr1999.md#function-calc_ptf_mayr1999) | Estimate modified Brooks-Corey a, b, and saturated water content from texture, bulk density, and organic carbon. | [`ptfkit.mayr1999`](modules/mayr1999.md) | | [`ptfkit::oosterveld1980::calc_ptf_oosterveld1980_available_water`](modules/oosterveld1980.md#function-calc_ptf_oosterveld1980_available_water) | Estimate available gravimetric soil moisture between field capacity and wilting point. | [`ptfkit.oosterveld1980`](modules/oosterveld1980.md) | diff --git a/docs/src/reference/cpp/index.md b/docs/src/reference/cpp/index.md index 6e4651c..966a7c1 100644 --- a/docs/src/reference/cpp/index.md +++ b/docs/src/reference/cpp/index.md @@ -22,6 +22,7 @@ ptfkit's C++ API is organized around C++23 modules. - [`ptfkit.gunarathna2019`](modules/gunarathna2019.md) — Point water-retention regressions for tropical Sri Lankan soils. - [`ptfkit.hodnett2002`](modules/hodnett2002.md) — Hodnett & Tomasella (2002), tropical-soil regressions for four van Genuchten parameters. - [`ptfkit.jabro1992`](modules/jabro1992.md) — Jabro (1992), United States. +- [`ptfkit.lal1979`](modules/lal1979.md) — Moisture retention and plasticity regressions for two groups of Nigerian soils. - [`ptfkit.li2007`](modules/li2007.md) — Li et al. (2007), Fengqiu County, North China Plain, China. - [`ptfkit.mayr1999`](modules/mayr1999.md) — Mayr and Jarvis (1999) modified Brooks-Corey water-retention parameter PTFs. - [`ptfkit.oosterveld1980`](modules/oosterveld1980.md) — Oosterveld and Chang (1980), soil-moisture retention from texture and depth. diff --git a/docs/src/reference/cpp/modules/lal1979.md b/docs/src/reference/cpp/modules/lal1979.md new file mode 100644 index 0000000..5f0cf42 --- /dev/null +++ b/docs/src/reference/cpp/modules/lal1979.md @@ -0,0 +1,975 @@ +--- +# @generated by ptfkit-codegen; DO NOT EDIT. + +title: C++ module ptfkit.lal1979 +nav-title: ptfkit.lal1979 +--- + +# `ptfkit.lal1979` + +```cpp +import ptfkit.lal1979; +``` + +**Exported namespace:** `ptfkit::lal1979` + +Moisture retention and plasticity regressions for two groups of Nigerian soils. + +## Source + +Lal, R. (1979). Physical properties and moisture retention characteristics of some Nigerian soils. Geoderma, 21, 209-223. + +[DOI: 10.1016/0016-7061(78)90028-9](https://doi.org/10.1016/0016-7061(78)90028-9) + +## Scope + +**Territory:** Nigeria + +**Dataset:** 119 genetic-horizon samples from 23 profiles in two parent-material groups. + +[PTF catalog page](../../../ptf-catalog/sources/lal1979.md) + +## Functions + +### `calc_ptf_lal1979_group_i_water_0bar_from_clay` {#function-calc_ptf_lal1979_group_i_water_0bar_from_clay} + +Estimate gravimetric moisture retention at saturation for Group I. + +```cpp +[[nodiscard]] +inline double calc_ptf_lal1979_group_i_water_0bar_from_clay(double clay) +``` + +#### Parameters + +| Name | Description | +| --- | --- | +| `clay` | Clay smaller than 0.002 mm; percentage of the fine earth. Full calibration bounds are not reported. (%) | + +#### Returns + +Gravimetric moisture retention at saturation expressed per unit dry soil mass. (g g⁻¹) + +!!! note + + Table IV, Group I, clay predictor, water_0bar response. + +### `calc_ptf_lal1979_group_i_water_0bar_from_sand` {#function-calc_ptf_lal1979_group_i_water_0bar_from_sand} + +Estimate gravimetric moisture retention at saturation for Group I. + +```cpp +[[nodiscard]] +inline double calc_ptf_lal1979_group_i_water_0bar_from_sand(double sand) +``` + +#### Parameters + +| Name | Description | +| --- | --- | +| `sand` | Sand from 0.02 to 2 mm; percentage of the fine earth. Full calibration bounds are not reported. (%) | + +#### Returns + +Gravimetric moisture retention at saturation expressed per unit dry soil mass. (g g⁻¹) + +!!! note + + Table IV, Group I, sand predictor, water_0bar response. + +### `calc_ptf_lal1979_group_ii_water_0bar_from_clay` {#function-calc_ptf_lal1979_group_ii_water_0bar_from_clay} + +Estimate gravimetric moisture retention at saturation for Group II. + +```cpp +[[nodiscard]] +inline double calc_ptf_lal1979_group_ii_water_0bar_from_clay(double clay) +``` + +#### Parameters + +| Name | Description | +| --- | --- | +| `clay` | Clay smaller than 0.002 mm; percentage of the fine earth. Full calibration bounds are not reported. (%) | + +#### Returns + +Gravimetric moisture retention at saturation expressed per unit dry soil mass. (g g⁻¹) + +!!! note + + Table IV, Group II, clay predictor, water_0bar response. + +### `calc_ptf_lal1979_group_ii_water_0bar_from_sand` {#function-calc_ptf_lal1979_group_ii_water_0bar_from_sand} + +Estimate gravimetric moisture retention at saturation for Group II. + +```cpp +[[nodiscard]] +inline double calc_ptf_lal1979_group_ii_water_0bar_from_sand(double sand) +``` + +#### Parameters + +| Name | Description | +| --- | --- | +| `sand` | Sand from 0.02 to 2 mm; percentage of the fine earth. Full calibration bounds are not reported. (%) | + +#### Returns + +Gravimetric moisture retention at saturation expressed per unit dry soil mass. (g g⁻¹) + +!!! note + + Table IV, Group II, sand predictor, water_0bar response. + +### `calc_ptf_lal1979_group_i_water_01bar_from_clay` {#function-calc_ptf_lal1979_group_i_water_01bar_from_clay} + +Estimate gravimetric moisture retention at 0.1 bar suction for Group I. + +```cpp +[[nodiscard]] +inline double calc_ptf_lal1979_group_i_water_01bar_from_clay(double clay) +``` + +#### Parameters + +| Name | Description | +| --- | --- | +| `clay` | Clay smaller than 0.002 mm; percentage of the fine earth. Full calibration bounds are not reported. (%) | + +#### Returns + +Gravimetric moisture retention at 0.1 bar suction expressed per unit dry soil mass. (g g⁻¹) + +!!! note + + Table V, Group I, clay predictor, water_01bar response. + +### `calc_ptf_lal1979_group_i_water_03bar_from_clay` {#function-calc_ptf_lal1979_group_i_water_03bar_from_clay} + +Estimate gravimetric moisture retention at 0.3 bar suction for Group I. + +```cpp +[[nodiscard]] +inline double calc_ptf_lal1979_group_i_water_03bar_from_clay(double clay) +``` + +#### Parameters + +| Name | Description | +| --- | --- | +| `clay` | Clay smaller than 0.002 mm; percentage of the fine earth. Full calibration bounds are not reported. (%) | + +#### Returns + +Gravimetric moisture retention at 0.3 bar suction expressed per unit dry soil mass. (g g⁻¹) + +!!! note + + Table V, Group I, clay predictor, water_03bar response. + +### `calc_ptf_lal1979_group_i_water_01bar_from_sand` {#function-calc_ptf_lal1979_group_i_water_01bar_from_sand} + +Estimate gravimetric moisture retention at 0.1 bar suction for Group I. + +```cpp +[[nodiscard]] +inline double calc_ptf_lal1979_group_i_water_01bar_from_sand(double sand) +``` + +#### Parameters + +| Name | Description | +| --- | --- | +| `sand` | Sand from 0.02 to 2 mm; percentage of the fine earth. Full calibration bounds are not reported. (%) | + +#### Returns + +Gravimetric moisture retention at 0.1 bar suction expressed per unit dry soil mass. (g g⁻¹) + +!!! note + + Table V, Group I, sand predictor, water_01bar response. + +### `calc_ptf_lal1979_group_i_water_03bar_from_sand` {#function-calc_ptf_lal1979_group_i_water_03bar_from_sand} + +Estimate gravimetric moisture retention at 0.3 bar suction for Group I. + +```cpp +[[nodiscard]] +inline double calc_ptf_lal1979_group_i_water_03bar_from_sand(double sand) +``` + +#### Parameters + +| Name | Description | +| --- | --- | +| `sand` | Sand from 0.02 to 2 mm; percentage of the fine earth. Full calibration bounds are not reported. (%) | + +#### Returns + +Gravimetric moisture retention at 0.3 bar suction expressed per unit dry soil mass. (g g⁻¹) + +!!! note + + Table V, Group I, sand predictor, water_03bar response. + +### `calc_ptf_lal1979_group_ii_water_01bar_from_clay` {#function-calc_ptf_lal1979_group_ii_water_01bar_from_clay} + +Estimate gravimetric moisture retention at 0.1 bar suction for Group II. + +```cpp +[[nodiscard]] +inline double calc_ptf_lal1979_group_ii_water_01bar_from_clay(double clay) +``` + +#### Parameters + +| Name | Description | +| --- | --- | +| `clay` | Clay smaller than 0.002 mm; percentage of the fine earth. Full calibration bounds are not reported. (%) | + +#### Returns + +Gravimetric moisture retention at 0.1 bar suction expressed per unit dry soil mass. (g g⁻¹) + +!!! note + + Table V, Group II, clay predictor, water_01bar response. + +### `calc_ptf_lal1979_group_ii_water_03bar_from_clay` {#function-calc_ptf_lal1979_group_ii_water_03bar_from_clay} + +Estimate gravimetric moisture retention at 0.3 bar suction for Group II. + +```cpp +[[nodiscard]] +inline double calc_ptf_lal1979_group_ii_water_03bar_from_clay(double clay) +``` + +#### Parameters + +| Name | Description | +| --- | --- | +| `clay` | Clay smaller than 0.002 mm; percentage of the fine earth. Full calibration bounds are not reported. (%) | + +#### Returns + +Gravimetric moisture retention at 0.3 bar suction expressed per unit dry soil mass. (g g⁻¹) + +!!! note + + Table V, Group II, clay predictor, water_03bar response. + +### `calc_ptf_lal1979_group_ii_water_01bar_from_sand` {#function-calc_ptf_lal1979_group_ii_water_01bar_from_sand} + +Estimate gravimetric moisture retention at 0.1 bar suction for Group II. + +```cpp +[[nodiscard]] +inline double calc_ptf_lal1979_group_ii_water_01bar_from_sand(double sand) +``` + +#### Parameters + +| Name | Description | +| --- | --- | +| `sand` | Sand from 0.02 to 2 mm; percentage of the fine earth. Full calibration bounds are not reported. (%) | + +#### Returns + +Gravimetric moisture retention at 0.1 bar suction expressed per unit dry soil mass. (g g⁻¹) + +!!! note + + Table V, Group II, sand predictor, water_01bar response. + +### `calc_ptf_lal1979_group_ii_water_03bar_from_sand` {#function-calc_ptf_lal1979_group_ii_water_03bar_from_sand} + +Estimate gravimetric moisture retention at 0.3 bar suction for Group II. + +```cpp +[[nodiscard]] +inline double calc_ptf_lal1979_group_ii_water_03bar_from_sand(double sand) +``` + +#### Parameters + +| Name | Description | +| --- | --- | +| `sand` | Sand from 0.02 to 2 mm; percentage of the fine earth. Full calibration bounds are not reported. (%) | + +#### Returns + +Gravimetric moisture retention at 0.3 bar suction expressed per unit dry soil mass. (g g⁻¹) + +!!! note + + Table V, Group II, sand predictor, water_03bar response. + +### `calc_ptf_lal1979_group_i_water_15bar_from_clay` {#function-calc_ptf_lal1979_group_i_water_15bar_from_clay} + +Estimate gravimetric moisture retention at 15 bar suction for Group I. + +```cpp +[[nodiscard]] +inline double calc_ptf_lal1979_group_i_water_15bar_from_clay(double clay) +``` + +#### Parameters + +| Name | Description | +| --- | --- | +| `clay` | Clay smaller than 0.002 mm; percentage of the fine earth. Full calibration bounds are not reported. (%) | + +#### Returns + +Gravimetric moisture retention at 15 bar suction expressed per unit dry soil mass. (g g⁻¹) + +!!! note + + Table VI, Group I, clay predictor, water_15bar response. + +### `calc_ptf_lal1979_group_i_water_15bar_from_sand` {#function-calc_ptf_lal1979_group_i_water_15bar_from_sand} + +Estimate gravimetric moisture retention at 15 bar suction for Group I. + +```cpp +[[nodiscard]] +inline double calc_ptf_lal1979_group_i_water_15bar_from_sand(double sand) +``` + +#### Parameters + +| Name | Description | +| --- | --- | +| `sand` | Sand from 0.02 to 2 mm; percentage of the fine earth. Full calibration bounds are not reported. (%) | + +#### Returns + +Gravimetric moisture retention at 15 bar suction expressed per unit dry soil mass. (g g⁻¹) + +!!! note + + Table VI, Group I, sand predictor, water_15bar response. + +### `calc_ptf_lal1979_group_i_water_15bar_from_silt` {#function-calc_ptf_lal1979_group_i_water_15bar_from_silt} + +Estimate gravimetric moisture retention at 15 bar suction for Group I. + +```cpp +[[nodiscard]] +inline double calc_ptf_lal1979_group_i_water_15bar_from_silt(double silt) +``` + +#### Parameters + +| Name | Description | +| --- | --- | +| `silt` | Silt from 0.002 to 0.02 mm; percentage of the fine earth. Full calibration bounds are not reported. (%) | + +#### Returns + +Gravimetric moisture retention at 15 bar suction expressed per unit dry soil mass. (g g⁻¹) + +!!! note + + Table VI, Group I, silt predictor, water_15bar response. + +### `calc_ptf_lal1979_group_ii_water_15bar_from_clay` {#function-calc_ptf_lal1979_group_ii_water_15bar_from_clay} + +Estimate gravimetric moisture retention at 15 bar suction for Group II. + +```cpp +[[nodiscard]] +inline double calc_ptf_lal1979_group_ii_water_15bar_from_clay(double clay) +``` + +#### Parameters + +| Name | Description | +| --- | --- | +| `clay` | Clay smaller than 0.002 mm; percentage of the fine earth. Full calibration bounds are not reported. (%) | + +#### Returns + +Gravimetric moisture retention at 15 bar suction expressed per unit dry soil mass. (g g⁻¹) + +!!! note + + Table VI, Group II, clay predictor, water_15bar response. + +### `calc_ptf_lal1979_group_ii_water_15bar_from_sand` {#function-calc_ptf_lal1979_group_ii_water_15bar_from_sand} + +Estimate gravimetric moisture retention at 15 bar suction for Group II. + +```cpp +[[nodiscard]] +inline double calc_ptf_lal1979_group_ii_water_15bar_from_sand(double sand) +``` + +#### Parameters + +| Name | Description | +| --- | --- | +| `sand` | Sand from 0.02 to 2 mm; percentage of the fine earth. Full calibration bounds are not reported. (%) | + +#### Returns + +Gravimetric moisture retention at 15 bar suction expressed per unit dry soil mass. (g g⁻¹) + +!!! note + + Table VI, Group II, sand predictor, water_15bar response. + +### `calc_ptf_lal1979_group_i_moisture_equivalent_from_clay` {#function-calc_ptf_lal1979_group_i_moisture_equivalent_from_clay} + +Estimate gravimetric moisture equivalent measured at 1000 times gravity for Group I. + +```cpp +[[nodiscard]] +inline double calc_ptf_lal1979_group_i_moisture_equivalent_from_clay(double clay) +``` + +#### Parameters + +| Name | Description | +| --- | --- | +| `clay` | Clay smaller than 0.002 mm; percentage of the fine earth. Full calibration bounds are not reported. (%) | + +#### Returns + +Gravimetric moisture equivalent measured at 1000 times gravity expressed per unit dry soil mass. (g g⁻¹) + +!!! note + + Table VII, Group I, clay predictor, moisture_equivalent response. + +### `calc_ptf_lal1979_group_i_moisture_equivalent_from_sand` {#function-calc_ptf_lal1979_group_i_moisture_equivalent_from_sand} + +Estimate gravimetric moisture equivalent measured at 1000 times gravity for Group I. + +```cpp +[[nodiscard]] +inline double calc_ptf_lal1979_group_i_moisture_equivalent_from_sand(double sand) +``` + +#### Parameters + +| Name | Description | +| --- | --- | +| `sand` | Sand from 0.02 to 2 mm; percentage of the fine earth. Full calibration bounds are not reported. (%) | + +#### Returns + +Gravimetric moisture equivalent measured at 1000 times gravity expressed per unit dry soil mass. (g g⁻¹) + +!!! note + + Table VII, Group I, sand predictor, moisture_equivalent response. + +### `calc_ptf_lal1979_group_ii_moisture_equivalent_from_clay` {#function-calc_ptf_lal1979_group_ii_moisture_equivalent_from_clay} + +Estimate gravimetric moisture equivalent measured at 1000 times gravity for Group II. + +```cpp +[[nodiscard]] +inline double calc_ptf_lal1979_group_ii_moisture_equivalent_from_clay(double clay) +``` + +#### Parameters + +| Name | Description | +| --- | --- | +| `clay` | Clay smaller than 0.002 mm; percentage of the fine earth. Full calibration bounds are not reported. (%) | + +#### Returns + +Gravimetric moisture equivalent measured at 1000 times gravity expressed per unit dry soil mass. (g g⁻¹) + +!!! note + + Table VII, Group II, clay predictor, moisture_equivalent response. + +### `calc_ptf_lal1979_group_ii_moisture_equivalent_from_sand` {#function-calc_ptf_lal1979_group_ii_moisture_equivalent_from_sand} + +Estimate gravimetric moisture equivalent measured at 1000 times gravity for Group II. + +```cpp +[[nodiscard]] +inline double calc_ptf_lal1979_group_ii_moisture_equivalent_from_sand(double sand) +``` + +#### Parameters + +| Name | Description | +| --- | --- | +| `sand` | Sand from 0.02 to 2 mm; percentage of the fine earth. Full calibration bounds are not reported. (%) | + +#### Returns + +Gravimetric moisture equivalent measured at 1000 times gravity expressed per unit dry soil mass. (g g⁻¹) + +!!! note + + Table VII, Group II, sand predictor, moisture_equivalent response. + +### `calc_ptf_lal1979_group_ii_moisture_equivalent_from_silt` {#function-calc_ptf_lal1979_group_ii_moisture_equivalent_from_silt} + +Estimate gravimetric moisture equivalent measured at 1000 times gravity for Group II. + +```cpp +[[nodiscard]] +inline double calc_ptf_lal1979_group_ii_moisture_equivalent_from_silt(double silt) +``` + +#### Parameters + +| Name | Description | +| --- | --- | +| `silt` | Silt from 0.002 to 0.02 mm; percentage of the fine earth. Full calibration bounds are not reported. (%) | + +#### Returns + +Gravimetric moisture equivalent measured at 1000 times gravity expressed per unit dry soil mass. (g g⁻¹) + +!!! note + + Table VII, Group II, silt predictor, moisture_equivalent response. + +### `calc_ptf_lal1979_group_ii_water_03bar_from_water_01bar` {#function-calc_ptf_lal1979_group_ii_water_03bar_from_water_01bar} + +Estimate gravimetric moisture retention at 0.3 bar suction for Group II. + +```cpp +[[nodiscard]] +inline double calc_ptf_lal1979_group_ii_water_03bar_from_water_01bar(double water_01bar) +``` + +#### Parameters + +| Name | Description | +| --- | --- | +| `water_01bar` | Gravimetric moisture retention at 0.1 bar suction on disturbed soil. (g/g) | + +#### Returns + +Gravimetric moisture retention at 0.3 bar suction expressed per unit dry soil mass. (g g⁻¹) + +!!! note + + Table VIII, Group II, water_01bar predictor, water_03bar response. + +### `calc_ptf_lal1979_group_ii_water_15bar_from_water_01bar` {#function-calc_ptf_lal1979_group_ii_water_15bar_from_water_01bar} + +Estimate gravimetric moisture retention at 15 bar suction for Group II. + +```cpp +[[nodiscard]] +inline double calc_ptf_lal1979_group_ii_water_15bar_from_water_01bar(double water_01bar) +``` + +#### Parameters + +| Name | Description | +| --- | --- | +| `water_01bar` | Gravimetric moisture retention at 0.1 bar suction on disturbed soil. (g/g) | + +#### Returns + +Gravimetric moisture retention at 15 bar suction expressed per unit dry soil mass. (g g⁻¹) + +!!! note + + Table VIII, Group II, water_01bar predictor, water_15bar response. + +### `calc_ptf_lal1979_group_i_upper_plastic_limit_from_organic_carbon` {#function-calc_ptf_lal1979_group_i_upper_plastic_limit_from_organic_carbon} + +Estimate upper plastic limit for Group I. + +```cpp +[[nodiscard]] +inline double calc_ptf_lal1979_group_i_upper_plastic_limit_from_organic_carbon(double organic_carbon) +``` + +#### Parameters + +| Name | Description | +| --- | --- | +| `organic_carbon` | Organic carbon measured by Walkley and Black wet combustion; percentage of the fine earth. Full calibration bounds are not reported. (%) | + +#### Returns + +Upper plastic limit expressed as percentage of oven-dry soil mass. (%) + +!!! note + + Table IX, Group I, organic_carbon predictor, upper_plastic_limit response. + +### `calc_ptf_lal1979_group_i_lower_plastic_limit_from_organic_carbon` {#function-calc_ptf_lal1979_group_i_lower_plastic_limit_from_organic_carbon} + +Estimate lower plastic limit for Group I. + +```cpp +[[nodiscard]] +inline double calc_ptf_lal1979_group_i_lower_plastic_limit_from_organic_carbon(double organic_carbon) +``` + +#### Parameters + +| Name | Description | +| --- | --- | +| `organic_carbon` | Organic carbon measured by Walkley and Black wet combustion; percentage of the fine earth. Full calibration bounds are not reported. (%) | + +#### Returns + +Lower plastic limit expressed as percentage of oven-dry soil mass. (%) + +!!! note + + Table IX, Group I, organic_carbon predictor, lower_plastic_limit response. + +### `calc_ptf_lal1979_group_i_plasticity_index_from_organic_carbon` {#function-calc_ptf_lal1979_group_i_plasticity_index_from_organic_carbon} + +Estimate plasticity index (upper minus lower plastic limit) for Group I. + +```cpp +[[nodiscard]] +inline double calc_ptf_lal1979_group_i_plasticity_index_from_organic_carbon(double organic_carbon) +``` + +#### Parameters + +| Name | Description | +| --- | --- | +| `organic_carbon` | Organic carbon measured by Walkley and Black wet combustion; percentage of the fine earth. Full calibration bounds are not reported. (%) | + +#### Returns + +Plasticity index (upper minus lower plastic limit) expressed as percentage of oven-dry soil mass. (%) + +!!! note + + Table IX, Group I, organic_carbon predictor, plasticity_index response. + +### `calc_ptf_lal1979_group_i_upper_plastic_limit_from_clay` {#function-calc_ptf_lal1979_group_i_upper_plastic_limit_from_clay} + +Estimate upper plastic limit for Group I. + +```cpp +[[nodiscard]] +inline double calc_ptf_lal1979_group_i_upper_plastic_limit_from_clay(double clay) +``` + +#### Parameters + +| Name | Description | +| --- | --- | +| `clay` | Clay smaller than 0.002 mm; percentage of the fine earth. Full calibration bounds are not reported. (%) | + +#### Returns + +Upper plastic limit expressed as percentage of oven-dry soil mass. (%) + +!!! note + + Table IX, Group I, clay predictor, upper_plastic_limit response. + +### `calc_ptf_lal1979_group_i_lower_plastic_limit_from_clay` {#function-calc_ptf_lal1979_group_i_lower_plastic_limit_from_clay} + +Estimate lower plastic limit for Group I. + +```cpp +[[nodiscard]] +inline double calc_ptf_lal1979_group_i_lower_plastic_limit_from_clay(double clay) +``` + +#### Parameters + +| Name | Description | +| --- | --- | +| `clay` | Clay smaller than 0.002 mm; percentage of the fine earth. Full calibration bounds are not reported. (%) | + +#### Returns + +Lower plastic limit expressed as percentage of oven-dry soil mass. (%) + +!!! note + + Table IX, Group I, clay predictor, lower_plastic_limit response. + +### `calc_ptf_lal1979_group_i_plasticity_index_from_clay` {#function-calc_ptf_lal1979_group_i_plasticity_index_from_clay} + +Estimate plasticity index (upper minus lower plastic limit) for Group I. + +```cpp +[[nodiscard]] +inline double calc_ptf_lal1979_group_i_plasticity_index_from_clay(double clay) +``` + +#### Parameters + +| Name | Description | +| --- | --- | +| `clay` | Clay smaller than 0.002 mm; percentage of the fine earth. Full calibration bounds are not reported. (%) | + +#### Returns + +Plasticity index (upper minus lower plastic limit) expressed as percentage of oven-dry soil mass. (%) + +!!! note + + Table IX, Group I, clay predictor, plasticity_index response. + +### `calc_ptf_lal1979_group_i_lower_plastic_limit_from_sand` {#function-calc_ptf_lal1979_group_i_lower_plastic_limit_from_sand} + +Estimate lower plastic limit for Group I. + +```cpp +[[nodiscard]] +inline double calc_ptf_lal1979_group_i_lower_plastic_limit_from_sand(double sand) +``` + +#### Parameters + +| Name | Description | +| --- | --- | +| `sand` | Sand from 0.02 to 2 mm; percentage of the fine earth. Full calibration bounds are not reported. (%) | + +#### Returns + +Lower plastic limit expressed as percentage of oven-dry soil mass. (%) + +!!! note + + Table IX, Group I, sand predictor, lower_plastic_limit response. + +### `calc_ptf_lal1979_group_i_plasticity_index_from_sand` {#function-calc_ptf_lal1979_group_i_plasticity_index_from_sand} + +Estimate plasticity index (upper minus lower plastic limit) for Group I. + +```cpp +[[nodiscard]] +inline double calc_ptf_lal1979_group_i_plasticity_index_from_sand(double sand) +``` + +#### Parameters + +| Name | Description | +| --- | --- | +| `sand` | Sand from 0.02 to 2 mm; percentage of the fine earth. Full calibration bounds are not reported. (%) | + +#### Returns + +Plasticity index (upper minus lower plastic limit) expressed as percentage of oven-dry soil mass. (%) + +!!! note + + Table IX, Group I, sand predictor, plasticity_index response. + +### `calc_ptf_lal1979_group_ii_upper_plastic_limit_from_organic_carbon` {#function-calc_ptf_lal1979_group_ii_upper_plastic_limit_from_organic_carbon} + +Estimate upper plastic limit for Group II. + +```cpp +[[nodiscard]] +inline double calc_ptf_lal1979_group_ii_upper_plastic_limit_from_organic_carbon(double organic_carbon) +``` + +#### Parameters + +| Name | Description | +| --- | --- | +| `organic_carbon` | Organic carbon measured by Walkley and Black wet combustion; percentage of the fine earth. Full calibration bounds are not reported. (%) | + +#### Returns + +Upper plastic limit expressed as percentage of oven-dry soil mass. (%) + +!!! note + + Table IX, Group II, organic_carbon predictor, upper_plastic_limit response. + +### `calc_ptf_lal1979_group_ii_plasticity_index_from_organic_carbon` {#function-calc_ptf_lal1979_group_ii_plasticity_index_from_organic_carbon} + +Estimate plasticity index (upper minus lower plastic limit) for Group II. + +```cpp +[[nodiscard]] +inline double calc_ptf_lal1979_group_ii_plasticity_index_from_organic_carbon(double organic_carbon) +``` + +#### Parameters + +| Name | Description | +| --- | --- | +| `organic_carbon` | Organic carbon measured by Walkley and Black wet combustion; percentage of the fine earth. Full calibration bounds are not reported. (%) | + +#### Returns + +Plasticity index (upper minus lower plastic limit) expressed as percentage of oven-dry soil mass. (%) + +!!! note + + Table IX, Group II, organic_carbon predictor, plasticity_index response. + +### `calc_ptf_lal1979_group_ii_upper_plastic_limit_from_clay` {#function-calc_ptf_lal1979_group_ii_upper_plastic_limit_from_clay} + +Estimate upper plastic limit for Group II. + +```cpp +[[nodiscard]] +inline double calc_ptf_lal1979_group_ii_upper_plastic_limit_from_clay(double clay) +``` + +#### Parameters + +| Name | Description | +| --- | --- | +| `clay` | Clay smaller than 0.002 mm; percentage of the fine earth. Full calibration bounds are not reported. (%) | + +#### Returns + +Upper plastic limit expressed as percentage of oven-dry soil mass. (%) + +!!! note + + Table IX, Group II, clay predictor, upper_plastic_limit response. + +### `calc_ptf_lal1979_group_ii_lower_plastic_limit_from_clay` {#function-calc_ptf_lal1979_group_ii_lower_plastic_limit_from_clay} + +Estimate lower plastic limit for Group II. + +```cpp +[[nodiscard]] +inline double calc_ptf_lal1979_group_ii_lower_plastic_limit_from_clay(double clay) +``` + +#### Parameters + +| Name | Description | +| --- | --- | +| `clay` | Clay smaller than 0.002 mm; percentage of the fine earth. Full calibration bounds are not reported. (%) | + +#### Returns + +Lower plastic limit expressed as percentage of oven-dry soil mass. (%) + +!!! note + + Table IX, Group II, clay predictor, lower_plastic_limit response. + +### `calc_ptf_lal1979_group_ii_upper_plastic_limit_from_sand` {#function-calc_ptf_lal1979_group_ii_upper_plastic_limit_from_sand} + +Estimate upper plastic limit for Group II. + +```cpp +[[nodiscard]] +inline double calc_ptf_lal1979_group_ii_upper_plastic_limit_from_sand(double sand) +``` + +#### Parameters + +| Name | Description | +| --- | --- | +| `sand` | Sand from 0.02 to 2 mm; percentage of the fine earth. Full calibration bounds are not reported. (%) | + +#### Returns + +Upper plastic limit expressed as percentage of oven-dry soil mass. (%) + +!!! note + + Table IX, Group II, sand predictor, upper_plastic_limit response. + +### `calc_ptf_lal1979_group_ii_lower_plastic_limit_from_sand` {#function-calc_ptf_lal1979_group_ii_lower_plastic_limit_from_sand} + +Estimate lower plastic limit for Group II. + +```cpp +[[nodiscard]] +inline double calc_ptf_lal1979_group_ii_lower_plastic_limit_from_sand(double sand) +``` + +#### Parameters + +| Name | Description | +| --- | --- | +| `sand` | Sand from 0.02 to 2 mm; percentage of the fine earth. Full calibration bounds are not reported. (%) | + +#### Returns + +Lower plastic limit expressed as percentage of oven-dry soil mass. (%) + +!!! note + + Table IX, Group II, sand predictor, lower_plastic_limit response. + +### `calc_ptf_lal1979_group_ii_upper_plastic_limit_from_silt` {#function-calc_ptf_lal1979_group_ii_upper_plastic_limit_from_silt} + +Estimate upper plastic limit for Group II. + +```cpp +[[nodiscard]] +inline double calc_ptf_lal1979_group_ii_upper_plastic_limit_from_silt(double silt) +``` + +#### Parameters + +| Name | Description | +| --- | --- | +| `silt` | Silt from 0.002 to 0.02 mm; percentage of the fine earth. Full calibration bounds are not reported. (%) | + +#### Returns + +Upper plastic limit expressed as percentage of oven-dry soil mass. (%) + +!!! note + + Table IX, Group II, silt predictor, upper_plastic_limit response. + +### `calc_ptf_lal1979_group_ii_lower_plastic_limit_from_silt` {#function-calc_ptf_lal1979_group_ii_lower_plastic_limit_from_silt} + +Estimate lower plastic limit for Group II. + +```cpp +[[nodiscard]] +inline double calc_ptf_lal1979_group_ii_lower_plastic_limit_from_silt(double silt) +``` + +#### Parameters + +| Name | Description | +| --- | --- | +| `silt` | Silt from 0.002 to 0.02 mm; percentage of the fine earth. Full calibration bounds are not reported. (%) | + +#### Returns + +Lower plastic limit expressed as percentage of oven-dry soil mass. (%) + +!!! note + + Table IX, Group II, silt predictor, lower_plastic_limit response. + +### `calc_ptf_lal1979_group_ii_plasticity_index_from_silt` {#function-calc_ptf_lal1979_group_ii_plasticity_index_from_silt} + +Estimate plasticity index (upper minus lower plastic limit) for Group II. + +```cpp +[[nodiscard]] +inline double calc_ptf_lal1979_group_ii_plasticity_index_from_silt(double silt) +``` + +#### Parameters + +| Name | Description | +| --- | --- | +| `silt` | Silt from 0.002 to 0.02 mm; percentage of the fine earth. Full calibration bounds are not reported. (%) | + +#### Returns + +Plasticity index (upper minus lower plastic limit) expressed as percentage of oven-dry soil mass. (%) + +!!! note + + Table IX, Group II, silt predictor, plasticity_index response. diff --git a/docs/src/reference/cpp/modules/ptfkit.md b/docs/src/reference/cpp/modules/ptfkit.md index 2827c69..6db4a9a 100644 --- a/docs/src/reference/cpp/modules/ptfkit.md +++ b/docs/src/reference/cpp/modules/ptfkit.md @@ -26,6 +26,7 @@ This umbrella module re-exports every public ptfkit source module. Import an ind - [`ptfkit.gunarathna2019`](gunarathna2019.md) — Point water-retention regressions for tropical Sri Lankan soils. - [`ptfkit.hodnett2002`](hodnett2002.md) — Hodnett & Tomasella (2002), tropical-soil regressions for four van Genuchten parameters. - [`ptfkit.jabro1992`](jabro1992.md) — Jabro (1992), United States. +- [`ptfkit.lal1979`](lal1979.md) — Moisture retention and plasticity regressions for two groups of Nigerian soils. - [`ptfkit.li2007`](li2007.md) — Li et al. (2007), Fengqiu County, North China Plain, China. - [`ptfkit.mayr1999`](mayr1999.md) — Mayr and Jarvis (1999) modified Brooks-Corey water-retention parameter PTFs. - [`ptfkit.oosterveld1980`](oosterveld1980.md) — Oosterveld and Chang (1980), soil-moisture retention from texture and depth. diff --git a/docs/src/reference/python/index.md b/docs/src/reference/python/index.md index e5fb401..75f5340 100644 --- a/docs/src/reference/python/index.md +++ b/docs/src/reference/python/index.md @@ -21,6 +21,7 @@ ptfkit's Python API is organized around public source modules. - [`ptfkit.gunarathna2019`](gunarathna2019.md) — Point water-retention regressions for tropical Sri Lankan soils. - [`ptfkit.hodnett2002`](hodnett2002.md) — Hodnett & Tomasella (2002), tropical-soil regressions for four van Genuchten parameters. - [`ptfkit.jabro1992`](jabro1992.md) — Jabro (1992), United States. +- [`ptfkit.lal1979`](lal1979.md) — Moisture retention and plasticity regressions for two groups of Nigerian soils. - [`ptfkit.li2007`](li2007.md) — Li et al. (2007), Fengqiu County, North China Plain, China. - [`ptfkit.mayr1999`](mayr1999.md) — Mayr and Jarvis (1999) modified Brooks-Corey water-retention parameter PTFs. - [`ptfkit.oosterveld1980`](oosterveld1980.md) — Oosterveld and Chang (1980), soil-moisture retention from texture and depth. diff --git a/docs/src/reference/python/lal1979.md b/docs/src/reference/python/lal1979.md new file mode 100644 index 0000000..9998e5d --- /dev/null +++ b/docs/src/reference/python/lal1979.md @@ -0,0 +1,8 @@ +--- +# @generated by ptfkit-codegen; DO NOT EDIT. + +title: Python module ptfkit.lal1979 +nav-title: ptfkit.lal1979 +--- + +::: ptfkit.lal1979 diff --git a/specs/functions/lal1979.yaml b/specs/functions/lal1979.yaml new file mode 100644 index 0000000..2cb7682 --- /dev/null +++ b/specs/functions/lal1979.yaml @@ -0,0 +1,721 @@ +source: + summary: "Moisture retention and plasticity regressions for two groups of Nigerian soils." + citation_apa: "Lal, R. (1979). Physical properties and moisture retention characteristics of some Nigerian soils. Geoderma, 21, 209-223." + doi: {"identifier": "10.1016/0016-7061(78)90028-9", "url": "https://doi.org/10.1016/0016-7061(78)90028-9"} +scope: + territory: Nigeria + dataset: 119 genetic-horizon samples from 23 profiles in two parent-material groups. +$defs: + clay: {"name": "clay", "symbol": null, "unit": "%", "domain": null, "description": "Clay smaller than 0.002 mm; percentage of the fine earth. Full calibration bounds are not reported."} + sand: {"name": "sand", "symbol": null, "unit": "%", "domain": null, "description": "Sand from 0.02 to 2 mm; percentage of the fine earth. Full calibration bounds are not reported."} + silt: {"name": "silt", "symbol": null, "unit": "%", "domain": null, "description": "Silt from 0.002 to 0.02 mm; percentage of the fine earth. Full calibration bounds are not reported."} + organic_carbon: {"name": "organic_carbon", "symbol": null, "unit": "%", "domain": null, "description": "Organic carbon measured by Walkley and Black wet combustion; percentage of the fine earth. Full calibration bounds are not reported."} + water_0bar: {"name": "water_0bar", "symbol": null, "unit": "g/g", "domain": null, "description": "Gravimetric moisture retention at 0 bar suction on disturbed soil."} + water_01bar: {"name": "water_01bar", "symbol": null, "unit": "g/g", "domain": null, "description": "Gravimetric moisture retention at 0.1 bar suction on disturbed soil."} +functions: + - name: calc_ptf_lal1979_group_i_water_0bar_from_clay + status: "ready-for-implementation" + public_api: {"name": "calc_ptf_lal1979_group_i_water_0bar_from_clay", "result_class": null, "summary": "Estimate gravimetric moisture retention at saturation for Group I."} + scope: {"territory": "Group I: 11 well-drained upland profiles in western Nigeria developed over pre-Cambrian basement complex rocks, mainly biotite-muscovite paragneisses.", "prediction_target": "Gravimetric moisture retention at saturation", "models": {"h_theta": null, "k_h": null}} + inputs: [{"$ref": "#/$defs/clay"}] + outputs: {"type": "scalar", "name": "water_0bar", "quantity": "gravimetric_water_content", "symbol": null, "unit": "mass_fraction", "reported_unit": "g g⁻¹", "domain": null, "description": "Gravimetric moisture retention at saturation expressed per unit dry soil mass."} + verification_cases: + - {"id": "published_predictor_mean", "kind": "calculated", "inputs": {"clay": 19}, "expected": {"water_0bar": 0.365}, "rationale": "Table II surface horizon mean for Group I; the accompanying sand, silt and clay means sum to 100%. Only the stated predictor is used. Expected value calculated with Python decimal arithmetic from the printed slope and intercept; not an observed prediction or evidence of model accuracy."} + edge_cases: [] + documentation: {"notes": ["Table IV, Group I, clay predictor, water_0bar response."], "warnings": []} + implementation: + variables: + - name: water_0bar + expr: "0.004 * clay + (0.289)" + - name: calc_ptf_lal1979_group_i_water_0bar_from_sand + status: "ready-for-implementation" + public_api: {"name": "calc_ptf_lal1979_group_i_water_0bar_from_sand", "result_class": null, "summary": "Estimate gravimetric moisture retention at saturation for Group I."} + scope: {"territory": "Group I: 11 well-drained upland profiles in western Nigeria developed over pre-Cambrian basement complex rocks, mainly biotite-muscovite paragneisses.", "prediction_target": "Gravimetric moisture retention at saturation", "models": {"h_theta": null, "k_h": null}} + inputs: [{"$ref": "#/$defs/sand"}] + outputs: {"type": "scalar", "name": "water_0bar", "quantity": "gravimetric_water_content", "symbol": null, "unit": "mass_fraction", "reported_unit": "g g⁻¹", "domain": null, "description": "Gravimetric moisture retention at saturation expressed per unit dry soil mass."} + verification_cases: + - {"id": "published_predictor_mean", "kind": "calculated", "inputs": {"sand": 66}, "expected": {"water_0bar": 0.381}, "rationale": "Table II surface horizon mean for Group I; the accompanying sand, silt and clay means sum to 100%. Only the stated predictor is used. Expected value calculated with Python decimal arithmetic from the printed slope and intercept; not an observed prediction or evidence of model accuracy."} + edge_cases: [] + documentation: {"notes": ["Table IV, Group I, sand predictor, water_0bar response."], "warnings": []} + implementation: + variables: + - name: water_0bar + expr: "-0.003 * sand + (0.579)" + - name: calc_ptf_lal1979_group_ii_water_0bar_from_clay + status: "ready-for-implementation" + public_api: {"name": "calc_ptf_lal1979_group_ii_water_0bar_from_clay", "result_class": null, "summary": "Estimate gravimetric moisture retention at saturation for Group II."} + scope: {"territory": "Group II: 12 profiles in Nigeria developed from arenaceous sedimentary rocks, partly Cretaceous and partly Lower Pleistocene.", "prediction_target": "Gravimetric moisture retention at saturation", "models": {"h_theta": null, "k_h": null}} + inputs: [{"$ref": "#/$defs/clay"}] + outputs: {"type": "scalar", "name": "water_0bar", "quantity": "gravimetric_water_content", "symbol": null, "unit": "mass_fraction", "reported_unit": "g g⁻¹", "domain": null, "description": "Gravimetric moisture retention at saturation expressed per unit dry soil mass."} + verification_cases: + - {"id": "published_predictor_mean", "kind": "calculated", "inputs": {"clay": 38}, "expected": {"water_0bar": 0.448}, "rationale": "Table II B2t horizon mean for Group II; the accompanying sand, silt and clay means sum to 100%. Only the stated predictor is used. Expected value calculated with Python decimal arithmetic from the printed slope and intercept; not an observed prediction or evidence of model accuracy."} + edge_cases: [] + documentation: {"notes": ["Table IV, Group II, clay predictor, water_0bar response."], "warnings": []} + implementation: + variables: + - name: water_0bar + expr: "0.004 * clay + (0.296)" + - name: calc_ptf_lal1979_group_ii_water_0bar_from_sand + status: "ready-for-implementation" + public_api: {"name": "calc_ptf_lal1979_group_ii_water_0bar_from_sand", "result_class": null, "summary": "Estimate gravimetric moisture retention at saturation for Group II."} + scope: {"territory": "Group II: 12 profiles in Nigeria developed from arenaceous sedimentary rocks, partly Cretaceous and partly Lower Pleistocene.", "prediction_target": "Gravimetric moisture retention at saturation", "models": {"h_theta": null, "k_h": null}} + inputs: [{"$ref": "#/$defs/sand"}] + outputs: {"type": "scalar", "name": "water_0bar", "quantity": "gravimetric_water_content", "symbol": null, "unit": "mass_fraction", "reported_unit": "g g⁻¹", "domain": null, "description": "Gravimetric moisture retention at saturation expressed per unit dry soil mass."} + verification_cases: + - {"id": "published_predictor_mean", "kind": "calculated", "inputs": {"sand": 57}, "expected": {"water_0bar": 0.417}, "rationale": "Table II B2t horizon mean for Group II; the accompanying sand, silt and clay means sum to 100%. Only the stated predictor is used. Expected value calculated with Python decimal arithmetic from the printed slope and intercept; not an observed prediction or evidence of model accuracy."} + edge_cases: [] + documentation: {"notes": ["Table IV, Group II, sand predictor, water_0bar response."], "warnings": []} + implementation: + variables: + - name: water_0bar + expr: "-0.004 * sand + (0.645)" + - name: calc_ptf_lal1979_group_i_water_01bar_from_clay + status: "ready-for-implementation" + public_api: {"name": "calc_ptf_lal1979_group_i_water_01bar_from_clay", "result_class": null, "summary": "Estimate gravimetric moisture retention at 0.1 bar suction for Group I."} + scope: {"territory": "Group I: 11 well-drained upland profiles in western Nigeria developed over pre-Cambrian basement complex rocks, mainly biotite-muscovite paragneisses.", "prediction_target": "Gravimetric moisture retention at 0.1 bar suction", "models": {"h_theta": null, "k_h": null}} + inputs: [{"$ref": "#/$defs/clay"}] + outputs: {"type": "scalar", "name": "water_01bar", "quantity": "gravimetric_water_content", "symbol": null, "unit": "mass_fraction", "reported_unit": "g g⁻¹", "domain": null, "description": "Gravimetric moisture retention at 0.1 bar suction expressed per unit dry soil mass."} + verification_cases: + - {"id": "published_predictor_mean", "kind": "calculated", "inputs": {"clay": 19}, "expected": {"water_01bar": 0.159}, "rationale": "Table II surface horizon mean for Group I; the accompanying sand, silt and clay means sum to 100%. Only the stated predictor is used. Expected value calculated with Python decimal arithmetic from the printed slope and intercept; not an observed prediction or evidence of model accuracy."} + edge_cases: [] + documentation: {"notes": ["Table V, Group I, clay predictor, water_01bar response."], "warnings": []} + implementation: + variables: + - name: water_01bar + expr: "0.003 * clay + (0.102)" + - name: calc_ptf_lal1979_group_i_water_03bar_from_clay + status: "ready-for-implementation" + public_api: {"name": "calc_ptf_lal1979_group_i_water_03bar_from_clay", "result_class": null, "summary": "Estimate gravimetric moisture retention at 0.3 bar suction for Group I."} + scope: {"territory": "Group I: 11 well-drained upland profiles in western Nigeria developed over pre-Cambrian basement complex rocks, mainly biotite-muscovite paragneisses.", "prediction_target": "Gravimetric moisture retention at 0.3 bar suction", "models": {"h_theta": null, "k_h": null}} + inputs: [{"$ref": "#/$defs/clay"}] + outputs: {"type": "scalar", "name": "water_03bar", "quantity": "gravimetric_water_content", "symbol": null, "unit": "mass_fraction", "reported_unit": "g g⁻¹", "domain": null, "description": "Gravimetric moisture retention at 0.3 bar suction expressed per unit dry soil mass."} + verification_cases: + - {"id": "published_predictor_mean", "kind": "calculated", "inputs": {"clay": 19}, "expected": {"water_03bar": 0.141}, "rationale": "Table II surface horizon mean for Group I; the accompanying sand, silt and clay means sum to 100%. Only the stated predictor is used. Expected value calculated with Python decimal arithmetic from the printed slope and intercept; not an observed prediction or evidence of model accuracy."} + edge_cases: [] + documentation: {"notes": ["Table V, Group I, clay predictor, water_03bar response."], "warnings": []} + implementation: + variables: + - name: water_03bar + expr: "0.004 * clay + (0.065)" + - name: calc_ptf_lal1979_group_i_water_01bar_from_sand + status: "ready-for-implementation" + public_api: {"name": "calc_ptf_lal1979_group_i_water_01bar_from_sand", "result_class": null, "summary": "Estimate gravimetric moisture retention at 0.1 bar suction for Group I."} + scope: {"territory": "Group I: 11 well-drained upland profiles in western Nigeria developed over pre-Cambrian basement complex rocks, mainly biotite-muscovite paragneisses.", "prediction_target": "Gravimetric moisture retention at 0.1 bar suction", "models": {"h_theta": null, "k_h": null}} + inputs: [{"$ref": "#/$defs/sand"}] + outputs: {"type": "scalar", "name": "water_01bar", "quantity": "gravimetric_water_content", "symbol": null, "unit": "mass_fraction", "reported_unit": "g g⁻¹", "domain": null, "description": "Gravimetric moisture retention at 0.1 bar suction expressed per unit dry soil mass."} + verification_cases: + - {"id": "published_predictor_mean", "kind": "calculated", "inputs": {"sand": 66}, "expected": {"water_01bar": 0.166}, "rationale": "Table II surface horizon mean for Group I; the accompanying sand, silt and clay means sum to 100%. Only the stated predictor is used. Expected value calculated with Python decimal arithmetic from the printed slope and intercept; not an observed prediction or evidence of model accuracy."} + edge_cases: [] + documentation: {"notes": ["Table V, Group I, sand predictor, water_01bar response."], "warnings": []} + implementation: + variables: + - name: water_01bar + expr: "-0.003 * sand + (0.364)" + - name: calc_ptf_lal1979_group_i_water_03bar_from_sand + status: "ready-for-implementation" + public_api: {"name": "calc_ptf_lal1979_group_i_water_03bar_from_sand", "result_class": null, "summary": "Estimate gravimetric moisture retention at 0.3 bar suction for Group I."} + scope: {"territory": "Group I: 11 well-drained upland profiles in western Nigeria developed over pre-Cambrian basement complex rocks, mainly biotite-muscovite paragneisses.", "prediction_target": "Gravimetric moisture retention at 0.3 bar suction", "models": {"h_theta": null, "k_h": null}} + inputs: [{"$ref": "#/$defs/sand"}] + outputs: {"type": "scalar", "name": "water_03bar", "quantity": "gravimetric_water_content", "symbol": null, "unit": "mass_fraction", "reported_unit": "g g⁻¹", "domain": null, "description": "Gravimetric moisture retention at 0.3 bar suction expressed per unit dry soil mass."} + verification_cases: + - {"id": "published_predictor_mean", "kind": "calculated", "inputs": {"sand": 66}, "expected": {"water_03bar": 0.136}, "rationale": "Table II surface horizon mean for Group I; the accompanying sand, silt and clay means sum to 100%. Only the stated predictor is used. Expected value calculated with Python decimal arithmetic from the printed slope and intercept; not an observed prediction or evidence of model accuracy."} + edge_cases: [] + documentation: {"notes": ["Table V, Group I, sand predictor, water_03bar response."], "warnings": []} + implementation: + variables: + - name: water_03bar + expr: "-0.003 * sand + (0.334)" + - name: calc_ptf_lal1979_group_ii_water_01bar_from_clay + status: "ready-for-implementation" + public_api: {"name": "calc_ptf_lal1979_group_ii_water_01bar_from_clay", "result_class": null, "summary": "Estimate gravimetric moisture retention at 0.1 bar suction for Group II."} + scope: {"territory": "Group II: 12 profiles in Nigeria developed from arenaceous sedimentary rocks, partly Cretaceous and partly Lower Pleistocene.", "prediction_target": "Gravimetric moisture retention at 0.1 bar suction", "models": {"h_theta": null, "k_h": null}} + inputs: [{"$ref": "#/$defs/clay"}] + outputs: {"type": "scalar", "name": "water_01bar", "quantity": "gravimetric_water_content", "symbol": null, "unit": "mass_fraction", "reported_unit": "g g⁻¹", "domain": null, "description": "Gravimetric moisture retention at 0.1 bar suction expressed per unit dry soil mass."} + verification_cases: + - {"id": "published_predictor_mean", "kind": "calculated", "inputs": {"clay": 38}, "expected": {"water_01bar": 0.194}, "rationale": "Table II B2t horizon mean for Group II; the accompanying sand, silt and clay means sum to 100%. Only the stated predictor is used. Expected value calculated with Python decimal arithmetic from the printed slope and intercept; not an observed prediction or evidence of model accuracy."} + edge_cases: [] + documentation: {"notes": ["Table V, Group II, clay predictor, water_01bar response."], "warnings": []} + implementation: + variables: + - name: water_01bar + expr: "0.003 * clay + (0.080)" + - name: calc_ptf_lal1979_group_ii_water_03bar_from_clay + status: "ready-for-implementation" + public_api: {"name": "calc_ptf_lal1979_group_ii_water_03bar_from_clay", "result_class": null, "summary": "Estimate gravimetric moisture retention at 0.3 bar suction for Group II."} + scope: {"territory": "Group II: 12 profiles in Nigeria developed from arenaceous sedimentary rocks, partly Cretaceous and partly Lower Pleistocene.", "prediction_target": "Gravimetric moisture retention at 0.3 bar suction", "models": {"h_theta": null, "k_h": null}} + inputs: [{"$ref": "#/$defs/clay"}] + outputs: {"type": "scalar", "name": "water_03bar", "quantity": "gravimetric_water_content", "symbol": null, "unit": "mass_fraction", "reported_unit": "g g⁻¹", "domain": null, "description": "Gravimetric moisture retention at 0.3 bar suction expressed per unit dry soil mass."} + verification_cases: + - {"id": "published_predictor_mean", "kind": "calculated", "inputs": {"clay": 38}, "expected": {"water_03bar": 0.161}, "rationale": "Table II B2t horizon mean for Group II; the accompanying sand, silt and clay means sum to 100%. Only the stated predictor is used. Expected value calculated with Python decimal arithmetic from the printed slope and intercept; not an observed prediction or evidence of model accuracy."} + edge_cases: [] + documentation: {"notes": ["Table V, Group II, clay predictor, water_03bar response."], "warnings": []} + implementation: + variables: + - name: water_03bar + expr: "0.003 * clay + (0.047)" + - name: calc_ptf_lal1979_group_ii_water_01bar_from_sand + status: "ready-for-implementation" + public_api: {"name": "calc_ptf_lal1979_group_ii_water_01bar_from_sand", "result_class": null, "summary": "Estimate gravimetric moisture retention at 0.1 bar suction for Group II."} + scope: {"territory": "Group II: 12 profiles in Nigeria developed from arenaceous sedimentary rocks, partly Cretaceous and partly Lower Pleistocene.", "prediction_target": "Gravimetric moisture retention at 0.1 bar suction", "models": {"h_theta": null, "k_h": null}} + inputs: [{"$ref": "#/$defs/sand"}] + outputs: {"type": "scalar", "name": "water_01bar", "quantity": "gravimetric_water_content", "symbol": null, "unit": "mass_fraction", "reported_unit": "g g⁻¹", "domain": null, "description": "Gravimetric moisture retention at 0.1 bar suction expressed per unit dry soil mass."} + verification_cases: + - {"id": "published_predictor_mean", "kind": "calculated", "inputs": {"sand": 57}, "expected": {"water_01bar": 0.2065}, "rationale": "Table II B2t horizon mean for Group II; the accompanying sand, silt and clay means sum to 100%. Only the stated predictor is used. Expected value calculated with Python decimal arithmetic from the printed slope and intercept; not an observed prediction or evidence of model accuracy."} + edge_cases: [] + documentation: {"notes": ["Table V, Group II, sand predictor, water_01bar response."], "warnings": []} + implementation: + variables: + - name: water_01bar + expr: "-0.0035 * sand + (0.406)" + - name: calc_ptf_lal1979_group_ii_water_03bar_from_sand + status: "ready-for-implementation" + public_api: {"name": "calc_ptf_lal1979_group_ii_water_03bar_from_sand", "result_class": null, "summary": "Estimate gravimetric moisture retention at 0.3 bar suction for Group II."} + scope: {"territory": "Group II: 12 profiles in Nigeria developed from arenaceous sedimentary rocks, partly Cretaceous and partly Lower Pleistocene.", "prediction_target": "Gravimetric moisture retention at 0.3 bar suction", "models": {"h_theta": null, "k_h": null}} + inputs: [{"$ref": "#/$defs/sand"}] + outputs: {"type": "scalar", "name": "water_03bar", "quantity": "gravimetric_water_content", "symbol": null, "unit": "mass_fraction", "reported_unit": "g g⁻¹", "domain": null, "description": "Gravimetric moisture retention at 0.3 bar suction expressed per unit dry soil mass."} + verification_cases: + - {"id": "published_predictor_mean", "kind": "calculated", "inputs": {"sand": 57}, "expected": {"water_03bar": 0.178}, "rationale": "Table II B2t horizon mean for Group II; the accompanying sand, silt and clay means sum to 100%. Only the stated predictor is used. Expected value calculated with Python decimal arithmetic from the printed slope and intercept; not an observed prediction or evidence of model accuracy."} + edge_cases: [] + documentation: {"notes": ["Table V, Group II, sand predictor, water_03bar response."], "warnings": []} + implementation: + variables: + - name: water_03bar + expr: "-0.003 * sand + (0.349)" + - name: calc_ptf_lal1979_group_i_water_15bar_from_clay + status: "ready-for-implementation" + public_api: {"name": "calc_ptf_lal1979_group_i_water_15bar_from_clay", "result_class": null, "summary": "Estimate gravimetric moisture retention at 15 bar suction for Group I."} + scope: {"territory": "Group I: 11 well-drained upland profiles in western Nigeria developed over pre-Cambrian basement complex rocks, mainly biotite-muscovite paragneisses.", "prediction_target": "Gravimetric moisture retention at 15 bar suction", "models": {"h_theta": null, "k_h": null}} + inputs: [{"$ref": "#/$defs/clay"}] + outputs: {"type": "scalar", "name": "water_15bar", "quantity": "gravimetric_water_content", "symbol": null, "unit": "mass_fraction", "reported_unit": "g g⁻¹", "domain": null, "description": "Gravimetric moisture retention at 15 bar suction expressed per unit dry soil mass."} + verification_cases: + - {"id": "published_predictor_mean", "kind": "calculated", "inputs": {"clay": 19}, "expected": {"water_15bar": 0.063}, "rationale": "Table II surface horizon mean for Group I; the accompanying sand, silt and clay means sum to 100%. Only the stated predictor is used. Expected value calculated with Python decimal arithmetic from the printed slope and intercept; not an observed prediction or evidence of model accuracy."} + edge_cases: [] + documentation: {"notes": ["Table VI, Group I, clay predictor, water_15bar response."], "warnings": []} + implementation: + variables: + - name: water_15bar + expr: "0.003 * clay + (0.006)" + - name: calc_ptf_lal1979_group_i_water_15bar_from_sand + status: "ready-for-implementation" + public_api: {"name": "calc_ptf_lal1979_group_i_water_15bar_from_sand", "result_class": null, "summary": "Estimate gravimetric moisture retention at 15 bar suction for Group I."} + scope: {"territory": "Group I: 11 well-drained upland profiles in western Nigeria developed over pre-Cambrian basement complex rocks, mainly biotite-muscovite paragneisses.", "prediction_target": "Gravimetric moisture retention at 15 bar suction", "models": {"h_theta": null, "k_h": null}} + inputs: [{"$ref": "#/$defs/sand"}] + outputs: {"type": "scalar", "name": "water_15bar", "quantity": "gravimetric_water_content", "symbol": null, "unit": "mass_fraction", "reported_unit": "g g⁻¹", "domain": null, "description": "Gravimetric moisture retention at 15 bar suction expressed per unit dry soil mass."} + verification_cases: + - {"id": "published_predictor_mean", "kind": "calculated", "inputs": {"sand": 66}, "expected": {"water_15bar": 0.049}, "rationale": "Table II surface horizon mean for Group I; the accompanying sand, silt and clay means sum to 100%. Only the stated predictor is used. Expected value calculated with Python decimal arithmetic from the printed slope and intercept; not an observed prediction or evidence of model accuracy."} + edge_cases: [] + documentation: {"notes": ["Table VI, Group I, sand predictor, water_15bar response."], "warnings": []} + implementation: + variables: + - name: water_15bar + expr: "-0.003 * sand + (0.247)" + - name: calc_ptf_lal1979_group_i_water_15bar_from_silt + status: "ready-for-implementation" + public_api: {"name": "calc_ptf_lal1979_group_i_water_15bar_from_silt", "result_class": null, "summary": "Estimate gravimetric moisture retention at 15 bar suction for Group I."} + scope: {"territory": "Group I: 11 well-drained upland profiles in western Nigeria developed over pre-Cambrian basement complex rocks, mainly biotite-muscovite paragneisses.", "prediction_target": "Gravimetric moisture retention at 15 bar suction", "models": {"h_theta": null, "k_h": null}} + inputs: [{"$ref": "#/$defs/silt"}] + outputs: {"type": "scalar", "name": "water_15bar", "quantity": "gravimetric_water_content", "symbol": null, "unit": "mass_fraction", "reported_unit": "g g⁻¹", "domain": null, "description": "Gravimetric moisture retention at 15 bar suction expressed per unit dry soil mass."} + verification_cases: + - {"id": "published_predictor_mean", "kind": "calculated", "inputs": {"silt": 15}, "expected": {"water_15bar": 0.128}, "rationale": "Table II surface horizon mean for Group I; the accompanying sand, silt and clay means sum to 100%. Only the stated predictor is used. Expected value calculated with Python decimal arithmetic from the printed slope and intercept; not an observed prediction or evidence of model accuracy."} + edge_cases: [] + documentation: {"notes": ["Table VI, Group I, silt predictor, water_15bar response."], "warnings": []} + implementation: + variables: + - name: water_15bar + expr: "0.005 * silt + (0.053)" + - name: calc_ptf_lal1979_group_ii_water_15bar_from_clay + status: "ready-for-implementation" + public_api: {"name": "calc_ptf_lal1979_group_ii_water_15bar_from_clay", "result_class": null, "summary": "Estimate gravimetric moisture retention at 15 bar suction for Group II."} + scope: {"territory": "Group II: 12 profiles in Nigeria developed from arenaceous sedimentary rocks, partly Cretaceous and partly Lower Pleistocene.", "prediction_target": "Gravimetric moisture retention at 15 bar suction", "models": {"h_theta": null, "k_h": null}} + inputs: [{"$ref": "#/$defs/clay"}] + outputs: {"type": "scalar", "name": "water_15bar", "quantity": "gravimetric_water_content", "symbol": null, "unit": "mass_fraction", "reported_unit": "g g⁻¹", "domain": null, "description": "Gravimetric moisture retention at 15 bar suction expressed per unit dry soil mass."} + verification_cases: + - {"id": "published_predictor_mean", "kind": "calculated", "inputs": {"clay": 38}, "expected": {"water_15bar": 0.1086}, "rationale": "Table II B2t horizon mean for Group II; the accompanying sand, silt and clay means sum to 100%. Only the stated predictor is used. Expected value calculated with Python decimal arithmetic from the printed slope and intercept; not an observed prediction or evidence of model accuracy."} + edge_cases: [] + documentation: {"notes": ["Table VI, Group II, clay predictor, water_15bar response."], "warnings": []} + implementation: + variables: + - name: water_15bar + expr: "0.0022 * clay + (0.025)" + - name: calc_ptf_lal1979_group_ii_water_15bar_from_sand + status: "ready-for-implementation" + public_api: {"name": "calc_ptf_lal1979_group_ii_water_15bar_from_sand", "result_class": null, "summary": "Estimate gravimetric moisture retention at 15 bar suction for Group II."} + scope: {"territory": "Group II: 12 profiles in Nigeria developed from arenaceous sedimentary rocks, partly Cretaceous and partly Lower Pleistocene.", "prediction_target": "Gravimetric moisture retention at 15 bar suction", "models": {"h_theta": null, "k_h": null}} + inputs: [{"$ref": "#/$defs/sand"}] + outputs: {"type": "scalar", "name": "water_15bar", "quantity": "gravimetric_water_content", "symbol": null, "unit": "mass_fraction", "reported_unit": "g g⁻¹", "domain": null, "description": "Gravimetric moisture retention at 15 bar suction expressed per unit dry soil mass."} + verification_cases: + - {"id": "published_predictor_mean", "kind": "calculated", "inputs": {"sand": 57}, "expected": {"water_15bar": 0.1472}, "rationale": "Table II B2t horizon mean for Group II; the accompanying sand, silt and clay means sum to 100%. Only the stated predictor is used. Expected value calculated with Python decimal arithmetic from the printed slope and intercept; not an observed prediction or evidence of model accuracy."} + edge_cases: [] + documentation: {"notes": ["Table VI, Group II, sand predictor, water_15bar response."], "warnings": []} + implementation: + variables: + - name: water_15bar + expr: "-0.0024 * sand + (0.284)" + - name: calc_ptf_lal1979_group_i_moisture_equivalent_from_clay + status: "ready-for-implementation" + public_api: {"name": "calc_ptf_lal1979_group_i_moisture_equivalent_from_clay", "result_class": null, "summary": "Estimate gravimetric moisture equivalent measured at 1000 times gravity for Group I."} + scope: {"territory": "Group I: 11 well-drained upland profiles in western Nigeria developed over pre-Cambrian basement complex rocks, mainly biotite-muscovite paragneisses.", "prediction_target": "Gravimetric moisture equivalent measured at 1000 times gravity", "models": {"h_theta": null, "k_h": null}} + inputs: [{"$ref": "#/$defs/clay"}] + outputs: {"type": "scalar", "name": "moisture_equivalent", "quantity": "gravimetric_water_content", "symbol": null, "unit": "mass_fraction", "reported_unit": "g g⁻¹", "domain": null, "description": "Gravimetric moisture equivalent measured at 1000 times gravity expressed per unit dry soil mass."} + verification_cases: + - {"id": "published_predictor_mean", "kind": "calculated", "inputs": {"clay": 19}, "expected": {"moisture_equivalent": 0.128}, "rationale": "Table II surface horizon mean for Group I; the accompanying sand, silt and clay means sum to 100%. Only the stated predictor is used. Expected value calculated with Python decimal arithmetic from the printed slope and intercept; not an observed prediction or evidence of model accuracy."} + edge_cases: [] + documentation: {"notes": ["Table VII, Group I, clay predictor, moisture_equivalent response."], "warnings": []} + implementation: + variables: + - name: moisture_equivalent + expr: "0.004 * clay + (0.052)" + - name: calc_ptf_lal1979_group_i_moisture_equivalent_from_sand + status: "ready-for-implementation" + public_api: {"name": "calc_ptf_lal1979_group_i_moisture_equivalent_from_sand", "result_class": null, "summary": "Estimate gravimetric moisture equivalent measured at 1000 times gravity for Group I."} + scope: {"territory": "Group I: 11 well-drained upland profiles in western Nigeria developed over pre-Cambrian basement complex rocks, mainly biotite-muscovite paragneisses.", "prediction_target": "Gravimetric moisture equivalent measured at 1000 times gravity", "models": {"h_theta": null, "k_h": null}} + inputs: [{"$ref": "#/$defs/sand"}] + outputs: {"type": "scalar", "name": "moisture_equivalent", "quantity": "gravimetric_water_content", "symbol": null, "unit": "mass_fraction", "reported_unit": "g g⁻¹", "domain": null, "description": "Gravimetric moisture equivalent measured at 1000 times gravity expressed per unit dry soil mass."} + verification_cases: + - {"id": "published_predictor_mean", "kind": "calculated", "inputs": {"sand": 66}, "expected": {"moisture_equivalent": 0.141}, "rationale": "Table II surface horizon mean for Group I; the accompanying sand, silt and clay means sum to 100%. Only the stated predictor is used. Expected value calculated with Python decimal arithmetic from the printed slope and intercept; not an observed prediction or evidence of model accuracy."} + edge_cases: [] + documentation: {"notes": ["Table VII, Group I, sand predictor, moisture_equivalent response."], "warnings": []} + implementation: + variables: + - name: moisture_equivalent + expr: "-0.003 * sand + (0.339)" + - name: calc_ptf_lal1979_group_ii_moisture_equivalent_from_clay + status: "ready-for-implementation" + public_api: {"name": "calc_ptf_lal1979_group_ii_moisture_equivalent_from_clay", "result_class": null, "summary": "Estimate gravimetric moisture equivalent measured at 1000 times gravity for Group II."} + scope: {"territory": "Group II: 12 profiles in Nigeria developed from arenaceous sedimentary rocks, partly Cretaceous and partly Lower Pleistocene.", "prediction_target": "Gravimetric moisture equivalent measured at 1000 times gravity", "models": {"h_theta": null, "k_h": null}} + inputs: [{"$ref": "#/$defs/clay"}] + outputs: {"type": "scalar", "name": "moisture_equivalent", "quantity": "gravimetric_water_content", "symbol": null, "unit": "mass_fraction", "reported_unit": "g g⁻¹", "domain": null, "description": "Gravimetric moisture equivalent measured at 1000 times gravity expressed per unit dry soil mass."} + verification_cases: + - {"id": "published_predictor_mean", "kind": "calculated", "inputs": {"clay": 38}, "expected": {"moisture_equivalent": 0.152}, "rationale": "Table II B2t horizon mean for Group II; the accompanying sand, silt and clay means sum to 100%. Only the stated predictor is used. Expected value calculated with Python decimal arithmetic from the printed slope and intercept; not an observed prediction or evidence of model accuracy."} + edge_cases: [] + documentation: {"notes": ["Table VII, Group II, clay predictor, moisture_equivalent response."], "warnings": []} + implementation: + variables: + - name: moisture_equivalent + expr: "0.0025 * clay + (0.057)" + - name: calc_ptf_lal1979_group_ii_moisture_equivalent_from_sand + status: "ready-for-implementation" + public_api: {"name": "calc_ptf_lal1979_group_ii_moisture_equivalent_from_sand", "result_class": null, "summary": "Estimate gravimetric moisture equivalent measured at 1000 times gravity for Group II."} + scope: {"territory": "Group II: 12 profiles in Nigeria developed from arenaceous sedimentary rocks, partly Cretaceous and partly Lower Pleistocene.", "prediction_target": "Gravimetric moisture equivalent measured at 1000 times gravity", "models": {"h_theta": null, "k_h": null}} + inputs: [{"$ref": "#/$defs/sand"}] + outputs: {"type": "scalar", "name": "moisture_equivalent", "quantity": "gravimetric_water_content", "symbol": null, "unit": "mass_fraction", "reported_unit": "g g⁻¹", "domain": null, "description": "Gravimetric moisture equivalent measured at 1000 times gravity expressed per unit dry soil mass."} + verification_cases: + - {"id": "published_predictor_mean", "kind": "calculated", "inputs": {"sand": 57}, "expected": {"moisture_equivalent": 0.17}, "rationale": "Table II B2t horizon mean for Group II; the accompanying sand, silt and clay means sum to 100%. Only the stated predictor is used. Expected value calculated with Python decimal arithmetic from the printed slope and intercept; not an observed prediction or evidence of model accuracy."} + edge_cases: [] + documentation: {"notes": ["Table VII, Group II, sand predictor, moisture_equivalent response."], "warnings": []} + implementation: + variables: + - name: moisture_equivalent + expr: "-0.002 * sand + (0.284)" + - name: calc_ptf_lal1979_group_ii_moisture_equivalent_from_silt + status: "ready-for-implementation" + public_api: {"name": "calc_ptf_lal1979_group_ii_moisture_equivalent_from_silt", "result_class": null, "summary": "Estimate gravimetric moisture equivalent measured at 1000 times gravity for Group II."} + scope: {"territory": "Group II: 12 profiles in Nigeria developed from arenaceous sedimentary rocks, partly Cretaceous and partly Lower Pleistocene.", "prediction_target": "Gravimetric moisture equivalent measured at 1000 times gravity", "models": {"h_theta": null, "k_h": null}} + inputs: [{"$ref": "#/$defs/silt"}] + outputs: {"type": "scalar", "name": "moisture_equivalent", "quantity": "gravimetric_water_content", "symbol": null, "unit": "mass_fraction", "reported_unit": "g g⁻¹", "domain": null, "description": "Gravimetric moisture equivalent measured at 1000 times gravity expressed per unit dry soil mass."} + verification_cases: + - {"id": "published_predictor_mean", "kind": "calculated", "inputs": {"silt": 5}, "expected": {"moisture_equivalent": 0.15}, "rationale": "Table II B2t horizon mean for Group II; the accompanying sand, silt and clay means sum to 100%. Only the stated predictor is used. Expected value calculated with Python decimal arithmetic from the printed slope and intercept; not an observed prediction or evidence of model accuracy."} + edge_cases: [] + documentation: {"notes": ["Table VII, Group II, silt predictor, moisture_equivalent response."], "warnings": []} + implementation: + variables: + - name: moisture_equivalent + expr: "-0.005 * silt + (0.175)" + - name: calc_ptf_lal1979_group_i_water_01bar_from_water_0bar + status: "blocked" + public_api: {"name": "calc_ptf_lal1979_group_i_water_01bar_from_water_0bar", "result_class": null, "summary": "Estimate gravimetric moisture retention at 0.1 bar suction for Group I."} + scope: {"territory": "Group I: 11 well-drained upland profiles in western Nigeria developed over pre-Cambrian basement complex rocks, mainly biotite-muscovite paragneisses.", "prediction_target": "Gravimetric moisture retention at 0.1 bar suction", "models": {"h_theta": null, "k_h": null}} + inputs: [{"$ref": "#/$defs/water_0bar"}] + outputs: {"type": "scalar", "name": "water_01bar", "quantity": "gravimetric_water_content", "symbol": null, "unit": "mass_fraction", "reported_unit": "g g⁻¹", "domain": null, "description": "Gravimetric moisture retention at 0.1 bar suction expressed per unit dry soil mass."} + verification_cases: [] + edge_cases: [] + documentation: {"notes": ["Table VIII, Group I, water_0bar predictor, water_01bar response.", "Printed regression slope m = 1.00; intercept b = 0.20."], "warnings": ["Blocked: the printed dependent/independent labels and coefficients predict increasing water content with increasing suction. Confirm regression direction and intercept sign from authoritative evidence; no reversal or sign correction is assumed."]} + - name: calc_ptf_lal1979_group_i_water_03bar_from_water_0bar + status: "blocked" + public_api: {"name": "calc_ptf_lal1979_group_i_water_03bar_from_water_0bar", "result_class": null, "summary": "Estimate gravimetric moisture retention at 0.3 bar suction for Group I."} + scope: {"territory": "Group I: 11 well-drained upland profiles in western Nigeria developed over pre-Cambrian basement complex rocks, mainly biotite-muscovite paragneisses.", "prediction_target": "Gravimetric moisture retention at 0.3 bar suction", "models": {"h_theta": null, "k_h": null}} + inputs: [{"$ref": "#/$defs/water_0bar"}] + outputs: {"type": "scalar", "name": "water_03bar", "quantity": "gravimetric_water_content", "symbol": null, "unit": "mass_fraction", "reported_unit": "g g⁻¹", "domain": null, "description": "Gravimetric moisture retention at 0.3 bar suction expressed per unit dry soil mass."} + verification_cases: [] + edge_cases: [] + documentation: {"notes": ["Table VIII, Group I, water_0bar predictor, water_03bar response.", "Printed regression slope m = 1.05; intercept b = 0.22."], "warnings": ["Blocked: the printed dependent/independent labels and coefficients predict increasing water content with increasing suction. Confirm regression direction and intercept sign from authoritative evidence; no reversal or sign correction is assumed."]} + - name: calc_ptf_lal1979_group_i_water_15bar_from_water_0bar + status: "blocked" + public_api: {"name": "calc_ptf_lal1979_group_i_water_15bar_from_water_0bar", "result_class": null, "summary": "Estimate gravimetric moisture retention at 15 bar suction for Group I."} + scope: {"territory": "Group I: 11 well-drained upland profiles in western Nigeria developed over pre-Cambrian basement complex rocks, mainly biotite-muscovite paragneisses.", "prediction_target": "Gravimetric moisture retention at 15 bar suction", "models": {"h_theta": null, "k_h": null}} + inputs: [{"$ref": "#/$defs/water_0bar"}] + outputs: {"type": "scalar", "name": "water_15bar", "quantity": "gravimetric_water_content", "symbol": null, "unit": "mass_fraction", "reported_unit": "g g⁻¹", "domain": null, "description": "Gravimetric moisture retention at 15 bar suction expressed per unit dry soil mass."} + verification_cases: [] + edge_cases: [] + documentation: {"notes": ["Table VIII, Group I, water_0bar predictor, water_15bar response.", "Printed regression slope m = 1.19; intercept b = 0.28."], "warnings": ["Blocked: the printed dependent/independent labels and coefficients predict increasing water content with increasing suction. Confirm regression direction and intercept sign from authoritative evidence; no reversal or sign correction is assumed."]} + - name: calc_ptf_lal1979_group_i_water_03bar_from_water_01bar + status: "blocked" + public_api: {"name": "calc_ptf_lal1979_group_i_water_03bar_from_water_01bar", "result_class": null, "summary": "Estimate gravimetric moisture retention at 0.3 bar suction for Group I."} + scope: {"territory": "Group I: 11 well-drained upland profiles in western Nigeria developed over pre-Cambrian basement complex rocks, mainly biotite-muscovite paragneisses.", "prediction_target": "Gravimetric moisture retention at 0.3 bar suction", "models": {"h_theta": null, "k_h": null}} + inputs: [{"$ref": "#/$defs/water_01bar"}] + outputs: {"type": "scalar", "name": "water_03bar", "quantity": "gravimetric_water_content", "symbol": null, "unit": "mass_fraction", "reported_unit": "g g⁻¹", "domain": null, "description": "Gravimetric moisture retention at 0.3 bar suction expressed per unit dry soil mass."} + verification_cases: [] + edge_cases: [] + documentation: {"notes": ["Table VIII, Group I, water_01bar predictor, water_03bar response.", "Printed regression slope m = 1.05; intercept b = 0.10."], "warnings": ["Blocked: the printed dependent/independent labels and coefficients predict increasing water content with increasing suction. Confirm regression direction and intercept sign from authoritative evidence; no reversal or sign correction is assumed."]} + - name: calc_ptf_lal1979_group_ii_water_01bar_from_water_0bar + status: "blocked" + public_api: {"name": "calc_ptf_lal1979_group_ii_water_01bar_from_water_0bar", "result_class": null, "summary": "Estimate gravimetric moisture retention at 0.1 bar suction for Group II."} + scope: {"territory": "Group II: 12 profiles in Nigeria developed from arenaceous sedimentary rocks, partly Cretaceous and partly Lower Pleistocene.", "prediction_target": "Gravimetric moisture retention at 0.1 bar suction", "models": {"h_theta": null, "k_h": null}} + inputs: [{"$ref": "#/$defs/water_0bar"}] + outputs: {"type": "scalar", "name": "water_01bar", "quantity": "gravimetric_water_content", "symbol": null, "unit": "mass_fraction", "reported_unit": "g g⁻¹", "domain": null, "description": "Gravimetric moisture retention at 0.1 bar suction expressed per unit dry soil mass."} + verification_cases: [] + edge_cases: [] + documentation: {"notes": ["Table VIII, Group II, water_0bar predictor, water_01bar response.", "Printed regression slope m = 0.94; intercept b = 0.238."], "warnings": ["Blocked: the printed dependent/independent labels and coefficients predict increasing water content with increasing suction. Confirm regression direction and intercept sign from authoritative evidence; no reversal or sign correction is assumed."]} + - name: calc_ptf_lal1979_group_ii_water_03bar_from_water_0bar + status: "blocked" + public_api: {"name": "calc_ptf_lal1979_group_ii_water_03bar_from_water_0bar", "result_class": null, "summary": "Estimate gravimetric moisture retention at 0.3 bar suction for Group II."} + scope: {"territory": "Group II: 12 profiles in Nigeria developed from arenaceous sedimentary rocks, partly Cretaceous and partly Lower Pleistocene.", "prediction_target": "Gravimetric moisture retention at 0.3 bar suction", "models": {"h_theta": null, "k_h": null}} + inputs: [{"$ref": "#/$defs/water_0bar"}] + outputs: {"type": "scalar", "name": "water_03bar", "quantity": "gravimetric_water_content", "symbol": null, "unit": "mass_fraction", "reported_unit": "g g⁻¹", "domain": null, "description": "Gravimetric moisture retention at 0.3 bar suction expressed per unit dry soil mass."} + verification_cases: [] + edge_cases: [] + documentation: {"notes": ["Table VIII, Group II, water_0bar predictor, water_03bar response.", "Printed regression slope m = 0.91; intercept b = 0.281."], "warnings": ["Blocked: the printed dependent/independent labels and coefficients predict increasing water content with increasing suction. Confirm regression direction and intercept sign from authoritative evidence; no reversal or sign correction is assumed."]} + - name: calc_ptf_lal1979_group_ii_water_15bar_from_water_0bar + status: "blocked" + public_api: {"name": "calc_ptf_lal1979_group_ii_water_15bar_from_water_0bar", "result_class": null, "summary": "Estimate gravimetric moisture retention at 15 bar suction for Group II."} + scope: {"territory": "Group II: 12 profiles in Nigeria developed from arenaceous sedimentary rocks, partly Cretaceous and partly Lower Pleistocene.", "prediction_target": "Gravimetric moisture retention at 15 bar suction", "models": {"h_theta": null, "k_h": null}} + inputs: [{"$ref": "#/$defs/water_0bar"}] + outputs: {"type": "scalar", "name": "water_15bar", "quantity": "gravimetric_water_content", "symbol": null, "unit": "mass_fraction", "reported_unit": "g g⁻¹", "domain": null, "description": "Gravimetric moisture retention at 15 bar suction expressed per unit dry soil mass."} + verification_cases: [] + edge_cases: [] + documentation: {"notes": ["Table VIII, Group II, water_0bar predictor, water_15bar response.", "Printed regression slope m = 1.45; intercept b = 0.277."], "warnings": ["Blocked: the printed dependent/independent labels and coefficients predict increasing water content with increasing suction. Confirm regression direction and intercept sign from authoritative evidence; no reversal or sign correction is assumed."]} + - name: calc_ptf_lal1979_group_ii_water_03bar_from_water_01bar + status: "ready-for-implementation" + public_api: {"name": "calc_ptf_lal1979_group_ii_water_03bar_from_water_01bar", "result_class": null, "summary": "Estimate gravimetric moisture retention at 0.3 bar suction for Group II."} + scope: {"territory": "Group II: 12 profiles in Nigeria developed from arenaceous sedimentary rocks, partly Cretaceous and partly Lower Pleistocene.", "prediction_target": "Gravimetric moisture retention at 0.3 bar suction", "models": {"h_theta": null, "k_h": null}} + inputs: [{"$ref": "#/$defs/water_01bar"}] + outputs: {"type": "scalar", "name": "water_03bar", "quantity": "gravimetric_water_content", "symbol": null, "unit": "mass_fraction", "reported_unit": "g g⁻¹", "domain": null, "description": "Gravimetric moisture retention at 0.3 bar suction expressed per unit dry soil mass."} + verification_cases: + - {"id": "published_predictor_mean", "kind": "calculated", "inputs": {"water_01bar": 0.17}, "expected": {"water_03bar": 0.1322}, "rationale": "Table III Group II surface-horizon mean at 0.1 bar suction. Expected value calculated with Python decimal arithmetic from the printed slope and intercept; not an observed prediction or evidence of model accuracy."} + edge_cases: [] + documentation: {"notes": ["Table VIII, Group II, water_01bar predictor, water_03bar response."], "warnings": []} + implementation: + variables: + - name: water_03bar + expr: "0.86 * water_01bar + (-0.014)" + - name: calc_ptf_lal1979_group_ii_water_15bar_from_water_01bar + status: "ready-for-implementation" + public_api: {"name": "calc_ptf_lal1979_group_ii_water_15bar_from_water_01bar", "result_class": null, "summary": "Estimate gravimetric moisture retention at 15 bar suction for Group II."} + scope: {"territory": "Group II: 12 profiles in Nigeria developed from arenaceous sedimentary rocks, partly Cretaceous and partly Lower Pleistocene.", "prediction_target": "Gravimetric moisture retention at 15 bar suction", "models": {"h_theta": null, "k_h": null}} + inputs: [{"$ref": "#/$defs/water_01bar"}] + outputs: {"type": "scalar", "name": "water_15bar", "quantity": "gravimetric_water_content", "symbol": null, "unit": "mass_fraction", "reported_unit": "g g⁻¹", "domain": null, "description": "Gravimetric moisture retention at 15 bar suction expressed per unit dry soil mass."} + verification_cases: + - {"id": "published_predictor_mean", "kind": "calculated", "inputs": {"water_01bar": 0.17}, "expected": {"water_15bar": 0.0868}, "rationale": "Table III Group II surface-horizon mean at 0.1 bar suction. Expected value calculated with Python decimal arithmetic from the printed slope and intercept; not an observed prediction or evidence of model accuracy."} + edge_cases: [] + documentation: {"notes": ["Table VIII, Group II, water_01bar predictor, water_15bar response."], "warnings": []} + implementation: + variables: + - name: water_15bar + expr: "0.54 * water_01bar + (-0.005)" + - name: calc_ptf_lal1979_group_i_upper_plastic_limit_from_organic_carbon + status: "ready-for-implementation" + public_api: {"name": "calc_ptf_lal1979_group_i_upper_plastic_limit_from_organic_carbon", "result_class": null, "summary": "Estimate upper plastic limit for Group I."} + scope: {"territory": "Group I: 11 well-drained upland profiles in western Nigeria developed over pre-Cambrian basement complex rocks, mainly biotite-muscovite paragneisses.", "prediction_target": "Upper plastic limit", "models": {"h_theta": null, "k_h": null}} + inputs: [{"$ref": "#/$defs/organic_carbon"}] + outputs: {"type": "scalar", "name": "upper_plastic_limit", "quantity": "gravimetric_water_content", "symbol": null, "unit": "mass_percent", "reported_unit": "%", "domain": null, "description": "Upper plastic limit expressed as percentage of oven-dry soil mass."} + verification_cases: + - {"id": "published_predictor_mean", "kind": "calculated", "inputs": {"organic_carbon": 1.5}, "expected": {"upper_plastic_limit": 23.63}, "rationale": "Table II surface horizon mean for Group I; the accompanying sand, silt and clay means sum to 100%. Only the stated predictor is used. Expected value calculated with Python decimal arithmetic from the printed slope and intercept; not an observed prediction or evidence of model accuracy."} + edge_cases: [] + documentation: {"notes": ["Table IX, Group I, organic_carbon predictor, upper_plastic_limit response."], "warnings": []} + implementation: + variables: + - name: upper_plastic_limit + expr: "-5.40 * organic_carbon + (31.73)" + - name: calc_ptf_lal1979_group_i_lower_plastic_limit_from_organic_carbon + status: "ready-for-implementation" + public_api: {"name": "calc_ptf_lal1979_group_i_lower_plastic_limit_from_organic_carbon", "result_class": null, "summary": "Estimate lower plastic limit for Group I."} + scope: {"territory": "Group I: 11 well-drained upland profiles in western Nigeria developed over pre-Cambrian basement complex rocks, mainly biotite-muscovite paragneisses.", "prediction_target": "Lower plastic limit", "models": {"h_theta": null, "k_h": null}} + inputs: [{"$ref": "#/$defs/organic_carbon"}] + outputs: {"type": "scalar", "name": "lower_plastic_limit", "quantity": "gravimetric_water_content", "symbol": null, "unit": "mass_percent", "reported_unit": "%", "domain": null, "description": "Lower plastic limit expressed as percentage of oven-dry soil mass."} + verification_cases: + - {"id": "published_predictor_mean", "kind": "calculated", "inputs": {"organic_carbon": 1.5}, "expected": {"lower_plastic_limit": 18.37}, "rationale": "Table II surface horizon mean for Group I; the accompanying sand, silt and clay means sum to 100%. Only the stated predictor is used. Expected value calculated with Python decimal arithmetic from the printed slope and intercept; not an observed prediction or evidence of model accuracy."} + edge_cases: [] + documentation: {"notes": ["Table IX, Group I, organic_carbon predictor, lower_plastic_limit response."], "warnings": []} + implementation: + variables: + - name: lower_plastic_limit + expr: "-4.24 * organic_carbon + (24.73)" + - name: calc_ptf_lal1979_group_i_plasticity_index_from_organic_carbon + status: "ready-for-implementation" + public_api: {"name": "calc_ptf_lal1979_group_i_plasticity_index_from_organic_carbon", "result_class": null, "summary": "Estimate plasticity index (upper minus lower plastic limit) for Group I."} + scope: {"territory": "Group I: 11 well-drained upland profiles in western Nigeria developed over pre-Cambrian basement complex rocks, mainly biotite-muscovite paragneisses.", "prediction_target": "Plasticity index (upper minus lower plastic limit)", "models": {"h_theta": null, "k_h": null}} + inputs: [{"$ref": "#/$defs/organic_carbon"}] + outputs: {"type": "scalar", "name": "plasticity_index", "quantity": "gravimetric_water_content", "symbol": null, "unit": "mass_percent", "reported_unit": "%", "domain": null, "description": "Plasticity index (upper minus lower plastic limit) expressed as percentage of oven-dry soil mass."} + verification_cases: + - {"id": "published_predictor_mean", "kind": "calculated", "inputs": {"organic_carbon": 1.5}, "expected": {"plasticity_index": 5.56}, "rationale": "Table II surface horizon mean for Group I; the accompanying sand, silt and clay means sum to 100%. Only the stated predictor is used. Expected value calculated with Python decimal arithmetic from the printed slope and intercept; not an observed prediction or evidence of model accuracy."} + edge_cases: [] + documentation: {"notes": ["Table IX, Group I, organic_carbon predictor, plasticity_index response."], "warnings": []} + implementation: + variables: + - name: plasticity_index + expr: "-1.24 * organic_carbon + (7.42)" + - name: calc_ptf_lal1979_group_i_upper_plastic_limit_from_clay + status: "ready-for-implementation" + public_api: {"name": "calc_ptf_lal1979_group_i_upper_plastic_limit_from_clay", "result_class": null, "summary": "Estimate upper plastic limit for Group I."} + scope: {"territory": "Group I: 11 well-drained upland profiles in western Nigeria developed over pre-Cambrian basement complex rocks, mainly biotite-muscovite paragneisses.", "prediction_target": "Upper plastic limit", "models": {"h_theta": null, "k_h": null}} + inputs: [{"$ref": "#/$defs/clay"}] + outputs: {"type": "scalar", "name": "upper_plastic_limit", "quantity": "gravimetric_water_content", "symbol": null, "unit": "mass_percent", "reported_unit": "%", "domain": null, "description": "Upper plastic limit expressed as percentage of oven-dry soil mass."} + verification_cases: + - {"id": "published_predictor_mean", "kind": "calculated", "inputs": {"clay": 19}, "expected": {"upper_plastic_limit": 20.22}, "rationale": "Table II surface horizon mean for Group I; the accompanying sand, silt and clay means sum to 100%. Only the stated predictor is used. Expected value calculated with Python decimal arithmetic from the printed slope and intercept; not an observed prediction or evidence of model accuracy."} + edge_cases: [] + documentation: {"notes": ["Table IX, Group I, clay predictor, upper_plastic_limit response."], "warnings": []} + implementation: + variables: + - name: upper_plastic_limit + expr: "0.46 * clay + (11.48)" + - name: calc_ptf_lal1979_group_i_lower_plastic_limit_from_clay + status: "ready-for-implementation" + public_api: {"name": "calc_ptf_lal1979_group_i_lower_plastic_limit_from_clay", "result_class": null, "summary": "Estimate lower plastic limit for Group I."} + scope: {"territory": "Group I: 11 well-drained upland profiles in western Nigeria developed over pre-Cambrian basement complex rocks, mainly biotite-muscovite paragneisses.", "prediction_target": "Lower plastic limit", "models": {"h_theta": null, "k_h": null}} + inputs: [{"$ref": "#/$defs/clay"}] + outputs: {"type": "scalar", "name": "lower_plastic_limit", "quantity": "gravimetric_water_content", "symbol": null, "unit": "mass_percent", "reported_unit": "%", "domain": null, "description": "Lower plastic limit expressed as percentage of oven-dry soil mass."} + verification_cases: + - {"id": "published_predictor_mean", "kind": "calculated", "inputs": {"clay": 19}, "expected": {"lower_plastic_limit": 15.96}, "rationale": "Table II surface horizon mean for Group I; the accompanying sand, silt and clay means sum to 100%. Only the stated predictor is used. Expected value calculated with Python decimal arithmetic from the printed slope and intercept; not an observed prediction or evidence of model accuracy."} + edge_cases: [] + documentation: {"notes": ["Table IX, Group I, clay predictor, lower_plastic_limit response."], "warnings": []} + implementation: + variables: + - name: lower_plastic_limit + expr: "0.34 * clay + (9.50)" + - name: calc_ptf_lal1979_group_i_plasticity_index_from_clay + status: "ready-for-implementation" + public_api: {"name": "calc_ptf_lal1979_group_i_plasticity_index_from_clay", "result_class": null, "summary": "Estimate plasticity index (upper minus lower plastic limit) for Group I."} + scope: {"territory": "Group I: 11 well-drained upland profiles in western Nigeria developed over pre-Cambrian basement complex rocks, mainly biotite-muscovite paragneisses.", "prediction_target": "Plasticity index (upper minus lower plastic limit)", "models": {"h_theta": null, "k_h": null}} + inputs: [{"$ref": "#/$defs/clay"}] + outputs: {"type": "scalar", "name": "plasticity_index", "quantity": "gravimetric_water_content", "symbol": null, "unit": "mass_percent", "reported_unit": "%", "domain": null, "description": "Plasticity index (upper minus lower plastic limit) expressed as percentage of oven-dry soil mass."} + verification_cases: + - {"id": "published_predictor_mean", "kind": "calculated", "inputs": {"clay": 19}, "expected": {"plasticity_index": 4.57}, "rationale": "Table II surface horizon mean for Group I; the accompanying sand, silt and clay means sum to 100%. Only the stated predictor is used. Expected value calculated with Python decimal arithmetic from the printed slope and intercept; not an observed prediction or evidence of model accuracy."} + edge_cases: [] + documentation: {"notes": ["Table IX, Group I, clay predictor, plasticity_index response."], "warnings": []} + implementation: + variables: + - name: plasticity_index + expr: "0.11 * clay + (2.48)" + - name: calc_ptf_lal1979_group_i_upper_plastic_limit_from_sand + status: "blocked" + public_api: {"name": "calc_ptf_lal1979_group_i_upper_plastic_limit_from_sand", "result_class": null, "summary": "Estimate upper plastic limit for Group I."} + scope: {"territory": "Group I: 11 well-drained upland profiles in western Nigeria developed over pre-Cambrian basement complex rocks, mainly biotite-muscovite paragneisses.", "prediction_target": "Upper plastic limit", "models": {"h_theta": null, "k_h": null}} + inputs: [{"$ref": "#/$defs/sand"}] + outputs: {"type": "scalar", "name": "upper_plastic_limit", "quantity": "gravimetric_water_content", "symbol": null, "unit": "mass_percent", "reported_unit": "%", "domain": null, "description": "Upper plastic limit expressed as percentage of oven-dry soil mass."} + verification_cases: [] + edge_cases: [] + documentation: {"notes": ["Table IX, Group I, sand predictor, upper_plastic_limit response.", "Printed regression slope m = -0.40; intercept b = -46.20."], "warnings": ["Blocked: printed intercept -46.20 with slope -0.40 produces a negative upper plastic limit for nonnegative sand. Confirm the intercept sign; no correction is assumed."]} + - name: calc_ptf_lal1979_group_i_lower_plastic_limit_from_sand + status: "ready-for-implementation" + public_api: {"name": "calc_ptf_lal1979_group_i_lower_plastic_limit_from_sand", "result_class": null, "summary": "Estimate lower plastic limit for Group I."} + scope: {"territory": "Group I: 11 well-drained upland profiles in western Nigeria developed over pre-Cambrian basement complex rocks, mainly biotite-muscovite paragneisses.", "prediction_target": "Lower plastic limit", "models": {"h_theta": null, "k_h": null}} + inputs: [{"$ref": "#/$defs/sand"}] + outputs: {"type": "scalar", "name": "lower_plastic_limit", "quantity": "gravimetric_water_content", "symbol": null, "unit": "mass_percent", "reported_unit": "%", "domain": null, "description": "Lower plastic limit expressed as percentage of oven-dry soil mass."} + verification_cases: + - {"id": "published_predictor_mean", "kind": "calculated", "inputs": {"sand": 66}, "expected": {"lower_plastic_limit": 15.7}, "rationale": "Table II surface horizon mean for Group I; the accompanying sand, silt and clay means sum to 100%. Only the stated predictor is used. Expected value calculated with Python decimal arithmetic from the printed slope and intercept; not an observed prediction or evidence of model accuracy."} + edge_cases: [] + documentation: {"notes": ["Table IX, Group I, sand predictor, lower_plastic_limit response."], "warnings": []} + implementation: + variables: + - name: lower_plastic_limit + expr: "-0.30 * sand + (35.50)" + - name: calc_ptf_lal1979_group_i_plasticity_index_from_sand + status: "ready-for-implementation" + public_api: {"name": "calc_ptf_lal1979_group_i_plasticity_index_from_sand", "result_class": null, "summary": "Estimate plasticity index (upper minus lower plastic limit) for Group I."} + scope: {"territory": "Group I: 11 well-drained upland profiles in western Nigeria developed over pre-Cambrian basement complex rocks, mainly biotite-muscovite paragneisses.", "prediction_target": "Plasticity index (upper minus lower plastic limit)", "models": {"h_theta": null, "k_h": null}} + inputs: [{"$ref": "#/$defs/sand"}] + outputs: {"type": "scalar", "name": "plasticity_index", "quantity": "gravimetric_water_content", "symbol": null, "unit": "mass_percent", "reported_unit": "%", "domain": null, "description": "Plasticity index (upper minus lower plastic limit) expressed as percentage of oven-dry soil mass."} + verification_cases: + - {"id": "published_predictor_mean", "kind": "calculated", "inputs": {"sand": 66}, "expected": {"plasticity_index": 4.4}, "rationale": "Table II surface horizon mean for Group I; the accompanying sand, silt and clay means sum to 100%. Only the stated predictor is used. Expected value calculated with Python decimal arithmetic from the printed slope and intercept; not an observed prediction or evidence of model accuracy."} + edge_cases: [] + documentation: {"notes": ["Table IX, Group I, sand predictor, plasticity_index response."], "warnings": []} + implementation: + variables: + - name: plasticity_index + expr: "-0.10 * sand + (11.00)" + - name: calc_ptf_lal1979_group_ii_upper_plastic_limit_from_organic_carbon + status: "ready-for-implementation" + public_api: {"name": "calc_ptf_lal1979_group_ii_upper_plastic_limit_from_organic_carbon", "result_class": null, "summary": "Estimate upper plastic limit for Group II."} + scope: {"territory": "Group II: 12 profiles in Nigeria developed from arenaceous sedimentary rocks, partly Cretaceous and partly Lower Pleistocene.", "prediction_target": "Upper plastic limit", "models": {"h_theta": null, "k_h": null}} + inputs: [{"$ref": "#/$defs/organic_carbon"}] + outputs: {"type": "scalar", "name": "upper_plastic_limit", "quantity": "gravimetric_water_content", "symbol": null, "unit": "mass_percent", "reported_unit": "%", "domain": null, "description": "Upper plastic limit expressed as percentage of oven-dry soil mass."} + verification_cases: + - {"id": "published_predictor_mean", "kind": "calculated", "inputs": {"organic_carbon": 0.42}, "expected": {"upper_plastic_limit": 30.9358}, "rationale": "Table II B2t horizon mean for Group II; the accompanying sand, silt and clay means sum to 100%. Only the stated predictor is used. Expected value calculated with Python decimal arithmetic from the printed slope and intercept; not an observed prediction or evidence of model accuracy."} + edge_cases: [] + documentation: {"notes": ["Table IX, Group II, organic_carbon predictor, upper_plastic_limit response."], "warnings": []} + implementation: + variables: + - name: upper_plastic_limit + expr: "-3.01 * organic_carbon + (32.20)" + - name: calc_ptf_lal1979_group_ii_plasticity_index_from_organic_carbon + status: "ready-for-implementation" + public_api: {"name": "calc_ptf_lal1979_group_ii_plasticity_index_from_organic_carbon", "result_class": null, "summary": "Estimate plasticity index (upper minus lower plastic limit) for Group II."} + scope: {"territory": "Group II: 12 profiles in Nigeria developed from arenaceous sedimentary rocks, partly Cretaceous and partly Lower Pleistocene.", "prediction_target": "Plasticity index (upper minus lower plastic limit)", "models": {"h_theta": null, "k_h": null}} + inputs: [{"$ref": "#/$defs/organic_carbon"}] + outputs: {"type": "scalar", "name": "plasticity_index", "quantity": "gravimetric_water_content", "symbol": null, "unit": "mass_percent", "reported_unit": "%", "domain": null, "description": "Plasticity index (upper minus lower plastic limit) expressed as percentage of oven-dry soil mass."} + verification_cases: + - {"id": "published_predictor_mean", "kind": "calculated", "inputs": {"organic_carbon": 0.42}, "expected": {"plasticity_index": 11.3476}, "rationale": "Table II B2t horizon mean for Group II; the accompanying sand, silt and clay means sum to 100%. Only the stated predictor is used. Expected value calculated with Python decimal arithmetic from the printed slope and intercept; not an observed prediction or evidence of model accuracy."} + edge_cases: [] + documentation: {"notes": ["Table IX, Group II, organic_carbon predictor, plasticity_index response."], "warnings": []} + implementation: + variables: + - name: plasticity_index + expr: "-3.22 * organic_carbon + (12.70)" + - name: calc_ptf_lal1979_group_ii_upper_plastic_limit_from_clay + status: "ready-for-implementation" + public_api: {"name": "calc_ptf_lal1979_group_ii_upper_plastic_limit_from_clay", "result_class": null, "summary": "Estimate upper plastic limit for Group II."} + scope: {"territory": "Group II: 12 profiles in Nigeria developed from arenaceous sedimentary rocks, partly Cretaceous and partly Lower Pleistocene.", "prediction_target": "Upper plastic limit", "models": {"h_theta": null, "k_h": null}} + inputs: [{"$ref": "#/$defs/clay"}] + outputs: {"type": "scalar", "name": "upper_plastic_limit", "quantity": "gravimetric_water_content", "symbol": null, "unit": "mass_percent", "reported_unit": "%", "domain": null, "description": "Upper plastic limit expressed as percentage of oven-dry soil mass."} + verification_cases: + - {"id": "published_predictor_mean", "kind": "calculated", "inputs": {"clay": 38}, "expected": {"upper_plastic_limit": 30.67}, "rationale": "Table II B2t horizon mean for Group II; the accompanying sand, silt and clay means sum to 100%. Only the stated predictor is used. Expected value calculated with Python decimal arithmetic from the printed slope and intercept; not an observed prediction or evidence of model accuracy."} + edge_cases: [] + documentation: {"notes": ["Table IX, Group II, clay predictor, upper_plastic_limit response."], "warnings": []} + implementation: + variables: + - name: upper_plastic_limit + expr: "0.16 * clay + (24.59)" + - name: calc_ptf_lal1979_group_ii_lower_plastic_limit_from_clay + status: "ready-for-implementation" + public_api: {"name": "calc_ptf_lal1979_group_ii_lower_plastic_limit_from_clay", "result_class": null, "summary": "Estimate lower plastic limit for Group II."} + scope: {"territory": "Group II: 12 profiles in Nigeria developed from arenaceous sedimentary rocks, partly Cretaceous and partly Lower Pleistocene.", "prediction_target": "Lower plastic limit", "models": {"h_theta": null, "k_h": null}} + inputs: [{"$ref": "#/$defs/clay"}] + outputs: {"type": "scalar", "name": "lower_plastic_limit", "quantity": "gravimetric_water_content", "symbol": null, "unit": "mass_percent", "reported_unit": "%", "domain": null, "description": "Lower plastic limit expressed as percentage of oven-dry soil mass."} + verification_cases: + - {"id": "published_predictor_mean", "kind": "calculated", "inputs": {"clay": 38}, "expected": {"lower_plastic_limit": 19.96}, "rationale": "Table II B2t horizon mean for Group II; the accompanying sand, silt and clay means sum to 100%. Only the stated predictor is used. Expected value calculated with Python decimal arithmetic from the printed slope and intercept; not an observed prediction or evidence of model accuracy."} + edge_cases: [] + documentation: {"notes": ["Table IX, Group II, clay predictor, lower_plastic_limit response."], "warnings": []} + implementation: + variables: + - name: lower_plastic_limit + expr: "0.14 * clay + (14.64)" + - name: calc_ptf_lal1979_group_ii_upper_plastic_limit_from_sand + status: "ready-for-implementation" + public_api: {"name": "calc_ptf_lal1979_group_ii_upper_plastic_limit_from_sand", "result_class": null, "summary": "Estimate upper plastic limit for Group II."} + scope: {"territory": "Group II: 12 profiles in Nigeria developed from arenaceous sedimentary rocks, partly Cretaceous and partly Lower Pleistocene.", "prediction_target": "Upper plastic limit", "models": {"h_theta": null, "k_h": null}} + inputs: [{"$ref": "#/$defs/sand"}] + outputs: {"type": "scalar", "name": "upper_plastic_limit", "quantity": "gravimetric_water_content", "symbol": null, "unit": "mass_percent", "reported_unit": "%", "domain": null, "description": "Upper plastic limit expressed as percentage of oven-dry soil mass."} + verification_cases: + - {"id": "published_predictor_mean", "kind": "calculated", "inputs": {"sand": 57}, "expected": {"upper_plastic_limit": 30.72}, "rationale": "Table II B2t horizon mean for Group II; the accompanying sand, silt and clay means sum to 100%. Only the stated predictor is used. Expected value calculated with Python decimal arithmetic from the printed slope and intercept; not an observed prediction or evidence of model accuracy."} + edge_cases: [] + documentation: {"notes": ["Table IX, Group II, sand predictor, upper_plastic_limit response."], "warnings": []} + implementation: + variables: + - name: upper_plastic_limit + expr: "-0.17 * sand + (40.41)" + - name: calc_ptf_lal1979_group_ii_lower_plastic_limit_from_sand + status: "ready-for-implementation" + public_api: {"name": "calc_ptf_lal1979_group_ii_lower_plastic_limit_from_sand", "result_class": null, "summary": "Estimate lower plastic limit for Group II."} + scope: {"territory": "Group II: 12 profiles in Nigeria developed from arenaceous sedimentary rocks, partly Cretaceous and partly Lower Pleistocene.", "prediction_target": "Lower plastic limit", "models": {"h_theta": null, "k_h": null}} + inputs: [{"$ref": "#/$defs/sand"}] + outputs: {"type": "scalar", "name": "lower_plastic_limit", "quantity": "gravimetric_water_content", "symbol": null, "unit": "mass_percent", "reported_unit": "%", "domain": null, "description": "Lower plastic limit expressed as percentage of oven-dry soil mass."} + verification_cases: + - {"id": "published_predictor_mean", "kind": "calculated", "inputs": {"sand": 57}, "expected": {"lower_plastic_limit": 20.19}, "rationale": "Table II B2t horizon mean for Group II; the accompanying sand, silt and clay means sum to 100%. Only the stated predictor is used. Expected value calculated with Python decimal arithmetic from the printed slope and intercept; not an observed prediction or evidence of model accuracy."} + edge_cases: [] + documentation: {"notes": ["Table IX, Group II, sand predictor, lower_plastic_limit response."], "warnings": []} + implementation: + variables: + - name: lower_plastic_limit + expr: "-0.17 * sand + (29.88)" + - name: calc_ptf_lal1979_group_ii_upper_plastic_limit_from_silt + status: "ready-for-implementation" + public_api: {"name": "calc_ptf_lal1979_group_ii_upper_plastic_limit_from_silt", "result_class": null, "summary": "Estimate upper plastic limit for Group II."} + scope: {"territory": "Group II: 12 profiles in Nigeria developed from arenaceous sedimentary rocks, partly Cretaceous and partly Lower Pleistocene.", "prediction_target": "Upper plastic limit", "models": {"h_theta": null, "k_h": null}} + inputs: [{"$ref": "#/$defs/silt"}] + outputs: {"type": "scalar", "name": "upper_plastic_limit", "quantity": "gravimetric_water_content", "symbol": null, "unit": "mass_percent", "reported_unit": "%", "domain": null, "description": "Upper plastic limit expressed as percentage of oven-dry soil mass."} + verification_cases: + - {"id": "published_predictor_mean", "kind": "calculated", "inputs": {"silt": 5}, "expected": {"upper_plastic_limit": 29.99}, "rationale": "Table II B2t horizon mean for Group II; the accompanying sand, silt and clay means sum to 100%. Only the stated predictor is used. Expected value calculated with Python decimal arithmetic from the printed slope and intercept; not an observed prediction or evidence of model accuracy."} + edge_cases: [] + documentation: {"notes": ["Table IX, Group II, silt predictor, upper_plastic_limit response."], "warnings": []} + implementation: + variables: + - name: upper_plastic_limit + expr: "0.35 * silt + (28.24)" + - name: calc_ptf_lal1979_group_ii_lower_plastic_limit_from_silt + status: "ready-for-implementation" + public_api: {"name": "calc_ptf_lal1979_group_ii_lower_plastic_limit_from_silt", "result_class": null, "summary": "Estimate lower plastic limit for Group II."} + scope: {"territory": "Group II: 12 profiles in Nigeria developed from arenaceous sedimentary rocks, partly Cretaceous and partly Lower Pleistocene.", "prediction_target": "Lower plastic limit", "models": {"h_theta": null, "k_h": null}} + inputs: [{"$ref": "#/$defs/silt"}] + outputs: {"type": "scalar", "name": "lower_plastic_limit", "quantity": "gravimetric_water_content", "symbol": null, "unit": "mass_percent", "reported_unit": "%", "domain": null, "description": "Lower plastic limit expressed as percentage of oven-dry soil mass."} + verification_cases: + - {"id": "published_predictor_mean", "kind": "calculated", "inputs": {"silt": 5}, "expected": {"lower_plastic_limit": 19.51}, "rationale": "Table II B2t horizon mean for Group II; the accompanying sand, silt and clay means sum to 100%. Only the stated predictor is used. Expected value calculated with Python decimal arithmetic from the printed slope and intercept; not an observed prediction or evidence of model accuracy."} + edge_cases: [] + documentation: {"notes": ["Table IX, Group II, silt predictor, lower_plastic_limit response."], "warnings": []} + implementation: + variables: + - name: lower_plastic_limit + expr: "0.67 * silt + (16.16)" + - name: calc_ptf_lal1979_group_ii_plasticity_index_from_silt + status: "ready-for-implementation" + public_api: {"name": "calc_ptf_lal1979_group_ii_plasticity_index_from_silt", "result_class": null, "summary": "Estimate plasticity index (upper minus lower plastic limit) for Group II."} + scope: {"territory": "Group II: 12 profiles in Nigeria developed from arenaceous sedimentary rocks, partly Cretaceous and partly Lower Pleistocene.", "prediction_target": "Plasticity index (upper minus lower plastic limit)", "models": {"h_theta": null, "k_h": null}} + inputs: [{"$ref": "#/$defs/silt"}] + outputs: {"type": "scalar", "name": "plasticity_index", "quantity": "gravimetric_water_content", "symbol": null, "unit": "mass_percent", "reported_unit": "%", "domain": null, "description": "Plasticity index (upper minus lower plastic limit) expressed as percentage of oven-dry soil mass."} + verification_cases: + - {"id": "published_predictor_mean", "kind": "calculated", "inputs": {"silt": 5}, "expected": {"plasticity_index": 10.48}, "rationale": "Table II B2t horizon mean for Group II; the accompanying sand, silt and clay means sum to 100%. Only the stated predictor is used. Expected value calculated with Python decimal arithmetic from the printed slope and intercept; not an observed prediction or evidence of model accuracy."} + edge_cases: [] + documentation: {"notes": ["Table IX, Group II, silt predictor, plasticity_index response."], "warnings": []} + implementation: + variables: + - name: plasticity_index + expr: "-0.32 * silt + (12.08)" +scientific_notes: | + ## Supported models + + Tables IV-VII provide separate univariate regressions for saturation, moisture + retention at 0.1, 0.3 and 15 bar suction, and moisture equivalent. Table VIII + relates moisture constants. Table IX provides plasticity regressions; entries + reported only as n.s. have no coefficients and are not computational models. + Groups are represented by separate functions with explicit applicability, + not by a new categorical predictor. No continuous retention curve is fitted. + + ## Review decisions + + The supplied bundle includes the article and older research instructions requiring + an external numerical oracle. The active extraction policy permits calculated + verification cases. No complete published input-to-predicted-output cases occur + in the supplied article; Tables II-III are marginal summaries, not such cases. + Python decimal arithmetic evaluates m*x+b directly to fix the calculated values. + Group I surface texture means (66, 15, 19) and Group II B2t means (57, 5, 38) + sum to 100%; inconsistent texture means in the other rows are not combined. + These summary predictors are not individual measured soil records. + + Table III reports moisture retention in g g⁻¹, mapped without conversion to + gravimetric_water_content/mass_fraction. The user approved this notation alias. + Plastic limits are gravimetric moisture percentages (Methods and Table II); + plasticity index is their difference and uses the same quantity in mass_percent. + The DOI is supplied in the bundle; the citation year and pagination come from + the article abstract. Measurement definitions for shrinkage and bulk density, + correlation statistics, and qualitative profile trends are not predictive PTFs. + + ## Documented limitations + + The dataset contains 119 genetic-horizon samples from 23 profiles. Samples were + air-dried, ground and sieved at 2 mm. Retention used disturbed samples, a hanging + water column at low suctions and pressure plates at higher suctions. Clay + mineralogy is predominantly kaolinite and sesquioxides. The paper restricts + extrapolation to similar soils and notes structural limitations of disturbed + samples. Full predictor calibration ranges are not tabulated; Table II ranges + cover surface and B2t horizons only and are not imposed as full-domain bounds. + Sand uses the published 0.02 mm lower boundary, not the USDA 0.05 mm boundary. + No output accuracy override, clipping, or unsupported boundary behavior is added. + Independent regressions need not preserve ordering when combined into a curve. + Table IX Group I organic-carbon upper-limit r is printed positive despite a + negative slope; this statistical discrepancy does not change its coefficients. + The supplied image descriptions are not numerical evidence. + + ## Blockers + + Seven Table VIII rows are blocked: all four Group I rows and the three Group II + rows using saturation as predictor. Their printed coefficients with the column + labels imply wetter soil at greater suction, contrary to Table III. For example, + Group I saturation 0.31 would predict 0.51 at 0.1 bar instead of the reported + surface mean 0.19. This flags an ambiguity, not a requirement to fit the means. + The last two Group II rows have coherent directions and negative intercepts and + are retained as printed. Confirm the seven affected regression directions and + intercept signs before implementation; coefficients are preserved in their notes. + + Table IX Group I sand-to-upper-plastic-limit is blocked because its printed + negative slope and negative intercept imply negative moisture percentages. + Authoritative evidence for the intercept sign is required. No silent typographic + repair is made. All other complete regressions remain drafts for human review. diff --git a/specs/units.yaml b/specs/units.yaml index 5deb485..d33b09f 100644 --- a/specs/units.yaml +++ b/specs/units.yaml @@ -8,7 +8,7 @@ volume_percent: mass_fraction: preferred_notation: "kg/kg" - aliases: ["g/g"] + aliases: ["g/g", "g g⁻¹"] mass_percent: preferred_notation: "% w/w" diff --git a/targets/ptfkit-native/cpp/lal1979.cppm b/targets/ptfkit-native/cpp/lal1979.cppm new file mode 100644 index 0000000..39f4e60 --- /dev/null +++ b/targets/ptfkit-native/cpp/lal1979.cppm @@ -0,0 +1,834 @@ +/* @generated by ptfkit-codegen; DO NOT EDIT. */ + +export module ptfkit.lal1979; + +/** + * @brief Moisture retention and plasticity regressions for two groups of Nigerian soils. + * + * @details Source publication: + * Lal, R. (1979). Physical properties and moisture retention characteristics of some Nigerian + * soils. Geoderma, 21, 209-223. + * @see https://doi.org/10.1016/0016-7061(78)90028-9 DOI: 10.1016/0016-7061(78)90028-9 + * + * @remark Geographic scope: + * Nigeria + * + * @remark Calibration dataset: + * 119 genetic-horizon samples from 23 profiles in two parent-material groups. + */ + +export namespace ptfkit::lal1979 { + +/** + * @brief Estimate gravimetric moisture retention at saturation for Group I. + * @param clay Clay smaller than 0.002 mm; percentage of the fine earth. Full calibration + * bounds are not reported. (%) + * @return Gravimetric moisture retention at saturation expressed per unit dry soil mass. (g + * g⁻¹) + * + * @remark Geographic scope: + * Group I: 11 well-drained upland profiles in western Nigeria developed over pre-Cambrian + * basement complex rocks, mainly biotite-muscovite paragneisses. + * + * @details Prediction target: + * Gravimetric moisture retention at saturation + * @note Table IV, Group I, clay predictor, water_0bar response. + */ +[[nodiscard]] +inline double calc_ptf_lal1979_group_i_water_0bar_from_clay(double clay) { + return 0.004 * clay + 0.289; +} + +/** + * @brief Estimate gravimetric moisture retention at saturation for Group I. + * @param sand Sand from 0.02 to 2 mm; percentage of the fine earth. Full calibration bounds + * are not reported. (%) + * @return Gravimetric moisture retention at saturation expressed per unit dry soil mass. (g + * g⁻¹) + * + * @remark Geographic scope: + * Group I: 11 well-drained upland profiles in western Nigeria developed over pre-Cambrian + * basement complex rocks, mainly biotite-muscovite paragneisses. + * + * @details Prediction target: + * Gravimetric moisture retention at saturation + * @note Table IV, Group I, sand predictor, water_0bar response. + */ +[[nodiscard]] +inline double calc_ptf_lal1979_group_i_water_0bar_from_sand(double sand) { + return -0.003 * sand + 0.579; +} + +/** + * @brief Estimate gravimetric moisture retention at saturation for Group II. + * @param clay Clay smaller than 0.002 mm; percentage of the fine earth. Full calibration + * bounds are not reported. (%) + * @return Gravimetric moisture retention at saturation expressed per unit dry soil mass. (g + * g⁻¹) + * + * @remark Geographic scope: + * Group II: 12 profiles in Nigeria developed from arenaceous sedimentary rocks, partly + * Cretaceous and partly Lower Pleistocene. + * + * @details Prediction target: + * Gravimetric moisture retention at saturation + * @note Table IV, Group II, clay predictor, water_0bar response. + */ +[[nodiscard]] +inline double calc_ptf_lal1979_group_ii_water_0bar_from_clay(double clay) { + return 0.004 * clay + 0.296; +} + +/** + * @brief Estimate gravimetric moisture retention at saturation for Group II. + * @param sand Sand from 0.02 to 2 mm; percentage of the fine earth. Full calibration bounds + * are not reported. (%) + * @return Gravimetric moisture retention at saturation expressed per unit dry soil mass. (g + * g⁻¹) + * + * @remark Geographic scope: + * Group II: 12 profiles in Nigeria developed from arenaceous sedimentary rocks, partly + * Cretaceous and partly Lower Pleistocene. + * + * @details Prediction target: + * Gravimetric moisture retention at saturation + * @note Table IV, Group II, sand predictor, water_0bar response. + */ +[[nodiscard]] +inline double calc_ptf_lal1979_group_ii_water_0bar_from_sand(double sand) { + return -0.004 * sand + 0.645; +} + +/** + * @brief Estimate gravimetric moisture retention at 0.1 bar suction for Group I. + * @param clay Clay smaller than 0.002 mm; percentage of the fine earth. Full calibration + * bounds are not reported. (%) + * @return Gravimetric moisture retention at 0.1 bar suction expressed per unit dry soil mass. + * (g g⁻¹) + * + * @remark Geographic scope: + * Group I: 11 well-drained upland profiles in western Nigeria developed over pre-Cambrian + * basement complex rocks, mainly biotite-muscovite paragneisses. + * + * @details Prediction target: + * Gravimetric moisture retention at 0.1 bar suction + * @note Table V, Group I, clay predictor, water_01bar response. + */ +[[nodiscard]] +inline double calc_ptf_lal1979_group_i_water_01bar_from_clay(double clay) { + return 0.003 * clay + 0.102; +} + +/** + * @brief Estimate gravimetric moisture retention at 0.3 bar suction for Group I. + * @param clay Clay smaller than 0.002 mm; percentage of the fine earth. Full calibration + * bounds are not reported. (%) + * @return Gravimetric moisture retention at 0.3 bar suction expressed per unit dry soil mass. + * (g g⁻¹) + * + * @remark Geographic scope: + * Group I: 11 well-drained upland profiles in western Nigeria developed over pre-Cambrian + * basement complex rocks, mainly biotite-muscovite paragneisses. + * + * @details Prediction target: + * Gravimetric moisture retention at 0.3 bar suction + * @note Table V, Group I, clay predictor, water_03bar response. + */ +[[nodiscard]] +inline double calc_ptf_lal1979_group_i_water_03bar_from_clay(double clay) { + return 0.004 * clay + 0.065; +} + +/** + * @brief Estimate gravimetric moisture retention at 0.1 bar suction for Group I. + * @param sand Sand from 0.02 to 2 mm; percentage of the fine earth. Full calibration bounds + * are not reported. (%) + * @return Gravimetric moisture retention at 0.1 bar suction expressed per unit dry soil mass. + * (g g⁻¹) + * + * @remark Geographic scope: + * Group I: 11 well-drained upland profiles in western Nigeria developed over pre-Cambrian + * basement complex rocks, mainly biotite-muscovite paragneisses. + * + * @details Prediction target: + * Gravimetric moisture retention at 0.1 bar suction + * @note Table V, Group I, sand predictor, water_01bar response. + */ +[[nodiscard]] +inline double calc_ptf_lal1979_group_i_water_01bar_from_sand(double sand) { + return -0.003 * sand + 0.364; +} + +/** + * @brief Estimate gravimetric moisture retention at 0.3 bar suction for Group I. + * @param sand Sand from 0.02 to 2 mm; percentage of the fine earth. Full calibration bounds + * are not reported. (%) + * @return Gravimetric moisture retention at 0.3 bar suction expressed per unit dry soil mass. + * (g g⁻¹) + * + * @remark Geographic scope: + * Group I: 11 well-drained upland profiles in western Nigeria developed over pre-Cambrian + * basement complex rocks, mainly biotite-muscovite paragneisses. + * + * @details Prediction target: + * Gravimetric moisture retention at 0.3 bar suction + * @note Table V, Group I, sand predictor, water_03bar response. + */ +[[nodiscard]] +inline double calc_ptf_lal1979_group_i_water_03bar_from_sand(double sand) { + return -0.003 * sand + 0.334; +} + +/** + * @brief Estimate gravimetric moisture retention at 0.1 bar suction for Group II. + * @param clay Clay smaller than 0.002 mm; percentage of the fine earth. Full calibration + * bounds are not reported. (%) + * @return Gravimetric moisture retention at 0.1 bar suction expressed per unit dry soil mass. + * (g g⁻¹) + * + * @remark Geographic scope: + * Group II: 12 profiles in Nigeria developed from arenaceous sedimentary rocks, partly + * Cretaceous and partly Lower Pleistocene. + * + * @details Prediction target: + * Gravimetric moisture retention at 0.1 bar suction + * @note Table V, Group II, clay predictor, water_01bar response. + */ +[[nodiscard]] +inline double calc_ptf_lal1979_group_ii_water_01bar_from_clay(double clay) { + return 0.003 * clay + 0.080; +} + +/** + * @brief Estimate gravimetric moisture retention at 0.3 bar suction for Group II. + * @param clay Clay smaller than 0.002 mm; percentage of the fine earth. Full calibration + * bounds are not reported. (%) + * @return Gravimetric moisture retention at 0.3 bar suction expressed per unit dry soil mass. + * (g g⁻¹) + * + * @remark Geographic scope: + * Group II: 12 profiles in Nigeria developed from arenaceous sedimentary rocks, partly + * Cretaceous and partly Lower Pleistocene. + * + * @details Prediction target: + * Gravimetric moisture retention at 0.3 bar suction + * @note Table V, Group II, clay predictor, water_03bar response. + */ +[[nodiscard]] +inline double calc_ptf_lal1979_group_ii_water_03bar_from_clay(double clay) { + return 0.003 * clay + 0.047; +} + +/** + * @brief Estimate gravimetric moisture retention at 0.1 bar suction for Group II. + * @param sand Sand from 0.02 to 2 mm; percentage of the fine earth. Full calibration bounds + * are not reported. (%) + * @return Gravimetric moisture retention at 0.1 bar suction expressed per unit dry soil mass. + * (g g⁻¹) + * + * @remark Geographic scope: + * Group II: 12 profiles in Nigeria developed from arenaceous sedimentary rocks, partly + * Cretaceous and partly Lower Pleistocene. + * + * @details Prediction target: + * Gravimetric moisture retention at 0.1 bar suction + * @note Table V, Group II, sand predictor, water_01bar response. + */ +[[nodiscard]] +inline double calc_ptf_lal1979_group_ii_water_01bar_from_sand(double sand) { + return -0.0035 * sand + 0.406; +} + +/** + * @brief Estimate gravimetric moisture retention at 0.3 bar suction for Group II. + * @param sand Sand from 0.02 to 2 mm; percentage of the fine earth. Full calibration bounds + * are not reported. (%) + * @return Gravimetric moisture retention at 0.3 bar suction expressed per unit dry soil mass. + * (g g⁻¹) + * + * @remark Geographic scope: + * Group II: 12 profiles in Nigeria developed from arenaceous sedimentary rocks, partly + * Cretaceous and partly Lower Pleistocene. + * + * @details Prediction target: + * Gravimetric moisture retention at 0.3 bar suction + * @note Table V, Group II, sand predictor, water_03bar response. + */ +[[nodiscard]] +inline double calc_ptf_lal1979_group_ii_water_03bar_from_sand(double sand) { + return -0.003 * sand + 0.349; +} + +/** + * @brief Estimate gravimetric moisture retention at 15 bar suction for Group I. + * @param clay Clay smaller than 0.002 mm; percentage of the fine earth. Full calibration + * bounds are not reported. (%) + * @return Gravimetric moisture retention at 15 bar suction expressed per unit dry soil mass. + * (g g⁻¹) + * + * @remark Geographic scope: + * Group I: 11 well-drained upland profiles in western Nigeria developed over pre-Cambrian + * basement complex rocks, mainly biotite-muscovite paragneisses. + * + * @details Prediction target: + * Gravimetric moisture retention at 15 bar suction + * @note Table VI, Group I, clay predictor, water_15bar response. + */ +[[nodiscard]] +inline double calc_ptf_lal1979_group_i_water_15bar_from_clay(double clay) { + return 0.003 * clay + 0.006; +} + +/** + * @brief Estimate gravimetric moisture retention at 15 bar suction for Group I. + * @param sand Sand from 0.02 to 2 mm; percentage of the fine earth. Full calibration bounds + * are not reported. (%) + * @return Gravimetric moisture retention at 15 bar suction expressed per unit dry soil mass. + * (g g⁻¹) + * + * @remark Geographic scope: + * Group I: 11 well-drained upland profiles in western Nigeria developed over pre-Cambrian + * basement complex rocks, mainly biotite-muscovite paragneisses. + * + * @details Prediction target: + * Gravimetric moisture retention at 15 bar suction + * @note Table VI, Group I, sand predictor, water_15bar response. + */ +[[nodiscard]] +inline double calc_ptf_lal1979_group_i_water_15bar_from_sand(double sand) { + return -0.003 * sand + 0.247; +} + +/** + * @brief Estimate gravimetric moisture retention at 15 bar suction for Group I. + * @param silt Silt from 0.002 to 0.02 mm; percentage of the fine earth. Full calibration + * bounds are not reported. (%) + * @return Gravimetric moisture retention at 15 bar suction expressed per unit dry soil mass. + * (g g⁻¹) + * + * @remark Geographic scope: + * Group I: 11 well-drained upland profiles in western Nigeria developed over pre-Cambrian + * basement complex rocks, mainly biotite-muscovite paragneisses. + * + * @details Prediction target: + * Gravimetric moisture retention at 15 bar suction + * @note Table VI, Group I, silt predictor, water_15bar response. + */ +[[nodiscard]] +inline double calc_ptf_lal1979_group_i_water_15bar_from_silt(double silt) { + return 0.005 * silt + 0.053; +} + +/** + * @brief Estimate gravimetric moisture retention at 15 bar suction for Group II. + * @param clay Clay smaller than 0.002 mm; percentage of the fine earth. Full calibration + * bounds are not reported. (%) + * @return Gravimetric moisture retention at 15 bar suction expressed per unit dry soil mass. + * (g g⁻¹) + * + * @remark Geographic scope: + * Group II: 12 profiles in Nigeria developed from arenaceous sedimentary rocks, partly + * Cretaceous and partly Lower Pleistocene. + * + * @details Prediction target: + * Gravimetric moisture retention at 15 bar suction + * @note Table VI, Group II, clay predictor, water_15bar response. + */ +[[nodiscard]] +inline double calc_ptf_lal1979_group_ii_water_15bar_from_clay(double clay) { + return 0.0022 * clay + 0.025; +} + +/** + * @brief Estimate gravimetric moisture retention at 15 bar suction for Group II. + * @param sand Sand from 0.02 to 2 mm; percentage of the fine earth. Full calibration bounds + * are not reported. (%) + * @return Gravimetric moisture retention at 15 bar suction expressed per unit dry soil mass. + * (g g⁻¹) + * + * @remark Geographic scope: + * Group II: 12 profiles in Nigeria developed from arenaceous sedimentary rocks, partly + * Cretaceous and partly Lower Pleistocene. + * + * @details Prediction target: + * Gravimetric moisture retention at 15 bar suction + * @note Table VI, Group II, sand predictor, water_15bar response. + */ +[[nodiscard]] +inline double calc_ptf_lal1979_group_ii_water_15bar_from_sand(double sand) { + return -0.0024 * sand + 0.284; +} + +/** + * @brief Estimate gravimetric moisture equivalent measured at 1000 times gravity for Group I. + * @param clay Clay smaller than 0.002 mm; percentage of the fine earth. Full calibration + * bounds are not reported. (%) + * @return Gravimetric moisture equivalent measured at 1000 times gravity expressed per unit + * dry soil mass. (g g⁻¹) + * + * @remark Geographic scope: + * Group I: 11 well-drained upland profiles in western Nigeria developed over pre-Cambrian + * basement complex rocks, mainly biotite-muscovite paragneisses. + * + * @details Prediction target: + * Gravimetric moisture equivalent measured at 1000 times gravity + * @note Table VII, Group I, clay predictor, moisture_equivalent response. + */ +[[nodiscard]] +inline double calc_ptf_lal1979_group_i_moisture_equivalent_from_clay(double clay) { + return 0.004 * clay + 0.052; +} + +/** + * @brief Estimate gravimetric moisture equivalent measured at 1000 times gravity for Group I. + * @param sand Sand from 0.02 to 2 mm; percentage of the fine earth. Full calibration bounds + * are not reported. (%) + * @return Gravimetric moisture equivalent measured at 1000 times gravity expressed per unit + * dry soil mass. (g g⁻¹) + * + * @remark Geographic scope: + * Group I: 11 well-drained upland profiles in western Nigeria developed over pre-Cambrian + * basement complex rocks, mainly biotite-muscovite paragneisses. + * + * @details Prediction target: + * Gravimetric moisture equivalent measured at 1000 times gravity + * @note Table VII, Group I, sand predictor, moisture_equivalent response. + */ +[[nodiscard]] +inline double calc_ptf_lal1979_group_i_moisture_equivalent_from_sand(double sand) { + return -0.003 * sand + 0.339; +} + +/** + * @brief Estimate gravimetric moisture equivalent measured at 1000 times gravity for Group II. + * @param clay Clay smaller than 0.002 mm; percentage of the fine earth. Full calibration + * bounds are not reported. (%) + * @return Gravimetric moisture equivalent measured at 1000 times gravity expressed per unit + * dry soil mass. (g g⁻¹) + * + * @remark Geographic scope: + * Group II: 12 profiles in Nigeria developed from arenaceous sedimentary rocks, partly + * Cretaceous and partly Lower Pleistocene. + * + * @details Prediction target: + * Gravimetric moisture equivalent measured at 1000 times gravity + * @note Table VII, Group II, clay predictor, moisture_equivalent response. + */ +[[nodiscard]] +inline double calc_ptf_lal1979_group_ii_moisture_equivalent_from_clay(double clay) { + return 0.0025 * clay + 0.057; +} + +/** + * @brief Estimate gravimetric moisture equivalent measured at 1000 times gravity for Group II. + * @param sand Sand from 0.02 to 2 mm; percentage of the fine earth. Full calibration bounds + * are not reported. (%) + * @return Gravimetric moisture equivalent measured at 1000 times gravity expressed per unit + * dry soil mass. (g g⁻¹) + * + * @remark Geographic scope: + * Group II: 12 profiles in Nigeria developed from arenaceous sedimentary rocks, partly + * Cretaceous and partly Lower Pleistocene. + * + * @details Prediction target: + * Gravimetric moisture equivalent measured at 1000 times gravity + * @note Table VII, Group II, sand predictor, moisture_equivalent response. + */ +[[nodiscard]] +inline double calc_ptf_lal1979_group_ii_moisture_equivalent_from_sand(double sand) { + return -0.002 * sand + 0.284; +} + +/** + * @brief Estimate gravimetric moisture equivalent measured at 1000 times gravity for Group II. + * @param silt Silt from 0.002 to 0.02 mm; percentage of the fine earth. Full calibration + * bounds are not reported. (%) + * @return Gravimetric moisture equivalent measured at 1000 times gravity expressed per unit + * dry soil mass. (g g⁻¹) + * + * @remark Geographic scope: + * Group II: 12 profiles in Nigeria developed from arenaceous sedimentary rocks, partly + * Cretaceous and partly Lower Pleistocene. + * + * @details Prediction target: + * Gravimetric moisture equivalent measured at 1000 times gravity + * @note Table VII, Group II, silt predictor, moisture_equivalent response. + */ +[[nodiscard]] +inline double calc_ptf_lal1979_group_ii_moisture_equivalent_from_silt(double silt) { + return -0.005 * silt + 0.175; +} + +/** + * @brief Estimate gravimetric moisture retention at 0.3 bar suction for Group II. + * @param water_01bar Gravimetric moisture retention at 0.1 bar suction on disturbed soil. + * (g/g) + * @return Gravimetric moisture retention at 0.3 bar suction expressed per unit dry soil mass. + * (g g⁻¹) + * + * @remark Geographic scope: + * Group II: 12 profiles in Nigeria developed from arenaceous sedimentary rocks, partly + * Cretaceous and partly Lower Pleistocene. + * + * @details Prediction target: + * Gravimetric moisture retention at 0.3 bar suction + * @note Table VIII, Group II, water_01bar predictor, water_03bar response. + */ +[[nodiscard]] +inline double calc_ptf_lal1979_group_ii_water_03bar_from_water_01bar(double water_01bar) { + return 0.86 * water_01bar + -0.014; +} + +/** + * @brief Estimate gravimetric moisture retention at 15 bar suction for Group II. + * @param water_01bar Gravimetric moisture retention at 0.1 bar suction on disturbed soil. + * (g/g) + * @return Gravimetric moisture retention at 15 bar suction expressed per unit dry soil mass. + * (g g⁻¹) + * + * @remark Geographic scope: + * Group II: 12 profiles in Nigeria developed from arenaceous sedimentary rocks, partly + * Cretaceous and partly Lower Pleistocene. + * + * @details Prediction target: + * Gravimetric moisture retention at 15 bar suction + * @note Table VIII, Group II, water_01bar predictor, water_15bar response. + */ +[[nodiscard]] +inline double calc_ptf_lal1979_group_ii_water_15bar_from_water_01bar(double water_01bar) { + return 0.54 * water_01bar + -0.005; +} + +/** + * @brief Estimate upper plastic limit for Group I. + * @param organic_carbon Organic carbon measured by Walkley and Black wet combustion; + * percentage of the fine earth. Full calibration bounds are not reported. (%) + * @return Upper plastic limit expressed as percentage of oven-dry soil mass. (%) + * + * @remark Geographic scope: + * Group I: 11 well-drained upland profiles in western Nigeria developed over pre-Cambrian + * basement complex rocks, mainly biotite-muscovite paragneisses. + * + * @details Prediction target: + * Upper plastic limit + * @note Table IX, Group I, organic_carbon predictor, upper_plastic_limit response. + */ +[[nodiscard]] +inline double +calc_ptf_lal1979_group_i_upper_plastic_limit_from_organic_carbon(double organic_carbon) { + return -5.40 * organic_carbon + 31.73; +} + +/** + * @brief Estimate lower plastic limit for Group I. + * @param organic_carbon Organic carbon measured by Walkley and Black wet combustion; + * percentage of the fine earth. Full calibration bounds are not reported. (%) + * @return Lower plastic limit expressed as percentage of oven-dry soil mass. (%) + * + * @remark Geographic scope: + * Group I: 11 well-drained upland profiles in western Nigeria developed over pre-Cambrian + * basement complex rocks, mainly biotite-muscovite paragneisses. + * + * @details Prediction target: + * Lower plastic limit + * @note Table IX, Group I, organic_carbon predictor, lower_plastic_limit response. + */ +[[nodiscard]] +inline double +calc_ptf_lal1979_group_i_lower_plastic_limit_from_organic_carbon(double organic_carbon) { + return -4.24 * organic_carbon + 24.73; +} + +/** + * @brief Estimate plasticity index (upper minus lower plastic limit) for Group I. + * @param organic_carbon Organic carbon measured by Walkley and Black wet combustion; + * percentage of the fine earth. Full calibration bounds are not reported. (%) + * @return Plasticity index (upper minus lower plastic limit) expressed as percentage of + * oven-dry soil mass. (%) + * + * @remark Geographic scope: + * Group I: 11 well-drained upland profiles in western Nigeria developed over pre-Cambrian + * basement complex rocks, mainly biotite-muscovite paragneisses. + * + * @details Prediction target: + * Plasticity index (upper minus lower plastic limit) + * @note Table IX, Group I, organic_carbon predictor, plasticity_index response. + */ +[[nodiscard]] +inline double calc_ptf_lal1979_group_i_plasticity_index_from_organic_carbon(double organic_carbon) { + return -1.24 * organic_carbon + 7.42; +} + +/** + * @brief Estimate upper plastic limit for Group I. + * @param clay Clay smaller than 0.002 mm; percentage of the fine earth. Full calibration + * bounds are not reported. (%) + * @return Upper plastic limit expressed as percentage of oven-dry soil mass. (%) + * + * @remark Geographic scope: + * Group I: 11 well-drained upland profiles in western Nigeria developed over pre-Cambrian + * basement complex rocks, mainly biotite-muscovite paragneisses. + * + * @details Prediction target: + * Upper plastic limit + * @note Table IX, Group I, clay predictor, upper_plastic_limit response. + */ +[[nodiscard]] +inline double calc_ptf_lal1979_group_i_upper_plastic_limit_from_clay(double clay) { + return 0.46 * clay + 11.48; +} + +/** + * @brief Estimate lower plastic limit for Group I. + * @param clay Clay smaller than 0.002 mm; percentage of the fine earth. Full calibration + * bounds are not reported. (%) + * @return Lower plastic limit expressed as percentage of oven-dry soil mass. (%) + * + * @remark Geographic scope: + * Group I: 11 well-drained upland profiles in western Nigeria developed over pre-Cambrian + * basement complex rocks, mainly biotite-muscovite paragneisses. + * + * @details Prediction target: + * Lower plastic limit + * @note Table IX, Group I, clay predictor, lower_plastic_limit response. + */ +[[nodiscard]] +inline double calc_ptf_lal1979_group_i_lower_plastic_limit_from_clay(double clay) { + return 0.34 * clay + 9.50; +} + +/** + * @brief Estimate plasticity index (upper minus lower plastic limit) for Group I. + * @param clay Clay smaller than 0.002 mm; percentage of the fine earth. Full calibration + * bounds are not reported. (%) + * @return Plasticity index (upper minus lower plastic limit) expressed as percentage of + * oven-dry soil mass. (%) + * + * @remark Geographic scope: + * Group I: 11 well-drained upland profiles in western Nigeria developed over pre-Cambrian + * basement complex rocks, mainly biotite-muscovite paragneisses. + * + * @details Prediction target: + * Plasticity index (upper minus lower plastic limit) + * @note Table IX, Group I, clay predictor, plasticity_index response. + */ +[[nodiscard]] +inline double calc_ptf_lal1979_group_i_plasticity_index_from_clay(double clay) { + return 0.11 * clay + 2.48; +} + +/** + * @brief Estimate lower plastic limit for Group I. + * @param sand Sand from 0.02 to 2 mm; percentage of the fine earth. Full calibration bounds + * are not reported. (%) + * @return Lower plastic limit expressed as percentage of oven-dry soil mass. (%) + * + * @remark Geographic scope: + * Group I: 11 well-drained upland profiles in western Nigeria developed over pre-Cambrian + * basement complex rocks, mainly biotite-muscovite paragneisses. + * + * @details Prediction target: + * Lower plastic limit + * @note Table IX, Group I, sand predictor, lower_plastic_limit response. + */ +[[nodiscard]] +inline double calc_ptf_lal1979_group_i_lower_plastic_limit_from_sand(double sand) { + return -0.30 * sand + 35.50; +} + +/** + * @brief Estimate plasticity index (upper minus lower plastic limit) for Group I. + * @param sand Sand from 0.02 to 2 mm; percentage of the fine earth. Full calibration bounds + * are not reported. (%) + * @return Plasticity index (upper minus lower plastic limit) expressed as percentage of + * oven-dry soil mass. (%) + * + * @remark Geographic scope: + * Group I: 11 well-drained upland profiles in western Nigeria developed over pre-Cambrian + * basement complex rocks, mainly biotite-muscovite paragneisses. + * + * @details Prediction target: + * Plasticity index (upper minus lower plastic limit) + * @note Table IX, Group I, sand predictor, plasticity_index response. + */ +[[nodiscard]] +inline double calc_ptf_lal1979_group_i_plasticity_index_from_sand(double sand) { + return -0.10 * sand + 11.00; +} + +/** + * @brief Estimate upper plastic limit for Group II. + * @param organic_carbon Organic carbon measured by Walkley and Black wet combustion; + * percentage of the fine earth. Full calibration bounds are not reported. (%) + * @return Upper plastic limit expressed as percentage of oven-dry soil mass. (%) + * + * @remark Geographic scope: + * Group II: 12 profiles in Nigeria developed from arenaceous sedimentary rocks, partly + * Cretaceous and partly Lower Pleistocene. + * + * @details Prediction target: + * Upper plastic limit + * @note Table IX, Group II, organic_carbon predictor, upper_plastic_limit response. + */ +[[nodiscard]] +inline double +calc_ptf_lal1979_group_ii_upper_plastic_limit_from_organic_carbon(double organic_carbon) { + return -3.01 * organic_carbon + 32.20; +} + +/** + * @brief Estimate plasticity index (upper minus lower plastic limit) for Group II. + * @param organic_carbon Organic carbon measured by Walkley and Black wet combustion; + * percentage of the fine earth. Full calibration bounds are not reported. (%) + * @return Plasticity index (upper minus lower plastic limit) expressed as percentage of + * oven-dry soil mass. (%) + * + * @remark Geographic scope: + * Group II: 12 profiles in Nigeria developed from arenaceous sedimentary rocks, partly + * Cretaceous and partly Lower Pleistocene. + * + * @details Prediction target: + * Plasticity index (upper minus lower plastic limit) + * @note Table IX, Group II, organic_carbon predictor, plasticity_index response. + */ +[[nodiscard]] +inline double +calc_ptf_lal1979_group_ii_plasticity_index_from_organic_carbon(double organic_carbon) { + return -3.22 * organic_carbon + 12.70; +} + +/** + * @brief Estimate upper plastic limit for Group II. + * @param clay Clay smaller than 0.002 mm; percentage of the fine earth. Full calibration + * bounds are not reported. (%) + * @return Upper plastic limit expressed as percentage of oven-dry soil mass. (%) + * + * @remark Geographic scope: + * Group II: 12 profiles in Nigeria developed from arenaceous sedimentary rocks, partly + * Cretaceous and partly Lower Pleistocene. + * + * @details Prediction target: + * Upper plastic limit + * @note Table IX, Group II, clay predictor, upper_plastic_limit response. + */ +[[nodiscard]] +inline double calc_ptf_lal1979_group_ii_upper_plastic_limit_from_clay(double clay) { + return 0.16 * clay + 24.59; +} + +/** + * @brief Estimate lower plastic limit for Group II. + * @param clay Clay smaller than 0.002 mm; percentage of the fine earth. Full calibration + * bounds are not reported. (%) + * @return Lower plastic limit expressed as percentage of oven-dry soil mass. (%) + * + * @remark Geographic scope: + * Group II: 12 profiles in Nigeria developed from arenaceous sedimentary rocks, partly + * Cretaceous and partly Lower Pleistocene. + * + * @details Prediction target: + * Lower plastic limit + * @note Table IX, Group II, clay predictor, lower_plastic_limit response. + */ +[[nodiscard]] +inline double calc_ptf_lal1979_group_ii_lower_plastic_limit_from_clay(double clay) { + return 0.14 * clay + 14.64; +} + +/** + * @brief Estimate upper plastic limit for Group II. + * @param sand Sand from 0.02 to 2 mm; percentage of the fine earth. Full calibration bounds + * are not reported. (%) + * @return Upper plastic limit expressed as percentage of oven-dry soil mass. (%) + * + * @remark Geographic scope: + * Group II: 12 profiles in Nigeria developed from arenaceous sedimentary rocks, partly + * Cretaceous and partly Lower Pleistocene. + * + * @details Prediction target: + * Upper plastic limit + * @note Table IX, Group II, sand predictor, upper_plastic_limit response. + */ +[[nodiscard]] +inline double calc_ptf_lal1979_group_ii_upper_plastic_limit_from_sand(double sand) { + return -0.17 * sand + 40.41; +} + +/** + * @brief Estimate lower plastic limit for Group II. + * @param sand Sand from 0.02 to 2 mm; percentage of the fine earth. Full calibration bounds + * are not reported. (%) + * @return Lower plastic limit expressed as percentage of oven-dry soil mass. (%) + * + * @remark Geographic scope: + * Group II: 12 profiles in Nigeria developed from arenaceous sedimentary rocks, partly + * Cretaceous and partly Lower Pleistocene. + * + * @details Prediction target: + * Lower plastic limit + * @note Table IX, Group II, sand predictor, lower_plastic_limit response. + */ +[[nodiscard]] +inline double calc_ptf_lal1979_group_ii_lower_plastic_limit_from_sand(double sand) { + return -0.17 * sand + 29.88; +} + +/** + * @brief Estimate upper plastic limit for Group II. + * @param silt Silt from 0.002 to 0.02 mm; percentage of the fine earth. Full calibration + * bounds are not reported. (%) + * @return Upper plastic limit expressed as percentage of oven-dry soil mass. (%) + * + * @remark Geographic scope: + * Group II: 12 profiles in Nigeria developed from arenaceous sedimentary rocks, partly + * Cretaceous and partly Lower Pleistocene. + * + * @details Prediction target: + * Upper plastic limit + * @note Table IX, Group II, silt predictor, upper_plastic_limit response. + */ +[[nodiscard]] +inline double calc_ptf_lal1979_group_ii_upper_plastic_limit_from_silt(double silt) { + return 0.35 * silt + 28.24; +} + +/** + * @brief Estimate lower plastic limit for Group II. + * @param silt Silt from 0.002 to 0.02 mm; percentage of the fine earth. Full calibration + * bounds are not reported. (%) + * @return Lower plastic limit expressed as percentage of oven-dry soil mass. (%) + * + * @remark Geographic scope: + * Group II: 12 profiles in Nigeria developed from arenaceous sedimentary rocks, partly + * Cretaceous and partly Lower Pleistocene. + * + * @details Prediction target: + * Lower plastic limit + * @note Table IX, Group II, silt predictor, lower_plastic_limit response. + */ +[[nodiscard]] +inline double calc_ptf_lal1979_group_ii_lower_plastic_limit_from_silt(double silt) { + return 0.67 * silt + 16.16; +} + +/** + * @brief Estimate plasticity index (upper minus lower plastic limit) for Group II. + * @param silt Silt from 0.002 to 0.02 mm; percentage of the fine earth. Full calibration + * bounds are not reported. (%) + * @return Plasticity index (upper minus lower plastic limit) expressed as percentage of + * oven-dry soil mass. (%) + * + * @remark Geographic scope: + * Group II: 12 profiles in Nigeria developed from arenaceous sedimentary rocks, partly + * Cretaceous and partly Lower Pleistocene. + * + * @details Prediction target: + * Plasticity index (upper minus lower plastic limit) + * @note Table IX, Group II, silt predictor, plasticity_index response. + */ +[[nodiscard]] +inline double calc_ptf_lal1979_group_ii_plasticity_index_from_silt(double silt) { + return -0.32 * silt + 12.08; +} + +} // namespace ptfkit::lal1979 diff --git a/targets/ptfkit-native/cpp/ptfkit.cppm b/targets/ptfkit-native/cpp/ptfkit.cppm index 5cefe0c..c39a37e 100644 --- a/targets/ptfkit-native/cpp/ptfkit.cppm +++ b/targets/ptfkit-native/cpp/ptfkit.cppm @@ -13,6 +13,7 @@ export import ptfkit.ferrerjulia2004; export import ptfkit.gunarathna2019; export import ptfkit.hodnett2002; export import ptfkit.jabro1992; +export import ptfkit.lal1979; export import ptfkit.li2007; export import ptfkit.mayr1999; export import ptfkit.oosterveld1980; diff --git a/targets/ptfkit-native/include/ptfkit/lal1979.h b/targets/ptfkit-native/include/ptfkit/lal1979.h new file mode 100644 index 0000000..faad6e8 --- /dev/null +++ b/targets/ptfkit-native/include/ptfkit/lal1979.h @@ -0,0 +1,793 @@ +/* @generated by ptfkit-codegen; DO NOT EDIT. */ + +#ifndef PTFKIT_LAL1979_H +#define PTFKIT_LAL1979_H + +/** + * @brief Moisture retention and plasticity regressions for two groups of Nigerian soils. + * + * @details Source publication: + * Lal, R. (1979). Physical properties and moisture retention characteristics of some Nigerian + * soils. Geoderma, 21, 209-223. + * @see https://doi.org/10.1016/0016-7061(78)90028-9 DOI: 10.1016/0016-7061(78)90028-9 + * + * @remark Geographic scope: + * Nigeria + * + * @remark Calibration dataset: + * 119 genetic-horizon samples from 23 profiles in two parent-material groups. + */ + +/** + * @brief Estimate gravimetric moisture retention at saturation for Group I. + * @param clay Clay smaller than 0.002 mm; percentage of the fine earth. Full calibration + * bounds are not reported. (%) + * @return Gravimetric moisture retention at saturation expressed per unit dry soil mass. (g + * g⁻¹) + * + * @remark Geographic scope: + * Group I: 11 well-drained upland profiles in western Nigeria developed over pre-Cambrian + * basement complex rocks, mainly biotite-muscovite paragneisses. + * + * @details Prediction target: + * Gravimetric moisture retention at saturation + * @note Table IV, Group I, clay predictor, water_0bar response. + */ +static inline double calc_ptf_lal1979_group_i_water_0bar_from_clay(double clay) { + return 0.004 * clay + 0.289; +} + +/** + * @brief Estimate gravimetric moisture retention at saturation for Group I. + * @param sand Sand from 0.02 to 2 mm; percentage of the fine earth. Full calibration bounds + * are not reported. (%) + * @return Gravimetric moisture retention at saturation expressed per unit dry soil mass. (g + * g⁻¹) + * + * @remark Geographic scope: + * Group I: 11 well-drained upland profiles in western Nigeria developed over pre-Cambrian + * basement complex rocks, mainly biotite-muscovite paragneisses. + * + * @details Prediction target: + * Gravimetric moisture retention at saturation + * @note Table IV, Group I, sand predictor, water_0bar response. + */ +static inline double calc_ptf_lal1979_group_i_water_0bar_from_sand(double sand) { + return -0.003 * sand + 0.579; +} + +/** + * @brief Estimate gravimetric moisture retention at saturation for Group II. + * @param clay Clay smaller than 0.002 mm; percentage of the fine earth. Full calibration + * bounds are not reported. (%) + * @return Gravimetric moisture retention at saturation expressed per unit dry soil mass. (g + * g⁻¹) + * + * @remark Geographic scope: + * Group II: 12 profiles in Nigeria developed from arenaceous sedimentary rocks, partly + * Cretaceous and partly Lower Pleistocene. + * + * @details Prediction target: + * Gravimetric moisture retention at saturation + * @note Table IV, Group II, clay predictor, water_0bar response. + */ +static inline double calc_ptf_lal1979_group_ii_water_0bar_from_clay(double clay) { + return 0.004 * clay + 0.296; +} + +/** + * @brief Estimate gravimetric moisture retention at saturation for Group II. + * @param sand Sand from 0.02 to 2 mm; percentage of the fine earth. Full calibration bounds + * are not reported. (%) + * @return Gravimetric moisture retention at saturation expressed per unit dry soil mass. (g + * g⁻¹) + * + * @remark Geographic scope: + * Group II: 12 profiles in Nigeria developed from arenaceous sedimentary rocks, partly + * Cretaceous and partly Lower Pleistocene. + * + * @details Prediction target: + * Gravimetric moisture retention at saturation + * @note Table IV, Group II, sand predictor, water_0bar response. + */ +static inline double calc_ptf_lal1979_group_ii_water_0bar_from_sand(double sand) { + return -0.004 * sand + 0.645; +} + +/** + * @brief Estimate gravimetric moisture retention at 0.1 bar suction for Group I. + * @param clay Clay smaller than 0.002 mm; percentage of the fine earth. Full calibration + * bounds are not reported. (%) + * @return Gravimetric moisture retention at 0.1 bar suction expressed per unit dry soil mass. + * (g g⁻¹) + * + * @remark Geographic scope: + * Group I: 11 well-drained upland profiles in western Nigeria developed over pre-Cambrian + * basement complex rocks, mainly biotite-muscovite paragneisses. + * + * @details Prediction target: + * Gravimetric moisture retention at 0.1 bar suction + * @note Table V, Group I, clay predictor, water_01bar response. + */ +static inline double calc_ptf_lal1979_group_i_water_01bar_from_clay(double clay) { + return 0.003 * clay + 0.102; +} + +/** + * @brief Estimate gravimetric moisture retention at 0.3 bar suction for Group I. + * @param clay Clay smaller than 0.002 mm; percentage of the fine earth. Full calibration + * bounds are not reported. (%) + * @return Gravimetric moisture retention at 0.3 bar suction expressed per unit dry soil mass. + * (g g⁻¹) + * + * @remark Geographic scope: + * Group I: 11 well-drained upland profiles in western Nigeria developed over pre-Cambrian + * basement complex rocks, mainly biotite-muscovite paragneisses. + * + * @details Prediction target: + * Gravimetric moisture retention at 0.3 bar suction + * @note Table V, Group I, clay predictor, water_03bar response. + */ +static inline double calc_ptf_lal1979_group_i_water_03bar_from_clay(double clay) { + return 0.004 * clay + 0.065; +} + +/** + * @brief Estimate gravimetric moisture retention at 0.1 bar suction for Group I. + * @param sand Sand from 0.02 to 2 mm; percentage of the fine earth. Full calibration bounds + * are not reported. (%) + * @return Gravimetric moisture retention at 0.1 bar suction expressed per unit dry soil mass. + * (g g⁻¹) + * + * @remark Geographic scope: + * Group I: 11 well-drained upland profiles in western Nigeria developed over pre-Cambrian + * basement complex rocks, mainly biotite-muscovite paragneisses. + * + * @details Prediction target: + * Gravimetric moisture retention at 0.1 bar suction + * @note Table V, Group I, sand predictor, water_01bar response. + */ +static inline double calc_ptf_lal1979_group_i_water_01bar_from_sand(double sand) { + return -0.003 * sand + 0.364; +} + +/** + * @brief Estimate gravimetric moisture retention at 0.3 bar suction for Group I. + * @param sand Sand from 0.02 to 2 mm; percentage of the fine earth. Full calibration bounds + * are not reported. (%) + * @return Gravimetric moisture retention at 0.3 bar suction expressed per unit dry soil mass. + * (g g⁻¹) + * + * @remark Geographic scope: + * Group I: 11 well-drained upland profiles in western Nigeria developed over pre-Cambrian + * basement complex rocks, mainly biotite-muscovite paragneisses. + * + * @details Prediction target: + * Gravimetric moisture retention at 0.3 bar suction + * @note Table V, Group I, sand predictor, water_03bar response. + */ +static inline double calc_ptf_lal1979_group_i_water_03bar_from_sand(double sand) { + return -0.003 * sand + 0.334; +} + +/** + * @brief Estimate gravimetric moisture retention at 0.1 bar suction for Group II. + * @param clay Clay smaller than 0.002 mm; percentage of the fine earth. Full calibration + * bounds are not reported. (%) + * @return Gravimetric moisture retention at 0.1 bar suction expressed per unit dry soil mass. + * (g g⁻¹) + * + * @remark Geographic scope: + * Group II: 12 profiles in Nigeria developed from arenaceous sedimentary rocks, partly + * Cretaceous and partly Lower Pleistocene. + * + * @details Prediction target: + * Gravimetric moisture retention at 0.1 bar suction + * @note Table V, Group II, clay predictor, water_01bar response. + */ +static inline double calc_ptf_lal1979_group_ii_water_01bar_from_clay(double clay) { + return 0.003 * clay + 0.080; +} + +/** + * @brief Estimate gravimetric moisture retention at 0.3 bar suction for Group II. + * @param clay Clay smaller than 0.002 mm; percentage of the fine earth. Full calibration + * bounds are not reported. (%) + * @return Gravimetric moisture retention at 0.3 bar suction expressed per unit dry soil mass. + * (g g⁻¹) + * + * @remark Geographic scope: + * Group II: 12 profiles in Nigeria developed from arenaceous sedimentary rocks, partly + * Cretaceous and partly Lower Pleistocene. + * + * @details Prediction target: + * Gravimetric moisture retention at 0.3 bar suction + * @note Table V, Group II, clay predictor, water_03bar response. + */ +static inline double calc_ptf_lal1979_group_ii_water_03bar_from_clay(double clay) { + return 0.003 * clay + 0.047; +} + +/** + * @brief Estimate gravimetric moisture retention at 0.1 bar suction for Group II. + * @param sand Sand from 0.02 to 2 mm; percentage of the fine earth. Full calibration bounds + * are not reported. (%) + * @return Gravimetric moisture retention at 0.1 bar suction expressed per unit dry soil mass. + * (g g⁻¹) + * + * @remark Geographic scope: + * Group II: 12 profiles in Nigeria developed from arenaceous sedimentary rocks, partly + * Cretaceous and partly Lower Pleistocene. + * + * @details Prediction target: + * Gravimetric moisture retention at 0.1 bar suction + * @note Table V, Group II, sand predictor, water_01bar response. + */ +static inline double calc_ptf_lal1979_group_ii_water_01bar_from_sand(double sand) { + return -0.0035 * sand + 0.406; +} + +/** + * @brief Estimate gravimetric moisture retention at 0.3 bar suction for Group II. + * @param sand Sand from 0.02 to 2 mm; percentage of the fine earth. Full calibration bounds + * are not reported. (%) + * @return Gravimetric moisture retention at 0.3 bar suction expressed per unit dry soil mass. + * (g g⁻¹) + * + * @remark Geographic scope: + * Group II: 12 profiles in Nigeria developed from arenaceous sedimentary rocks, partly + * Cretaceous and partly Lower Pleistocene. + * + * @details Prediction target: + * Gravimetric moisture retention at 0.3 bar suction + * @note Table V, Group II, sand predictor, water_03bar response. + */ +static inline double calc_ptf_lal1979_group_ii_water_03bar_from_sand(double sand) { + return -0.003 * sand + 0.349; +} + +/** + * @brief Estimate gravimetric moisture retention at 15 bar suction for Group I. + * @param clay Clay smaller than 0.002 mm; percentage of the fine earth. Full calibration + * bounds are not reported. (%) + * @return Gravimetric moisture retention at 15 bar suction expressed per unit dry soil mass. + * (g g⁻¹) + * + * @remark Geographic scope: + * Group I: 11 well-drained upland profiles in western Nigeria developed over pre-Cambrian + * basement complex rocks, mainly biotite-muscovite paragneisses. + * + * @details Prediction target: + * Gravimetric moisture retention at 15 bar suction + * @note Table VI, Group I, clay predictor, water_15bar response. + */ +static inline double calc_ptf_lal1979_group_i_water_15bar_from_clay(double clay) { + return 0.003 * clay + 0.006; +} + +/** + * @brief Estimate gravimetric moisture retention at 15 bar suction for Group I. + * @param sand Sand from 0.02 to 2 mm; percentage of the fine earth. Full calibration bounds + * are not reported. (%) + * @return Gravimetric moisture retention at 15 bar suction expressed per unit dry soil mass. + * (g g⁻¹) + * + * @remark Geographic scope: + * Group I: 11 well-drained upland profiles in western Nigeria developed over pre-Cambrian + * basement complex rocks, mainly biotite-muscovite paragneisses. + * + * @details Prediction target: + * Gravimetric moisture retention at 15 bar suction + * @note Table VI, Group I, sand predictor, water_15bar response. + */ +static inline double calc_ptf_lal1979_group_i_water_15bar_from_sand(double sand) { + return -0.003 * sand + 0.247; +} + +/** + * @brief Estimate gravimetric moisture retention at 15 bar suction for Group I. + * @param silt Silt from 0.002 to 0.02 mm; percentage of the fine earth. Full calibration + * bounds are not reported. (%) + * @return Gravimetric moisture retention at 15 bar suction expressed per unit dry soil mass. + * (g g⁻¹) + * + * @remark Geographic scope: + * Group I: 11 well-drained upland profiles in western Nigeria developed over pre-Cambrian + * basement complex rocks, mainly biotite-muscovite paragneisses. + * + * @details Prediction target: + * Gravimetric moisture retention at 15 bar suction + * @note Table VI, Group I, silt predictor, water_15bar response. + */ +static inline double calc_ptf_lal1979_group_i_water_15bar_from_silt(double silt) { + return 0.005 * silt + 0.053; +} + +/** + * @brief Estimate gravimetric moisture retention at 15 bar suction for Group II. + * @param clay Clay smaller than 0.002 mm; percentage of the fine earth. Full calibration + * bounds are not reported. (%) + * @return Gravimetric moisture retention at 15 bar suction expressed per unit dry soil mass. + * (g g⁻¹) + * + * @remark Geographic scope: + * Group II: 12 profiles in Nigeria developed from arenaceous sedimentary rocks, partly + * Cretaceous and partly Lower Pleistocene. + * + * @details Prediction target: + * Gravimetric moisture retention at 15 bar suction + * @note Table VI, Group II, clay predictor, water_15bar response. + */ +static inline double calc_ptf_lal1979_group_ii_water_15bar_from_clay(double clay) { + return 0.0022 * clay + 0.025; +} + +/** + * @brief Estimate gravimetric moisture retention at 15 bar suction for Group II. + * @param sand Sand from 0.02 to 2 mm; percentage of the fine earth. Full calibration bounds + * are not reported. (%) + * @return Gravimetric moisture retention at 15 bar suction expressed per unit dry soil mass. + * (g g⁻¹) + * + * @remark Geographic scope: + * Group II: 12 profiles in Nigeria developed from arenaceous sedimentary rocks, partly + * Cretaceous and partly Lower Pleistocene. + * + * @details Prediction target: + * Gravimetric moisture retention at 15 bar suction + * @note Table VI, Group II, sand predictor, water_15bar response. + */ +static inline double calc_ptf_lal1979_group_ii_water_15bar_from_sand(double sand) { + return -0.0024 * sand + 0.284; +} + +/** + * @brief Estimate gravimetric moisture equivalent measured at 1000 times gravity for Group I. + * @param clay Clay smaller than 0.002 mm; percentage of the fine earth. Full calibration + * bounds are not reported. (%) + * @return Gravimetric moisture equivalent measured at 1000 times gravity expressed per unit + * dry soil mass. (g g⁻¹) + * + * @remark Geographic scope: + * Group I: 11 well-drained upland profiles in western Nigeria developed over pre-Cambrian + * basement complex rocks, mainly biotite-muscovite paragneisses. + * + * @details Prediction target: + * Gravimetric moisture equivalent measured at 1000 times gravity + * @note Table VII, Group I, clay predictor, moisture_equivalent response. + */ +static inline double calc_ptf_lal1979_group_i_moisture_equivalent_from_clay(double clay) { + return 0.004 * clay + 0.052; +} + +/** + * @brief Estimate gravimetric moisture equivalent measured at 1000 times gravity for Group I. + * @param sand Sand from 0.02 to 2 mm; percentage of the fine earth. Full calibration bounds + * are not reported. (%) + * @return Gravimetric moisture equivalent measured at 1000 times gravity expressed per unit + * dry soil mass. (g g⁻¹) + * + * @remark Geographic scope: + * Group I: 11 well-drained upland profiles in western Nigeria developed over pre-Cambrian + * basement complex rocks, mainly biotite-muscovite paragneisses. + * + * @details Prediction target: + * Gravimetric moisture equivalent measured at 1000 times gravity + * @note Table VII, Group I, sand predictor, moisture_equivalent response. + */ +static inline double calc_ptf_lal1979_group_i_moisture_equivalent_from_sand(double sand) { + return -0.003 * sand + 0.339; +} + +/** + * @brief Estimate gravimetric moisture equivalent measured at 1000 times gravity for Group II. + * @param clay Clay smaller than 0.002 mm; percentage of the fine earth. Full calibration + * bounds are not reported. (%) + * @return Gravimetric moisture equivalent measured at 1000 times gravity expressed per unit + * dry soil mass. (g g⁻¹) + * + * @remark Geographic scope: + * Group II: 12 profiles in Nigeria developed from arenaceous sedimentary rocks, partly + * Cretaceous and partly Lower Pleistocene. + * + * @details Prediction target: + * Gravimetric moisture equivalent measured at 1000 times gravity + * @note Table VII, Group II, clay predictor, moisture_equivalent response. + */ +static inline double calc_ptf_lal1979_group_ii_moisture_equivalent_from_clay(double clay) { + return 0.0025 * clay + 0.057; +} + +/** + * @brief Estimate gravimetric moisture equivalent measured at 1000 times gravity for Group II. + * @param sand Sand from 0.02 to 2 mm; percentage of the fine earth. Full calibration bounds + * are not reported. (%) + * @return Gravimetric moisture equivalent measured at 1000 times gravity expressed per unit + * dry soil mass. (g g⁻¹) + * + * @remark Geographic scope: + * Group II: 12 profiles in Nigeria developed from arenaceous sedimentary rocks, partly + * Cretaceous and partly Lower Pleistocene. + * + * @details Prediction target: + * Gravimetric moisture equivalent measured at 1000 times gravity + * @note Table VII, Group II, sand predictor, moisture_equivalent response. + */ +static inline double calc_ptf_lal1979_group_ii_moisture_equivalent_from_sand(double sand) { + return -0.002 * sand + 0.284; +} + +/** + * @brief Estimate gravimetric moisture equivalent measured at 1000 times gravity for Group II. + * @param silt Silt from 0.002 to 0.02 mm; percentage of the fine earth. Full calibration + * bounds are not reported. (%) + * @return Gravimetric moisture equivalent measured at 1000 times gravity expressed per unit + * dry soil mass. (g g⁻¹) + * + * @remark Geographic scope: + * Group II: 12 profiles in Nigeria developed from arenaceous sedimentary rocks, partly + * Cretaceous and partly Lower Pleistocene. + * + * @details Prediction target: + * Gravimetric moisture equivalent measured at 1000 times gravity + * @note Table VII, Group II, silt predictor, moisture_equivalent response. + */ +static inline double calc_ptf_lal1979_group_ii_moisture_equivalent_from_silt(double silt) { + return -0.005 * silt + 0.175; +} + +/** + * @brief Estimate gravimetric moisture retention at 0.3 bar suction for Group II. + * @param water_01bar Gravimetric moisture retention at 0.1 bar suction on disturbed soil. + * (g/g) + * @return Gravimetric moisture retention at 0.3 bar suction expressed per unit dry soil mass. + * (g g⁻¹) + * + * @remark Geographic scope: + * Group II: 12 profiles in Nigeria developed from arenaceous sedimentary rocks, partly + * Cretaceous and partly Lower Pleistocene. + * + * @details Prediction target: + * Gravimetric moisture retention at 0.3 bar suction + * @note Table VIII, Group II, water_01bar predictor, water_03bar response. + */ +static inline double calc_ptf_lal1979_group_ii_water_03bar_from_water_01bar(double water_01bar) { + return 0.86 * water_01bar + -0.014; +} + +/** + * @brief Estimate gravimetric moisture retention at 15 bar suction for Group II. + * @param water_01bar Gravimetric moisture retention at 0.1 bar suction on disturbed soil. + * (g/g) + * @return Gravimetric moisture retention at 15 bar suction expressed per unit dry soil mass. + * (g g⁻¹) + * + * @remark Geographic scope: + * Group II: 12 profiles in Nigeria developed from arenaceous sedimentary rocks, partly + * Cretaceous and partly Lower Pleistocene. + * + * @details Prediction target: + * Gravimetric moisture retention at 15 bar suction + * @note Table VIII, Group II, water_01bar predictor, water_15bar response. + */ +static inline double calc_ptf_lal1979_group_ii_water_15bar_from_water_01bar(double water_01bar) { + return 0.54 * water_01bar + -0.005; +} + +/** + * @brief Estimate upper plastic limit for Group I. + * @param organic_carbon Organic carbon measured by Walkley and Black wet combustion; + * percentage of the fine earth. Full calibration bounds are not reported. (%) + * @return Upper plastic limit expressed as percentage of oven-dry soil mass. (%) + * + * @remark Geographic scope: + * Group I: 11 well-drained upland profiles in western Nigeria developed over pre-Cambrian + * basement complex rocks, mainly biotite-muscovite paragneisses. + * + * @details Prediction target: + * Upper plastic limit + * @note Table IX, Group I, organic_carbon predictor, upper_plastic_limit response. + */ +static inline double +calc_ptf_lal1979_group_i_upper_plastic_limit_from_organic_carbon(double organic_carbon) { + return -5.40 * organic_carbon + 31.73; +} + +/** + * @brief Estimate lower plastic limit for Group I. + * @param organic_carbon Organic carbon measured by Walkley and Black wet combustion; + * percentage of the fine earth. Full calibration bounds are not reported. (%) + * @return Lower plastic limit expressed as percentage of oven-dry soil mass. (%) + * + * @remark Geographic scope: + * Group I: 11 well-drained upland profiles in western Nigeria developed over pre-Cambrian + * basement complex rocks, mainly biotite-muscovite paragneisses. + * + * @details Prediction target: + * Lower plastic limit + * @note Table IX, Group I, organic_carbon predictor, lower_plastic_limit response. + */ +static inline double +calc_ptf_lal1979_group_i_lower_plastic_limit_from_organic_carbon(double organic_carbon) { + return -4.24 * organic_carbon + 24.73; +} + +/** + * @brief Estimate plasticity index (upper minus lower plastic limit) for Group I. + * @param organic_carbon Organic carbon measured by Walkley and Black wet combustion; + * percentage of the fine earth. Full calibration bounds are not reported. (%) + * @return Plasticity index (upper minus lower plastic limit) expressed as percentage of + * oven-dry soil mass. (%) + * + * @remark Geographic scope: + * Group I: 11 well-drained upland profiles in western Nigeria developed over pre-Cambrian + * basement complex rocks, mainly biotite-muscovite paragneisses. + * + * @details Prediction target: + * Plasticity index (upper minus lower plastic limit) + * @note Table IX, Group I, organic_carbon predictor, plasticity_index response. + */ +static inline double +calc_ptf_lal1979_group_i_plasticity_index_from_organic_carbon(double organic_carbon) { + return -1.24 * organic_carbon + 7.42; +} + +/** + * @brief Estimate upper plastic limit for Group I. + * @param clay Clay smaller than 0.002 mm; percentage of the fine earth. Full calibration + * bounds are not reported. (%) + * @return Upper plastic limit expressed as percentage of oven-dry soil mass. (%) + * + * @remark Geographic scope: + * Group I: 11 well-drained upland profiles in western Nigeria developed over pre-Cambrian + * basement complex rocks, mainly biotite-muscovite paragneisses. + * + * @details Prediction target: + * Upper plastic limit + * @note Table IX, Group I, clay predictor, upper_plastic_limit response. + */ +static inline double calc_ptf_lal1979_group_i_upper_plastic_limit_from_clay(double clay) { + return 0.46 * clay + 11.48; +} + +/** + * @brief Estimate lower plastic limit for Group I. + * @param clay Clay smaller than 0.002 mm; percentage of the fine earth. Full calibration + * bounds are not reported. (%) + * @return Lower plastic limit expressed as percentage of oven-dry soil mass. (%) + * + * @remark Geographic scope: + * Group I: 11 well-drained upland profiles in western Nigeria developed over pre-Cambrian + * basement complex rocks, mainly biotite-muscovite paragneisses. + * + * @details Prediction target: + * Lower plastic limit + * @note Table IX, Group I, clay predictor, lower_plastic_limit response. + */ +static inline double calc_ptf_lal1979_group_i_lower_plastic_limit_from_clay(double clay) { + return 0.34 * clay + 9.50; +} + +/** + * @brief Estimate plasticity index (upper minus lower plastic limit) for Group I. + * @param clay Clay smaller than 0.002 mm; percentage of the fine earth. Full calibration + * bounds are not reported. (%) + * @return Plasticity index (upper minus lower plastic limit) expressed as percentage of + * oven-dry soil mass. (%) + * + * @remark Geographic scope: + * Group I: 11 well-drained upland profiles in western Nigeria developed over pre-Cambrian + * basement complex rocks, mainly biotite-muscovite paragneisses. + * + * @details Prediction target: + * Plasticity index (upper minus lower plastic limit) + * @note Table IX, Group I, clay predictor, plasticity_index response. + */ +static inline double calc_ptf_lal1979_group_i_plasticity_index_from_clay(double clay) { + return 0.11 * clay + 2.48; +} + +/** + * @brief Estimate lower plastic limit for Group I. + * @param sand Sand from 0.02 to 2 mm; percentage of the fine earth. Full calibration bounds + * are not reported. (%) + * @return Lower plastic limit expressed as percentage of oven-dry soil mass. (%) + * + * @remark Geographic scope: + * Group I: 11 well-drained upland profiles in western Nigeria developed over pre-Cambrian + * basement complex rocks, mainly biotite-muscovite paragneisses. + * + * @details Prediction target: + * Lower plastic limit + * @note Table IX, Group I, sand predictor, lower_plastic_limit response. + */ +static inline double calc_ptf_lal1979_group_i_lower_plastic_limit_from_sand(double sand) { + return -0.30 * sand + 35.50; +} + +/** + * @brief Estimate plasticity index (upper minus lower plastic limit) for Group I. + * @param sand Sand from 0.02 to 2 mm; percentage of the fine earth. Full calibration bounds + * are not reported. (%) + * @return Plasticity index (upper minus lower plastic limit) expressed as percentage of + * oven-dry soil mass. (%) + * + * @remark Geographic scope: + * Group I: 11 well-drained upland profiles in western Nigeria developed over pre-Cambrian + * basement complex rocks, mainly biotite-muscovite paragneisses. + * + * @details Prediction target: + * Plasticity index (upper minus lower plastic limit) + * @note Table IX, Group I, sand predictor, plasticity_index response. + */ +static inline double calc_ptf_lal1979_group_i_plasticity_index_from_sand(double sand) { + return -0.10 * sand + 11.00; +} + +/** + * @brief Estimate upper plastic limit for Group II. + * @param organic_carbon Organic carbon measured by Walkley and Black wet combustion; + * percentage of the fine earth. Full calibration bounds are not reported. (%) + * @return Upper plastic limit expressed as percentage of oven-dry soil mass. (%) + * + * @remark Geographic scope: + * Group II: 12 profiles in Nigeria developed from arenaceous sedimentary rocks, partly + * Cretaceous and partly Lower Pleistocene. + * + * @details Prediction target: + * Upper plastic limit + * @note Table IX, Group II, organic_carbon predictor, upper_plastic_limit response. + */ +static inline double +calc_ptf_lal1979_group_ii_upper_plastic_limit_from_organic_carbon(double organic_carbon) { + return -3.01 * organic_carbon + 32.20; +} + +/** + * @brief Estimate plasticity index (upper minus lower plastic limit) for Group II. + * @param organic_carbon Organic carbon measured by Walkley and Black wet combustion; + * percentage of the fine earth. Full calibration bounds are not reported. (%) + * @return Plasticity index (upper minus lower plastic limit) expressed as percentage of + * oven-dry soil mass. (%) + * + * @remark Geographic scope: + * Group II: 12 profiles in Nigeria developed from arenaceous sedimentary rocks, partly + * Cretaceous and partly Lower Pleistocene. + * + * @details Prediction target: + * Plasticity index (upper minus lower plastic limit) + * @note Table IX, Group II, organic_carbon predictor, plasticity_index response. + */ +static inline double +calc_ptf_lal1979_group_ii_plasticity_index_from_organic_carbon(double organic_carbon) { + return -3.22 * organic_carbon + 12.70; +} + +/** + * @brief Estimate upper plastic limit for Group II. + * @param clay Clay smaller than 0.002 mm; percentage of the fine earth. Full calibration + * bounds are not reported. (%) + * @return Upper plastic limit expressed as percentage of oven-dry soil mass. (%) + * + * @remark Geographic scope: + * Group II: 12 profiles in Nigeria developed from arenaceous sedimentary rocks, partly + * Cretaceous and partly Lower Pleistocene. + * + * @details Prediction target: + * Upper plastic limit + * @note Table IX, Group II, clay predictor, upper_plastic_limit response. + */ +static inline double calc_ptf_lal1979_group_ii_upper_plastic_limit_from_clay(double clay) { + return 0.16 * clay + 24.59; +} + +/** + * @brief Estimate lower plastic limit for Group II. + * @param clay Clay smaller than 0.002 mm; percentage of the fine earth. Full calibration + * bounds are not reported. (%) + * @return Lower plastic limit expressed as percentage of oven-dry soil mass. (%) + * + * @remark Geographic scope: + * Group II: 12 profiles in Nigeria developed from arenaceous sedimentary rocks, partly + * Cretaceous and partly Lower Pleistocene. + * + * @details Prediction target: + * Lower plastic limit + * @note Table IX, Group II, clay predictor, lower_plastic_limit response. + */ +static inline double calc_ptf_lal1979_group_ii_lower_plastic_limit_from_clay(double clay) { + return 0.14 * clay + 14.64; +} + +/** + * @brief Estimate upper plastic limit for Group II. + * @param sand Sand from 0.02 to 2 mm; percentage of the fine earth. Full calibration bounds + * are not reported. (%) + * @return Upper plastic limit expressed as percentage of oven-dry soil mass. (%) + * + * @remark Geographic scope: + * Group II: 12 profiles in Nigeria developed from arenaceous sedimentary rocks, partly + * Cretaceous and partly Lower Pleistocene. + * + * @details Prediction target: + * Upper plastic limit + * @note Table IX, Group II, sand predictor, upper_plastic_limit response. + */ +static inline double calc_ptf_lal1979_group_ii_upper_plastic_limit_from_sand(double sand) { + return -0.17 * sand + 40.41; +} + +/** + * @brief Estimate lower plastic limit for Group II. + * @param sand Sand from 0.02 to 2 mm; percentage of the fine earth. Full calibration bounds + * are not reported. (%) + * @return Lower plastic limit expressed as percentage of oven-dry soil mass. (%) + * + * @remark Geographic scope: + * Group II: 12 profiles in Nigeria developed from arenaceous sedimentary rocks, partly + * Cretaceous and partly Lower Pleistocene. + * + * @details Prediction target: + * Lower plastic limit + * @note Table IX, Group II, sand predictor, lower_plastic_limit response. + */ +static inline double calc_ptf_lal1979_group_ii_lower_plastic_limit_from_sand(double sand) { + return -0.17 * sand + 29.88; +} + +/** + * @brief Estimate upper plastic limit for Group II. + * @param silt Silt from 0.002 to 0.02 mm; percentage of the fine earth. Full calibration + * bounds are not reported. (%) + * @return Upper plastic limit expressed as percentage of oven-dry soil mass. (%) + * + * @remark Geographic scope: + * Group II: 12 profiles in Nigeria developed from arenaceous sedimentary rocks, partly + * Cretaceous and partly Lower Pleistocene. + * + * @details Prediction target: + * Upper plastic limit + * @note Table IX, Group II, silt predictor, upper_plastic_limit response. + */ +static inline double calc_ptf_lal1979_group_ii_upper_plastic_limit_from_silt(double silt) { + return 0.35 * silt + 28.24; +} + +/** + * @brief Estimate lower plastic limit for Group II. + * @param silt Silt from 0.002 to 0.02 mm; percentage of the fine earth. Full calibration + * bounds are not reported. (%) + * @return Lower plastic limit expressed as percentage of oven-dry soil mass. (%) + * + * @remark Geographic scope: + * Group II: 12 profiles in Nigeria developed from arenaceous sedimentary rocks, partly + * Cretaceous and partly Lower Pleistocene. + * + * @details Prediction target: + * Lower plastic limit + * @note Table IX, Group II, silt predictor, lower_plastic_limit response. + */ +static inline double calc_ptf_lal1979_group_ii_lower_plastic_limit_from_silt(double silt) { + return 0.67 * silt + 16.16; +} + +/** + * @brief Estimate plasticity index (upper minus lower plastic limit) for Group II. + * @param silt Silt from 0.002 to 0.02 mm; percentage of the fine earth. Full calibration + * bounds are not reported. (%) + * @return Plasticity index (upper minus lower plastic limit) expressed as percentage of + * oven-dry soil mass. (%) + * + * @remark Geographic scope: + * Group II: 12 profiles in Nigeria developed from arenaceous sedimentary rocks, partly + * Cretaceous and partly Lower Pleistocene. + * + * @details Prediction target: + * Plasticity index (upper minus lower plastic limit) + * @note Table IX, Group II, silt predictor, plasticity_index response. + */ +static inline double calc_ptf_lal1979_group_ii_plasticity_index_from_silt(double silt) { + return -0.32 * silt + 12.08; +} + +#endif diff --git a/targets/ptfkit-native/include/ptfkit/ptfkit.h b/targets/ptfkit-native/include/ptfkit/ptfkit.h index d3088f0..8c046b5 100644 --- a/targets/ptfkit-native/include/ptfkit/ptfkit.h +++ b/targets/ptfkit-native/include/ptfkit/ptfkit.h @@ -14,6 +14,7 @@ #include #include #include +#include #include #include #include diff --git a/targets/ptfkit-native/tests/c/lal1979.c b/targets/ptfkit-native/tests/c/lal1979.c new file mode 100644 index 0000000..fddd85a --- /dev/null +++ b/targets/ptfkit-native/tests/c/lal1979.c @@ -0,0 +1,214 @@ +/* @generated by ptfkit-codegen; DO NOT EDIT. */ + +#include +#include "support/close_enough.h" + +int main() { + { + const double result = calc_ptf_lal1979_group_i_water_0bar_from_clay(19.0); + assert_close(result, 0.365, 0.001, 0.0, "gravimetric_water_content", "mass_fraction", + "registry", "published_predictor_mean"); + } + { + const double result = calc_ptf_lal1979_group_i_water_0bar_from_sand(66.0); + assert_close(result, 0.381, 0.001, 0.0, "gravimetric_water_content", "mass_fraction", + "registry", "published_predictor_mean"); + } + { + const double result = calc_ptf_lal1979_group_ii_water_0bar_from_clay(38.0); + assert_close(result, 0.448, 0.001, 0.0, "gravimetric_water_content", "mass_fraction", + "registry", "published_predictor_mean"); + } + { + const double result = calc_ptf_lal1979_group_ii_water_0bar_from_sand(57.0); + assert_close(result, 0.417, 0.001, 0.0, "gravimetric_water_content", "mass_fraction", + "registry", "published_predictor_mean"); + } + { + const double result = calc_ptf_lal1979_group_i_water_01bar_from_clay(19.0); + assert_close(result, 0.159, 0.001, 0.0, "gravimetric_water_content", "mass_fraction", + "registry", "published_predictor_mean"); + } + { + const double result = calc_ptf_lal1979_group_i_water_03bar_from_clay(19.0); + assert_close(result, 0.141, 0.001, 0.0, "gravimetric_water_content", "mass_fraction", + "registry", "published_predictor_mean"); + } + { + const double result = calc_ptf_lal1979_group_i_water_01bar_from_sand(66.0); + assert_close(result, 0.166, 0.001, 0.0, "gravimetric_water_content", "mass_fraction", + "registry", "published_predictor_mean"); + } + { + const double result = calc_ptf_lal1979_group_i_water_03bar_from_sand(66.0); + assert_close(result, 0.136, 0.001, 0.0, "gravimetric_water_content", "mass_fraction", + "registry", "published_predictor_mean"); + } + { + const double result = calc_ptf_lal1979_group_ii_water_01bar_from_clay(38.0); + assert_close(result, 0.194, 0.001, 0.0, "gravimetric_water_content", "mass_fraction", + "registry", "published_predictor_mean"); + } + { + const double result = calc_ptf_lal1979_group_ii_water_03bar_from_clay(38.0); + assert_close(result, 0.161, 0.001, 0.0, "gravimetric_water_content", "mass_fraction", + "registry", "published_predictor_mean"); + } + { + const double result = calc_ptf_lal1979_group_ii_water_01bar_from_sand(57.0); + assert_close(result, 0.2065, 0.001, 0.0, "gravimetric_water_content", "mass_fraction", + "registry", "published_predictor_mean"); + } + { + const double result = calc_ptf_lal1979_group_ii_water_03bar_from_sand(57.0); + assert_close(result, 0.178, 0.001, 0.0, "gravimetric_water_content", "mass_fraction", + "registry", "published_predictor_mean"); + } + { + const double result = calc_ptf_lal1979_group_i_water_15bar_from_clay(19.0); + assert_close(result, 0.063, 0.001, 0.0, "gravimetric_water_content", "mass_fraction", + "registry", "published_predictor_mean"); + } + { + const double result = calc_ptf_lal1979_group_i_water_15bar_from_sand(66.0); + assert_close(result, 0.049, 0.001, 0.0, "gravimetric_water_content", "mass_fraction", + "registry", "published_predictor_mean"); + } + { + const double result = calc_ptf_lal1979_group_i_water_15bar_from_silt(15.0); + assert_close(result, 0.128, 0.001, 0.0, "gravimetric_water_content", "mass_fraction", + "registry", "published_predictor_mean"); + } + { + const double result = calc_ptf_lal1979_group_ii_water_15bar_from_clay(38.0); + assert_close(result, 0.1086, 0.001, 0.0, "gravimetric_water_content", "mass_fraction", + "registry", "published_predictor_mean"); + } + { + const double result = calc_ptf_lal1979_group_ii_water_15bar_from_sand(57.0); + assert_close(result, 0.1472, 0.001, 0.0, "gravimetric_water_content", "mass_fraction", + "registry", "published_predictor_mean"); + } + { + const double result = calc_ptf_lal1979_group_i_moisture_equivalent_from_clay(19.0); + assert_close(result, 0.128, 0.001, 0.0, "gravimetric_water_content", "mass_fraction", + "registry", "published_predictor_mean"); + } + { + const double result = calc_ptf_lal1979_group_i_moisture_equivalent_from_sand(66.0); + assert_close(result, 0.141, 0.001, 0.0, "gravimetric_water_content", "mass_fraction", + "registry", "published_predictor_mean"); + } + { + const double result = calc_ptf_lal1979_group_ii_moisture_equivalent_from_clay(38.0); + assert_close(result, 0.152, 0.001, 0.0, "gravimetric_water_content", "mass_fraction", + "registry", "published_predictor_mean"); + } + { + const double result = calc_ptf_lal1979_group_ii_moisture_equivalent_from_sand(57.0); + assert_close(result, 0.17, 0.001, 0.0, "gravimetric_water_content", "mass_fraction", + "registry", "published_predictor_mean"); + } + { + const double result = calc_ptf_lal1979_group_ii_moisture_equivalent_from_silt(5.0); + assert_close(result, 0.15, 0.001, 0.0, "gravimetric_water_content", "mass_fraction", + "registry", "published_predictor_mean"); + } + { + const double result = calc_ptf_lal1979_group_ii_water_03bar_from_water_01bar(0.17); + assert_close(result, 0.1322, 0.001, 0.0, "gravimetric_water_content", "mass_fraction", + "registry", "published_predictor_mean"); + } + { + const double result = calc_ptf_lal1979_group_ii_water_15bar_from_water_01bar(0.17); + assert_close(result, 0.0868, 0.001, 0.0, "gravimetric_water_content", "mass_fraction", + "registry", "published_predictor_mean"); + } + { + const double result = calc_ptf_lal1979_group_i_upper_plastic_limit_from_organic_carbon(1.5); + assert_close(result, 23.63, 0.1, 0.0, "gravimetric_water_content", "mass_percent", + "registry", "published_predictor_mean"); + } + { + const double result = calc_ptf_lal1979_group_i_lower_plastic_limit_from_organic_carbon(1.5); + assert_close(result, 18.37, 0.1, 0.0, "gravimetric_water_content", "mass_percent", + "registry", "published_predictor_mean"); + } + { + const double result = calc_ptf_lal1979_group_i_plasticity_index_from_organic_carbon(1.5); + assert_close(result, 5.56, 0.1, 0.0, "gravimetric_water_content", "mass_percent", + "registry", "published_predictor_mean"); + } + { + const double result = calc_ptf_lal1979_group_i_upper_plastic_limit_from_clay(19.0); + assert_close(result, 20.22, 0.1, 0.0, "gravimetric_water_content", "mass_percent", + "registry", "published_predictor_mean"); + } + { + const double result = calc_ptf_lal1979_group_i_lower_plastic_limit_from_clay(19.0); + assert_close(result, 15.96, 0.1, 0.0, "gravimetric_water_content", "mass_percent", + "registry", "published_predictor_mean"); + } + { + const double result = calc_ptf_lal1979_group_i_plasticity_index_from_clay(19.0); + assert_close(result, 4.57, 0.1, 0.0, "gravimetric_water_content", "mass_percent", + "registry", "published_predictor_mean"); + } + { + const double result = calc_ptf_lal1979_group_i_lower_plastic_limit_from_sand(66.0); + assert_close(result, 15.7, 0.1, 0.0, "gravimetric_water_content", "mass_percent", + "registry", "published_predictor_mean"); + } + { + const double result = calc_ptf_lal1979_group_i_plasticity_index_from_sand(66.0); + assert_close(result, 4.4, 0.1, 0.0, "gravimetric_water_content", "mass_percent", "registry", + "published_predictor_mean"); + } + { + const double result = + calc_ptf_lal1979_group_ii_upper_plastic_limit_from_organic_carbon(0.42); + assert_close(result, 30.9358, 0.1, 0.0, "gravimetric_water_content", "mass_percent", + "registry", "published_predictor_mean"); + } + { + const double result = calc_ptf_lal1979_group_ii_plasticity_index_from_organic_carbon(0.42); + assert_close(result, 11.3476, 0.1, 0.0, "gravimetric_water_content", "mass_percent", + "registry", "published_predictor_mean"); + } + { + const double result = calc_ptf_lal1979_group_ii_upper_plastic_limit_from_clay(38.0); + assert_close(result, 30.67, 0.1, 0.0, "gravimetric_water_content", "mass_percent", + "registry", "published_predictor_mean"); + } + { + const double result = calc_ptf_lal1979_group_ii_lower_plastic_limit_from_clay(38.0); + assert_close(result, 19.96, 0.1, 0.0, "gravimetric_water_content", "mass_percent", + "registry", "published_predictor_mean"); + } + { + const double result = calc_ptf_lal1979_group_ii_upper_plastic_limit_from_sand(57.0); + assert_close(result, 30.72, 0.1, 0.0, "gravimetric_water_content", "mass_percent", + "registry", "published_predictor_mean"); + } + { + const double result = calc_ptf_lal1979_group_ii_lower_plastic_limit_from_sand(57.0); + assert_close(result, 20.19, 0.1, 0.0, "gravimetric_water_content", "mass_percent", + "registry", "published_predictor_mean"); + } + { + const double result = calc_ptf_lal1979_group_ii_upper_plastic_limit_from_silt(5.0); + assert_close(result, 29.99, 0.1, 0.0, "gravimetric_water_content", "mass_percent", + "registry", "published_predictor_mean"); + } + { + const double result = calc_ptf_lal1979_group_ii_lower_plastic_limit_from_silt(5.0); + assert_close(result, 19.51, 0.1, 0.0, "gravimetric_water_content", "mass_percent", + "registry", "published_predictor_mean"); + } + { + const double result = calc_ptf_lal1979_group_ii_plasticity_index_from_silt(5.0); + assert_close(result, 10.48, 0.1, 0.0, "gravimetric_water_content", "mass_percent", + "registry", "published_predictor_mean"); + } + return 0; +} diff --git a/targets/ptfkit-native/tests/cpp/lal1979.cpp b/targets/ptfkit-native/tests/cpp/lal1979.cpp new file mode 100644 index 0000000..37a2f1c --- /dev/null +++ b/targets/ptfkit-native/tests/cpp/lal1979.cpp @@ -0,0 +1,243 @@ +/* @generated by ptfkit-codegen; DO NOT EDIT. */ + +#ifdef IMPORT_UMBRELLA +import ptfkit; +#else +import ptfkit.lal1979; +#endif + +#include "support/close_enough.h" + +int main() { + { + const auto result = ptfkit::lal1979::calc_ptf_lal1979_group_i_water_0bar_from_clay(19.0); + assert_close(result, 0.365, 0.001, 0.0, "gravimetric_water_content", "mass_fraction", + "registry", "published_predictor_mean"); + } + { + const auto result = ptfkit::lal1979::calc_ptf_lal1979_group_i_water_0bar_from_sand(66.0); + assert_close(result, 0.381, 0.001, 0.0, "gravimetric_water_content", "mass_fraction", + "registry", "published_predictor_mean"); + } + { + const auto result = ptfkit::lal1979::calc_ptf_lal1979_group_ii_water_0bar_from_clay(38.0); + assert_close(result, 0.448, 0.001, 0.0, "gravimetric_water_content", "mass_fraction", + "registry", "published_predictor_mean"); + } + { + const auto result = ptfkit::lal1979::calc_ptf_lal1979_group_ii_water_0bar_from_sand(57.0); + assert_close(result, 0.417, 0.001, 0.0, "gravimetric_water_content", "mass_fraction", + "registry", "published_predictor_mean"); + } + { + const auto result = ptfkit::lal1979::calc_ptf_lal1979_group_i_water_01bar_from_clay(19.0); + assert_close(result, 0.159, 0.001, 0.0, "gravimetric_water_content", "mass_fraction", + "registry", "published_predictor_mean"); + } + { + const auto result = ptfkit::lal1979::calc_ptf_lal1979_group_i_water_03bar_from_clay(19.0); + assert_close(result, 0.141, 0.001, 0.0, "gravimetric_water_content", "mass_fraction", + "registry", "published_predictor_mean"); + } + { + const auto result = ptfkit::lal1979::calc_ptf_lal1979_group_i_water_01bar_from_sand(66.0); + assert_close(result, 0.166, 0.001, 0.0, "gravimetric_water_content", "mass_fraction", + "registry", "published_predictor_mean"); + } + { + const auto result = ptfkit::lal1979::calc_ptf_lal1979_group_i_water_03bar_from_sand(66.0); + assert_close(result, 0.136, 0.001, 0.0, "gravimetric_water_content", "mass_fraction", + "registry", "published_predictor_mean"); + } + { + const auto result = ptfkit::lal1979::calc_ptf_lal1979_group_ii_water_01bar_from_clay(38.0); + assert_close(result, 0.194, 0.001, 0.0, "gravimetric_water_content", "mass_fraction", + "registry", "published_predictor_mean"); + } + { + const auto result = ptfkit::lal1979::calc_ptf_lal1979_group_ii_water_03bar_from_clay(38.0); + assert_close(result, 0.161, 0.001, 0.0, "gravimetric_water_content", "mass_fraction", + "registry", "published_predictor_mean"); + } + { + const auto result = ptfkit::lal1979::calc_ptf_lal1979_group_ii_water_01bar_from_sand(57.0); + assert_close(result, 0.2065, 0.001, 0.0, "gravimetric_water_content", "mass_fraction", + "registry", "published_predictor_mean"); + } + { + const auto result = ptfkit::lal1979::calc_ptf_lal1979_group_ii_water_03bar_from_sand(57.0); + assert_close(result, 0.178, 0.001, 0.0, "gravimetric_water_content", "mass_fraction", + "registry", "published_predictor_mean"); + } + { + const auto result = ptfkit::lal1979::calc_ptf_lal1979_group_i_water_15bar_from_clay(19.0); + assert_close(result, 0.063, 0.001, 0.0, "gravimetric_water_content", "mass_fraction", + "registry", "published_predictor_mean"); + } + { + const auto result = ptfkit::lal1979::calc_ptf_lal1979_group_i_water_15bar_from_sand(66.0); + assert_close(result, 0.049, 0.001, 0.0, "gravimetric_water_content", "mass_fraction", + "registry", "published_predictor_mean"); + } + { + const auto result = ptfkit::lal1979::calc_ptf_lal1979_group_i_water_15bar_from_silt(15.0); + assert_close(result, 0.128, 0.001, 0.0, "gravimetric_water_content", "mass_fraction", + "registry", "published_predictor_mean"); + } + { + const auto result = ptfkit::lal1979::calc_ptf_lal1979_group_ii_water_15bar_from_clay(38.0); + assert_close(result, 0.1086, 0.001, 0.0, "gravimetric_water_content", "mass_fraction", + "registry", "published_predictor_mean"); + } + { + const auto result = ptfkit::lal1979::calc_ptf_lal1979_group_ii_water_15bar_from_sand(57.0); + assert_close(result, 0.1472, 0.001, 0.0, "gravimetric_water_content", "mass_fraction", + "registry", "published_predictor_mean"); + } + { + const auto result = + ptfkit::lal1979::calc_ptf_lal1979_group_i_moisture_equivalent_from_clay(19.0); + assert_close(result, 0.128, 0.001, 0.0, "gravimetric_water_content", "mass_fraction", + "registry", "published_predictor_mean"); + } + { + const auto result = + ptfkit::lal1979::calc_ptf_lal1979_group_i_moisture_equivalent_from_sand(66.0); + assert_close(result, 0.141, 0.001, 0.0, "gravimetric_water_content", "mass_fraction", + "registry", "published_predictor_mean"); + } + { + const auto result = + ptfkit::lal1979::calc_ptf_lal1979_group_ii_moisture_equivalent_from_clay(38.0); + assert_close(result, 0.152, 0.001, 0.0, "gravimetric_water_content", "mass_fraction", + "registry", "published_predictor_mean"); + } + { + const auto result = + ptfkit::lal1979::calc_ptf_lal1979_group_ii_moisture_equivalent_from_sand(57.0); + assert_close(result, 0.17, 0.001, 0.0, "gravimetric_water_content", "mass_fraction", + "registry", "published_predictor_mean"); + } + { + const auto result = + ptfkit::lal1979::calc_ptf_lal1979_group_ii_moisture_equivalent_from_silt(5.0); + assert_close(result, 0.15, 0.001, 0.0, "gravimetric_water_content", "mass_fraction", + "registry", "published_predictor_mean"); + } + { + const auto result = + ptfkit::lal1979::calc_ptf_lal1979_group_ii_water_03bar_from_water_01bar(0.17); + assert_close(result, 0.1322, 0.001, 0.0, "gravimetric_water_content", "mass_fraction", + "registry", "published_predictor_mean"); + } + { + const auto result = + ptfkit::lal1979::calc_ptf_lal1979_group_ii_water_15bar_from_water_01bar(0.17); + assert_close(result, 0.0868, 0.001, 0.0, "gravimetric_water_content", "mass_fraction", + "registry", "published_predictor_mean"); + } + { + const auto result = + ptfkit::lal1979::calc_ptf_lal1979_group_i_upper_plastic_limit_from_organic_carbon(1.5); + assert_close(result, 23.63, 0.1, 0.0, "gravimetric_water_content", "mass_percent", + "registry", "published_predictor_mean"); + } + { + const auto result = + ptfkit::lal1979::calc_ptf_lal1979_group_i_lower_plastic_limit_from_organic_carbon(1.5); + assert_close(result, 18.37, 0.1, 0.0, "gravimetric_water_content", "mass_percent", + "registry", "published_predictor_mean"); + } + { + const auto result = + ptfkit::lal1979::calc_ptf_lal1979_group_i_plasticity_index_from_organic_carbon(1.5); + assert_close(result, 5.56, 0.1, 0.0, "gravimetric_water_content", "mass_percent", + "registry", "published_predictor_mean"); + } + { + const auto result = + ptfkit::lal1979::calc_ptf_lal1979_group_i_upper_plastic_limit_from_clay(19.0); + assert_close(result, 20.22, 0.1, 0.0, "gravimetric_water_content", "mass_percent", + "registry", "published_predictor_mean"); + } + { + const auto result = + ptfkit::lal1979::calc_ptf_lal1979_group_i_lower_plastic_limit_from_clay(19.0); + assert_close(result, 15.96, 0.1, 0.0, "gravimetric_water_content", "mass_percent", + "registry", "published_predictor_mean"); + } + { + const auto result = + ptfkit::lal1979::calc_ptf_lal1979_group_i_plasticity_index_from_clay(19.0); + assert_close(result, 4.57, 0.1, 0.0, "gravimetric_water_content", "mass_percent", + "registry", "published_predictor_mean"); + } + { + const auto result = + ptfkit::lal1979::calc_ptf_lal1979_group_i_lower_plastic_limit_from_sand(66.0); + assert_close(result, 15.7, 0.1, 0.0, "gravimetric_water_content", "mass_percent", + "registry", "published_predictor_mean"); + } + { + const auto result = + ptfkit::lal1979::calc_ptf_lal1979_group_i_plasticity_index_from_sand(66.0); + assert_close(result, 4.4, 0.1, 0.0, "gravimetric_water_content", "mass_percent", "registry", + "published_predictor_mean"); + } + { + const auto result = + ptfkit::lal1979::calc_ptf_lal1979_group_ii_upper_plastic_limit_from_organic_carbon( + 0.42); + assert_close(result, 30.9358, 0.1, 0.0, "gravimetric_water_content", "mass_percent", + "registry", "published_predictor_mean"); + } + { + const auto result = + ptfkit::lal1979::calc_ptf_lal1979_group_ii_plasticity_index_from_organic_carbon(0.42); + assert_close(result, 11.3476, 0.1, 0.0, "gravimetric_water_content", "mass_percent", + "registry", "published_predictor_mean"); + } + { + const auto result = + ptfkit::lal1979::calc_ptf_lal1979_group_ii_upper_plastic_limit_from_clay(38.0); + assert_close(result, 30.67, 0.1, 0.0, "gravimetric_water_content", "mass_percent", + "registry", "published_predictor_mean"); + } + { + const auto result = + ptfkit::lal1979::calc_ptf_lal1979_group_ii_lower_plastic_limit_from_clay(38.0); + assert_close(result, 19.96, 0.1, 0.0, "gravimetric_water_content", "mass_percent", + "registry", "published_predictor_mean"); + } + { + const auto result = + ptfkit::lal1979::calc_ptf_lal1979_group_ii_upper_plastic_limit_from_sand(57.0); + assert_close(result, 30.72, 0.1, 0.0, "gravimetric_water_content", "mass_percent", + "registry", "published_predictor_mean"); + } + { + const auto result = + ptfkit::lal1979::calc_ptf_lal1979_group_ii_lower_plastic_limit_from_sand(57.0); + assert_close(result, 20.19, 0.1, 0.0, "gravimetric_water_content", "mass_percent", + "registry", "published_predictor_mean"); + } + { + const auto result = + ptfkit::lal1979::calc_ptf_lal1979_group_ii_upper_plastic_limit_from_silt(5.0); + assert_close(result, 29.99, 0.1, 0.0, "gravimetric_water_content", "mass_percent", + "registry", "published_predictor_mean"); + } + { + const auto result = + ptfkit::lal1979::calc_ptf_lal1979_group_ii_lower_plastic_limit_from_silt(5.0); + assert_close(result, 19.51, 0.1, 0.0, "gravimetric_water_content", "mass_percent", + "registry", "published_predictor_mean"); + } + { + const auto result = + ptfkit::lal1979::calc_ptf_lal1979_group_ii_plasticity_index_from_silt(5.0); + assert_close(result, 10.48, 0.1, 0.0, "gravimetric_water_content", "mass_percent", + "registry", "published_predictor_mean"); + } + return 0; +} diff --git a/targets/ptfkit-py/src/ptfkit/_ptfkit.pyi b/targets/ptfkit-py/src/ptfkit/_ptfkit.pyi index 84d1bbb..88b1215 100644 --- a/targets/ptfkit-py/src/ptfkit/_ptfkit.pyi +++ b/targets/ptfkit-py/src/ptfkit/_ptfkit.pyi @@ -82,6 +82,47 @@ calc_ptf_gunarathna2019_vwc33_set3: ufunc calc_ptf_gunarathna2019_vwc33_set4: ufunc calc_ptf_hodnett2002: ufunc calc_ptf_jabro1992: ufunc +calc_ptf_lal1979_group_i_lower_plastic_limit_from_clay: ufunc +calc_ptf_lal1979_group_i_lower_plastic_limit_from_organic_carbon: ufunc +calc_ptf_lal1979_group_i_lower_plastic_limit_from_sand: ufunc +calc_ptf_lal1979_group_i_moisture_equivalent_from_clay: ufunc +calc_ptf_lal1979_group_i_moisture_equivalent_from_sand: ufunc +calc_ptf_lal1979_group_i_plasticity_index_from_clay: ufunc +calc_ptf_lal1979_group_i_plasticity_index_from_organic_carbon: ufunc +calc_ptf_lal1979_group_i_plasticity_index_from_sand: ufunc +calc_ptf_lal1979_group_i_upper_plastic_limit_from_clay: ufunc +calc_ptf_lal1979_group_i_upper_plastic_limit_from_organic_carbon: ufunc +calc_ptf_lal1979_group_i_water_01bar_from_clay: ufunc +calc_ptf_lal1979_group_i_water_01bar_from_sand: ufunc +calc_ptf_lal1979_group_i_water_03bar_from_clay: ufunc +calc_ptf_lal1979_group_i_water_03bar_from_sand: ufunc +calc_ptf_lal1979_group_i_water_0bar_from_clay: ufunc +calc_ptf_lal1979_group_i_water_0bar_from_sand: ufunc +calc_ptf_lal1979_group_i_water_15bar_from_clay: ufunc +calc_ptf_lal1979_group_i_water_15bar_from_sand: ufunc +calc_ptf_lal1979_group_i_water_15bar_from_silt: ufunc +calc_ptf_lal1979_group_ii_lower_plastic_limit_from_clay: ufunc +calc_ptf_lal1979_group_ii_lower_plastic_limit_from_sand: ufunc +calc_ptf_lal1979_group_ii_lower_plastic_limit_from_silt: ufunc +calc_ptf_lal1979_group_ii_moisture_equivalent_from_clay: ufunc +calc_ptf_lal1979_group_ii_moisture_equivalent_from_sand: ufunc +calc_ptf_lal1979_group_ii_moisture_equivalent_from_silt: ufunc +calc_ptf_lal1979_group_ii_plasticity_index_from_organic_carbon: ufunc +calc_ptf_lal1979_group_ii_plasticity_index_from_silt: ufunc +calc_ptf_lal1979_group_ii_upper_plastic_limit_from_clay: ufunc +calc_ptf_lal1979_group_ii_upper_plastic_limit_from_organic_carbon: ufunc +calc_ptf_lal1979_group_ii_upper_plastic_limit_from_sand: ufunc +calc_ptf_lal1979_group_ii_upper_plastic_limit_from_silt: ufunc +calc_ptf_lal1979_group_ii_water_01bar_from_clay: ufunc +calc_ptf_lal1979_group_ii_water_01bar_from_sand: ufunc +calc_ptf_lal1979_group_ii_water_03bar_from_clay: ufunc +calc_ptf_lal1979_group_ii_water_03bar_from_sand: ufunc +calc_ptf_lal1979_group_ii_water_03bar_from_water_01bar: ufunc +calc_ptf_lal1979_group_ii_water_0bar_from_clay: ufunc +calc_ptf_lal1979_group_ii_water_0bar_from_sand: ufunc +calc_ptf_lal1979_group_ii_water_15bar_from_clay: ufunc +calc_ptf_lal1979_group_ii_water_15bar_from_sand: ufunc +calc_ptf_lal1979_group_ii_water_15bar_from_water_01bar: ufunc calc_ptf_li2007: ufunc calc_ptf_mayr1999: ufunc calc_ptf_oosterveld1980_available_water: ufunc diff --git a/targets/ptfkit-py/src/ptfkit/lal1979.c b/targets/ptfkit-py/src/ptfkit/lal1979.c new file mode 100644 index 0000000..2dfaa04 --- /dev/null +++ b/targets/ptfkit-py/src/ptfkit/lal1979.c @@ -0,0 +1,1961 @@ +/* @generated by ptfkit-codegen; DO NOT EDIT. */ +#include +#include "ufunc.h" + +static const int calc_ptf_lal1979_group_i_water_0bar_from_clay_types[] = {NPY_DOUBLE, NPY_DOUBLE}; +static int calc_ptf_lal1979_group_i_water_0bar_from_clay_contiguous_loop( + PyArrayMethod_Context *context, char *const *data, const npy_intp *dimensions, + const npy_intp *strides, NpyAuxData *transferdata) { + (void)context; + (void)strides; + (void)transferdata; + const double *in_clay = (const double *)data[0]; + double *out_water_0bar = (double *)data[1]; + for (npy_intp index = 0; index < dimensions[0]; index++) { + const double clay = in_clay[index]; + const double ptfkit_result = calc_ptf_lal1979_group_i_water_0bar_from_clay(clay); + out_water_0bar[index] = ptfkit_result; + } + return 0; +} + +static int calc_ptf_lal1979_group_i_water_0bar_from_clay_strided_loop( + PyArrayMethod_Context *context, char *const *data, const npy_intp *dimensions, + const npy_intp *strides, NpyAuxData *transferdata) { + (void)context; + (void)transferdata; + for (npy_intp index = 0; index < dimensions[0]; index++) { + const double clay = *(const double *)(data[0] + index * strides[0]); + const double ptfkit_result = calc_ptf_lal1979_group_i_water_0bar_from_clay(clay); + *(double *)(data[1] + index * strides[1]) = ptfkit_result; + } + return 0; +} +static PyType_Slot calc_ptf_lal1979_group_i_water_0bar_from_clay_slots[] = { + {NPY_METH_strided_loop, calc_ptf_lal1979_group_i_water_0bar_from_clay_strided_loop}, + {NPY_METH_contiguous_loop, calc_ptf_lal1979_group_i_water_0bar_from_clay_contiguous_loop}, + {0, NULL}, +}; +static PyArrayMethod_Spec calc_ptf_lal1979_group_i_water_0bar_from_clay_spec = { + .name = "calc_ptf_lal1979_group_i_water_0bar_from_clay", + .nin = 1, + .nout = 1, + .casting = NPY_SAME_KIND_CASTING, + .slots = calc_ptf_lal1979_group_i_water_0bar_from_clay_slots, +}; + +static const int calc_ptf_lal1979_group_i_water_0bar_from_sand_types[] = {NPY_DOUBLE, NPY_DOUBLE}; +static int calc_ptf_lal1979_group_i_water_0bar_from_sand_contiguous_loop( + PyArrayMethod_Context *context, char *const *data, const npy_intp *dimensions, + const npy_intp *strides, NpyAuxData *transferdata) { + (void)context; + (void)strides; + (void)transferdata; + const double *in_sand = (const double *)data[0]; + double *out_water_0bar = (double *)data[1]; + for (npy_intp index = 0; index < dimensions[0]; index++) { + const double sand = in_sand[index]; + const double ptfkit_result = calc_ptf_lal1979_group_i_water_0bar_from_sand(sand); + out_water_0bar[index] = ptfkit_result; + } + return 0; +} + +static int calc_ptf_lal1979_group_i_water_0bar_from_sand_strided_loop( + PyArrayMethod_Context *context, char *const *data, const npy_intp *dimensions, + const npy_intp *strides, NpyAuxData *transferdata) { + (void)context; + (void)transferdata; + for (npy_intp index = 0; index < dimensions[0]; index++) { + const double sand = *(const double *)(data[0] + index * strides[0]); + const double ptfkit_result = calc_ptf_lal1979_group_i_water_0bar_from_sand(sand); + *(double *)(data[1] + index * strides[1]) = ptfkit_result; + } + return 0; +} +static PyType_Slot calc_ptf_lal1979_group_i_water_0bar_from_sand_slots[] = { + {NPY_METH_strided_loop, calc_ptf_lal1979_group_i_water_0bar_from_sand_strided_loop}, + {NPY_METH_contiguous_loop, calc_ptf_lal1979_group_i_water_0bar_from_sand_contiguous_loop}, + {0, NULL}, +}; +static PyArrayMethod_Spec calc_ptf_lal1979_group_i_water_0bar_from_sand_spec = { + .name = "calc_ptf_lal1979_group_i_water_0bar_from_sand", + .nin = 1, + .nout = 1, + .casting = NPY_SAME_KIND_CASTING, + .slots = calc_ptf_lal1979_group_i_water_0bar_from_sand_slots, +}; + +static const int calc_ptf_lal1979_group_ii_water_0bar_from_clay_types[] = {NPY_DOUBLE, NPY_DOUBLE}; +static int calc_ptf_lal1979_group_ii_water_0bar_from_clay_contiguous_loop( + PyArrayMethod_Context *context, char *const *data, const npy_intp *dimensions, + const npy_intp *strides, NpyAuxData *transferdata) { + (void)context; + (void)strides; + (void)transferdata; + const double *in_clay = (const double *)data[0]; + double *out_water_0bar = (double *)data[1]; + for (npy_intp index = 0; index < dimensions[0]; index++) { + const double clay = in_clay[index]; + const double ptfkit_result = calc_ptf_lal1979_group_ii_water_0bar_from_clay(clay); + out_water_0bar[index] = ptfkit_result; + } + return 0; +} + +static int calc_ptf_lal1979_group_ii_water_0bar_from_clay_strided_loop( + PyArrayMethod_Context *context, char *const *data, const npy_intp *dimensions, + const npy_intp *strides, NpyAuxData *transferdata) { + (void)context; + (void)transferdata; + for (npy_intp index = 0; index < dimensions[0]; index++) { + const double clay = *(const double *)(data[0] + index * strides[0]); + const double ptfkit_result = calc_ptf_lal1979_group_ii_water_0bar_from_clay(clay); + *(double *)(data[1] + index * strides[1]) = ptfkit_result; + } + return 0; +} +static PyType_Slot calc_ptf_lal1979_group_ii_water_0bar_from_clay_slots[] = { + {NPY_METH_strided_loop, calc_ptf_lal1979_group_ii_water_0bar_from_clay_strided_loop}, + {NPY_METH_contiguous_loop, calc_ptf_lal1979_group_ii_water_0bar_from_clay_contiguous_loop}, + {0, NULL}, +}; +static PyArrayMethod_Spec calc_ptf_lal1979_group_ii_water_0bar_from_clay_spec = { + .name = "calc_ptf_lal1979_group_ii_water_0bar_from_clay", + .nin = 1, + .nout = 1, + .casting = NPY_SAME_KIND_CASTING, + .slots = calc_ptf_lal1979_group_ii_water_0bar_from_clay_slots, +}; + +static const int calc_ptf_lal1979_group_ii_water_0bar_from_sand_types[] = {NPY_DOUBLE, NPY_DOUBLE}; +static int calc_ptf_lal1979_group_ii_water_0bar_from_sand_contiguous_loop( + PyArrayMethod_Context *context, char *const *data, const npy_intp *dimensions, + const npy_intp *strides, NpyAuxData *transferdata) { + (void)context; + (void)strides; + (void)transferdata; + const double *in_sand = (const double *)data[0]; + double *out_water_0bar = (double *)data[1]; + for (npy_intp index = 0; index < dimensions[0]; index++) { + const double sand = in_sand[index]; + const double ptfkit_result = calc_ptf_lal1979_group_ii_water_0bar_from_sand(sand); + out_water_0bar[index] = ptfkit_result; + } + return 0; +} + +static int calc_ptf_lal1979_group_ii_water_0bar_from_sand_strided_loop( + PyArrayMethod_Context *context, char *const *data, const npy_intp *dimensions, + const npy_intp *strides, NpyAuxData *transferdata) { + (void)context; + (void)transferdata; + for (npy_intp index = 0; index < dimensions[0]; index++) { + const double sand = *(const double *)(data[0] + index * strides[0]); + const double ptfkit_result = calc_ptf_lal1979_group_ii_water_0bar_from_sand(sand); + *(double *)(data[1] + index * strides[1]) = ptfkit_result; + } + return 0; +} +static PyType_Slot calc_ptf_lal1979_group_ii_water_0bar_from_sand_slots[] = { + {NPY_METH_strided_loop, calc_ptf_lal1979_group_ii_water_0bar_from_sand_strided_loop}, + {NPY_METH_contiguous_loop, calc_ptf_lal1979_group_ii_water_0bar_from_sand_contiguous_loop}, + {0, NULL}, +}; +static PyArrayMethod_Spec calc_ptf_lal1979_group_ii_water_0bar_from_sand_spec = { + .name = "calc_ptf_lal1979_group_ii_water_0bar_from_sand", + .nin = 1, + .nout = 1, + .casting = NPY_SAME_KIND_CASTING, + .slots = calc_ptf_lal1979_group_ii_water_0bar_from_sand_slots, +}; + +static const int calc_ptf_lal1979_group_i_water_01bar_from_clay_types[] = {NPY_DOUBLE, NPY_DOUBLE}; +static int calc_ptf_lal1979_group_i_water_01bar_from_clay_contiguous_loop( + PyArrayMethod_Context *context, char *const *data, const npy_intp *dimensions, + const npy_intp *strides, NpyAuxData *transferdata) { + (void)context; + (void)strides; + (void)transferdata; + const double *in_clay = (const double *)data[0]; + double *out_water_01bar = (double *)data[1]; + for (npy_intp index = 0; index < dimensions[0]; index++) { + const double clay = in_clay[index]; + const double ptfkit_result = calc_ptf_lal1979_group_i_water_01bar_from_clay(clay); + out_water_01bar[index] = ptfkit_result; + } + return 0; +} + +static int calc_ptf_lal1979_group_i_water_01bar_from_clay_strided_loop( + PyArrayMethod_Context *context, char *const *data, const npy_intp *dimensions, + const npy_intp *strides, NpyAuxData *transferdata) { + (void)context; + (void)transferdata; + for (npy_intp index = 0; index < dimensions[0]; index++) { + const double clay = *(const double *)(data[0] + index * strides[0]); + const double ptfkit_result = calc_ptf_lal1979_group_i_water_01bar_from_clay(clay); + *(double *)(data[1] + index * strides[1]) = ptfkit_result; + } + return 0; +} +static PyType_Slot calc_ptf_lal1979_group_i_water_01bar_from_clay_slots[] = { + {NPY_METH_strided_loop, calc_ptf_lal1979_group_i_water_01bar_from_clay_strided_loop}, + {NPY_METH_contiguous_loop, calc_ptf_lal1979_group_i_water_01bar_from_clay_contiguous_loop}, + {0, NULL}, +}; +static PyArrayMethod_Spec calc_ptf_lal1979_group_i_water_01bar_from_clay_spec = { + .name = "calc_ptf_lal1979_group_i_water_01bar_from_clay", + .nin = 1, + .nout = 1, + .casting = NPY_SAME_KIND_CASTING, + .slots = calc_ptf_lal1979_group_i_water_01bar_from_clay_slots, +}; + +static const int calc_ptf_lal1979_group_i_water_03bar_from_clay_types[] = {NPY_DOUBLE, NPY_DOUBLE}; +static int calc_ptf_lal1979_group_i_water_03bar_from_clay_contiguous_loop( + PyArrayMethod_Context *context, char *const *data, const npy_intp *dimensions, + const npy_intp *strides, NpyAuxData *transferdata) { + (void)context; + (void)strides; + (void)transferdata; + const double *in_clay = (const double *)data[0]; + double *out_water_03bar = (double *)data[1]; + for (npy_intp index = 0; index < dimensions[0]; index++) { + const double clay = in_clay[index]; + const double ptfkit_result = calc_ptf_lal1979_group_i_water_03bar_from_clay(clay); + out_water_03bar[index] = ptfkit_result; + } + return 0; +} + +static int calc_ptf_lal1979_group_i_water_03bar_from_clay_strided_loop( + PyArrayMethod_Context *context, char *const *data, const npy_intp *dimensions, + const npy_intp *strides, NpyAuxData *transferdata) { + (void)context; + (void)transferdata; + for (npy_intp index = 0; index < dimensions[0]; index++) { + const double clay = *(const double *)(data[0] + index * strides[0]); + const double ptfkit_result = calc_ptf_lal1979_group_i_water_03bar_from_clay(clay); + *(double *)(data[1] + index * strides[1]) = ptfkit_result; + } + return 0; +} +static PyType_Slot calc_ptf_lal1979_group_i_water_03bar_from_clay_slots[] = { + {NPY_METH_strided_loop, calc_ptf_lal1979_group_i_water_03bar_from_clay_strided_loop}, + {NPY_METH_contiguous_loop, calc_ptf_lal1979_group_i_water_03bar_from_clay_contiguous_loop}, + {0, NULL}, +}; +static PyArrayMethod_Spec calc_ptf_lal1979_group_i_water_03bar_from_clay_spec = { + .name = "calc_ptf_lal1979_group_i_water_03bar_from_clay", + .nin = 1, + .nout = 1, + .casting = NPY_SAME_KIND_CASTING, + .slots = calc_ptf_lal1979_group_i_water_03bar_from_clay_slots, +}; + +static const int calc_ptf_lal1979_group_i_water_01bar_from_sand_types[] = {NPY_DOUBLE, NPY_DOUBLE}; +static int calc_ptf_lal1979_group_i_water_01bar_from_sand_contiguous_loop( + PyArrayMethod_Context *context, char *const *data, const npy_intp *dimensions, + const npy_intp *strides, NpyAuxData *transferdata) { + (void)context; + (void)strides; + (void)transferdata; + const double *in_sand = (const double *)data[0]; + double *out_water_01bar = (double *)data[1]; + for (npy_intp index = 0; index < dimensions[0]; index++) { + const double sand = in_sand[index]; + const double ptfkit_result = calc_ptf_lal1979_group_i_water_01bar_from_sand(sand); + out_water_01bar[index] = ptfkit_result; + } + return 0; +} + +static int calc_ptf_lal1979_group_i_water_01bar_from_sand_strided_loop( + PyArrayMethod_Context *context, char *const *data, const npy_intp *dimensions, + const npy_intp *strides, NpyAuxData *transferdata) { + (void)context; + (void)transferdata; + for (npy_intp index = 0; index < dimensions[0]; index++) { + const double sand = *(const double *)(data[0] + index * strides[0]); + const double ptfkit_result = calc_ptf_lal1979_group_i_water_01bar_from_sand(sand); + *(double *)(data[1] + index * strides[1]) = ptfkit_result; + } + return 0; +} +static PyType_Slot calc_ptf_lal1979_group_i_water_01bar_from_sand_slots[] = { + {NPY_METH_strided_loop, calc_ptf_lal1979_group_i_water_01bar_from_sand_strided_loop}, + {NPY_METH_contiguous_loop, calc_ptf_lal1979_group_i_water_01bar_from_sand_contiguous_loop}, + {0, NULL}, +}; +static PyArrayMethod_Spec calc_ptf_lal1979_group_i_water_01bar_from_sand_spec = { + .name = "calc_ptf_lal1979_group_i_water_01bar_from_sand", + .nin = 1, + .nout = 1, + .casting = NPY_SAME_KIND_CASTING, + .slots = calc_ptf_lal1979_group_i_water_01bar_from_sand_slots, +}; + +static const int calc_ptf_lal1979_group_i_water_03bar_from_sand_types[] = {NPY_DOUBLE, NPY_DOUBLE}; +static int calc_ptf_lal1979_group_i_water_03bar_from_sand_contiguous_loop( + PyArrayMethod_Context *context, char *const *data, const npy_intp *dimensions, + const npy_intp *strides, NpyAuxData *transferdata) { + (void)context; + (void)strides; + (void)transferdata; + const double *in_sand = (const double *)data[0]; + double *out_water_03bar = (double *)data[1]; + for (npy_intp index = 0; index < dimensions[0]; index++) { + const double sand = in_sand[index]; + const double ptfkit_result = calc_ptf_lal1979_group_i_water_03bar_from_sand(sand); + out_water_03bar[index] = ptfkit_result; + } + return 0; +} + +static int calc_ptf_lal1979_group_i_water_03bar_from_sand_strided_loop( + PyArrayMethod_Context *context, char *const *data, const npy_intp *dimensions, + const npy_intp *strides, NpyAuxData *transferdata) { + (void)context; + (void)transferdata; + for (npy_intp index = 0; index < dimensions[0]; index++) { + const double sand = *(const double *)(data[0] + index * strides[0]); + const double ptfkit_result = calc_ptf_lal1979_group_i_water_03bar_from_sand(sand); + *(double *)(data[1] + index * strides[1]) = ptfkit_result; + } + return 0; +} +static PyType_Slot calc_ptf_lal1979_group_i_water_03bar_from_sand_slots[] = { + {NPY_METH_strided_loop, calc_ptf_lal1979_group_i_water_03bar_from_sand_strided_loop}, + {NPY_METH_contiguous_loop, calc_ptf_lal1979_group_i_water_03bar_from_sand_contiguous_loop}, + {0, NULL}, +}; +static PyArrayMethod_Spec calc_ptf_lal1979_group_i_water_03bar_from_sand_spec = { + .name = "calc_ptf_lal1979_group_i_water_03bar_from_sand", + .nin = 1, + .nout = 1, + .casting = NPY_SAME_KIND_CASTING, + .slots = calc_ptf_lal1979_group_i_water_03bar_from_sand_slots, +}; + +static const int calc_ptf_lal1979_group_ii_water_01bar_from_clay_types[] = {NPY_DOUBLE, NPY_DOUBLE}; +static int calc_ptf_lal1979_group_ii_water_01bar_from_clay_contiguous_loop( + PyArrayMethod_Context *context, char *const *data, const npy_intp *dimensions, + const npy_intp *strides, NpyAuxData *transferdata) { + (void)context; + (void)strides; + (void)transferdata; + const double *in_clay = (const double *)data[0]; + double *out_water_01bar = (double *)data[1]; + for (npy_intp index = 0; index < dimensions[0]; index++) { + const double clay = in_clay[index]; + const double ptfkit_result = calc_ptf_lal1979_group_ii_water_01bar_from_clay(clay); + out_water_01bar[index] = ptfkit_result; + } + return 0; +} + +static int calc_ptf_lal1979_group_ii_water_01bar_from_clay_strided_loop( + PyArrayMethod_Context *context, char *const *data, const npy_intp *dimensions, + const npy_intp *strides, NpyAuxData *transferdata) { + (void)context; + (void)transferdata; + for (npy_intp index = 0; index < dimensions[0]; index++) { + const double clay = *(const double *)(data[0] + index * strides[0]); + const double ptfkit_result = calc_ptf_lal1979_group_ii_water_01bar_from_clay(clay); + *(double *)(data[1] + index * strides[1]) = ptfkit_result; + } + return 0; +} +static PyType_Slot calc_ptf_lal1979_group_ii_water_01bar_from_clay_slots[] = { + {NPY_METH_strided_loop, calc_ptf_lal1979_group_ii_water_01bar_from_clay_strided_loop}, + {NPY_METH_contiguous_loop, calc_ptf_lal1979_group_ii_water_01bar_from_clay_contiguous_loop}, + {0, NULL}, +}; +static PyArrayMethod_Spec calc_ptf_lal1979_group_ii_water_01bar_from_clay_spec = { + .name = "calc_ptf_lal1979_group_ii_water_01bar_from_clay", + .nin = 1, + .nout = 1, + .casting = NPY_SAME_KIND_CASTING, + .slots = calc_ptf_lal1979_group_ii_water_01bar_from_clay_slots, +}; + +static const int calc_ptf_lal1979_group_ii_water_03bar_from_clay_types[] = {NPY_DOUBLE, NPY_DOUBLE}; +static int calc_ptf_lal1979_group_ii_water_03bar_from_clay_contiguous_loop( + PyArrayMethod_Context *context, char *const *data, const npy_intp *dimensions, + const npy_intp *strides, NpyAuxData *transferdata) { + (void)context; + (void)strides; + (void)transferdata; + const double *in_clay = (const double *)data[0]; + double *out_water_03bar = (double *)data[1]; + for (npy_intp index = 0; index < dimensions[0]; index++) { + const double clay = in_clay[index]; + const double ptfkit_result = calc_ptf_lal1979_group_ii_water_03bar_from_clay(clay); + out_water_03bar[index] = ptfkit_result; + } + return 0; +} + +static int calc_ptf_lal1979_group_ii_water_03bar_from_clay_strided_loop( + PyArrayMethod_Context *context, char *const *data, const npy_intp *dimensions, + const npy_intp *strides, NpyAuxData *transferdata) { + (void)context; + (void)transferdata; + for (npy_intp index = 0; index < dimensions[0]; index++) { + const double clay = *(const double *)(data[0] + index * strides[0]); + const double ptfkit_result = calc_ptf_lal1979_group_ii_water_03bar_from_clay(clay); + *(double *)(data[1] + index * strides[1]) = ptfkit_result; + } + return 0; +} +static PyType_Slot calc_ptf_lal1979_group_ii_water_03bar_from_clay_slots[] = { + {NPY_METH_strided_loop, calc_ptf_lal1979_group_ii_water_03bar_from_clay_strided_loop}, + {NPY_METH_contiguous_loop, calc_ptf_lal1979_group_ii_water_03bar_from_clay_contiguous_loop}, + {0, NULL}, +}; +static PyArrayMethod_Spec calc_ptf_lal1979_group_ii_water_03bar_from_clay_spec = { + .name = "calc_ptf_lal1979_group_ii_water_03bar_from_clay", + .nin = 1, + .nout = 1, + .casting = NPY_SAME_KIND_CASTING, + .slots = calc_ptf_lal1979_group_ii_water_03bar_from_clay_slots, +}; + +static const int calc_ptf_lal1979_group_ii_water_01bar_from_sand_types[] = {NPY_DOUBLE, NPY_DOUBLE}; +static int calc_ptf_lal1979_group_ii_water_01bar_from_sand_contiguous_loop( + PyArrayMethod_Context *context, char *const *data, const npy_intp *dimensions, + const npy_intp *strides, NpyAuxData *transferdata) { + (void)context; + (void)strides; + (void)transferdata; + const double *in_sand = (const double *)data[0]; + double *out_water_01bar = (double *)data[1]; + for (npy_intp index = 0; index < dimensions[0]; index++) { + const double sand = in_sand[index]; + const double ptfkit_result = calc_ptf_lal1979_group_ii_water_01bar_from_sand(sand); + out_water_01bar[index] = ptfkit_result; + } + return 0; +} + +static int calc_ptf_lal1979_group_ii_water_01bar_from_sand_strided_loop( + PyArrayMethod_Context *context, char *const *data, const npy_intp *dimensions, + const npy_intp *strides, NpyAuxData *transferdata) { + (void)context; + (void)transferdata; + for (npy_intp index = 0; index < dimensions[0]; index++) { + const double sand = *(const double *)(data[0] + index * strides[0]); + const double ptfkit_result = calc_ptf_lal1979_group_ii_water_01bar_from_sand(sand); + *(double *)(data[1] + index * strides[1]) = ptfkit_result; + } + return 0; +} +static PyType_Slot calc_ptf_lal1979_group_ii_water_01bar_from_sand_slots[] = { + {NPY_METH_strided_loop, calc_ptf_lal1979_group_ii_water_01bar_from_sand_strided_loop}, + {NPY_METH_contiguous_loop, calc_ptf_lal1979_group_ii_water_01bar_from_sand_contiguous_loop}, + {0, NULL}, +}; +static PyArrayMethod_Spec calc_ptf_lal1979_group_ii_water_01bar_from_sand_spec = { + .name = "calc_ptf_lal1979_group_ii_water_01bar_from_sand", + .nin = 1, + .nout = 1, + .casting = NPY_SAME_KIND_CASTING, + .slots = calc_ptf_lal1979_group_ii_water_01bar_from_sand_slots, +}; + +static const int calc_ptf_lal1979_group_ii_water_03bar_from_sand_types[] = {NPY_DOUBLE, NPY_DOUBLE}; +static int calc_ptf_lal1979_group_ii_water_03bar_from_sand_contiguous_loop( + PyArrayMethod_Context *context, char *const *data, const npy_intp *dimensions, + const npy_intp *strides, NpyAuxData *transferdata) { + (void)context; + (void)strides; + (void)transferdata; + const double *in_sand = (const double *)data[0]; + double *out_water_03bar = (double *)data[1]; + for (npy_intp index = 0; index < dimensions[0]; index++) { + const double sand = in_sand[index]; + const double ptfkit_result = calc_ptf_lal1979_group_ii_water_03bar_from_sand(sand); + out_water_03bar[index] = ptfkit_result; + } + return 0; +} + +static int calc_ptf_lal1979_group_ii_water_03bar_from_sand_strided_loop( + PyArrayMethod_Context *context, char *const *data, const npy_intp *dimensions, + const npy_intp *strides, NpyAuxData *transferdata) { + (void)context; + (void)transferdata; + for (npy_intp index = 0; index < dimensions[0]; index++) { + const double sand = *(const double *)(data[0] + index * strides[0]); + const double ptfkit_result = calc_ptf_lal1979_group_ii_water_03bar_from_sand(sand); + *(double *)(data[1] + index * strides[1]) = ptfkit_result; + } + return 0; +} +static PyType_Slot calc_ptf_lal1979_group_ii_water_03bar_from_sand_slots[] = { + {NPY_METH_strided_loop, calc_ptf_lal1979_group_ii_water_03bar_from_sand_strided_loop}, + {NPY_METH_contiguous_loop, calc_ptf_lal1979_group_ii_water_03bar_from_sand_contiguous_loop}, + {0, NULL}, +}; +static PyArrayMethod_Spec calc_ptf_lal1979_group_ii_water_03bar_from_sand_spec = { + .name = "calc_ptf_lal1979_group_ii_water_03bar_from_sand", + .nin = 1, + .nout = 1, + .casting = NPY_SAME_KIND_CASTING, + .slots = calc_ptf_lal1979_group_ii_water_03bar_from_sand_slots, +}; + +static const int calc_ptf_lal1979_group_i_water_15bar_from_clay_types[] = {NPY_DOUBLE, NPY_DOUBLE}; +static int calc_ptf_lal1979_group_i_water_15bar_from_clay_contiguous_loop( + PyArrayMethod_Context *context, char *const *data, const npy_intp *dimensions, + const npy_intp *strides, NpyAuxData *transferdata) { + (void)context; + (void)strides; + (void)transferdata; + const double *in_clay = (const double *)data[0]; + double *out_water_15bar = (double *)data[1]; + for (npy_intp index = 0; index < dimensions[0]; index++) { + const double clay = in_clay[index]; + const double ptfkit_result = calc_ptf_lal1979_group_i_water_15bar_from_clay(clay); + out_water_15bar[index] = ptfkit_result; + } + return 0; +} + +static int calc_ptf_lal1979_group_i_water_15bar_from_clay_strided_loop( + PyArrayMethod_Context *context, char *const *data, const npy_intp *dimensions, + const npy_intp *strides, NpyAuxData *transferdata) { + (void)context; + (void)transferdata; + for (npy_intp index = 0; index < dimensions[0]; index++) { + const double clay = *(const double *)(data[0] + index * strides[0]); + const double ptfkit_result = calc_ptf_lal1979_group_i_water_15bar_from_clay(clay); + *(double *)(data[1] + index * strides[1]) = ptfkit_result; + } + return 0; +} +static PyType_Slot calc_ptf_lal1979_group_i_water_15bar_from_clay_slots[] = { + {NPY_METH_strided_loop, calc_ptf_lal1979_group_i_water_15bar_from_clay_strided_loop}, + {NPY_METH_contiguous_loop, calc_ptf_lal1979_group_i_water_15bar_from_clay_contiguous_loop}, + {0, NULL}, +}; +static PyArrayMethod_Spec calc_ptf_lal1979_group_i_water_15bar_from_clay_spec = { + .name = "calc_ptf_lal1979_group_i_water_15bar_from_clay", + .nin = 1, + .nout = 1, + .casting = NPY_SAME_KIND_CASTING, + .slots = calc_ptf_lal1979_group_i_water_15bar_from_clay_slots, +}; + +static const int calc_ptf_lal1979_group_i_water_15bar_from_sand_types[] = {NPY_DOUBLE, NPY_DOUBLE}; +static int calc_ptf_lal1979_group_i_water_15bar_from_sand_contiguous_loop( + PyArrayMethod_Context *context, char *const *data, const npy_intp *dimensions, + const npy_intp *strides, NpyAuxData *transferdata) { + (void)context; + (void)strides; + (void)transferdata; + const double *in_sand = (const double *)data[0]; + double *out_water_15bar = (double *)data[1]; + for (npy_intp index = 0; index < dimensions[0]; index++) { + const double sand = in_sand[index]; + const double ptfkit_result = calc_ptf_lal1979_group_i_water_15bar_from_sand(sand); + out_water_15bar[index] = ptfkit_result; + } + return 0; +} + +static int calc_ptf_lal1979_group_i_water_15bar_from_sand_strided_loop( + PyArrayMethod_Context *context, char *const *data, const npy_intp *dimensions, + const npy_intp *strides, NpyAuxData *transferdata) { + (void)context; + (void)transferdata; + for (npy_intp index = 0; index < dimensions[0]; index++) { + const double sand = *(const double *)(data[0] + index * strides[0]); + const double ptfkit_result = calc_ptf_lal1979_group_i_water_15bar_from_sand(sand); + *(double *)(data[1] + index * strides[1]) = ptfkit_result; + } + return 0; +} +static PyType_Slot calc_ptf_lal1979_group_i_water_15bar_from_sand_slots[] = { + {NPY_METH_strided_loop, calc_ptf_lal1979_group_i_water_15bar_from_sand_strided_loop}, + {NPY_METH_contiguous_loop, calc_ptf_lal1979_group_i_water_15bar_from_sand_contiguous_loop}, + {0, NULL}, +}; +static PyArrayMethod_Spec calc_ptf_lal1979_group_i_water_15bar_from_sand_spec = { + .name = "calc_ptf_lal1979_group_i_water_15bar_from_sand", + .nin = 1, + .nout = 1, + .casting = NPY_SAME_KIND_CASTING, + .slots = calc_ptf_lal1979_group_i_water_15bar_from_sand_slots, +}; + +static const int calc_ptf_lal1979_group_i_water_15bar_from_silt_types[] = {NPY_DOUBLE, NPY_DOUBLE}; +static int calc_ptf_lal1979_group_i_water_15bar_from_silt_contiguous_loop( + PyArrayMethod_Context *context, char *const *data, const npy_intp *dimensions, + const npy_intp *strides, NpyAuxData *transferdata) { + (void)context; + (void)strides; + (void)transferdata; + const double *in_silt = (const double *)data[0]; + double *out_water_15bar = (double *)data[1]; + for (npy_intp index = 0; index < dimensions[0]; index++) { + const double silt = in_silt[index]; + const double ptfkit_result = calc_ptf_lal1979_group_i_water_15bar_from_silt(silt); + out_water_15bar[index] = ptfkit_result; + } + return 0; +} + +static int calc_ptf_lal1979_group_i_water_15bar_from_silt_strided_loop( + PyArrayMethod_Context *context, char *const *data, const npy_intp *dimensions, + const npy_intp *strides, NpyAuxData *transferdata) { + (void)context; + (void)transferdata; + for (npy_intp index = 0; index < dimensions[0]; index++) { + const double silt = *(const double *)(data[0] + index * strides[0]); + const double ptfkit_result = calc_ptf_lal1979_group_i_water_15bar_from_silt(silt); + *(double *)(data[1] + index * strides[1]) = ptfkit_result; + } + return 0; +} +static PyType_Slot calc_ptf_lal1979_group_i_water_15bar_from_silt_slots[] = { + {NPY_METH_strided_loop, calc_ptf_lal1979_group_i_water_15bar_from_silt_strided_loop}, + {NPY_METH_contiguous_loop, calc_ptf_lal1979_group_i_water_15bar_from_silt_contiguous_loop}, + {0, NULL}, +}; +static PyArrayMethod_Spec calc_ptf_lal1979_group_i_water_15bar_from_silt_spec = { + .name = "calc_ptf_lal1979_group_i_water_15bar_from_silt", + .nin = 1, + .nout = 1, + .casting = NPY_SAME_KIND_CASTING, + .slots = calc_ptf_lal1979_group_i_water_15bar_from_silt_slots, +}; + +static const int calc_ptf_lal1979_group_ii_water_15bar_from_clay_types[] = {NPY_DOUBLE, NPY_DOUBLE}; +static int calc_ptf_lal1979_group_ii_water_15bar_from_clay_contiguous_loop( + PyArrayMethod_Context *context, char *const *data, const npy_intp *dimensions, + const npy_intp *strides, NpyAuxData *transferdata) { + (void)context; + (void)strides; + (void)transferdata; + const double *in_clay = (const double *)data[0]; + double *out_water_15bar = (double *)data[1]; + for (npy_intp index = 0; index < dimensions[0]; index++) { + const double clay = in_clay[index]; + const double ptfkit_result = calc_ptf_lal1979_group_ii_water_15bar_from_clay(clay); + out_water_15bar[index] = ptfkit_result; + } + return 0; +} + +static int calc_ptf_lal1979_group_ii_water_15bar_from_clay_strided_loop( + PyArrayMethod_Context *context, char *const *data, const npy_intp *dimensions, + const npy_intp *strides, NpyAuxData *transferdata) { + (void)context; + (void)transferdata; + for (npy_intp index = 0; index < dimensions[0]; index++) { + const double clay = *(const double *)(data[0] + index * strides[0]); + const double ptfkit_result = calc_ptf_lal1979_group_ii_water_15bar_from_clay(clay); + *(double *)(data[1] + index * strides[1]) = ptfkit_result; + } + return 0; +} +static PyType_Slot calc_ptf_lal1979_group_ii_water_15bar_from_clay_slots[] = { + {NPY_METH_strided_loop, calc_ptf_lal1979_group_ii_water_15bar_from_clay_strided_loop}, + {NPY_METH_contiguous_loop, calc_ptf_lal1979_group_ii_water_15bar_from_clay_contiguous_loop}, + {0, NULL}, +}; +static PyArrayMethod_Spec calc_ptf_lal1979_group_ii_water_15bar_from_clay_spec = { + .name = "calc_ptf_lal1979_group_ii_water_15bar_from_clay", + .nin = 1, + .nout = 1, + .casting = NPY_SAME_KIND_CASTING, + .slots = calc_ptf_lal1979_group_ii_water_15bar_from_clay_slots, +}; + +static const int calc_ptf_lal1979_group_ii_water_15bar_from_sand_types[] = {NPY_DOUBLE, NPY_DOUBLE}; +static int calc_ptf_lal1979_group_ii_water_15bar_from_sand_contiguous_loop( + PyArrayMethod_Context *context, char *const *data, const npy_intp *dimensions, + const npy_intp *strides, NpyAuxData *transferdata) { + (void)context; + (void)strides; + (void)transferdata; + const double *in_sand = (const double *)data[0]; + double *out_water_15bar = (double *)data[1]; + for (npy_intp index = 0; index < dimensions[0]; index++) { + const double sand = in_sand[index]; + const double ptfkit_result = calc_ptf_lal1979_group_ii_water_15bar_from_sand(sand); + out_water_15bar[index] = ptfkit_result; + } + return 0; +} + +static int calc_ptf_lal1979_group_ii_water_15bar_from_sand_strided_loop( + PyArrayMethod_Context *context, char *const *data, const npy_intp *dimensions, + const npy_intp *strides, NpyAuxData *transferdata) { + (void)context; + (void)transferdata; + for (npy_intp index = 0; index < dimensions[0]; index++) { + const double sand = *(const double *)(data[0] + index * strides[0]); + const double ptfkit_result = calc_ptf_lal1979_group_ii_water_15bar_from_sand(sand); + *(double *)(data[1] + index * strides[1]) = ptfkit_result; + } + return 0; +} +static PyType_Slot calc_ptf_lal1979_group_ii_water_15bar_from_sand_slots[] = { + {NPY_METH_strided_loop, calc_ptf_lal1979_group_ii_water_15bar_from_sand_strided_loop}, + {NPY_METH_contiguous_loop, calc_ptf_lal1979_group_ii_water_15bar_from_sand_contiguous_loop}, + {0, NULL}, +}; +static PyArrayMethod_Spec calc_ptf_lal1979_group_ii_water_15bar_from_sand_spec = { + .name = "calc_ptf_lal1979_group_ii_water_15bar_from_sand", + .nin = 1, + .nout = 1, + .casting = NPY_SAME_KIND_CASTING, + .slots = calc_ptf_lal1979_group_ii_water_15bar_from_sand_slots, +}; + +static const int calc_ptf_lal1979_group_i_moisture_equivalent_from_clay_types[] = {NPY_DOUBLE, + NPY_DOUBLE}; +static int calc_ptf_lal1979_group_i_moisture_equivalent_from_clay_contiguous_loop( + PyArrayMethod_Context *context, char *const *data, const npy_intp *dimensions, + const npy_intp *strides, NpyAuxData *transferdata) { + (void)context; + (void)strides; + (void)transferdata; + const double *in_clay = (const double *)data[0]; + double *out_moisture_equivalent = (double *)data[1]; + for (npy_intp index = 0; index < dimensions[0]; index++) { + const double clay = in_clay[index]; + const double ptfkit_result = calc_ptf_lal1979_group_i_moisture_equivalent_from_clay(clay); + out_moisture_equivalent[index] = ptfkit_result; + } + return 0; +} + +static int calc_ptf_lal1979_group_i_moisture_equivalent_from_clay_strided_loop( + PyArrayMethod_Context *context, char *const *data, const npy_intp *dimensions, + const npy_intp *strides, NpyAuxData *transferdata) { + (void)context; + (void)transferdata; + for (npy_intp index = 0; index < dimensions[0]; index++) { + const double clay = *(const double *)(data[0] + index * strides[0]); + const double ptfkit_result = calc_ptf_lal1979_group_i_moisture_equivalent_from_clay(clay); + *(double *)(data[1] + index * strides[1]) = ptfkit_result; + } + return 0; +} +static PyType_Slot calc_ptf_lal1979_group_i_moisture_equivalent_from_clay_slots[] = { + {NPY_METH_strided_loop, calc_ptf_lal1979_group_i_moisture_equivalent_from_clay_strided_loop}, + {NPY_METH_contiguous_loop, + calc_ptf_lal1979_group_i_moisture_equivalent_from_clay_contiguous_loop}, + {0, NULL}, +}; +static PyArrayMethod_Spec calc_ptf_lal1979_group_i_moisture_equivalent_from_clay_spec = { + .name = "calc_ptf_lal1979_group_i_moisture_equivalent_from_clay", + .nin = 1, + .nout = 1, + .casting = NPY_SAME_KIND_CASTING, + .slots = calc_ptf_lal1979_group_i_moisture_equivalent_from_clay_slots, +}; + +static const int calc_ptf_lal1979_group_i_moisture_equivalent_from_sand_types[] = {NPY_DOUBLE, + NPY_DOUBLE}; +static int calc_ptf_lal1979_group_i_moisture_equivalent_from_sand_contiguous_loop( + PyArrayMethod_Context *context, char *const *data, const npy_intp *dimensions, + const npy_intp *strides, NpyAuxData *transferdata) { + (void)context; + (void)strides; + (void)transferdata; + const double *in_sand = (const double *)data[0]; + double *out_moisture_equivalent = (double *)data[1]; + for (npy_intp index = 0; index < dimensions[0]; index++) { + const double sand = in_sand[index]; + const double ptfkit_result = calc_ptf_lal1979_group_i_moisture_equivalent_from_sand(sand); + out_moisture_equivalent[index] = ptfkit_result; + } + return 0; +} + +static int calc_ptf_lal1979_group_i_moisture_equivalent_from_sand_strided_loop( + PyArrayMethod_Context *context, char *const *data, const npy_intp *dimensions, + const npy_intp *strides, NpyAuxData *transferdata) { + (void)context; + (void)transferdata; + for (npy_intp index = 0; index < dimensions[0]; index++) { + const double sand = *(const double *)(data[0] + index * strides[0]); + const double ptfkit_result = calc_ptf_lal1979_group_i_moisture_equivalent_from_sand(sand); + *(double *)(data[1] + index * strides[1]) = ptfkit_result; + } + return 0; +} +static PyType_Slot calc_ptf_lal1979_group_i_moisture_equivalent_from_sand_slots[] = { + {NPY_METH_strided_loop, calc_ptf_lal1979_group_i_moisture_equivalent_from_sand_strided_loop}, + {NPY_METH_contiguous_loop, + calc_ptf_lal1979_group_i_moisture_equivalent_from_sand_contiguous_loop}, + {0, NULL}, +}; +static PyArrayMethod_Spec calc_ptf_lal1979_group_i_moisture_equivalent_from_sand_spec = { + .name = "calc_ptf_lal1979_group_i_moisture_equivalent_from_sand", + .nin = 1, + .nout = 1, + .casting = NPY_SAME_KIND_CASTING, + .slots = calc_ptf_lal1979_group_i_moisture_equivalent_from_sand_slots, +}; + +static const int calc_ptf_lal1979_group_ii_moisture_equivalent_from_clay_types[] = {NPY_DOUBLE, + NPY_DOUBLE}; +static int calc_ptf_lal1979_group_ii_moisture_equivalent_from_clay_contiguous_loop( + PyArrayMethod_Context *context, char *const *data, const npy_intp *dimensions, + const npy_intp *strides, NpyAuxData *transferdata) { + (void)context; + (void)strides; + (void)transferdata; + const double *in_clay = (const double *)data[0]; + double *out_moisture_equivalent = (double *)data[1]; + for (npy_intp index = 0; index < dimensions[0]; index++) { + const double clay = in_clay[index]; + const double ptfkit_result = calc_ptf_lal1979_group_ii_moisture_equivalent_from_clay(clay); + out_moisture_equivalent[index] = ptfkit_result; + } + return 0; +} + +static int calc_ptf_lal1979_group_ii_moisture_equivalent_from_clay_strided_loop( + PyArrayMethod_Context *context, char *const *data, const npy_intp *dimensions, + const npy_intp *strides, NpyAuxData *transferdata) { + (void)context; + (void)transferdata; + for (npy_intp index = 0; index < dimensions[0]; index++) { + const double clay = *(const double *)(data[0] + index * strides[0]); + const double ptfkit_result = calc_ptf_lal1979_group_ii_moisture_equivalent_from_clay(clay); + *(double *)(data[1] + index * strides[1]) = ptfkit_result; + } + return 0; +} +static PyType_Slot calc_ptf_lal1979_group_ii_moisture_equivalent_from_clay_slots[] = { + {NPY_METH_strided_loop, calc_ptf_lal1979_group_ii_moisture_equivalent_from_clay_strided_loop}, + {NPY_METH_contiguous_loop, + calc_ptf_lal1979_group_ii_moisture_equivalent_from_clay_contiguous_loop}, + {0, NULL}, +}; +static PyArrayMethod_Spec calc_ptf_lal1979_group_ii_moisture_equivalent_from_clay_spec = { + .name = "calc_ptf_lal1979_group_ii_moisture_equivalent_from_clay", + .nin = 1, + .nout = 1, + .casting = NPY_SAME_KIND_CASTING, + .slots = calc_ptf_lal1979_group_ii_moisture_equivalent_from_clay_slots, +}; + +static const int calc_ptf_lal1979_group_ii_moisture_equivalent_from_sand_types[] = {NPY_DOUBLE, + NPY_DOUBLE}; +static int calc_ptf_lal1979_group_ii_moisture_equivalent_from_sand_contiguous_loop( + PyArrayMethod_Context *context, char *const *data, const npy_intp *dimensions, + const npy_intp *strides, NpyAuxData *transferdata) { + (void)context; + (void)strides; + (void)transferdata; + const double *in_sand = (const double *)data[0]; + double *out_moisture_equivalent = (double *)data[1]; + for (npy_intp index = 0; index < dimensions[0]; index++) { + const double sand = in_sand[index]; + const double ptfkit_result = calc_ptf_lal1979_group_ii_moisture_equivalent_from_sand(sand); + out_moisture_equivalent[index] = ptfkit_result; + } + return 0; +} + +static int calc_ptf_lal1979_group_ii_moisture_equivalent_from_sand_strided_loop( + PyArrayMethod_Context *context, char *const *data, const npy_intp *dimensions, + const npy_intp *strides, NpyAuxData *transferdata) { + (void)context; + (void)transferdata; + for (npy_intp index = 0; index < dimensions[0]; index++) { + const double sand = *(const double *)(data[0] + index * strides[0]); + const double ptfkit_result = calc_ptf_lal1979_group_ii_moisture_equivalent_from_sand(sand); + *(double *)(data[1] + index * strides[1]) = ptfkit_result; + } + return 0; +} +static PyType_Slot calc_ptf_lal1979_group_ii_moisture_equivalent_from_sand_slots[] = { + {NPY_METH_strided_loop, calc_ptf_lal1979_group_ii_moisture_equivalent_from_sand_strided_loop}, + {NPY_METH_contiguous_loop, + calc_ptf_lal1979_group_ii_moisture_equivalent_from_sand_contiguous_loop}, + {0, NULL}, +}; +static PyArrayMethod_Spec calc_ptf_lal1979_group_ii_moisture_equivalent_from_sand_spec = { + .name = "calc_ptf_lal1979_group_ii_moisture_equivalent_from_sand", + .nin = 1, + .nout = 1, + .casting = NPY_SAME_KIND_CASTING, + .slots = calc_ptf_lal1979_group_ii_moisture_equivalent_from_sand_slots, +}; + +static const int calc_ptf_lal1979_group_ii_moisture_equivalent_from_silt_types[] = {NPY_DOUBLE, + NPY_DOUBLE}; +static int calc_ptf_lal1979_group_ii_moisture_equivalent_from_silt_contiguous_loop( + PyArrayMethod_Context *context, char *const *data, const npy_intp *dimensions, + const npy_intp *strides, NpyAuxData *transferdata) { + (void)context; + (void)strides; + (void)transferdata; + const double *in_silt = (const double *)data[0]; + double *out_moisture_equivalent = (double *)data[1]; + for (npy_intp index = 0; index < dimensions[0]; index++) { + const double silt = in_silt[index]; + const double ptfkit_result = calc_ptf_lal1979_group_ii_moisture_equivalent_from_silt(silt); + out_moisture_equivalent[index] = ptfkit_result; + } + return 0; +} + +static int calc_ptf_lal1979_group_ii_moisture_equivalent_from_silt_strided_loop( + PyArrayMethod_Context *context, char *const *data, const npy_intp *dimensions, + const npy_intp *strides, NpyAuxData *transferdata) { + (void)context; + (void)transferdata; + for (npy_intp index = 0; index < dimensions[0]; index++) { + const double silt = *(const double *)(data[0] + index * strides[0]); + const double ptfkit_result = calc_ptf_lal1979_group_ii_moisture_equivalent_from_silt(silt); + *(double *)(data[1] + index * strides[1]) = ptfkit_result; + } + return 0; +} +static PyType_Slot calc_ptf_lal1979_group_ii_moisture_equivalent_from_silt_slots[] = { + {NPY_METH_strided_loop, calc_ptf_lal1979_group_ii_moisture_equivalent_from_silt_strided_loop}, + {NPY_METH_contiguous_loop, + calc_ptf_lal1979_group_ii_moisture_equivalent_from_silt_contiguous_loop}, + {0, NULL}, +}; +static PyArrayMethod_Spec calc_ptf_lal1979_group_ii_moisture_equivalent_from_silt_spec = { + .name = "calc_ptf_lal1979_group_ii_moisture_equivalent_from_silt", + .nin = 1, + .nout = 1, + .casting = NPY_SAME_KIND_CASTING, + .slots = calc_ptf_lal1979_group_ii_moisture_equivalent_from_silt_slots, +}; + +static const int calc_ptf_lal1979_group_ii_water_03bar_from_water_01bar_types[] = {NPY_DOUBLE, + NPY_DOUBLE}; +static int calc_ptf_lal1979_group_ii_water_03bar_from_water_01bar_contiguous_loop( + PyArrayMethod_Context *context, char *const *data, const npy_intp *dimensions, + const npy_intp *strides, NpyAuxData *transferdata) { + (void)context; + (void)strides; + (void)transferdata; + const double *in_water_01bar = (const double *)data[0]; + double *out_water_03bar = (double *)data[1]; + for (npy_intp index = 0; index < dimensions[0]; index++) { + const double water_01bar = in_water_01bar[index]; + const double ptfkit_result = + calc_ptf_lal1979_group_ii_water_03bar_from_water_01bar(water_01bar); + out_water_03bar[index] = ptfkit_result; + } + return 0; +} + +static int calc_ptf_lal1979_group_ii_water_03bar_from_water_01bar_strided_loop( + PyArrayMethod_Context *context, char *const *data, const npy_intp *dimensions, + const npy_intp *strides, NpyAuxData *transferdata) { + (void)context; + (void)transferdata; + for (npy_intp index = 0; index < dimensions[0]; index++) { + const double water_01bar = *(const double *)(data[0] + index * strides[0]); + const double ptfkit_result = + calc_ptf_lal1979_group_ii_water_03bar_from_water_01bar(water_01bar); + *(double *)(data[1] + index * strides[1]) = ptfkit_result; + } + return 0; +} +static PyType_Slot calc_ptf_lal1979_group_ii_water_03bar_from_water_01bar_slots[] = { + {NPY_METH_strided_loop, calc_ptf_lal1979_group_ii_water_03bar_from_water_01bar_strided_loop}, + {NPY_METH_contiguous_loop, + calc_ptf_lal1979_group_ii_water_03bar_from_water_01bar_contiguous_loop}, + {0, NULL}, +}; +static PyArrayMethod_Spec calc_ptf_lal1979_group_ii_water_03bar_from_water_01bar_spec = { + .name = "calc_ptf_lal1979_group_ii_water_03bar_from_water_01bar", + .nin = 1, + .nout = 1, + .casting = NPY_SAME_KIND_CASTING, + .slots = calc_ptf_lal1979_group_ii_water_03bar_from_water_01bar_slots, +}; + +static const int calc_ptf_lal1979_group_ii_water_15bar_from_water_01bar_types[] = {NPY_DOUBLE, + NPY_DOUBLE}; +static int calc_ptf_lal1979_group_ii_water_15bar_from_water_01bar_contiguous_loop( + PyArrayMethod_Context *context, char *const *data, const npy_intp *dimensions, + const npy_intp *strides, NpyAuxData *transferdata) { + (void)context; + (void)strides; + (void)transferdata; + const double *in_water_01bar = (const double *)data[0]; + double *out_water_15bar = (double *)data[1]; + for (npy_intp index = 0; index < dimensions[0]; index++) { + const double water_01bar = in_water_01bar[index]; + const double ptfkit_result = + calc_ptf_lal1979_group_ii_water_15bar_from_water_01bar(water_01bar); + out_water_15bar[index] = ptfkit_result; + } + return 0; +} + +static int calc_ptf_lal1979_group_ii_water_15bar_from_water_01bar_strided_loop( + PyArrayMethod_Context *context, char *const *data, const npy_intp *dimensions, + const npy_intp *strides, NpyAuxData *transferdata) { + (void)context; + (void)transferdata; + for (npy_intp index = 0; index < dimensions[0]; index++) { + const double water_01bar = *(const double *)(data[0] + index * strides[0]); + const double ptfkit_result = + calc_ptf_lal1979_group_ii_water_15bar_from_water_01bar(water_01bar); + *(double *)(data[1] + index * strides[1]) = ptfkit_result; + } + return 0; +} +static PyType_Slot calc_ptf_lal1979_group_ii_water_15bar_from_water_01bar_slots[] = { + {NPY_METH_strided_loop, calc_ptf_lal1979_group_ii_water_15bar_from_water_01bar_strided_loop}, + {NPY_METH_contiguous_loop, + calc_ptf_lal1979_group_ii_water_15bar_from_water_01bar_contiguous_loop}, + {0, NULL}, +}; +static PyArrayMethod_Spec calc_ptf_lal1979_group_ii_water_15bar_from_water_01bar_spec = { + .name = "calc_ptf_lal1979_group_ii_water_15bar_from_water_01bar", + .nin = 1, + .nout = 1, + .casting = NPY_SAME_KIND_CASTING, + .slots = calc_ptf_lal1979_group_ii_water_15bar_from_water_01bar_slots, +}; + +static const int calc_ptf_lal1979_group_i_upper_plastic_limit_from_organic_carbon_types[] = { + NPY_DOUBLE, NPY_DOUBLE}; +static int calc_ptf_lal1979_group_i_upper_plastic_limit_from_organic_carbon_contiguous_loop( + PyArrayMethod_Context *context, char *const *data, const npy_intp *dimensions, + const npy_intp *strides, NpyAuxData *transferdata) { + (void)context; + (void)strides; + (void)transferdata; + const double *in_organic_carbon = (const double *)data[0]; + double *out_upper_plastic_limit = (double *)data[1]; + for (npy_intp index = 0; index < dimensions[0]; index++) { + const double organic_carbon = in_organic_carbon[index]; + const double ptfkit_result = + calc_ptf_lal1979_group_i_upper_plastic_limit_from_organic_carbon(organic_carbon); + out_upper_plastic_limit[index] = ptfkit_result; + } + return 0; +} + +static int calc_ptf_lal1979_group_i_upper_plastic_limit_from_organic_carbon_strided_loop( + PyArrayMethod_Context *context, char *const *data, const npy_intp *dimensions, + const npy_intp *strides, NpyAuxData *transferdata) { + (void)context; + (void)transferdata; + for (npy_intp index = 0; index < dimensions[0]; index++) { + const double organic_carbon = *(const double *)(data[0] + index * strides[0]); + const double ptfkit_result = + calc_ptf_lal1979_group_i_upper_plastic_limit_from_organic_carbon(organic_carbon); + *(double *)(data[1] + index * strides[1]) = ptfkit_result; + } + return 0; +} +static PyType_Slot calc_ptf_lal1979_group_i_upper_plastic_limit_from_organic_carbon_slots[] = { + {NPY_METH_strided_loop, + calc_ptf_lal1979_group_i_upper_plastic_limit_from_organic_carbon_strided_loop}, + {NPY_METH_contiguous_loop, + calc_ptf_lal1979_group_i_upper_plastic_limit_from_organic_carbon_contiguous_loop}, + {0, NULL}, +}; +static PyArrayMethod_Spec calc_ptf_lal1979_group_i_upper_plastic_limit_from_organic_carbon_spec = { + .name = "calc_ptf_lal1979_group_i_upper_plastic_limit_from_organic_carbon", + .nin = 1, + .nout = 1, + .casting = NPY_SAME_KIND_CASTING, + .slots = calc_ptf_lal1979_group_i_upper_plastic_limit_from_organic_carbon_slots, +}; + +static const int calc_ptf_lal1979_group_i_lower_plastic_limit_from_organic_carbon_types[] = { + NPY_DOUBLE, NPY_DOUBLE}; +static int calc_ptf_lal1979_group_i_lower_plastic_limit_from_organic_carbon_contiguous_loop( + PyArrayMethod_Context *context, char *const *data, const npy_intp *dimensions, + const npy_intp *strides, NpyAuxData *transferdata) { + (void)context; + (void)strides; + (void)transferdata; + const double *in_organic_carbon = (const double *)data[0]; + double *out_lower_plastic_limit = (double *)data[1]; + for (npy_intp index = 0; index < dimensions[0]; index++) { + const double organic_carbon = in_organic_carbon[index]; + const double ptfkit_result = + calc_ptf_lal1979_group_i_lower_plastic_limit_from_organic_carbon(organic_carbon); + out_lower_plastic_limit[index] = ptfkit_result; + } + return 0; +} + +static int calc_ptf_lal1979_group_i_lower_plastic_limit_from_organic_carbon_strided_loop( + PyArrayMethod_Context *context, char *const *data, const npy_intp *dimensions, + const npy_intp *strides, NpyAuxData *transferdata) { + (void)context; + (void)transferdata; + for (npy_intp index = 0; index < dimensions[0]; index++) { + const double organic_carbon = *(const double *)(data[0] + index * strides[0]); + const double ptfkit_result = + calc_ptf_lal1979_group_i_lower_plastic_limit_from_organic_carbon(organic_carbon); + *(double *)(data[1] + index * strides[1]) = ptfkit_result; + } + return 0; +} +static PyType_Slot calc_ptf_lal1979_group_i_lower_plastic_limit_from_organic_carbon_slots[] = { + {NPY_METH_strided_loop, + calc_ptf_lal1979_group_i_lower_plastic_limit_from_organic_carbon_strided_loop}, + {NPY_METH_contiguous_loop, + calc_ptf_lal1979_group_i_lower_plastic_limit_from_organic_carbon_contiguous_loop}, + {0, NULL}, +}; +static PyArrayMethod_Spec calc_ptf_lal1979_group_i_lower_plastic_limit_from_organic_carbon_spec = { + .name = "calc_ptf_lal1979_group_i_lower_plastic_limit_from_organic_carbon", + .nin = 1, + .nout = 1, + .casting = NPY_SAME_KIND_CASTING, + .slots = calc_ptf_lal1979_group_i_lower_plastic_limit_from_organic_carbon_slots, +}; + +static const int calc_ptf_lal1979_group_i_plasticity_index_from_organic_carbon_types[] = { + NPY_DOUBLE, NPY_DOUBLE}; +static int calc_ptf_lal1979_group_i_plasticity_index_from_organic_carbon_contiguous_loop( + PyArrayMethod_Context *context, char *const *data, const npy_intp *dimensions, + const npy_intp *strides, NpyAuxData *transferdata) { + (void)context; + (void)strides; + (void)transferdata; + const double *in_organic_carbon = (const double *)data[0]; + double *out_plasticity_index = (double *)data[1]; + for (npy_intp index = 0; index < dimensions[0]; index++) { + const double organic_carbon = in_organic_carbon[index]; + const double ptfkit_result = + calc_ptf_lal1979_group_i_plasticity_index_from_organic_carbon(organic_carbon); + out_plasticity_index[index] = ptfkit_result; + } + return 0; +} + +static int calc_ptf_lal1979_group_i_plasticity_index_from_organic_carbon_strided_loop( + PyArrayMethod_Context *context, char *const *data, const npy_intp *dimensions, + const npy_intp *strides, NpyAuxData *transferdata) { + (void)context; + (void)transferdata; + for (npy_intp index = 0; index < dimensions[0]; index++) { + const double organic_carbon = *(const double *)(data[0] + index * strides[0]); + const double ptfkit_result = + calc_ptf_lal1979_group_i_plasticity_index_from_organic_carbon(organic_carbon); + *(double *)(data[1] + index * strides[1]) = ptfkit_result; + } + return 0; +} +static PyType_Slot calc_ptf_lal1979_group_i_plasticity_index_from_organic_carbon_slots[] = { + {NPY_METH_strided_loop, + calc_ptf_lal1979_group_i_plasticity_index_from_organic_carbon_strided_loop}, + {NPY_METH_contiguous_loop, + calc_ptf_lal1979_group_i_plasticity_index_from_organic_carbon_contiguous_loop}, + {0, NULL}, +}; +static PyArrayMethod_Spec calc_ptf_lal1979_group_i_plasticity_index_from_organic_carbon_spec = { + .name = "calc_ptf_lal1979_group_i_plasticity_index_from_organic_carbon", + .nin = 1, + .nout = 1, + .casting = NPY_SAME_KIND_CASTING, + .slots = calc_ptf_lal1979_group_i_plasticity_index_from_organic_carbon_slots, +}; + +static const int calc_ptf_lal1979_group_i_upper_plastic_limit_from_clay_types[] = {NPY_DOUBLE, + NPY_DOUBLE}; +static int calc_ptf_lal1979_group_i_upper_plastic_limit_from_clay_contiguous_loop( + PyArrayMethod_Context *context, char *const *data, const npy_intp *dimensions, + const npy_intp *strides, NpyAuxData *transferdata) { + (void)context; + (void)strides; + (void)transferdata; + const double *in_clay = (const double *)data[0]; + double *out_upper_plastic_limit = (double *)data[1]; + for (npy_intp index = 0; index < dimensions[0]; index++) { + const double clay = in_clay[index]; + const double ptfkit_result = calc_ptf_lal1979_group_i_upper_plastic_limit_from_clay(clay); + out_upper_plastic_limit[index] = ptfkit_result; + } + return 0; +} + +static int calc_ptf_lal1979_group_i_upper_plastic_limit_from_clay_strided_loop( + PyArrayMethod_Context *context, char *const *data, const npy_intp *dimensions, + const npy_intp *strides, NpyAuxData *transferdata) { + (void)context; + (void)transferdata; + for (npy_intp index = 0; index < dimensions[0]; index++) { + const double clay = *(const double *)(data[0] + index * strides[0]); + const double ptfkit_result = calc_ptf_lal1979_group_i_upper_plastic_limit_from_clay(clay); + *(double *)(data[1] + index * strides[1]) = ptfkit_result; + } + return 0; +} +static PyType_Slot calc_ptf_lal1979_group_i_upper_plastic_limit_from_clay_slots[] = { + {NPY_METH_strided_loop, calc_ptf_lal1979_group_i_upper_plastic_limit_from_clay_strided_loop}, + {NPY_METH_contiguous_loop, + calc_ptf_lal1979_group_i_upper_plastic_limit_from_clay_contiguous_loop}, + {0, NULL}, +}; +static PyArrayMethod_Spec calc_ptf_lal1979_group_i_upper_plastic_limit_from_clay_spec = { + .name = "calc_ptf_lal1979_group_i_upper_plastic_limit_from_clay", + .nin = 1, + .nout = 1, + .casting = NPY_SAME_KIND_CASTING, + .slots = calc_ptf_lal1979_group_i_upper_plastic_limit_from_clay_slots, +}; + +static const int calc_ptf_lal1979_group_i_lower_plastic_limit_from_clay_types[] = {NPY_DOUBLE, + NPY_DOUBLE}; +static int calc_ptf_lal1979_group_i_lower_plastic_limit_from_clay_contiguous_loop( + PyArrayMethod_Context *context, char *const *data, const npy_intp *dimensions, + const npy_intp *strides, NpyAuxData *transferdata) { + (void)context; + (void)strides; + (void)transferdata; + const double *in_clay = (const double *)data[0]; + double *out_lower_plastic_limit = (double *)data[1]; + for (npy_intp index = 0; index < dimensions[0]; index++) { + const double clay = in_clay[index]; + const double ptfkit_result = calc_ptf_lal1979_group_i_lower_plastic_limit_from_clay(clay); + out_lower_plastic_limit[index] = ptfkit_result; + } + return 0; +} + +static int calc_ptf_lal1979_group_i_lower_plastic_limit_from_clay_strided_loop( + PyArrayMethod_Context *context, char *const *data, const npy_intp *dimensions, + const npy_intp *strides, NpyAuxData *transferdata) { + (void)context; + (void)transferdata; + for (npy_intp index = 0; index < dimensions[0]; index++) { + const double clay = *(const double *)(data[0] + index * strides[0]); + const double ptfkit_result = calc_ptf_lal1979_group_i_lower_plastic_limit_from_clay(clay); + *(double *)(data[1] + index * strides[1]) = ptfkit_result; + } + return 0; +} +static PyType_Slot calc_ptf_lal1979_group_i_lower_plastic_limit_from_clay_slots[] = { + {NPY_METH_strided_loop, calc_ptf_lal1979_group_i_lower_plastic_limit_from_clay_strided_loop}, + {NPY_METH_contiguous_loop, + calc_ptf_lal1979_group_i_lower_plastic_limit_from_clay_contiguous_loop}, + {0, NULL}, +}; +static PyArrayMethod_Spec calc_ptf_lal1979_group_i_lower_plastic_limit_from_clay_spec = { + .name = "calc_ptf_lal1979_group_i_lower_plastic_limit_from_clay", + .nin = 1, + .nout = 1, + .casting = NPY_SAME_KIND_CASTING, + .slots = calc_ptf_lal1979_group_i_lower_plastic_limit_from_clay_slots, +}; + +static const int calc_ptf_lal1979_group_i_plasticity_index_from_clay_types[] = {NPY_DOUBLE, + NPY_DOUBLE}; +static int calc_ptf_lal1979_group_i_plasticity_index_from_clay_contiguous_loop( + PyArrayMethod_Context *context, char *const *data, const npy_intp *dimensions, + const npy_intp *strides, NpyAuxData *transferdata) { + (void)context; + (void)strides; + (void)transferdata; + const double *in_clay = (const double *)data[0]; + double *out_plasticity_index = (double *)data[1]; + for (npy_intp index = 0; index < dimensions[0]; index++) { + const double clay = in_clay[index]; + const double ptfkit_result = calc_ptf_lal1979_group_i_plasticity_index_from_clay(clay); + out_plasticity_index[index] = ptfkit_result; + } + return 0; +} + +static int calc_ptf_lal1979_group_i_plasticity_index_from_clay_strided_loop( + PyArrayMethod_Context *context, char *const *data, const npy_intp *dimensions, + const npy_intp *strides, NpyAuxData *transferdata) { + (void)context; + (void)transferdata; + for (npy_intp index = 0; index < dimensions[0]; index++) { + const double clay = *(const double *)(data[0] + index * strides[0]); + const double ptfkit_result = calc_ptf_lal1979_group_i_plasticity_index_from_clay(clay); + *(double *)(data[1] + index * strides[1]) = ptfkit_result; + } + return 0; +} +static PyType_Slot calc_ptf_lal1979_group_i_plasticity_index_from_clay_slots[] = { + {NPY_METH_strided_loop, calc_ptf_lal1979_group_i_plasticity_index_from_clay_strided_loop}, + {NPY_METH_contiguous_loop, calc_ptf_lal1979_group_i_plasticity_index_from_clay_contiguous_loop}, + {0, NULL}, +}; +static PyArrayMethod_Spec calc_ptf_lal1979_group_i_plasticity_index_from_clay_spec = { + .name = "calc_ptf_lal1979_group_i_plasticity_index_from_clay", + .nin = 1, + .nout = 1, + .casting = NPY_SAME_KIND_CASTING, + .slots = calc_ptf_lal1979_group_i_plasticity_index_from_clay_slots, +}; + +static const int calc_ptf_lal1979_group_i_lower_plastic_limit_from_sand_types[] = {NPY_DOUBLE, + NPY_DOUBLE}; +static int calc_ptf_lal1979_group_i_lower_plastic_limit_from_sand_contiguous_loop( + PyArrayMethod_Context *context, char *const *data, const npy_intp *dimensions, + const npy_intp *strides, NpyAuxData *transferdata) { + (void)context; + (void)strides; + (void)transferdata; + const double *in_sand = (const double *)data[0]; + double *out_lower_plastic_limit = (double *)data[1]; + for (npy_intp index = 0; index < dimensions[0]; index++) { + const double sand = in_sand[index]; + const double ptfkit_result = calc_ptf_lal1979_group_i_lower_plastic_limit_from_sand(sand); + out_lower_plastic_limit[index] = ptfkit_result; + } + return 0; +} + +static int calc_ptf_lal1979_group_i_lower_plastic_limit_from_sand_strided_loop( + PyArrayMethod_Context *context, char *const *data, const npy_intp *dimensions, + const npy_intp *strides, NpyAuxData *transferdata) { + (void)context; + (void)transferdata; + for (npy_intp index = 0; index < dimensions[0]; index++) { + const double sand = *(const double *)(data[0] + index * strides[0]); + const double ptfkit_result = calc_ptf_lal1979_group_i_lower_plastic_limit_from_sand(sand); + *(double *)(data[1] + index * strides[1]) = ptfkit_result; + } + return 0; +} +static PyType_Slot calc_ptf_lal1979_group_i_lower_plastic_limit_from_sand_slots[] = { + {NPY_METH_strided_loop, calc_ptf_lal1979_group_i_lower_plastic_limit_from_sand_strided_loop}, + {NPY_METH_contiguous_loop, + calc_ptf_lal1979_group_i_lower_plastic_limit_from_sand_contiguous_loop}, + {0, NULL}, +}; +static PyArrayMethod_Spec calc_ptf_lal1979_group_i_lower_plastic_limit_from_sand_spec = { + .name = "calc_ptf_lal1979_group_i_lower_plastic_limit_from_sand", + .nin = 1, + .nout = 1, + .casting = NPY_SAME_KIND_CASTING, + .slots = calc_ptf_lal1979_group_i_lower_plastic_limit_from_sand_slots, +}; + +static const int calc_ptf_lal1979_group_i_plasticity_index_from_sand_types[] = {NPY_DOUBLE, + NPY_DOUBLE}; +static int calc_ptf_lal1979_group_i_plasticity_index_from_sand_contiguous_loop( + PyArrayMethod_Context *context, char *const *data, const npy_intp *dimensions, + const npy_intp *strides, NpyAuxData *transferdata) { + (void)context; + (void)strides; + (void)transferdata; + const double *in_sand = (const double *)data[0]; + double *out_plasticity_index = (double *)data[1]; + for (npy_intp index = 0; index < dimensions[0]; index++) { + const double sand = in_sand[index]; + const double ptfkit_result = calc_ptf_lal1979_group_i_plasticity_index_from_sand(sand); + out_plasticity_index[index] = ptfkit_result; + } + return 0; +} + +static int calc_ptf_lal1979_group_i_plasticity_index_from_sand_strided_loop( + PyArrayMethod_Context *context, char *const *data, const npy_intp *dimensions, + const npy_intp *strides, NpyAuxData *transferdata) { + (void)context; + (void)transferdata; + for (npy_intp index = 0; index < dimensions[0]; index++) { + const double sand = *(const double *)(data[0] + index * strides[0]); + const double ptfkit_result = calc_ptf_lal1979_group_i_plasticity_index_from_sand(sand); + *(double *)(data[1] + index * strides[1]) = ptfkit_result; + } + return 0; +} +static PyType_Slot calc_ptf_lal1979_group_i_plasticity_index_from_sand_slots[] = { + {NPY_METH_strided_loop, calc_ptf_lal1979_group_i_plasticity_index_from_sand_strided_loop}, + {NPY_METH_contiguous_loop, calc_ptf_lal1979_group_i_plasticity_index_from_sand_contiguous_loop}, + {0, NULL}, +}; +static PyArrayMethod_Spec calc_ptf_lal1979_group_i_plasticity_index_from_sand_spec = { + .name = "calc_ptf_lal1979_group_i_plasticity_index_from_sand", + .nin = 1, + .nout = 1, + .casting = NPY_SAME_KIND_CASTING, + .slots = calc_ptf_lal1979_group_i_plasticity_index_from_sand_slots, +}; + +static const int calc_ptf_lal1979_group_ii_upper_plastic_limit_from_organic_carbon_types[] = { + NPY_DOUBLE, NPY_DOUBLE}; +static int calc_ptf_lal1979_group_ii_upper_plastic_limit_from_organic_carbon_contiguous_loop( + PyArrayMethod_Context *context, char *const *data, const npy_intp *dimensions, + const npy_intp *strides, NpyAuxData *transferdata) { + (void)context; + (void)strides; + (void)transferdata; + const double *in_organic_carbon = (const double *)data[0]; + double *out_upper_plastic_limit = (double *)data[1]; + for (npy_intp index = 0; index < dimensions[0]; index++) { + const double organic_carbon = in_organic_carbon[index]; + const double ptfkit_result = + calc_ptf_lal1979_group_ii_upper_plastic_limit_from_organic_carbon(organic_carbon); + out_upper_plastic_limit[index] = ptfkit_result; + } + return 0; +} + +static int calc_ptf_lal1979_group_ii_upper_plastic_limit_from_organic_carbon_strided_loop( + PyArrayMethod_Context *context, char *const *data, const npy_intp *dimensions, + const npy_intp *strides, NpyAuxData *transferdata) { + (void)context; + (void)transferdata; + for (npy_intp index = 0; index < dimensions[0]; index++) { + const double organic_carbon = *(const double *)(data[0] + index * strides[0]); + const double ptfkit_result = + calc_ptf_lal1979_group_ii_upper_plastic_limit_from_organic_carbon(organic_carbon); + *(double *)(data[1] + index * strides[1]) = ptfkit_result; + } + return 0; +} +static PyType_Slot calc_ptf_lal1979_group_ii_upper_plastic_limit_from_organic_carbon_slots[] = { + {NPY_METH_strided_loop, + calc_ptf_lal1979_group_ii_upper_plastic_limit_from_organic_carbon_strided_loop}, + {NPY_METH_contiguous_loop, + calc_ptf_lal1979_group_ii_upper_plastic_limit_from_organic_carbon_contiguous_loop}, + {0, NULL}, +}; +static PyArrayMethod_Spec calc_ptf_lal1979_group_ii_upper_plastic_limit_from_organic_carbon_spec = { + .name = "calc_ptf_lal1979_group_ii_upper_plastic_limit_from_organic_carbon", + .nin = 1, + .nout = 1, + .casting = NPY_SAME_KIND_CASTING, + .slots = calc_ptf_lal1979_group_ii_upper_plastic_limit_from_organic_carbon_slots, +}; + +static const int calc_ptf_lal1979_group_ii_plasticity_index_from_organic_carbon_types[] = { + NPY_DOUBLE, NPY_DOUBLE}; +static int calc_ptf_lal1979_group_ii_plasticity_index_from_organic_carbon_contiguous_loop( + PyArrayMethod_Context *context, char *const *data, const npy_intp *dimensions, + const npy_intp *strides, NpyAuxData *transferdata) { + (void)context; + (void)strides; + (void)transferdata; + const double *in_organic_carbon = (const double *)data[0]; + double *out_plasticity_index = (double *)data[1]; + for (npy_intp index = 0; index < dimensions[0]; index++) { + const double organic_carbon = in_organic_carbon[index]; + const double ptfkit_result = + calc_ptf_lal1979_group_ii_plasticity_index_from_organic_carbon(organic_carbon); + out_plasticity_index[index] = ptfkit_result; + } + return 0; +} + +static int calc_ptf_lal1979_group_ii_plasticity_index_from_organic_carbon_strided_loop( + PyArrayMethod_Context *context, char *const *data, const npy_intp *dimensions, + const npy_intp *strides, NpyAuxData *transferdata) { + (void)context; + (void)transferdata; + for (npy_intp index = 0; index < dimensions[0]; index++) { + const double organic_carbon = *(const double *)(data[0] + index * strides[0]); + const double ptfkit_result = + calc_ptf_lal1979_group_ii_plasticity_index_from_organic_carbon(organic_carbon); + *(double *)(data[1] + index * strides[1]) = ptfkit_result; + } + return 0; +} +static PyType_Slot calc_ptf_lal1979_group_ii_plasticity_index_from_organic_carbon_slots[] = { + {NPY_METH_strided_loop, + calc_ptf_lal1979_group_ii_plasticity_index_from_organic_carbon_strided_loop}, + {NPY_METH_contiguous_loop, + calc_ptf_lal1979_group_ii_plasticity_index_from_organic_carbon_contiguous_loop}, + {0, NULL}, +}; +static PyArrayMethod_Spec calc_ptf_lal1979_group_ii_plasticity_index_from_organic_carbon_spec = { + .name = "calc_ptf_lal1979_group_ii_plasticity_index_from_organic_carbon", + .nin = 1, + .nout = 1, + .casting = NPY_SAME_KIND_CASTING, + .slots = calc_ptf_lal1979_group_ii_plasticity_index_from_organic_carbon_slots, +}; + +static const int calc_ptf_lal1979_group_ii_upper_plastic_limit_from_clay_types[] = {NPY_DOUBLE, + NPY_DOUBLE}; +static int calc_ptf_lal1979_group_ii_upper_plastic_limit_from_clay_contiguous_loop( + PyArrayMethod_Context *context, char *const *data, const npy_intp *dimensions, + const npy_intp *strides, NpyAuxData *transferdata) { + (void)context; + (void)strides; + (void)transferdata; + const double *in_clay = (const double *)data[0]; + double *out_upper_plastic_limit = (double *)data[1]; + for (npy_intp index = 0; index < dimensions[0]; index++) { + const double clay = in_clay[index]; + const double ptfkit_result = calc_ptf_lal1979_group_ii_upper_plastic_limit_from_clay(clay); + out_upper_plastic_limit[index] = ptfkit_result; + } + return 0; +} + +static int calc_ptf_lal1979_group_ii_upper_plastic_limit_from_clay_strided_loop( + PyArrayMethod_Context *context, char *const *data, const npy_intp *dimensions, + const npy_intp *strides, NpyAuxData *transferdata) { + (void)context; + (void)transferdata; + for (npy_intp index = 0; index < dimensions[0]; index++) { + const double clay = *(const double *)(data[0] + index * strides[0]); + const double ptfkit_result = calc_ptf_lal1979_group_ii_upper_plastic_limit_from_clay(clay); + *(double *)(data[1] + index * strides[1]) = ptfkit_result; + } + return 0; +} +static PyType_Slot calc_ptf_lal1979_group_ii_upper_plastic_limit_from_clay_slots[] = { + {NPY_METH_strided_loop, calc_ptf_lal1979_group_ii_upper_plastic_limit_from_clay_strided_loop}, + {NPY_METH_contiguous_loop, + calc_ptf_lal1979_group_ii_upper_plastic_limit_from_clay_contiguous_loop}, + {0, NULL}, +}; +static PyArrayMethod_Spec calc_ptf_lal1979_group_ii_upper_plastic_limit_from_clay_spec = { + .name = "calc_ptf_lal1979_group_ii_upper_plastic_limit_from_clay", + .nin = 1, + .nout = 1, + .casting = NPY_SAME_KIND_CASTING, + .slots = calc_ptf_lal1979_group_ii_upper_plastic_limit_from_clay_slots, +}; + +static const int calc_ptf_lal1979_group_ii_lower_plastic_limit_from_clay_types[] = {NPY_DOUBLE, + NPY_DOUBLE}; +static int calc_ptf_lal1979_group_ii_lower_plastic_limit_from_clay_contiguous_loop( + PyArrayMethod_Context *context, char *const *data, const npy_intp *dimensions, + const npy_intp *strides, NpyAuxData *transferdata) { + (void)context; + (void)strides; + (void)transferdata; + const double *in_clay = (const double *)data[0]; + double *out_lower_plastic_limit = (double *)data[1]; + for (npy_intp index = 0; index < dimensions[0]; index++) { + const double clay = in_clay[index]; + const double ptfkit_result = calc_ptf_lal1979_group_ii_lower_plastic_limit_from_clay(clay); + out_lower_plastic_limit[index] = ptfkit_result; + } + return 0; +} + +static int calc_ptf_lal1979_group_ii_lower_plastic_limit_from_clay_strided_loop( + PyArrayMethod_Context *context, char *const *data, const npy_intp *dimensions, + const npy_intp *strides, NpyAuxData *transferdata) { + (void)context; + (void)transferdata; + for (npy_intp index = 0; index < dimensions[0]; index++) { + const double clay = *(const double *)(data[0] + index * strides[0]); + const double ptfkit_result = calc_ptf_lal1979_group_ii_lower_plastic_limit_from_clay(clay); + *(double *)(data[1] + index * strides[1]) = ptfkit_result; + } + return 0; +} +static PyType_Slot calc_ptf_lal1979_group_ii_lower_plastic_limit_from_clay_slots[] = { + {NPY_METH_strided_loop, calc_ptf_lal1979_group_ii_lower_plastic_limit_from_clay_strided_loop}, + {NPY_METH_contiguous_loop, + calc_ptf_lal1979_group_ii_lower_plastic_limit_from_clay_contiguous_loop}, + {0, NULL}, +}; +static PyArrayMethod_Spec calc_ptf_lal1979_group_ii_lower_plastic_limit_from_clay_spec = { + .name = "calc_ptf_lal1979_group_ii_lower_plastic_limit_from_clay", + .nin = 1, + .nout = 1, + .casting = NPY_SAME_KIND_CASTING, + .slots = calc_ptf_lal1979_group_ii_lower_plastic_limit_from_clay_slots, +}; + +static const int calc_ptf_lal1979_group_ii_upper_plastic_limit_from_sand_types[] = {NPY_DOUBLE, + NPY_DOUBLE}; +static int calc_ptf_lal1979_group_ii_upper_plastic_limit_from_sand_contiguous_loop( + PyArrayMethod_Context *context, char *const *data, const npy_intp *dimensions, + const npy_intp *strides, NpyAuxData *transferdata) { + (void)context; + (void)strides; + (void)transferdata; + const double *in_sand = (const double *)data[0]; + double *out_upper_plastic_limit = (double *)data[1]; + for (npy_intp index = 0; index < dimensions[0]; index++) { + const double sand = in_sand[index]; + const double ptfkit_result = calc_ptf_lal1979_group_ii_upper_plastic_limit_from_sand(sand); + out_upper_plastic_limit[index] = ptfkit_result; + } + return 0; +} + +static int calc_ptf_lal1979_group_ii_upper_plastic_limit_from_sand_strided_loop( + PyArrayMethod_Context *context, char *const *data, const npy_intp *dimensions, + const npy_intp *strides, NpyAuxData *transferdata) { + (void)context; + (void)transferdata; + for (npy_intp index = 0; index < dimensions[0]; index++) { + const double sand = *(const double *)(data[0] + index * strides[0]); + const double ptfkit_result = calc_ptf_lal1979_group_ii_upper_plastic_limit_from_sand(sand); + *(double *)(data[1] + index * strides[1]) = ptfkit_result; + } + return 0; +} +static PyType_Slot calc_ptf_lal1979_group_ii_upper_plastic_limit_from_sand_slots[] = { + {NPY_METH_strided_loop, calc_ptf_lal1979_group_ii_upper_plastic_limit_from_sand_strided_loop}, + {NPY_METH_contiguous_loop, + calc_ptf_lal1979_group_ii_upper_plastic_limit_from_sand_contiguous_loop}, + {0, NULL}, +}; +static PyArrayMethod_Spec calc_ptf_lal1979_group_ii_upper_plastic_limit_from_sand_spec = { + .name = "calc_ptf_lal1979_group_ii_upper_plastic_limit_from_sand", + .nin = 1, + .nout = 1, + .casting = NPY_SAME_KIND_CASTING, + .slots = calc_ptf_lal1979_group_ii_upper_plastic_limit_from_sand_slots, +}; + +static const int calc_ptf_lal1979_group_ii_lower_plastic_limit_from_sand_types[] = {NPY_DOUBLE, + NPY_DOUBLE}; +static int calc_ptf_lal1979_group_ii_lower_plastic_limit_from_sand_contiguous_loop( + PyArrayMethod_Context *context, char *const *data, const npy_intp *dimensions, + const npy_intp *strides, NpyAuxData *transferdata) { + (void)context; + (void)strides; + (void)transferdata; + const double *in_sand = (const double *)data[0]; + double *out_lower_plastic_limit = (double *)data[1]; + for (npy_intp index = 0; index < dimensions[0]; index++) { + const double sand = in_sand[index]; + const double ptfkit_result = calc_ptf_lal1979_group_ii_lower_plastic_limit_from_sand(sand); + out_lower_plastic_limit[index] = ptfkit_result; + } + return 0; +} + +static int calc_ptf_lal1979_group_ii_lower_plastic_limit_from_sand_strided_loop( + PyArrayMethod_Context *context, char *const *data, const npy_intp *dimensions, + const npy_intp *strides, NpyAuxData *transferdata) { + (void)context; + (void)transferdata; + for (npy_intp index = 0; index < dimensions[0]; index++) { + const double sand = *(const double *)(data[0] + index * strides[0]); + const double ptfkit_result = calc_ptf_lal1979_group_ii_lower_plastic_limit_from_sand(sand); + *(double *)(data[1] + index * strides[1]) = ptfkit_result; + } + return 0; +} +static PyType_Slot calc_ptf_lal1979_group_ii_lower_plastic_limit_from_sand_slots[] = { + {NPY_METH_strided_loop, calc_ptf_lal1979_group_ii_lower_plastic_limit_from_sand_strided_loop}, + {NPY_METH_contiguous_loop, + calc_ptf_lal1979_group_ii_lower_plastic_limit_from_sand_contiguous_loop}, + {0, NULL}, +}; +static PyArrayMethod_Spec calc_ptf_lal1979_group_ii_lower_plastic_limit_from_sand_spec = { + .name = "calc_ptf_lal1979_group_ii_lower_plastic_limit_from_sand", + .nin = 1, + .nout = 1, + .casting = NPY_SAME_KIND_CASTING, + .slots = calc_ptf_lal1979_group_ii_lower_plastic_limit_from_sand_slots, +}; + +static const int calc_ptf_lal1979_group_ii_upper_plastic_limit_from_silt_types[] = {NPY_DOUBLE, + NPY_DOUBLE}; +static int calc_ptf_lal1979_group_ii_upper_plastic_limit_from_silt_contiguous_loop( + PyArrayMethod_Context *context, char *const *data, const npy_intp *dimensions, + const npy_intp *strides, NpyAuxData *transferdata) { + (void)context; + (void)strides; + (void)transferdata; + const double *in_silt = (const double *)data[0]; + double *out_upper_plastic_limit = (double *)data[1]; + for (npy_intp index = 0; index < dimensions[0]; index++) { + const double silt = in_silt[index]; + const double ptfkit_result = calc_ptf_lal1979_group_ii_upper_plastic_limit_from_silt(silt); + out_upper_plastic_limit[index] = ptfkit_result; + } + return 0; +} + +static int calc_ptf_lal1979_group_ii_upper_plastic_limit_from_silt_strided_loop( + PyArrayMethod_Context *context, char *const *data, const npy_intp *dimensions, + const npy_intp *strides, NpyAuxData *transferdata) { + (void)context; + (void)transferdata; + for (npy_intp index = 0; index < dimensions[0]; index++) { + const double silt = *(const double *)(data[0] + index * strides[0]); + const double ptfkit_result = calc_ptf_lal1979_group_ii_upper_plastic_limit_from_silt(silt); + *(double *)(data[1] + index * strides[1]) = ptfkit_result; + } + return 0; +} +static PyType_Slot calc_ptf_lal1979_group_ii_upper_plastic_limit_from_silt_slots[] = { + {NPY_METH_strided_loop, calc_ptf_lal1979_group_ii_upper_plastic_limit_from_silt_strided_loop}, + {NPY_METH_contiguous_loop, + calc_ptf_lal1979_group_ii_upper_plastic_limit_from_silt_contiguous_loop}, + {0, NULL}, +}; +static PyArrayMethod_Spec calc_ptf_lal1979_group_ii_upper_plastic_limit_from_silt_spec = { + .name = "calc_ptf_lal1979_group_ii_upper_plastic_limit_from_silt", + .nin = 1, + .nout = 1, + .casting = NPY_SAME_KIND_CASTING, + .slots = calc_ptf_lal1979_group_ii_upper_plastic_limit_from_silt_slots, +}; + +static const int calc_ptf_lal1979_group_ii_lower_plastic_limit_from_silt_types[] = {NPY_DOUBLE, + NPY_DOUBLE}; +static int calc_ptf_lal1979_group_ii_lower_plastic_limit_from_silt_contiguous_loop( + PyArrayMethod_Context *context, char *const *data, const npy_intp *dimensions, + const npy_intp *strides, NpyAuxData *transferdata) { + (void)context; + (void)strides; + (void)transferdata; + const double *in_silt = (const double *)data[0]; + double *out_lower_plastic_limit = (double *)data[1]; + for (npy_intp index = 0; index < dimensions[0]; index++) { + const double silt = in_silt[index]; + const double ptfkit_result = calc_ptf_lal1979_group_ii_lower_plastic_limit_from_silt(silt); + out_lower_plastic_limit[index] = ptfkit_result; + } + return 0; +} + +static int calc_ptf_lal1979_group_ii_lower_plastic_limit_from_silt_strided_loop( + PyArrayMethod_Context *context, char *const *data, const npy_intp *dimensions, + const npy_intp *strides, NpyAuxData *transferdata) { + (void)context; + (void)transferdata; + for (npy_intp index = 0; index < dimensions[0]; index++) { + const double silt = *(const double *)(data[0] + index * strides[0]); + const double ptfkit_result = calc_ptf_lal1979_group_ii_lower_plastic_limit_from_silt(silt); + *(double *)(data[1] + index * strides[1]) = ptfkit_result; + } + return 0; +} +static PyType_Slot calc_ptf_lal1979_group_ii_lower_plastic_limit_from_silt_slots[] = { + {NPY_METH_strided_loop, calc_ptf_lal1979_group_ii_lower_plastic_limit_from_silt_strided_loop}, + {NPY_METH_contiguous_loop, + calc_ptf_lal1979_group_ii_lower_plastic_limit_from_silt_contiguous_loop}, + {0, NULL}, +}; +static PyArrayMethod_Spec calc_ptf_lal1979_group_ii_lower_plastic_limit_from_silt_spec = { + .name = "calc_ptf_lal1979_group_ii_lower_plastic_limit_from_silt", + .nin = 1, + .nout = 1, + .casting = NPY_SAME_KIND_CASTING, + .slots = calc_ptf_lal1979_group_ii_lower_plastic_limit_from_silt_slots, +}; + +static const int calc_ptf_lal1979_group_ii_plasticity_index_from_silt_types[] = {NPY_DOUBLE, + NPY_DOUBLE}; +static int calc_ptf_lal1979_group_ii_plasticity_index_from_silt_contiguous_loop( + PyArrayMethod_Context *context, char *const *data, const npy_intp *dimensions, + const npy_intp *strides, NpyAuxData *transferdata) { + (void)context; + (void)strides; + (void)transferdata; + const double *in_silt = (const double *)data[0]; + double *out_plasticity_index = (double *)data[1]; + for (npy_intp index = 0; index < dimensions[0]; index++) { + const double silt = in_silt[index]; + const double ptfkit_result = calc_ptf_lal1979_group_ii_plasticity_index_from_silt(silt); + out_plasticity_index[index] = ptfkit_result; + } + return 0; +} + +static int calc_ptf_lal1979_group_ii_plasticity_index_from_silt_strided_loop( + PyArrayMethod_Context *context, char *const *data, const npy_intp *dimensions, + const npy_intp *strides, NpyAuxData *transferdata) { + (void)context; + (void)transferdata; + for (npy_intp index = 0; index < dimensions[0]; index++) { + const double silt = *(const double *)(data[0] + index * strides[0]); + const double ptfkit_result = calc_ptf_lal1979_group_ii_plasticity_index_from_silt(silt); + *(double *)(data[1] + index * strides[1]) = ptfkit_result; + } + return 0; +} +static PyType_Slot calc_ptf_lal1979_group_ii_plasticity_index_from_silt_slots[] = { + {NPY_METH_strided_loop, calc_ptf_lal1979_group_ii_plasticity_index_from_silt_strided_loop}, + {NPY_METH_contiguous_loop, + calc_ptf_lal1979_group_ii_plasticity_index_from_silt_contiguous_loop}, + {0, NULL}, +}; +static PyArrayMethod_Spec calc_ptf_lal1979_group_ii_plasticity_index_from_silt_spec = { + .name = "calc_ptf_lal1979_group_ii_plasticity_index_from_silt", + .nin = 1, + .nout = 1, + .casting = NPY_SAME_KIND_CASTING, + .slots = calc_ptf_lal1979_group_ii_plasticity_index_from_silt_slots, +}; + +int ptfkit_register_lal1979(PyObject *module) { + if (ptfkit_add_ufunc(module, "calc_ptf_lal1979_group_i_water_0bar_from_clay", + calc_ptf_lal1979_group_i_water_0bar_from_clay_types, 1, 1, + &calc_ptf_lal1979_group_i_water_0bar_from_clay_spec) < 0) + return -1; + if (ptfkit_add_ufunc(module, "calc_ptf_lal1979_group_i_water_0bar_from_sand", + calc_ptf_lal1979_group_i_water_0bar_from_sand_types, 1, 1, + &calc_ptf_lal1979_group_i_water_0bar_from_sand_spec) < 0) + return -1; + if (ptfkit_add_ufunc(module, "calc_ptf_lal1979_group_ii_water_0bar_from_clay", + calc_ptf_lal1979_group_ii_water_0bar_from_clay_types, 1, 1, + &calc_ptf_lal1979_group_ii_water_0bar_from_clay_spec) < 0) + return -1; + if (ptfkit_add_ufunc(module, "calc_ptf_lal1979_group_ii_water_0bar_from_sand", + calc_ptf_lal1979_group_ii_water_0bar_from_sand_types, 1, 1, + &calc_ptf_lal1979_group_ii_water_0bar_from_sand_spec) < 0) + return -1; + if (ptfkit_add_ufunc(module, "calc_ptf_lal1979_group_i_water_01bar_from_clay", + calc_ptf_lal1979_group_i_water_01bar_from_clay_types, 1, 1, + &calc_ptf_lal1979_group_i_water_01bar_from_clay_spec) < 0) + return -1; + if (ptfkit_add_ufunc(module, "calc_ptf_lal1979_group_i_water_03bar_from_clay", + calc_ptf_lal1979_group_i_water_03bar_from_clay_types, 1, 1, + &calc_ptf_lal1979_group_i_water_03bar_from_clay_spec) < 0) + return -1; + if (ptfkit_add_ufunc(module, "calc_ptf_lal1979_group_i_water_01bar_from_sand", + calc_ptf_lal1979_group_i_water_01bar_from_sand_types, 1, 1, + &calc_ptf_lal1979_group_i_water_01bar_from_sand_spec) < 0) + return -1; + if (ptfkit_add_ufunc(module, "calc_ptf_lal1979_group_i_water_03bar_from_sand", + calc_ptf_lal1979_group_i_water_03bar_from_sand_types, 1, 1, + &calc_ptf_lal1979_group_i_water_03bar_from_sand_spec) < 0) + return -1; + if (ptfkit_add_ufunc(module, "calc_ptf_lal1979_group_ii_water_01bar_from_clay", + calc_ptf_lal1979_group_ii_water_01bar_from_clay_types, 1, 1, + &calc_ptf_lal1979_group_ii_water_01bar_from_clay_spec) < 0) + return -1; + if (ptfkit_add_ufunc(module, "calc_ptf_lal1979_group_ii_water_03bar_from_clay", + calc_ptf_lal1979_group_ii_water_03bar_from_clay_types, 1, 1, + &calc_ptf_lal1979_group_ii_water_03bar_from_clay_spec) < 0) + return -1; + if (ptfkit_add_ufunc(module, "calc_ptf_lal1979_group_ii_water_01bar_from_sand", + calc_ptf_lal1979_group_ii_water_01bar_from_sand_types, 1, 1, + &calc_ptf_lal1979_group_ii_water_01bar_from_sand_spec) < 0) + return -1; + if (ptfkit_add_ufunc(module, "calc_ptf_lal1979_group_ii_water_03bar_from_sand", + calc_ptf_lal1979_group_ii_water_03bar_from_sand_types, 1, 1, + &calc_ptf_lal1979_group_ii_water_03bar_from_sand_spec) < 0) + return -1; + if (ptfkit_add_ufunc(module, "calc_ptf_lal1979_group_i_water_15bar_from_clay", + calc_ptf_lal1979_group_i_water_15bar_from_clay_types, 1, 1, + &calc_ptf_lal1979_group_i_water_15bar_from_clay_spec) < 0) + return -1; + if (ptfkit_add_ufunc(module, "calc_ptf_lal1979_group_i_water_15bar_from_sand", + calc_ptf_lal1979_group_i_water_15bar_from_sand_types, 1, 1, + &calc_ptf_lal1979_group_i_water_15bar_from_sand_spec) < 0) + return -1; + if (ptfkit_add_ufunc(module, "calc_ptf_lal1979_group_i_water_15bar_from_silt", + calc_ptf_lal1979_group_i_water_15bar_from_silt_types, 1, 1, + &calc_ptf_lal1979_group_i_water_15bar_from_silt_spec) < 0) + return -1; + if (ptfkit_add_ufunc(module, "calc_ptf_lal1979_group_ii_water_15bar_from_clay", + calc_ptf_lal1979_group_ii_water_15bar_from_clay_types, 1, 1, + &calc_ptf_lal1979_group_ii_water_15bar_from_clay_spec) < 0) + return -1; + if (ptfkit_add_ufunc(module, "calc_ptf_lal1979_group_ii_water_15bar_from_sand", + calc_ptf_lal1979_group_ii_water_15bar_from_sand_types, 1, 1, + &calc_ptf_lal1979_group_ii_water_15bar_from_sand_spec) < 0) + return -1; + if (ptfkit_add_ufunc(module, "calc_ptf_lal1979_group_i_moisture_equivalent_from_clay", + calc_ptf_lal1979_group_i_moisture_equivalent_from_clay_types, 1, 1, + &calc_ptf_lal1979_group_i_moisture_equivalent_from_clay_spec) < 0) + return -1; + if (ptfkit_add_ufunc(module, "calc_ptf_lal1979_group_i_moisture_equivalent_from_sand", + calc_ptf_lal1979_group_i_moisture_equivalent_from_sand_types, 1, 1, + &calc_ptf_lal1979_group_i_moisture_equivalent_from_sand_spec) < 0) + return -1; + if (ptfkit_add_ufunc(module, "calc_ptf_lal1979_group_ii_moisture_equivalent_from_clay", + calc_ptf_lal1979_group_ii_moisture_equivalent_from_clay_types, 1, 1, + &calc_ptf_lal1979_group_ii_moisture_equivalent_from_clay_spec) < 0) + return -1; + if (ptfkit_add_ufunc(module, "calc_ptf_lal1979_group_ii_moisture_equivalent_from_sand", + calc_ptf_lal1979_group_ii_moisture_equivalent_from_sand_types, 1, 1, + &calc_ptf_lal1979_group_ii_moisture_equivalent_from_sand_spec) < 0) + return -1; + if (ptfkit_add_ufunc(module, "calc_ptf_lal1979_group_ii_moisture_equivalent_from_silt", + calc_ptf_lal1979_group_ii_moisture_equivalent_from_silt_types, 1, 1, + &calc_ptf_lal1979_group_ii_moisture_equivalent_from_silt_spec) < 0) + return -1; + if (ptfkit_add_ufunc(module, "calc_ptf_lal1979_group_ii_water_03bar_from_water_01bar", + calc_ptf_lal1979_group_ii_water_03bar_from_water_01bar_types, 1, 1, + &calc_ptf_lal1979_group_ii_water_03bar_from_water_01bar_spec) < 0) + return -1; + if (ptfkit_add_ufunc(module, "calc_ptf_lal1979_group_ii_water_15bar_from_water_01bar", + calc_ptf_lal1979_group_ii_water_15bar_from_water_01bar_types, 1, 1, + &calc_ptf_lal1979_group_ii_water_15bar_from_water_01bar_spec) < 0) + return -1; + if (ptfkit_add_ufunc( + module, "calc_ptf_lal1979_group_i_upper_plastic_limit_from_organic_carbon", + calc_ptf_lal1979_group_i_upper_plastic_limit_from_organic_carbon_types, 1, 1, + &calc_ptf_lal1979_group_i_upper_plastic_limit_from_organic_carbon_spec) < 0) + return -1; + if (ptfkit_add_ufunc( + module, "calc_ptf_lal1979_group_i_lower_plastic_limit_from_organic_carbon", + calc_ptf_lal1979_group_i_lower_plastic_limit_from_organic_carbon_types, 1, 1, + &calc_ptf_lal1979_group_i_lower_plastic_limit_from_organic_carbon_spec) < 0) + return -1; + if (ptfkit_add_ufunc(module, "calc_ptf_lal1979_group_i_plasticity_index_from_organic_carbon", + calc_ptf_lal1979_group_i_plasticity_index_from_organic_carbon_types, 1, 1, + &calc_ptf_lal1979_group_i_plasticity_index_from_organic_carbon_spec) < 0) + return -1; + if (ptfkit_add_ufunc(module, "calc_ptf_lal1979_group_i_upper_plastic_limit_from_clay", + calc_ptf_lal1979_group_i_upper_plastic_limit_from_clay_types, 1, 1, + &calc_ptf_lal1979_group_i_upper_plastic_limit_from_clay_spec) < 0) + return -1; + if (ptfkit_add_ufunc(module, "calc_ptf_lal1979_group_i_lower_plastic_limit_from_clay", + calc_ptf_lal1979_group_i_lower_plastic_limit_from_clay_types, 1, 1, + &calc_ptf_lal1979_group_i_lower_plastic_limit_from_clay_spec) < 0) + return -1; + if (ptfkit_add_ufunc(module, "calc_ptf_lal1979_group_i_plasticity_index_from_clay", + calc_ptf_lal1979_group_i_plasticity_index_from_clay_types, 1, 1, + &calc_ptf_lal1979_group_i_plasticity_index_from_clay_spec) < 0) + return -1; + if (ptfkit_add_ufunc(module, "calc_ptf_lal1979_group_i_lower_plastic_limit_from_sand", + calc_ptf_lal1979_group_i_lower_plastic_limit_from_sand_types, 1, 1, + &calc_ptf_lal1979_group_i_lower_plastic_limit_from_sand_spec) < 0) + return -1; + if (ptfkit_add_ufunc(module, "calc_ptf_lal1979_group_i_plasticity_index_from_sand", + calc_ptf_lal1979_group_i_plasticity_index_from_sand_types, 1, 1, + &calc_ptf_lal1979_group_i_plasticity_index_from_sand_spec) < 0) + return -1; + if (ptfkit_add_ufunc( + module, "calc_ptf_lal1979_group_ii_upper_plastic_limit_from_organic_carbon", + calc_ptf_lal1979_group_ii_upper_plastic_limit_from_organic_carbon_types, 1, 1, + &calc_ptf_lal1979_group_ii_upper_plastic_limit_from_organic_carbon_spec) < 0) + return -1; + if (ptfkit_add_ufunc(module, "calc_ptf_lal1979_group_ii_plasticity_index_from_organic_carbon", + calc_ptf_lal1979_group_ii_plasticity_index_from_organic_carbon_types, 1, 1, + &calc_ptf_lal1979_group_ii_plasticity_index_from_organic_carbon_spec) < 0) + return -1; + if (ptfkit_add_ufunc(module, "calc_ptf_lal1979_group_ii_upper_plastic_limit_from_clay", + calc_ptf_lal1979_group_ii_upper_plastic_limit_from_clay_types, 1, 1, + &calc_ptf_lal1979_group_ii_upper_plastic_limit_from_clay_spec) < 0) + return -1; + if (ptfkit_add_ufunc(module, "calc_ptf_lal1979_group_ii_lower_plastic_limit_from_clay", + calc_ptf_lal1979_group_ii_lower_plastic_limit_from_clay_types, 1, 1, + &calc_ptf_lal1979_group_ii_lower_plastic_limit_from_clay_spec) < 0) + return -1; + if (ptfkit_add_ufunc(module, "calc_ptf_lal1979_group_ii_upper_plastic_limit_from_sand", + calc_ptf_lal1979_group_ii_upper_plastic_limit_from_sand_types, 1, 1, + &calc_ptf_lal1979_group_ii_upper_plastic_limit_from_sand_spec) < 0) + return -1; + if (ptfkit_add_ufunc(module, "calc_ptf_lal1979_group_ii_lower_plastic_limit_from_sand", + calc_ptf_lal1979_group_ii_lower_plastic_limit_from_sand_types, 1, 1, + &calc_ptf_lal1979_group_ii_lower_plastic_limit_from_sand_spec) < 0) + return -1; + if (ptfkit_add_ufunc(module, "calc_ptf_lal1979_group_ii_upper_plastic_limit_from_silt", + calc_ptf_lal1979_group_ii_upper_plastic_limit_from_silt_types, 1, 1, + &calc_ptf_lal1979_group_ii_upper_plastic_limit_from_silt_spec) < 0) + return -1; + if (ptfkit_add_ufunc(module, "calc_ptf_lal1979_group_ii_lower_plastic_limit_from_silt", + calc_ptf_lal1979_group_ii_lower_plastic_limit_from_silt_types, 1, 1, + &calc_ptf_lal1979_group_ii_lower_plastic_limit_from_silt_spec) < 0) + return -1; + if (ptfkit_add_ufunc(module, "calc_ptf_lal1979_group_ii_plasticity_index_from_silt", + calc_ptf_lal1979_group_ii_plasticity_index_from_silt_types, 1, 1, + &calc_ptf_lal1979_group_ii_plasticity_index_from_silt_spec) < 0) + return -1; + return 0; +} diff --git a/targets/ptfkit-py/src/ptfkit/lal1979.py b/targets/ptfkit-py/src/ptfkit/lal1979.py new file mode 100644 index 0000000..dc47752 --- /dev/null +++ b/targets/ptfkit-py/src/ptfkit/lal1979.py @@ -0,0 +1,1918 @@ +# @generated by ptfkit-codegen; DO NOT EDIT. + +# ruff: noqa: E501, I001 + +r"""Moisture retention and plasticity regressions for two groups of Nigerian soils. + +Reference: + Lal, R. (1979). Physical properties and moisture retention characteristics of some Nigerian + soils. Geoderma, 21, 209-223. + [DOI: 10.1016/0016-7061(78)90028-9](https://doi.org/10.1016/0016-7061(78)90028-9) + +Territory + +: Nigeria + +Dataset + +: 119 genetic-horizon samples from 23 profiles in two parent-material groups. + +""" + +from __future__ import annotations + +from typing import TYPE_CHECKING, overload + +from ptfkit._dispatch import call as _call +from ptfkit._ptfkit import ( + calc_ptf_lal1979_group_i_water_0bar_from_clay as _calc_ptf_lal1979_group_i_water_0bar_from_clay, + calc_ptf_lal1979_group_i_water_0bar_from_sand as _calc_ptf_lal1979_group_i_water_0bar_from_sand, + calc_ptf_lal1979_group_ii_water_0bar_from_clay as _calc_ptf_lal1979_group_ii_water_0bar_from_clay, + calc_ptf_lal1979_group_ii_water_0bar_from_sand as _calc_ptf_lal1979_group_ii_water_0bar_from_sand, + calc_ptf_lal1979_group_i_water_01bar_from_clay as _calc_ptf_lal1979_group_i_water_01bar_from_clay, + calc_ptf_lal1979_group_i_water_03bar_from_clay as _calc_ptf_lal1979_group_i_water_03bar_from_clay, + calc_ptf_lal1979_group_i_water_01bar_from_sand as _calc_ptf_lal1979_group_i_water_01bar_from_sand, + calc_ptf_lal1979_group_i_water_03bar_from_sand as _calc_ptf_lal1979_group_i_water_03bar_from_sand, + calc_ptf_lal1979_group_ii_water_01bar_from_clay as _calc_ptf_lal1979_group_ii_water_01bar_from_clay, + calc_ptf_lal1979_group_ii_water_03bar_from_clay as _calc_ptf_lal1979_group_ii_water_03bar_from_clay, + calc_ptf_lal1979_group_ii_water_01bar_from_sand as _calc_ptf_lal1979_group_ii_water_01bar_from_sand, + calc_ptf_lal1979_group_ii_water_03bar_from_sand as _calc_ptf_lal1979_group_ii_water_03bar_from_sand, + calc_ptf_lal1979_group_i_water_15bar_from_clay as _calc_ptf_lal1979_group_i_water_15bar_from_clay, + calc_ptf_lal1979_group_i_water_15bar_from_sand as _calc_ptf_lal1979_group_i_water_15bar_from_sand, + calc_ptf_lal1979_group_i_water_15bar_from_silt as _calc_ptf_lal1979_group_i_water_15bar_from_silt, + calc_ptf_lal1979_group_ii_water_15bar_from_clay as _calc_ptf_lal1979_group_ii_water_15bar_from_clay, + calc_ptf_lal1979_group_ii_water_15bar_from_sand as _calc_ptf_lal1979_group_ii_water_15bar_from_sand, + calc_ptf_lal1979_group_i_moisture_equivalent_from_clay as _calc_ptf_lal1979_group_i_moisture_equivalent_from_clay, + calc_ptf_lal1979_group_i_moisture_equivalent_from_sand as _calc_ptf_lal1979_group_i_moisture_equivalent_from_sand, + calc_ptf_lal1979_group_ii_moisture_equivalent_from_clay as _calc_ptf_lal1979_group_ii_moisture_equivalent_from_clay, + calc_ptf_lal1979_group_ii_moisture_equivalent_from_sand as _calc_ptf_lal1979_group_ii_moisture_equivalent_from_sand, + calc_ptf_lal1979_group_ii_moisture_equivalent_from_silt as _calc_ptf_lal1979_group_ii_moisture_equivalent_from_silt, + calc_ptf_lal1979_group_ii_water_03bar_from_water_01bar as _calc_ptf_lal1979_group_ii_water_03bar_from_water_01bar, + calc_ptf_lal1979_group_ii_water_15bar_from_water_01bar as _calc_ptf_lal1979_group_ii_water_15bar_from_water_01bar, + calc_ptf_lal1979_group_i_upper_plastic_limit_from_organic_carbon as _calc_ptf_lal1979_group_i_upper_plastic_limit_from_organic_carbon, + calc_ptf_lal1979_group_i_lower_plastic_limit_from_organic_carbon as _calc_ptf_lal1979_group_i_lower_plastic_limit_from_organic_carbon, + calc_ptf_lal1979_group_i_plasticity_index_from_organic_carbon as _calc_ptf_lal1979_group_i_plasticity_index_from_organic_carbon, + calc_ptf_lal1979_group_i_upper_plastic_limit_from_clay as _calc_ptf_lal1979_group_i_upper_plastic_limit_from_clay, + calc_ptf_lal1979_group_i_lower_plastic_limit_from_clay as _calc_ptf_lal1979_group_i_lower_plastic_limit_from_clay, + calc_ptf_lal1979_group_i_plasticity_index_from_clay as _calc_ptf_lal1979_group_i_plasticity_index_from_clay, + calc_ptf_lal1979_group_i_lower_plastic_limit_from_sand as _calc_ptf_lal1979_group_i_lower_plastic_limit_from_sand, + calc_ptf_lal1979_group_i_plasticity_index_from_sand as _calc_ptf_lal1979_group_i_plasticity_index_from_sand, + calc_ptf_lal1979_group_ii_upper_plastic_limit_from_organic_carbon as _calc_ptf_lal1979_group_ii_upper_plastic_limit_from_organic_carbon, + calc_ptf_lal1979_group_ii_plasticity_index_from_organic_carbon as _calc_ptf_lal1979_group_ii_plasticity_index_from_organic_carbon, + calc_ptf_lal1979_group_ii_upper_plastic_limit_from_clay as _calc_ptf_lal1979_group_ii_upper_plastic_limit_from_clay, + calc_ptf_lal1979_group_ii_lower_plastic_limit_from_clay as _calc_ptf_lal1979_group_ii_lower_plastic_limit_from_clay, + calc_ptf_lal1979_group_ii_upper_plastic_limit_from_sand as _calc_ptf_lal1979_group_ii_upper_plastic_limit_from_sand, + calc_ptf_lal1979_group_ii_lower_plastic_limit_from_sand as _calc_ptf_lal1979_group_ii_lower_plastic_limit_from_sand, + calc_ptf_lal1979_group_ii_upper_plastic_limit_from_silt as _calc_ptf_lal1979_group_ii_upper_plastic_limit_from_silt, + calc_ptf_lal1979_group_ii_lower_plastic_limit_from_silt as _calc_ptf_lal1979_group_ii_lower_plastic_limit_from_silt, + calc_ptf_lal1979_group_ii_plasticity_index_from_silt as _calc_ptf_lal1979_group_ii_plasticity_index_from_silt, +) + + +if TYPE_CHECKING: + from numpy import floating + from numpy.typing import ArrayLike, NDArray + +__all__ = [ + 'calc_ptf_lal1979_group_i_lower_plastic_limit_from_clay', + 'calc_ptf_lal1979_group_i_lower_plastic_limit_from_organic_carbon', + 'calc_ptf_lal1979_group_i_lower_plastic_limit_from_sand', + 'calc_ptf_lal1979_group_i_moisture_equivalent_from_clay', + 'calc_ptf_lal1979_group_i_moisture_equivalent_from_sand', + 'calc_ptf_lal1979_group_i_plasticity_index_from_clay', + 'calc_ptf_lal1979_group_i_plasticity_index_from_organic_carbon', + 'calc_ptf_lal1979_group_i_plasticity_index_from_sand', + 'calc_ptf_lal1979_group_i_upper_plastic_limit_from_clay', + 'calc_ptf_lal1979_group_i_upper_plastic_limit_from_organic_carbon', + 'calc_ptf_lal1979_group_i_water_0bar_from_clay', + 'calc_ptf_lal1979_group_i_water_0bar_from_sand', + 'calc_ptf_lal1979_group_i_water_01bar_from_clay', + 'calc_ptf_lal1979_group_i_water_01bar_from_sand', + 'calc_ptf_lal1979_group_i_water_03bar_from_clay', + 'calc_ptf_lal1979_group_i_water_03bar_from_sand', + 'calc_ptf_lal1979_group_i_water_15bar_from_clay', + 'calc_ptf_lal1979_group_i_water_15bar_from_sand', + 'calc_ptf_lal1979_group_i_water_15bar_from_silt', + 'calc_ptf_lal1979_group_ii_lower_plastic_limit_from_clay', + 'calc_ptf_lal1979_group_ii_lower_plastic_limit_from_sand', + 'calc_ptf_lal1979_group_ii_lower_plastic_limit_from_silt', + 'calc_ptf_lal1979_group_ii_moisture_equivalent_from_clay', + 'calc_ptf_lal1979_group_ii_moisture_equivalent_from_sand', + 'calc_ptf_lal1979_group_ii_moisture_equivalent_from_silt', + 'calc_ptf_lal1979_group_ii_plasticity_index_from_organic_carbon', + 'calc_ptf_lal1979_group_ii_plasticity_index_from_silt', + 'calc_ptf_lal1979_group_ii_upper_plastic_limit_from_clay', + 'calc_ptf_lal1979_group_ii_upper_plastic_limit_from_organic_carbon', + 'calc_ptf_lal1979_group_ii_upper_plastic_limit_from_sand', + 'calc_ptf_lal1979_group_ii_upper_plastic_limit_from_silt', + 'calc_ptf_lal1979_group_ii_water_0bar_from_clay', + 'calc_ptf_lal1979_group_ii_water_0bar_from_sand', + 'calc_ptf_lal1979_group_ii_water_01bar_from_clay', + 'calc_ptf_lal1979_group_ii_water_01bar_from_sand', + 'calc_ptf_lal1979_group_ii_water_03bar_from_clay', + 'calc_ptf_lal1979_group_ii_water_03bar_from_sand', + 'calc_ptf_lal1979_group_ii_water_03bar_from_water_01bar', + 'calc_ptf_lal1979_group_ii_water_15bar_from_clay', + 'calc_ptf_lal1979_group_ii_water_15bar_from_sand', + 'calc_ptf_lal1979_group_ii_water_15bar_from_water_01bar', +] + + +@overload +def calc_ptf_lal1979_group_i_water_0bar_from_clay(*, clay: float) -> floating: ... + + +@overload +def calc_ptf_lal1979_group_i_water_0bar_from_clay( + *, + clay: ArrayLike, + out: NDArray[floating] | None = None, +) -> NDArray[floating]: ... + + +def calc_ptf_lal1979_group_i_water_0bar_from_clay( + *, + clay: float | ArrayLike, + out: NDArray[floating] | None = None, +) -> floating | NDArray[floating]: + """Estimate gravimetric moisture retention at saturation for Group I. + + Arguments: + clay: Clay smaller than 0.002 mm; percentage of the fine earth. Full calibration bounds are + not reported. (%) + out: Optional output arrays for in-place calculation. + + Returns: + water_0bar: Gravimetric moisture retention at saturation expressed per unit dry soil mass. + (g g⁻¹) + + Territory: + Group I: 11 well-drained upland profiles in western Nigeria developed over pre-Cambrian + basement complex rocks, mainly biotite-muscovite paragneisses. + + Notes: + Prediction target: Gravimetric moisture retention at saturation + Table IV, Group I, clay predictor, water_0bar response. + + """ + return _call( + _calc_ptf_lal1979_group_i_water_0bar_from_clay, + clay, + out=out, + ) + + +@overload +def calc_ptf_lal1979_group_i_water_0bar_from_sand(*, sand: float) -> floating: ... + + +@overload +def calc_ptf_lal1979_group_i_water_0bar_from_sand( + *, + sand: ArrayLike, + out: NDArray[floating] | None = None, +) -> NDArray[floating]: ... + + +def calc_ptf_lal1979_group_i_water_0bar_from_sand( + *, + sand: float | ArrayLike, + out: NDArray[floating] | None = None, +) -> floating | NDArray[floating]: + """Estimate gravimetric moisture retention at saturation for Group I. + + Arguments: + sand: Sand from 0.02 to 2 mm; percentage of the fine earth. Full calibration bounds are not + reported. (%) + out: Optional output arrays for in-place calculation. + + Returns: + water_0bar: Gravimetric moisture retention at saturation expressed per unit dry soil mass. + (g g⁻¹) + + Territory: + Group I: 11 well-drained upland profiles in western Nigeria developed over pre-Cambrian + basement complex rocks, mainly biotite-muscovite paragneisses. + + Notes: + Prediction target: Gravimetric moisture retention at saturation + Table IV, Group I, sand predictor, water_0bar response. + + """ + return _call( + _calc_ptf_lal1979_group_i_water_0bar_from_sand, + sand, + out=out, + ) + + +@overload +def calc_ptf_lal1979_group_ii_water_0bar_from_clay(*, clay: float) -> floating: ... + + +@overload +def calc_ptf_lal1979_group_ii_water_0bar_from_clay( + *, + clay: ArrayLike, + out: NDArray[floating] | None = None, +) -> NDArray[floating]: ... + + +def calc_ptf_lal1979_group_ii_water_0bar_from_clay( + *, + clay: float | ArrayLike, + out: NDArray[floating] | None = None, +) -> floating | NDArray[floating]: + """Estimate gravimetric moisture retention at saturation for Group II. + + Arguments: + clay: Clay smaller than 0.002 mm; percentage of the fine earth. Full calibration bounds are + not reported. (%) + out: Optional output arrays for in-place calculation. + + Returns: + water_0bar: Gravimetric moisture retention at saturation expressed per unit dry soil mass. + (g g⁻¹) + + Territory: + Group II: 12 profiles in Nigeria developed from arenaceous sedimentary rocks, partly + Cretaceous and partly Lower Pleistocene. + + Notes: + Prediction target: Gravimetric moisture retention at saturation + Table IV, Group II, clay predictor, water_0bar response. + + """ + return _call( + _calc_ptf_lal1979_group_ii_water_0bar_from_clay, + clay, + out=out, + ) + + +@overload +def calc_ptf_lal1979_group_ii_water_0bar_from_sand(*, sand: float) -> floating: ... + + +@overload +def calc_ptf_lal1979_group_ii_water_0bar_from_sand( + *, + sand: ArrayLike, + out: NDArray[floating] | None = None, +) -> NDArray[floating]: ... + + +def calc_ptf_lal1979_group_ii_water_0bar_from_sand( + *, + sand: float | ArrayLike, + out: NDArray[floating] | None = None, +) -> floating | NDArray[floating]: + """Estimate gravimetric moisture retention at saturation for Group II. + + Arguments: + sand: Sand from 0.02 to 2 mm; percentage of the fine earth. Full calibration bounds are not + reported. (%) + out: Optional output arrays for in-place calculation. + + Returns: + water_0bar: Gravimetric moisture retention at saturation expressed per unit dry soil mass. + (g g⁻¹) + + Territory: + Group II: 12 profiles in Nigeria developed from arenaceous sedimentary rocks, partly + Cretaceous and partly Lower Pleistocene. + + Notes: + Prediction target: Gravimetric moisture retention at saturation + Table IV, Group II, sand predictor, water_0bar response. + + """ + return _call( + _calc_ptf_lal1979_group_ii_water_0bar_from_sand, + sand, + out=out, + ) + + +@overload +def calc_ptf_lal1979_group_i_water_01bar_from_clay(*, clay: float) -> floating: ... + + +@overload +def calc_ptf_lal1979_group_i_water_01bar_from_clay( + *, + clay: ArrayLike, + out: NDArray[floating] | None = None, +) -> NDArray[floating]: ... + + +def calc_ptf_lal1979_group_i_water_01bar_from_clay( + *, + clay: float | ArrayLike, + out: NDArray[floating] | None = None, +) -> floating | NDArray[floating]: + """Estimate gravimetric moisture retention at 0.1 bar suction for Group I. + + Arguments: + clay: Clay smaller than 0.002 mm; percentage of the fine earth. Full calibration bounds are + not reported. (%) + out: Optional output arrays for in-place calculation. + + Returns: + water_01bar: Gravimetric moisture retention at 0.1 bar suction expressed per unit dry soil + mass. (g g⁻¹) + + Territory: + Group I: 11 well-drained upland profiles in western Nigeria developed over pre-Cambrian + basement complex rocks, mainly biotite-muscovite paragneisses. + + Notes: + Prediction target: Gravimetric moisture retention at 0.1 bar suction + Table V, Group I, clay predictor, water_01bar response. + + """ + return _call( + _calc_ptf_lal1979_group_i_water_01bar_from_clay, + clay, + out=out, + ) + + +@overload +def calc_ptf_lal1979_group_i_water_03bar_from_clay(*, clay: float) -> floating: ... + + +@overload +def calc_ptf_lal1979_group_i_water_03bar_from_clay( + *, + clay: ArrayLike, + out: NDArray[floating] | None = None, +) -> NDArray[floating]: ... + + +def calc_ptf_lal1979_group_i_water_03bar_from_clay( + *, + clay: float | ArrayLike, + out: NDArray[floating] | None = None, +) -> floating | NDArray[floating]: + """Estimate gravimetric moisture retention at 0.3 bar suction for Group I. + + Arguments: + clay: Clay smaller than 0.002 mm; percentage of the fine earth. Full calibration bounds are + not reported. (%) + out: Optional output arrays for in-place calculation. + + Returns: + water_03bar: Gravimetric moisture retention at 0.3 bar suction expressed per unit dry soil + mass. (g g⁻¹) + + Territory: + Group I: 11 well-drained upland profiles in western Nigeria developed over pre-Cambrian + basement complex rocks, mainly biotite-muscovite paragneisses. + + Notes: + Prediction target: Gravimetric moisture retention at 0.3 bar suction + Table V, Group I, clay predictor, water_03bar response. + + """ + return _call( + _calc_ptf_lal1979_group_i_water_03bar_from_clay, + clay, + out=out, + ) + + +@overload +def calc_ptf_lal1979_group_i_water_01bar_from_sand(*, sand: float) -> floating: ... + + +@overload +def calc_ptf_lal1979_group_i_water_01bar_from_sand( + *, + sand: ArrayLike, + out: NDArray[floating] | None = None, +) -> NDArray[floating]: ... + + +def calc_ptf_lal1979_group_i_water_01bar_from_sand( + *, + sand: float | ArrayLike, + out: NDArray[floating] | None = None, +) -> floating | NDArray[floating]: + """Estimate gravimetric moisture retention at 0.1 bar suction for Group I. + + Arguments: + sand: Sand from 0.02 to 2 mm; percentage of the fine earth. Full calibration bounds are not + reported. (%) + out: Optional output arrays for in-place calculation. + + Returns: + water_01bar: Gravimetric moisture retention at 0.1 bar suction expressed per unit dry soil + mass. (g g⁻¹) + + Territory: + Group I: 11 well-drained upland profiles in western Nigeria developed over pre-Cambrian + basement complex rocks, mainly biotite-muscovite paragneisses. + + Notes: + Prediction target: Gravimetric moisture retention at 0.1 bar suction + Table V, Group I, sand predictor, water_01bar response. + + """ + return _call( + _calc_ptf_lal1979_group_i_water_01bar_from_sand, + sand, + out=out, + ) + + +@overload +def calc_ptf_lal1979_group_i_water_03bar_from_sand(*, sand: float) -> floating: ... + + +@overload +def calc_ptf_lal1979_group_i_water_03bar_from_sand( + *, + sand: ArrayLike, + out: NDArray[floating] | None = None, +) -> NDArray[floating]: ... + + +def calc_ptf_lal1979_group_i_water_03bar_from_sand( + *, + sand: float | ArrayLike, + out: NDArray[floating] | None = None, +) -> floating | NDArray[floating]: + """Estimate gravimetric moisture retention at 0.3 bar suction for Group I. + + Arguments: + sand: Sand from 0.02 to 2 mm; percentage of the fine earth. Full calibration bounds are not + reported. (%) + out: Optional output arrays for in-place calculation. + + Returns: + water_03bar: Gravimetric moisture retention at 0.3 bar suction expressed per unit dry soil + mass. (g g⁻¹) + + Territory: + Group I: 11 well-drained upland profiles in western Nigeria developed over pre-Cambrian + basement complex rocks, mainly biotite-muscovite paragneisses. + + Notes: + Prediction target: Gravimetric moisture retention at 0.3 bar suction + Table V, Group I, sand predictor, water_03bar response. + + """ + return _call( + _calc_ptf_lal1979_group_i_water_03bar_from_sand, + sand, + out=out, + ) + + +@overload +def calc_ptf_lal1979_group_ii_water_01bar_from_clay(*, clay: float) -> floating: ... + + +@overload +def calc_ptf_lal1979_group_ii_water_01bar_from_clay( + *, + clay: ArrayLike, + out: NDArray[floating] | None = None, +) -> NDArray[floating]: ... + + +def calc_ptf_lal1979_group_ii_water_01bar_from_clay( + *, + clay: float | ArrayLike, + out: NDArray[floating] | None = None, +) -> floating | NDArray[floating]: + """Estimate gravimetric moisture retention at 0.1 bar suction for Group II. + + Arguments: + clay: Clay smaller than 0.002 mm; percentage of the fine earth. Full calibration bounds are + not reported. (%) + out: Optional output arrays for in-place calculation. + + Returns: + water_01bar: Gravimetric moisture retention at 0.1 bar suction expressed per unit dry soil + mass. (g g⁻¹) + + Territory: + Group II: 12 profiles in Nigeria developed from arenaceous sedimentary rocks, partly + Cretaceous and partly Lower Pleistocene. + + Notes: + Prediction target: Gravimetric moisture retention at 0.1 bar suction + Table V, Group II, clay predictor, water_01bar response. + + """ + return _call( + _calc_ptf_lal1979_group_ii_water_01bar_from_clay, + clay, + out=out, + ) + + +@overload +def calc_ptf_lal1979_group_ii_water_03bar_from_clay(*, clay: float) -> floating: ... + + +@overload +def calc_ptf_lal1979_group_ii_water_03bar_from_clay( + *, + clay: ArrayLike, + out: NDArray[floating] | None = None, +) -> NDArray[floating]: ... + + +def calc_ptf_lal1979_group_ii_water_03bar_from_clay( + *, + clay: float | ArrayLike, + out: NDArray[floating] | None = None, +) -> floating | NDArray[floating]: + """Estimate gravimetric moisture retention at 0.3 bar suction for Group II. + + Arguments: + clay: Clay smaller than 0.002 mm; percentage of the fine earth. Full calibration bounds are + not reported. (%) + out: Optional output arrays for in-place calculation. + + Returns: + water_03bar: Gravimetric moisture retention at 0.3 bar suction expressed per unit dry soil + mass. (g g⁻¹) + + Territory: + Group II: 12 profiles in Nigeria developed from arenaceous sedimentary rocks, partly + Cretaceous and partly Lower Pleistocene. + + Notes: + Prediction target: Gravimetric moisture retention at 0.3 bar suction + Table V, Group II, clay predictor, water_03bar response. + + """ + return _call( + _calc_ptf_lal1979_group_ii_water_03bar_from_clay, + clay, + out=out, + ) + + +@overload +def calc_ptf_lal1979_group_ii_water_01bar_from_sand(*, sand: float) -> floating: ... + + +@overload +def calc_ptf_lal1979_group_ii_water_01bar_from_sand( + *, + sand: ArrayLike, + out: NDArray[floating] | None = None, +) -> NDArray[floating]: ... + + +def calc_ptf_lal1979_group_ii_water_01bar_from_sand( + *, + sand: float | ArrayLike, + out: NDArray[floating] | None = None, +) -> floating | NDArray[floating]: + """Estimate gravimetric moisture retention at 0.1 bar suction for Group II. + + Arguments: + sand: Sand from 0.02 to 2 mm; percentage of the fine earth. Full calibration bounds are not + reported. (%) + out: Optional output arrays for in-place calculation. + + Returns: + water_01bar: Gravimetric moisture retention at 0.1 bar suction expressed per unit dry soil + mass. (g g⁻¹) + + Territory: + Group II: 12 profiles in Nigeria developed from arenaceous sedimentary rocks, partly + Cretaceous and partly Lower Pleistocene. + + Notes: + Prediction target: Gravimetric moisture retention at 0.1 bar suction + Table V, Group II, sand predictor, water_01bar response. + + """ + return _call( + _calc_ptf_lal1979_group_ii_water_01bar_from_sand, + sand, + out=out, + ) + + +@overload +def calc_ptf_lal1979_group_ii_water_03bar_from_sand(*, sand: float) -> floating: ... + + +@overload +def calc_ptf_lal1979_group_ii_water_03bar_from_sand( + *, + sand: ArrayLike, + out: NDArray[floating] | None = None, +) -> NDArray[floating]: ... + + +def calc_ptf_lal1979_group_ii_water_03bar_from_sand( + *, + sand: float | ArrayLike, + out: NDArray[floating] | None = None, +) -> floating | NDArray[floating]: + """Estimate gravimetric moisture retention at 0.3 bar suction for Group II. + + Arguments: + sand: Sand from 0.02 to 2 mm; percentage of the fine earth. Full calibration bounds are not + reported. (%) + out: Optional output arrays for in-place calculation. + + Returns: + water_03bar: Gravimetric moisture retention at 0.3 bar suction expressed per unit dry soil + mass. (g g⁻¹) + + Territory: + Group II: 12 profiles in Nigeria developed from arenaceous sedimentary rocks, partly + Cretaceous and partly Lower Pleistocene. + + Notes: + Prediction target: Gravimetric moisture retention at 0.3 bar suction + Table V, Group II, sand predictor, water_03bar response. + + """ + return _call( + _calc_ptf_lal1979_group_ii_water_03bar_from_sand, + sand, + out=out, + ) + + +@overload +def calc_ptf_lal1979_group_i_water_15bar_from_clay(*, clay: float) -> floating: ... + + +@overload +def calc_ptf_lal1979_group_i_water_15bar_from_clay( + *, + clay: ArrayLike, + out: NDArray[floating] | None = None, +) -> NDArray[floating]: ... + + +def calc_ptf_lal1979_group_i_water_15bar_from_clay( + *, + clay: float | ArrayLike, + out: NDArray[floating] | None = None, +) -> floating | NDArray[floating]: + """Estimate gravimetric moisture retention at 15 bar suction for Group I. + + Arguments: + clay: Clay smaller than 0.002 mm; percentage of the fine earth. Full calibration bounds are + not reported. (%) + out: Optional output arrays for in-place calculation. + + Returns: + water_15bar: Gravimetric moisture retention at 15 bar suction expressed per unit dry soil + mass. (g g⁻¹) + + Territory: + Group I: 11 well-drained upland profiles in western Nigeria developed over pre-Cambrian + basement complex rocks, mainly biotite-muscovite paragneisses. + + Notes: + Prediction target: Gravimetric moisture retention at 15 bar suction + Table VI, Group I, clay predictor, water_15bar response. + + """ + return _call( + _calc_ptf_lal1979_group_i_water_15bar_from_clay, + clay, + out=out, + ) + + +@overload +def calc_ptf_lal1979_group_i_water_15bar_from_sand(*, sand: float) -> floating: ... + + +@overload +def calc_ptf_lal1979_group_i_water_15bar_from_sand( + *, + sand: ArrayLike, + out: NDArray[floating] | None = None, +) -> NDArray[floating]: ... + + +def calc_ptf_lal1979_group_i_water_15bar_from_sand( + *, + sand: float | ArrayLike, + out: NDArray[floating] | None = None, +) -> floating | NDArray[floating]: + """Estimate gravimetric moisture retention at 15 bar suction for Group I. + + Arguments: + sand: Sand from 0.02 to 2 mm; percentage of the fine earth. Full calibration bounds are not + reported. (%) + out: Optional output arrays for in-place calculation. + + Returns: + water_15bar: Gravimetric moisture retention at 15 bar suction expressed per unit dry soil + mass. (g g⁻¹) + + Territory: + Group I: 11 well-drained upland profiles in western Nigeria developed over pre-Cambrian + basement complex rocks, mainly biotite-muscovite paragneisses. + + Notes: + Prediction target: Gravimetric moisture retention at 15 bar suction + Table VI, Group I, sand predictor, water_15bar response. + + """ + return _call( + _calc_ptf_lal1979_group_i_water_15bar_from_sand, + sand, + out=out, + ) + + +@overload +def calc_ptf_lal1979_group_i_water_15bar_from_silt(*, silt: float) -> floating: ... + + +@overload +def calc_ptf_lal1979_group_i_water_15bar_from_silt( + *, + silt: ArrayLike, + out: NDArray[floating] | None = None, +) -> NDArray[floating]: ... + + +def calc_ptf_lal1979_group_i_water_15bar_from_silt( + *, + silt: float | ArrayLike, + out: NDArray[floating] | None = None, +) -> floating | NDArray[floating]: + """Estimate gravimetric moisture retention at 15 bar suction for Group I. + + Arguments: + silt: Silt from 0.002 to 0.02 mm; percentage of the fine earth. Full calibration bounds are + not reported. (%) + out: Optional output arrays for in-place calculation. + + Returns: + water_15bar: Gravimetric moisture retention at 15 bar suction expressed per unit dry soil + mass. (g g⁻¹) + + Territory: + Group I: 11 well-drained upland profiles in western Nigeria developed over pre-Cambrian + basement complex rocks, mainly biotite-muscovite paragneisses. + + Notes: + Prediction target: Gravimetric moisture retention at 15 bar suction + Table VI, Group I, silt predictor, water_15bar response. + + """ + return _call( + _calc_ptf_lal1979_group_i_water_15bar_from_silt, + silt, + out=out, + ) + + +@overload +def calc_ptf_lal1979_group_ii_water_15bar_from_clay(*, clay: float) -> floating: ... + + +@overload +def calc_ptf_lal1979_group_ii_water_15bar_from_clay( + *, + clay: ArrayLike, + out: NDArray[floating] | None = None, +) -> NDArray[floating]: ... + + +def calc_ptf_lal1979_group_ii_water_15bar_from_clay( + *, + clay: float | ArrayLike, + out: NDArray[floating] | None = None, +) -> floating | NDArray[floating]: + """Estimate gravimetric moisture retention at 15 bar suction for Group II. + + Arguments: + clay: Clay smaller than 0.002 mm; percentage of the fine earth. Full calibration bounds are + not reported. (%) + out: Optional output arrays for in-place calculation. + + Returns: + water_15bar: Gravimetric moisture retention at 15 bar suction expressed per unit dry soil + mass. (g g⁻¹) + + Territory: + Group II: 12 profiles in Nigeria developed from arenaceous sedimentary rocks, partly + Cretaceous and partly Lower Pleistocene. + + Notes: + Prediction target: Gravimetric moisture retention at 15 bar suction + Table VI, Group II, clay predictor, water_15bar response. + + """ + return _call( + _calc_ptf_lal1979_group_ii_water_15bar_from_clay, + clay, + out=out, + ) + + +@overload +def calc_ptf_lal1979_group_ii_water_15bar_from_sand(*, sand: float) -> floating: ... + + +@overload +def calc_ptf_lal1979_group_ii_water_15bar_from_sand( + *, + sand: ArrayLike, + out: NDArray[floating] | None = None, +) -> NDArray[floating]: ... + + +def calc_ptf_lal1979_group_ii_water_15bar_from_sand( + *, + sand: float | ArrayLike, + out: NDArray[floating] | None = None, +) -> floating | NDArray[floating]: + """Estimate gravimetric moisture retention at 15 bar suction for Group II. + + Arguments: + sand: Sand from 0.02 to 2 mm; percentage of the fine earth. Full calibration bounds are not + reported. (%) + out: Optional output arrays for in-place calculation. + + Returns: + water_15bar: Gravimetric moisture retention at 15 bar suction expressed per unit dry soil + mass. (g g⁻¹) + + Territory: + Group II: 12 profiles in Nigeria developed from arenaceous sedimentary rocks, partly + Cretaceous and partly Lower Pleistocene. + + Notes: + Prediction target: Gravimetric moisture retention at 15 bar suction + Table VI, Group II, sand predictor, water_15bar response. + + """ + return _call( + _calc_ptf_lal1979_group_ii_water_15bar_from_sand, + sand, + out=out, + ) + + +@overload +def calc_ptf_lal1979_group_i_moisture_equivalent_from_clay(*, clay: float) -> floating: ... + + +@overload +def calc_ptf_lal1979_group_i_moisture_equivalent_from_clay( + *, + clay: ArrayLike, + out: NDArray[floating] | None = None, +) -> NDArray[floating]: ... + + +def calc_ptf_lal1979_group_i_moisture_equivalent_from_clay( + *, + clay: float | ArrayLike, + out: NDArray[floating] | None = None, +) -> floating | NDArray[floating]: + """Estimate gravimetric moisture equivalent measured at 1000 times gravity for Group I. + + Arguments: + clay: Clay smaller than 0.002 mm; percentage of the fine earth. Full calibration bounds are + not reported. (%) + out: Optional output arrays for in-place calculation. + + Returns: + moisture_equivalent: Gravimetric moisture equivalent measured at 1000 times gravity + expressed per unit dry soil mass. (g g⁻¹) + + Territory: + Group I: 11 well-drained upland profiles in western Nigeria developed over pre-Cambrian + basement complex rocks, mainly biotite-muscovite paragneisses. + + Notes: + Prediction target: Gravimetric moisture equivalent measured at 1000 times gravity + Table VII, Group I, clay predictor, moisture_equivalent response. + + """ + return _call( + _calc_ptf_lal1979_group_i_moisture_equivalent_from_clay, + clay, + out=out, + ) + + +@overload +def calc_ptf_lal1979_group_i_moisture_equivalent_from_sand(*, sand: float) -> floating: ... + + +@overload +def calc_ptf_lal1979_group_i_moisture_equivalent_from_sand( + *, + sand: ArrayLike, + out: NDArray[floating] | None = None, +) -> NDArray[floating]: ... + + +def calc_ptf_lal1979_group_i_moisture_equivalent_from_sand( + *, + sand: float | ArrayLike, + out: NDArray[floating] | None = None, +) -> floating | NDArray[floating]: + """Estimate gravimetric moisture equivalent measured at 1000 times gravity for Group I. + + Arguments: + sand: Sand from 0.02 to 2 mm; percentage of the fine earth. Full calibration bounds are not + reported. (%) + out: Optional output arrays for in-place calculation. + + Returns: + moisture_equivalent: Gravimetric moisture equivalent measured at 1000 times gravity + expressed per unit dry soil mass. (g g⁻¹) + + Territory: + Group I: 11 well-drained upland profiles in western Nigeria developed over pre-Cambrian + basement complex rocks, mainly biotite-muscovite paragneisses. + + Notes: + Prediction target: Gravimetric moisture equivalent measured at 1000 times gravity + Table VII, Group I, sand predictor, moisture_equivalent response. + + """ + return _call( + _calc_ptf_lal1979_group_i_moisture_equivalent_from_sand, + sand, + out=out, + ) + + +@overload +def calc_ptf_lal1979_group_ii_moisture_equivalent_from_clay(*, clay: float) -> floating: ... + + +@overload +def calc_ptf_lal1979_group_ii_moisture_equivalent_from_clay( + *, + clay: ArrayLike, + out: NDArray[floating] | None = None, +) -> NDArray[floating]: ... + + +def calc_ptf_lal1979_group_ii_moisture_equivalent_from_clay( + *, + clay: float | ArrayLike, + out: NDArray[floating] | None = None, +) -> floating | NDArray[floating]: + """Estimate gravimetric moisture equivalent measured at 1000 times gravity for Group II. + + Arguments: + clay: Clay smaller than 0.002 mm; percentage of the fine earth. Full calibration bounds are + not reported. (%) + out: Optional output arrays for in-place calculation. + + Returns: + moisture_equivalent: Gravimetric moisture equivalent measured at 1000 times gravity + expressed per unit dry soil mass. (g g⁻¹) + + Territory: + Group II: 12 profiles in Nigeria developed from arenaceous sedimentary rocks, partly + Cretaceous and partly Lower Pleistocene. + + Notes: + Prediction target: Gravimetric moisture equivalent measured at 1000 times gravity + Table VII, Group II, clay predictor, moisture_equivalent response. + + """ + return _call( + _calc_ptf_lal1979_group_ii_moisture_equivalent_from_clay, + clay, + out=out, + ) + + +@overload +def calc_ptf_lal1979_group_ii_moisture_equivalent_from_sand(*, sand: float) -> floating: ... + + +@overload +def calc_ptf_lal1979_group_ii_moisture_equivalent_from_sand( + *, + sand: ArrayLike, + out: NDArray[floating] | None = None, +) -> NDArray[floating]: ... + + +def calc_ptf_lal1979_group_ii_moisture_equivalent_from_sand( + *, + sand: float | ArrayLike, + out: NDArray[floating] | None = None, +) -> floating | NDArray[floating]: + """Estimate gravimetric moisture equivalent measured at 1000 times gravity for Group II. + + Arguments: + sand: Sand from 0.02 to 2 mm; percentage of the fine earth. Full calibration bounds are not + reported. (%) + out: Optional output arrays for in-place calculation. + + Returns: + moisture_equivalent: Gravimetric moisture equivalent measured at 1000 times gravity + expressed per unit dry soil mass. (g g⁻¹) + + Territory: + Group II: 12 profiles in Nigeria developed from arenaceous sedimentary rocks, partly + Cretaceous and partly Lower Pleistocene. + + Notes: + Prediction target: Gravimetric moisture equivalent measured at 1000 times gravity + Table VII, Group II, sand predictor, moisture_equivalent response. + + """ + return _call( + _calc_ptf_lal1979_group_ii_moisture_equivalent_from_sand, + sand, + out=out, + ) + + +@overload +def calc_ptf_lal1979_group_ii_moisture_equivalent_from_silt(*, silt: float) -> floating: ... + + +@overload +def calc_ptf_lal1979_group_ii_moisture_equivalent_from_silt( + *, + silt: ArrayLike, + out: NDArray[floating] | None = None, +) -> NDArray[floating]: ... + + +def calc_ptf_lal1979_group_ii_moisture_equivalent_from_silt( + *, + silt: float | ArrayLike, + out: NDArray[floating] | None = None, +) -> floating | NDArray[floating]: + """Estimate gravimetric moisture equivalent measured at 1000 times gravity for Group II. + + Arguments: + silt: Silt from 0.002 to 0.02 mm; percentage of the fine earth. Full calibration bounds are + not reported. (%) + out: Optional output arrays for in-place calculation. + + Returns: + moisture_equivalent: Gravimetric moisture equivalent measured at 1000 times gravity + expressed per unit dry soil mass. (g g⁻¹) + + Territory: + Group II: 12 profiles in Nigeria developed from arenaceous sedimentary rocks, partly + Cretaceous and partly Lower Pleistocene. + + Notes: + Prediction target: Gravimetric moisture equivalent measured at 1000 times gravity + Table VII, Group II, silt predictor, moisture_equivalent response. + + """ + return _call( + _calc_ptf_lal1979_group_ii_moisture_equivalent_from_silt, + silt, + out=out, + ) + + +@overload +def calc_ptf_lal1979_group_ii_water_03bar_from_water_01bar(*, water_01bar: float) -> floating: ... + + +@overload +def calc_ptf_lal1979_group_ii_water_03bar_from_water_01bar( + *, + water_01bar: ArrayLike, + out: NDArray[floating] | None = None, +) -> NDArray[floating]: ... + + +def calc_ptf_lal1979_group_ii_water_03bar_from_water_01bar( + *, + water_01bar: float | ArrayLike, + out: NDArray[floating] | None = None, +) -> floating | NDArray[floating]: + """Estimate gravimetric moisture retention at 0.3 bar suction for Group II. + + Arguments: + water_01bar: Gravimetric moisture retention at 0.1 bar suction on disturbed soil. (g/g) + out: Optional output arrays for in-place calculation. + + Returns: + water_03bar: Gravimetric moisture retention at 0.3 bar suction expressed per unit dry soil + mass. (g g⁻¹) + + Territory: + Group II: 12 profiles in Nigeria developed from arenaceous sedimentary rocks, partly + Cretaceous and partly Lower Pleistocene. + + Notes: + Prediction target: Gravimetric moisture retention at 0.3 bar suction + Table VIII, Group II, water_01bar predictor, water_03bar response. + + """ + return _call( + _calc_ptf_lal1979_group_ii_water_03bar_from_water_01bar, + water_01bar, + out=out, + ) + + +@overload +def calc_ptf_lal1979_group_ii_water_15bar_from_water_01bar(*, water_01bar: float) -> floating: ... + + +@overload +def calc_ptf_lal1979_group_ii_water_15bar_from_water_01bar( + *, + water_01bar: ArrayLike, + out: NDArray[floating] | None = None, +) -> NDArray[floating]: ... + + +def calc_ptf_lal1979_group_ii_water_15bar_from_water_01bar( + *, + water_01bar: float | ArrayLike, + out: NDArray[floating] | None = None, +) -> floating | NDArray[floating]: + """Estimate gravimetric moisture retention at 15 bar suction for Group II. + + Arguments: + water_01bar: Gravimetric moisture retention at 0.1 bar suction on disturbed soil. (g/g) + out: Optional output arrays for in-place calculation. + + Returns: + water_15bar: Gravimetric moisture retention at 15 bar suction expressed per unit dry soil + mass. (g g⁻¹) + + Territory: + Group II: 12 profiles in Nigeria developed from arenaceous sedimentary rocks, partly + Cretaceous and partly Lower Pleistocene. + + Notes: + Prediction target: Gravimetric moisture retention at 15 bar suction + Table VIII, Group II, water_01bar predictor, water_15bar response. + + """ + return _call( + _calc_ptf_lal1979_group_ii_water_15bar_from_water_01bar, + water_01bar, + out=out, + ) + + +@overload +def calc_ptf_lal1979_group_i_upper_plastic_limit_from_organic_carbon( + *, organic_carbon: float +) -> floating: ... + + +@overload +def calc_ptf_lal1979_group_i_upper_plastic_limit_from_organic_carbon( + *, + organic_carbon: ArrayLike, + out: NDArray[floating] | None = None, +) -> NDArray[floating]: ... + + +def calc_ptf_lal1979_group_i_upper_plastic_limit_from_organic_carbon( + *, + organic_carbon: float | ArrayLike, + out: NDArray[floating] | None = None, +) -> floating | NDArray[floating]: + """Estimate upper plastic limit for Group I. + + Arguments: + organic_carbon: Organic carbon measured by Walkley and Black wet combustion; percentage of + the fine earth. Full calibration bounds are not reported. (%) + out: Optional output arrays for in-place calculation. + + Returns: + upper_plastic_limit: Upper plastic limit expressed as percentage of oven-dry soil mass. (%) + + Territory: + Group I: 11 well-drained upland profiles in western Nigeria developed over pre-Cambrian + basement complex rocks, mainly biotite-muscovite paragneisses. + + Notes: + Prediction target: Upper plastic limit + Table IX, Group I, organic_carbon predictor, upper_plastic_limit response. + + """ + return _call( + _calc_ptf_lal1979_group_i_upper_plastic_limit_from_organic_carbon, + organic_carbon, + out=out, + ) + + +@overload +def calc_ptf_lal1979_group_i_lower_plastic_limit_from_organic_carbon( + *, organic_carbon: float +) -> floating: ... + + +@overload +def calc_ptf_lal1979_group_i_lower_plastic_limit_from_organic_carbon( + *, + organic_carbon: ArrayLike, + out: NDArray[floating] | None = None, +) -> NDArray[floating]: ... + + +def calc_ptf_lal1979_group_i_lower_plastic_limit_from_organic_carbon( + *, + organic_carbon: float | ArrayLike, + out: NDArray[floating] | None = None, +) -> floating | NDArray[floating]: + """Estimate lower plastic limit for Group I. + + Arguments: + organic_carbon: Organic carbon measured by Walkley and Black wet combustion; percentage of + the fine earth. Full calibration bounds are not reported. (%) + out: Optional output arrays for in-place calculation. + + Returns: + lower_plastic_limit: Lower plastic limit expressed as percentage of oven-dry soil mass. (%) + + Territory: + Group I: 11 well-drained upland profiles in western Nigeria developed over pre-Cambrian + basement complex rocks, mainly biotite-muscovite paragneisses. + + Notes: + Prediction target: Lower plastic limit + Table IX, Group I, organic_carbon predictor, lower_plastic_limit response. + + """ + return _call( + _calc_ptf_lal1979_group_i_lower_plastic_limit_from_organic_carbon, + organic_carbon, + out=out, + ) + + +@overload +def calc_ptf_lal1979_group_i_plasticity_index_from_organic_carbon( + *, organic_carbon: float +) -> floating: ... + + +@overload +def calc_ptf_lal1979_group_i_plasticity_index_from_organic_carbon( + *, + organic_carbon: ArrayLike, + out: NDArray[floating] | None = None, +) -> NDArray[floating]: ... + + +def calc_ptf_lal1979_group_i_plasticity_index_from_organic_carbon( + *, + organic_carbon: float | ArrayLike, + out: NDArray[floating] | None = None, +) -> floating | NDArray[floating]: + """Estimate plasticity index (upper minus lower plastic limit) for Group I. + + Arguments: + organic_carbon: Organic carbon measured by Walkley and Black wet combustion; percentage of + the fine earth. Full calibration bounds are not reported. (%) + out: Optional output arrays for in-place calculation. + + Returns: + plasticity_index: Plasticity index (upper minus lower plastic limit) expressed as percentage + of oven-dry soil mass. (%) + + Territory: + Group I: 11 well-drained upland profiles in western Nigeria developed over pre-Cambrian + basement complex rocks, mainly biotite-muscovite paragneisses. + + Notes: + Prediction target: Plasticity index (upper minus lower plastic limit) + Table IX, Group I, organic_carbon predictor, plasticity_index response. + + """ + return _call( + _calc_ptf_lal1979_group_i_plasticity_index_from_organic_carbon, + organic_carbon, + out=out, + ) + + +@overload +def calc_ptf_lal1979_group_i_upper_plastic_limit_from_clay(*, clay: float) -> floating: ... + + +@overload +def calc_ptf_lal1979_group_i_upper_plastic_limit_from_clay( + *, + clay: ArrayLike, + out: NDArray[floating] | None = None, +) -> NDArray[floating]: ... + + +def calc_ptf_lal1979_group_i_upper_plastic_limit_from_clay( + *, + clay: float | ArrayLike, + out: NDArray[floating] | None = None, +) -> floating | NDArray[floating]: + """Estimate upper plastic limit for Group I. + + Arguments: + clay: Clay smaller than 0.002 mm; percentage of the fine earth. Full calibration bounds are + not reported. (%) + out: Optional output arrays for in-place calculation. + + Returns: + upper_plastic_limit: Upper plastic limit expressed as percentage of oven-dry soil mass. (%) + + Territory: + Group I: 11 well-drained upland profiles in western Nigeria developed over pre-Cambrian + basement complex rocks, mainly biotite-muscovite paragneisses. + + Notes: + Prediction target: Upper plastic limit + Table IX, Group I, clay predictor, upper_plastic_limit response. + + """ + return _call( + _calc_ptf_lal1979_group_i_upper_plastic_limit_from_clay, + clay, + out=out, + ) + + +@overload +def calc_ptf_lal1979_group_i_lower_plastic_limit_from_clay(*, clay: float) -> floating: ... + + +@overload +def calc_ptf_lal1979_group_i_lower_plastic_limit_from_clay( + *, + clay: ArrayLike, + out: NDArray[floating] | None = None, +) -> NDArray[floating]: ... + + +def calc_ptf_lal1979_group_i_lower_plastic_limit_from_clay( + *, + clay: float | ArrayLike, + out: NDArray[floating] | None = None, +) -> floating | NDArray[floating]: + """Estimate lower plastic limit for Group I. + + Arguments: + clay: Clay smaller than 0.002 mm; percentage of the fine earth. Full calibration bounds are + not reported. (%) + out: Optional output arrays for in-place calculation. + + Returns: + lower_plastic_limit: Lower plastic limit expressed as percentage of oven-dry soil mass. (%) + + Territory: + Group I: 11 well-drained upland profiles in western Nigeria developed over pre-Cambrian + basement complex rocks, mainly biotite-muscovite paragneisses. + + Notes: + Prediction target: Lower plastic limit + Table IX, Group I, clay predictor, lower_plastic_limit response. + + """ + return _call( + _calc_ptf_lal1979_group_i_lower_plastic_limit_from_clay, + clay, + out=out, + ) + + +@overload +def calc_ptf_lal1979_group_i_plasticity_index_from_clay(*, clay: float) -> floating: ... + + +@overload +def calc_ptf_lal1979_group_i_plasticity_index_from_clay( + *, + clay: ArrayLike, + out: NDArray[floating] | None = None, +) -> NDArray[floating]: ... + + +def calc_ptf_lal1979_group_i_plasticity_index_from_clay( + *, + clay: float | ArrayLike, + out: NDArray[floating] | None = None, +) -> floating | NDArray[floating]: + """Estimate plasticity index (upper minus lower plastic limit) for Group I. + + Arguments: + clay: Clay smaller than 0.002 mm; percentage of the fine earth. Full calibration bounds are + not reported. (%) + out: Optional output arrays for in-place calculation. + + Returns: + plasticity_index: Plasticity index (upper minus lower plastic limit) expressed as percentage + of oven-dry soil mass. (%) + + Territory: + Group I: 11 well-drained upland profiles in western Nigeria developed over pre-Cambrian + basement complex rocks, mainly biotite-muscovite paragneisses. + + Notes: + Prediction target: Plasticity index (upper minus lower plastic limit) + Table IX, Group I, clay predictor, plasticity_index response. + + """ + return _call( + _calc_ptf_lal1979_group_i_plasticity_index_from_clay, + clay, + out=out, + ) + + +@overload +def calc_ptf_lal1979_group_i_lower_plastic_limit_from_sand(*, sand: float) -> floating: ... + + +@overload +def calc_ptf_lal1979_group_i_lower_plastic_limit_from_sand( + *, + sand: ArrayLike, + out: NDArray[floating] | None = None, +) -> NDArray[floating]: ... + + +def calc_ptf_lal1979_group_i_lower_plastic_limit_from_sand( + *, + sand: float | ArrayLike, + out: NDArray[floating] | None = None, +) -> floating | NDArray[floating]: + """Estimate lower plastic limit for Group I. + + Arguments: + sand: Sand from 0.02 to 2 mm; percentage of the fine earth. Full calibration bounds are not + reported. (%) + out: Optional output arrays for in-place calculation. + + Returns: + lower_plastic_limit: Lower plastic limit expressed as percentage of oven-dry soil mass. (%) + + Territory: + Group I: 11 well-drained upland profiles in western Nigeria developed over pre-Cambrian + basement complex rocks, mainly biotite-muscovite paragneisses. + + Notes: + Prediction target: Lower plastic limit + Table IX, Group I, sand predictor, lower_plastic_limit response. + + """ + return _call( + _calc_ptf_lal1979_group_i_lower_plastic_limit_from_sand, + sand, + out=out, + ) + + +@overload +def calc_ptf_lal1979_group_i_plasticity_index_from_sand(*, sand: float) -> floating: ... + + +@overload +def calc_ptf_lal1979_group_i_plasticity_index_from_sand( + *, + sand: ArrayLike, + out: NDArray[floating] | None = None, +) -> NDArray[floating]: ... + + +def calc_ptf_lal1979_group_i_plasticity_index_from_sand( + *, + sand: float | ArrayLike, + out: NDArray[floating] | None = None, +) -> floating | NDArray[floating]: + """Estimate plasticity index (upper minus lower plastic limit) for Group I. + + Arguments: + sand: Sand from 0.02 to 2 mm; percentage of the fine earth. Full calibration bounds are not + reported. (%) + out: Optional output arrays for in-place calculation. + + Returns: + plasticity_index: Plasticity index (upper minus lower plastic limit) expressed as percentage + of oven-dry soil mass. (%) + + Territory: + Group I: 11 well-drained upland profiles in western Nigeria developed over pre-Cambrian + basement complex rocks, mainly biotite-muscovite paragneisses. + + Notes: + Prediction target: Plasticity index (upper minus lower plastic limit) + Table IX, Group I, sand predictor, plasticity_index response. + + """ + return _call( + _calc_ptf_lal1979_group_i_plasticity_index_from_sand, + sand, + out=out, + ) + + +@overload +def calc_ptf_lal1979_group_ii_upper_plastic_limit_from_organic_carbon( + *, organic_carbon: float +) -> floating: ... + + +@overload +def calc_ptf_lal1979_group_ii_upper_plastic_limit_from_organic_carbon( + *, + organic_carbon: ArrayLike, + out: NDArray[floating] | None = None, +) -> NDArray[floating]: ... + + +def calc_ptf_lal1979_group_ii_upper_plastic_limit_from_organic_carbon( + *, + organic_carbon: float | ArrayLike, + out: NDArray[floating] | None = None, +) -> floating | NDArray[floating]: + """Estimate upper plastic limit for Group II. + + Arguments: + organic_carbon: Organic carbon measured by Walkley and Black wet combustion; percentage of + the fine earth. Full calibration bounds are not reported. (%) + out: Optional output arrays for in-place calculation. + + Returns: + upper_plastic_limit: Upper plastic limit expressed as percentage of oven-dry soil mass. (%) + + Territory: + Group II: 12 profiles in Nigeria developed from arenaceous sedimentary rocks, partly + Cretaceous and partly Lower Pleistocene. + + Notes: + Prediction target: Upper plastic limit + Table IX, Group II, organic_carbon predictor, upper_plastic_limit response. + + """ + return _call( + _calc_ptf_lal1979_group_ii_upper_plastic_limit_from_organic_carbon, + organic_carbon, + out=out, + ) + + +@overload +def calc_ptf_lal1979_group_ii_plasticity_index_from_organic_carbon( + *, organic_carbon: float +) -> floating: ... + + +@overload +def calc_ptf_lal1979_group_ii_plasticity_index_from_organic_carbon( + *, + organic_carbon: ArrayLike, + out: NDArray[floating] | None = None, +) -> NDArray[floating]: ... + + +def calc_ptf_lal1979_group_ii_plasticity_index_from_organic_carbon( + *, + organic_carbon: float | ArrayLike, + out: NDArray[floating] | None = None, +) -> floating | NDArray[floating]: + """Estimate plasticity index (upper minus lower plastic limit) for Group II. + + Arguments: + organic_carbon: Organic carbon measured by Walkley and Black wet combustion; percentage of + the fine earth. Full calibration bounds are not reported. (%) + out: Optional output arrays for in-place calculation. + + Returns: + plasticity_index: Plasticity index (upper minus lower plastic limit) expressed as percentage + of oven-dry soil mass. (%) + + Territory: + Group II: 12 profiles in Nigeria developed from arenaceous sedimentary rocks, partly + Cretaceous and partly Lower Pleistocene. + + Notes: + Prediction target: Plasticity index (upper minus lower plastic limit) + Table IX, Group II, organic_carbon predictor, plasticity_index response. + + """ + return _call( + _calc_ptf_lal1979_group_ii_plasticity_index_from_organic_carbon, + organic_carbon, + out=out, + ) + + +@overload +def calc_ptf_lal1979_group_ii_upper_plastic_limit_from_clay(*, clay: float) -> floating: ... + + +@overload +def calc_ptf_lal1979_group_ii_upper_plastic_limit_from_clay( + *, + clay: ArrayLike, + out: NDArray[floating] | None = None, +) -> NDArray[floating]: ... + + +def calc_ptf_lal1979_group_ii_upper_plastic_limit_from_clay( + *, + clay: float | ArrayLike, + out: NDArray[floating] | None = None, +) -> floating | NDArray[floating]: + """Estimate upper plastic limit for Group II. + + Arguments: + clay: Clay smaller than 0.002 mm; percentage of the fine earth. Full calibration bounds are + not reported. (%) + out: Optional output arrays for in-place calculation. + + Returns: + upper_plastic_limit: Upper plastic limit expressed as percentage of oven-dry soil mass. (%) + + Territory: + Group II: 12 profiles in Nigeria developed from arenaceous sedimentary rocks, partly + Cretaceous and partly Lower Pleistocene. + + Notes: + Prediction target: Upper plastic limit + Table IX, Group II, clay predictor, upper_plastic_limit response. + + """ + return _call( + _calc_ptf_lal1979_group_ii_upper_plastic_limit_from_clay, + clay, + out=out, + ) + + +@overload +def calc_ptf_lal1979_group_ii_lower_plastic_limit_from_clay(*, clay: float) -> floating: ... + + +@overload +def calc_ptf_lal1979_group_ii_lower_plastic_limit_from_clay( + *, + clay: ArrayLike, + out: NDArray[floating] | None = None, +) -> NDArray[floating]: ... + + +def calc_ptf_lal1979_group_ii_lower_plastic_limit_from_clay( + *, + clay: float | ArrayLike, + out: NDArray[floating] | None = None, +) -> floating | NDArray[floating]: + """Estimate lower plastic limit for Group II. + + Arguments: + clay: Clay smaller than 0.002 mm; percentage of the fine earth. Full calibration bounds are + not reported. (%) + out: Optional output arrays for in-place calculation. + + Returns: + lower_plastic_limit: Lower plastic limit expressed as percentage of oven-dry soil mass. (%) + + Territory: + Group II: 12 profiles in Nigeria developed from arenaceous sedimentary rocks, partly + Cretaceous and partly Lower Pleistocene. + + Notes: + Prediction target: Lower plastic limit + Table IX, Group II, clay predictor, lower_plastic_limit response. + + """ + return _call( + _calc_ptf_lal1979_group_ii_lower_plastic_limit_from_clay, + clay, + out=out, + ) + + +@overload +def calc_ptf_lal1979_group_ii_upper_plastic_limit_from_sand(*, sand: float) -> floating: ... + + +@overload +def calc_ptf_lal1979_group_ii_upper_plastic_limit_from_sand( + *, + sand: ArrayLike, + out: NDArray[floating] | None = None, +) -> NDArray[floating]: ... + + +def calc_ptf_lal1979_group_ii_upper_plastic_limit_from_sand( + *, + sand: float | ArrayLike, + out: NDArray[floating] | None = None, +) -> floating | NDArray[floating]: + """Estimate upper plastic limit for Group II. + + Arguments: + sand: Sand from 0.02 to 2 mm; percentage of the fine earth. Full calibration bounds are not + reported. (%) + out: Optional output arrays for in-place calculation. + + Returns: + upper_plastic_limit: Upper plastic limit expressed as percentage of oven-dry soil mass. (%) + + Territory: + Group II: 12 profiles in Nigeria developed from arenaceous sedimentary rocks, partly + Cretaceous and partly Lower Pleistocene. + + Notes: + Prediction target: Upper plastic limit + Table IX, Group II, sand predictor, upper_plastic_limit response. + + """ + return _call( + _calc_ptf_lal1979_group_ii_upper_plastic_limit_from_sand, + sand, + out=out, + ) + + +@overload +def calc_ptf_lal1979_group_ii_lower_plastic_limit_from_sand(*, sand: float) -> floating: ... + + +@overload +def calc_ptf_lal1979_group_ii_lower_plastic_limit_from_sand( + *, + sand: ArrayLike, + out: NDArray[floating] | None = None, +) -> NDArray[floating]: ... + + +def calc_ptf_lal1979_group_ii_lower_plastic_limit_from_sand( + *, + sand: float | ArrayLike, + out: NDArray[floating] | None = None, +) -> floating | NDArray[floating]: + """Estimate lower plastic limit for Group II. + + Arguments: + sand: Sand from 0.02 to 2 mm; percentage of the fine earth. Full calibration bounds are not + reported. (%) + out: Optional output arrays for in-place calculation. + + Returns: + lower_plastic_limit: Lower plastic limit expressed as percentage of oven-dry soil mass. (%) + + Territory: + Group II: 12 profiles in Nigeria developed from arenaceous sedimentary rocks, partly + Cretaceous and partly Lower Pleistocene. + + Notes: + Prediction target: Lower plastic limit + Table IX, Group II, sand predictor, lower_plastic_limit response. + + """ + return _call( + _calc_ptf_lal1979_group_ii_lower_plastic_limit_from_sand, + sand, + out=out, + ) + + +@overload +def calc_ptf_lal1979_group_ii_upper_plastic_limit_from_silt(*, silt: float) -> floating: ... + + +@overload +def calc_ptf_lal1979_group_ii_upper_plastic_limit_from_silt( + *, + silt: ArrayLike, + out: NDArray[floating] | None = None, +) -> NDArray[floating]: ... + + +def calc_ptf_lal1979_group_ii_upper_plastic_limit_from_silt( + *, + silt: float | ArrayLike, + out: NDArray[floating] | None = None, +) -> floating | NDArray[floating]: + """Estimate upper plastic limit for Group II. + + Arguments: + silt: Silt from 0.002 to 0.02 mm; percentage of the fine earth. Full calibration bounds are + not reported. (%) + out: Optional output arrays for in-place calculation. + + Returns: + upper_plastic_limit: Upper plastic limit expressed as percentage of oven-dry soil mass. (%) + + Territory: + Group II: 12 profiles in Nigeria developed from arenaceous sedimentary rocks, partly + Cretaceous and partly Lower Pleistocene. + + Notes: + Prediction target: Upper plastic limit + Table IX, Group II, silt predictor, upper_plastic_limit response. + + """ + return _call( + _calc_ptf_lal1979_group_ii_upper_plastic_limit_from_silt, + silt, + out=out, + ) + + +@overload +def calc_ptf_lal1979_group_ii_lower_plastic_limit_from_silt(*, silt: float) -> floating: ... + + +@overload +def calc_ptf_lal1979_group_ii_lower_plastic_limit_from_silt( + *, + silt: ArrayLike, + out: NDArray[floating] | None = None, +) -> NDArray[floating]: ... + + +def calc_ptf_lal1979_group_ii_lower_plastic_limit_from_silt( + *, + silt: float | ArrayLike, + out: NDArray[floating] | None = None, +) -> floating | NDArray[floating]: + """Estimate lower plastic limit for Group II. + + Arguments: + silt: Silt from 0.002 to 0.02 mm; percentage of the fine earth. Full calibration bounds are + not reported. (%) + out: Optional output arrays for in-place calculation. + + Returns: + lower_plastic_limit: Lower plastic limit expressed as percentage of oven-dry soil mass. (%) + + Territory: + Group II: 12 profiles in Nigeria developed from arenaceous sedimentary rocks, partly + Cretaceous and partly Lower Pleistocene. + + Notes: + Prediction target: Lower plastic limit + Table IX, Group II, silt predictor, lower_plastic_limit response. + + """ + return _call( + _calc_ptf_lal1979_group_ii_lower_plastic_limit_from_silt, + silt, + out=out, + ) + + +@overload +def calc_ptf_lal1979_group_ii_plasticity_index_from_silt(*, silt: float) -> floating: ... + + +@overload +def calc_ptf_lal1979_group_ii_plasticity_index_from_silt( + *, + silt: ArrayLike, + out: NDArray[floating] | None = None, +) -> NDArray[floating]: ... + + +def calc_ptf_lal1979_group_ii_plasticity_index_from_silt( + *, + silt: float | ArrayLike, + out: NDArray[floating] | None = None, +) -> floating | NDArray[floating]: + """Estimate plasticity index (upper minus lower plastic limit) for Group II. + + Arguments: + silt: Silt from 0.002 to 0.02 mm; percentage of the fine earth. Full calibration bounds are + not reported. (%) + out: Optional output arrays for in-place calculation. + + Returns: + plasticity_index: Plasticity index (upper minus lower plastic limit) expressed as percentage + of oven-dry soil mass. (%) + + Territory: + Group II: 12 profiles in Nigeria developed from arenaceous sedimentary rocks, partly + Cretaceous and partly Lower Pleistocene. + + Notes: + Prediction target: Plasticity index (upper minus lower plastic limit) + Table IX, Group II, silt predictor, plasticity_index response. + + """ + return _call( + _calc_ptf_lal1979_group_ii_plasticity_index_from_silt, + silt, + out=out, + ) diff --git a/targets/ptfkit-py/src/ptfkit/ptfkit.c b/targets/ptfkit-py/src/ptfkit/ptfkit.c index 6842698..8fb800d 100644 --- a/targets/ptfkit-py/src/ptfkit/ptfkit.c +++ b/targets/ptfkit-py/src/ptfkit/ptfkit.c @@ -17,6 +17,7 @@ #include "gunarathna2019.c" #include "hodnett2002.c" #include "jabro1992.c" +#include "lal1979.c" #include "li2007.c" #include "mayr1999.c" #include "oosterveld1980.c" @@ -83,6 +84,10 @@ PyMODINIT_FUNC PyInit__ptfkit(void) { Py_DECREF(module); return NULL; } + if (ptfkit_register_lal1979(module) < 0) { + Py_DECREF(module); + return NULL; + } if (ptfkit_register_li2007(module) < 0) { Py_DECREF(module); return NULL; diff --git a/targets/ptfkit-py/tests/test_lal1979.py b/targets/ptfkit-py/tests/test_lal1979.py new file mode 100644 index 0000000..1d638a2 --- /dev/null +++ b/targets/ptfkit-py/tests/test_lal1979.py @@ -0,0 +1,2587 @@ +# @generated by ptfkit-codegen; DO NOT EDIT. +from __future__ import annotations + +import pytest + +from _helpers import assert_close, prepare_vector_case +from ptfkit.lal1979 import ( + calc_ptf_lal1979_group_i_lower_plastic_limit_from_clay, + calc_ptf_lal1979_group_i_lower_plastic_limit_from_organic_carbon, + calc_ptf_lal1979_group_i_lower_plastic_limit_from_sand, + calc_ptf_lal1979_group_i_moisture_equivalent_from_clay, + calc_ptf_lal1979_group_i_moisture_equivalent_from_sand, + calc_ptf_lal1979_group_i_plasticity_index_from_clay, + calc_ptf_lal1979_group_i_plasticity_index_from_organic_carbon, + calc_ptf_lal1979_group_i_plasticity_index_from_sand, + calc_ptf_lal1979_group_i_upper_plastic_limit_from_clay, + calc_ptf_lal1979_group_i_upper_plastic_limit_from_organic_carbon, + calc_ptf_lal1979_group_i_water_0bar_from_clay, + calc_ptf_lal1979_group_i_water_0bar_from_sand, + calc_ptf_lal1979_group_i_water_01bar_from_clay, + calc_ptf_lal1979_group_i_water_01bar_from_sand, + calc_ptf_lal1979_group_i_water_03bar_from_clay, + calc_ptf_lal1979_group_i_water_03bar_from_sand, + calc_ptf_lal1979_group_i_water_15bar_from_clay, + calc_ptf_lal1979_group_i_water_15bar_from_sand, + calc_ptf_lal1979_group_i_water_15bar_from_silt, + calc_ptf_lal1979_group_ii_lower_plastic_limit_from_clay, + calc_ptf_lal1979_group_ii_lower_plastic_limit_from_sand, + calc_ptf_lal1979_group_ii_lower_plastic_limit_from_silt, + calc_ptf_lal1979_group_ii_moisture_equivalent_from_clay, + calc_ptf_lal1979_group_ii_moisture_equivalent_from_sand, + calc_ptf_lal1979_group_ii_moisture_equivalent_from_silt, + calc_ptf_lal1979_group_ii_plasticity_index_from_organic_carbon, + calc_ptf_lal1979_group_ii_plasticity_index_from_silt, + calc_ptf_lal1979_group_ii_upper_plastic_limit_from_clay, + calc_ptf_lal1979_group_ii_upper_plastic_limit_from_organic_carbon, + calc_ptf_lal1979_group_ii_upper_plastic_limit_from_sand, + calc_ptf_lal1979_group_ii_upper_plastic_limit_from_silt, + calc_ptf_lal1979_group_ii_water_0bar_from_clay, + calc_ptf_lal1979_group_ii_water_0bar_from_sand, + calc_ptf_lal1979_group_ii_water_01bar_from_clay, + calc_ptf_lal1979_group_ii_water_01bar_from_sand, + calc_ptf_lal1979_group_ii_water_03bar_from_clay, + calc_ptf_lal1979_group_ii_water_03bar_from_sand, + calc_ptf_lal1979_group_ii_water_03bar_from_water_01bar, + calc_ptf_lal1979_group_ii_water_15bar_from_clay, + calc_ptf_lal1979_group_ii_water_15bar_from_sand, + calc_ptf_lal1979_group_ii_water_15bar_from_water_01bar, +) + + +CASES_CALC_PTF_LAL1979_GROUP_I_WATER_0BAR_FROM_CLAY = [ + ({'clay': 19.0}, {'water_0bar': 0.365}), +] +CASES_CALC_PTF_LAL1979_GROUP_I_WATER_0BAR_FROM_CLAY_IDS = [ + 'published_predictor_mean', +] + + +@pytest.mark.parametrize( + ('inputs', 'expected'), + CASES_CALC_PTF_LAL1979_GROUP_I_WATER_0BAR_FROM_CLAY, + ids=CASES_CALC_PTF_LAL1979_GROUP_I_WATER_0BAR_FROM_CLAY_IDS, +) +def test_calc_ptf_lal1979_group_i_water_0bar_from_clay_verification( + inputs: dict[str, float], expected: dict[str, float] +): + result = calc_ptf_lal1979_group_i_water_0bar_from_clay(**inputs) + + assert_close( + result, + expected['water_0bar'], + absolute=0.001, + relative=0.0, + quantity='gravimetric_water_content', + unit='mass_fraction', + source='registry', + ) + + +def test_calc_ptf_lal1979_group_i_water_0bar_from_clay_array(): + inputs, expected, _out = prepare_vector_case( + CASES_CALC_PTF_LAL1979_GROUP_I_WATER_0BAR_FROM_CLAY + ) + result = calc_ptf_lal1979_group_i_water_0bar_from_clay(**inputs, out=None) + assert_close( + result[0], + expected['water_0bar'], + absolute=0.001, + relative=0.0, + quantity='gravimetric_water_content', + unit='mass_fraction', + source='registry', + ) + + +def test_calc_ptf_lal1979_group_i_water_0bar_from_clay_out(): + inputs, expected, out = prepare_vector_case(CASES_CALC_PTF_LAL1979_GROUP_I_WATER_0BAR_FROM_CLAY) + result = calc_ptf_lal1979_group_i_water_0bar_from_clay(**inputs, out=out) + assert result is out + assert_close( + result[0], + expected['water_0bar'], + absolute=0.001, + relative=0.0, + quantity='gravimetric_water_content', + unit='mass_fraction', + source='registry', + ) + + +CASES_CALC_PTF_LAL1979_GROUP_I_WATER_0BAR_FROM_SAND = [ + ({'sand': 66.0}, {'water_0bar': 0.381}), +] +CASES_CALC_PTF_LAL1979_GROUP_I_WATER_0BAR_FROM_SAND_IDS = [ + 'published_predictor_mean', +] + + +@pytest.mark.parametrize( + ('inputs', 'expected'), + CASES_CALC_PTF_LAL1979_GROUP_I_WATER_0BAR_FROM_SAND, + ids=CASES_CALC_PTF_LAL1979_GROUP_I_WATER_0BAR_FROM_SAND_IDS, +) +def test_calc_ptf_lal1979_group_i_water_0bar_from_sand_verification( + inputs: dict[str, float], expected: dict[str, float] +): + result = calc_ptf_lal1979_group_i_water_0bar_from_sand(**inputs) + + assert_close( + result, + expected['water_0bar'], + absolute=0.001, + relative=0.0, + quantity='gravimetric_water_content', + unit='mass_fraction', + source='registry', + ) + + +def test_calc_ptf_lal1979_group_i_water_0bar_from_sand_array(): + inputs, expected, _out = prepare_vector_case( + CASES_CALC_PTF_LAL1979_GROUP_I_WATER_0BAR_FROM_SAND + ) + result = calc_ptf_lal1979_group_i_water_0bar_from_sand(**inputs, out=None) + assert_close( + result[0], + expected['water_0bar'], + absolute=0.001, + relative=0.0, + quantity='gravimetric_water_content', + unit='mass_fraction', + source='registry', + ) + + +def test_calc_ptf_lal1979_group_i_water_0bar_from_sand_out(): + inputs, expected, out = prepare_vector_case(CASES_CALC_PTF_LAL1979_GROUP_I_WATER_0BAR_FROM_SAND) + result = calc_ptf_lal1979_group_i_water_0bar_from_sand(**inputs, out=out) + assert result is out + assert_close( + result[0], + expected['water_0bar'], + absolute=0.001, + relative=0.0, + quantity='gravimetric_water_content', + unit='mass_fraction', + source='registry', + ) + + +CASES_CALC_PTF_LAL1979_GROUP_II_WATER_0BAR_FROM_CLAY = [ + ({'clay': 38.0}, {'water_0bar': 0.448}), +] +CASES_CALC_PTF_LAL1979_GROUP_II_WATER_0BAR_FROM_CLAY_IDS = [ + 'published_predictor_mean', +] + + +@pytest.mark.parametrize( + ('inputs', 'expected'), + CASES_CALC_PTF_LAL1979_GROUP_II_WATER_0BAR_FROM_CLAY, + ids=CASES_CALC_PTF_LAL1979_GROUP_II_WATER_0BAR_FROM_CLAY_IDS, +) +def test_calc_ptf_lal1979_group_ii_water_0bar_from_clay_verification( + inputs: dict[str, float], expected: dict[str, float] +): + result = calc_ptf_lal1979_group_ii_water_0bar_from_clay(**inputs) + + assert_close( + result, + expected['water_0bar'], + absolute=0.001, + relative=0.0, + quantity='gravimetric_water_content', + unit='mass_fraction', + source='registry', + ) + + +def test_calc_ptf_lal1979_group_ii_water_0bar_from_clay_array(): + inputs, expected, _out = prepare_vector_case( + CASES_CALC_PTF_LAL1979_GROUP_II_WATER_0BAR_FROM_CLAY + ) + result = calc_ptf_lal1979_group_ii_water_0bar_from_clay(**inputs, out=None) + assert_close( + result[0], + expected['water_0bar'], + absolute=0.001, + relative=0.0, + quantity='gravimetric_water_content', + unit='mass_fraction', + source='registry', + ) + + +def test_calc_ptf_lal1979_group_ii_water_0bar_from_clay_out(): + inputs, expected, out = prepare_vector_case( + CASES_CALC_PTF_LAL1979_GROUP_II_WATER_0BAR_FROM_CLAY + ) + result = calc_ptf_lal1979_group_ii_water_0bar_from_clay(**inputs, out=out) + assert result is out + assert_close( + result[0], + expected['water_0bar'], + absolute=0.001, + relative=0.0, + quantity='gravimetric_water_content', + unit='mass_fraction', + source='registry', + ) + + +CASES_CALC_PTF_LAL1979_GROUP_II_WATER_0BAR_FROM_SAND = [ + ({'sand': 57.0}, {'water_0bar': 0.417}), +] +CASES_CALC_PTF_LAL1979_GROUP_II_WATER_0BAR_FROM_SAND_IDS = [ + 'published_predictor_mean', +] + + +@pytest.mark.parametrize( + ('inputs', 'expected'), + CASES_CALC_PTF_LAL1979_GROUP_II_WATER_0BAR_FROM_SAND, + ids=CASES_CALC_PTF_LAL1979_GROUP_II_WATER_0BAR_FROM_SAND_IDS, +) +def test_calc_ptf_lal1979_group_ii_water_0bar_from_sand_verification( + inputs: dict[str, float], expected: dict[str, float] +): + result = calc_ptf_lal1979_group_ii_water_0bar_from_sand(**inputs) + + assert_close( + result, + expected['water_0bar'], + absolute=0.001, + relative=0.0, + quantity='gravimetric_water_content', + unit='mass_fraction', + source='registry', + ) + + +def test_calc_ptf_lal1979_group_ii_water_0bar_from_sand_array(): + inputs, expected, _out = prepare_vector_case( + CASES_CALC_PTF_LAL1979_GROUP_II_WATER_0BAR_FROM_SAND + ) + result = calc_ptf_lal1979_group_ii_water_0bar_from_sand(**inputs, out=None) + assert_close( + result[0], + expected['water_0bar'], + absolute=0.001, + relative=0.0, + quantity='gravimetric_water_content', + unit='mass_fraction', + source='registry', + ) + + +def test_calc_ptf_lal1979_group_ii_water_0bar_from_sand_out(): + inputs, expected, out = prepare_vector_case( + CASES_CALC_PTF_LAL1979_GROUP_II_WATER_0BAR_FROM_SAND + ) + result = calc_ptf_lal1979_group_ii_water_0bar_from_sand(**inputs, out=out) + assert result is out + assert_close( + result[0], + expected['water_0bar'], + absolute=0.001, + relative=0.0, + quantity='gravimetric_water_content', + unit='mass_fraction', + source='registry', + ) + + +CASES_CALC_PTF_LAL1979_GROUP_I_WATER_01BAR_FROM_CLAY = [ + ({'clay': 19.0}, {'water_01bar': 0.159}), +] +CASES_CALC_PTF_LAL1979_GROUP_I_WATER_01BAR_FROM_CLAY_IDS = [ + 'published_predictor_mean', +] + + +@pytest.mark.parametrize( + ('inputs', 'expected'), + CASES_CALC_PTF_LAL1979_GROUP_I_WATER_01BAR_FROM_CLAY, + ids=CASES_CALC_PTF_LAL1979_GROUP_I_WATER_01BAR_FROM_CLAY_IDS, +) +def test_calc_ptf_lal1979_group_i_water_01bar_from_clay_verification( + inputs: dict[str, float], expected: dict[str, float] +): + result = calc_ptf_lal1979_group_i_water_01bar_from_clay(**inputs) + + assert_close( + result, + expected['water_01bar'], + absolute=0.001, + relative=0.0, + quantity='gravimetric_water_content', + unit='mass_fraction', + source='registry', + ) + + +def test_calc_ptf_lal1979_group_i_water_01bar_from_clay_array(): + inputs, expected, _out = prepare_vector_case( + CASES_CALC_PTF_LAL1979_GROUP_I_WATER_01BAR_FROM_CLAY + ) + result = calc_ptf_lal1979_group_i_water_01bar_from_clay(**inputs, out=None) + assert_close( + result[0], + expected['water_01bar'], + absolute=0.001, + relative=0.0, + quantity='gravimetric_water_content', + unit='mass_fraction', + source='registry', + ) + + +def test_calc_ptf_lal1979_group_i_water_01bar_from_clay_out(): + inputs, expected, out = prepare_vector_case( + CASES_CALC_PTF_LAL1979_GROUP_I_WATER_01BAR_FROM_CLAY + ) + result = calc_ptf_lal1979_group_i_water_01bar_from_clay(**inputs, out=out) + assert result is out + assert_close( + result[0], + expected['water_01bar'], + absolute=0.001, + relative=0.0, + quantity='gravimetric_water_content', + unit='mass_fraction', + source='registry', + ) + + +CASES_CALC_PTF_LAL1979_GROUP_I_WATER_03BAR_FROM_CLAY = [ + ({'clay': 19.0}, {'water_03bar': 0.141}), +] +CASES_CALC_PTF_LAL1979_GROUP_I_WATER_03BAR_FROM_CLAY_IDS = [ + 'published_predictor_mean', +] + + +@pytest.mark.parametrize( + ('inputs', 'expected'), + CASES_CALC_PTF_LAL1979_GROUP_I_WATER_03BAR_FROM_CLAY, + ids=CASES_CALC_PTF_LAL1979_GROUP_I_WATER_03BAR_FROM_CLAY_IDS, +) +def test_calc_ptf_lal1979_group_i_water_03bar_from_clay_verification( + inputs: dict[str, float], expected: dict[str, float] +): + result = calc_ptf_lal1979_group_i_water_03bar_from_clay(**inputs) + + assert_close( + result, + expected['water_03bar'], + absolute=0.001, + relative=0.0, + quantity='gravimetric_water_content', + unit='mass_fraction', + source='registry', + ) + + +def test_calc_ptf_lal1979_group_i_water_03bar_from_clay_array(): + inputs, expected, _out = prepare_vector_case( + CASES_CALC_PTF_LAL1979_GROUP_I_WATER_03BAR_FROM_CLAY + ) + result = calc_ptf_lal1979_group_i_water_03bar_from_clay(**inputs, out=None) + assert_close( + result[0], + expected['water_03bar'], + absolute=0.001, + relative=0.0, + quantity='gravimetric_water_content', + unit='mass_fraction', + source='registry', + ) + + +def test_calc_ptf_lal1979_group_i_water_03bar_from_clay_out(): + inputs, expected, out = prepare_vector_case( + CASES_CALC_PTF_LAL1979_GROUP_I_WATER_03BAR_FROM_CLAY + ) + result = calc_ptf_lal1979_group_i_water_03bar_from_clay(**inputs, out=out) + assert result is out + assert_close( + result[0], + expected['water_03bar'], + absolute=0.001, + relative=0.0, + quantity='gravimetric_water_content', + unit='mass_fraction', + source='registry', + ) + + +CASES_CALC_PTF_LAL1979_GROUP_I_WATER_01BAR_FROM_SAND = [ + ({'sand': 66.0}, {'water_01bar': 0.166}), +] +CASES_CALC_PTF_LAL1979_GROUP_I_WATER_01BAR_FROM_SAND_IDS = [ + 'published_predictor_mean', +] + + +@pytest.mark.parametrize( + ('inputs', 'expected'), + CASES_CALC_PTF_LAL1979_GROUP_I_WATER_01BAR_FROM_SAND, + ids=CASES_CALC_PTF_LAL1979_GROUP_I_WATER_01BAR_FROM_SAND_IDS, +) +def test_calc_ptf_lal1979_group_i_water_01bar_from_sand_verification( + inputs: dict[str, float], expected: dict[str, float] +): + result = calc_ptf_lal1979_group_i_water_01bar_from_sand(**inputs) + + assert_close( + result, + expected['water_01bar'], + absolute=0.001, + relative=0.0, + quantity='gravimetric_water_content', + unit='mass_fraction', + source='registry', + ) + + +def test_calc_ptf_lal1979_group_i_water_01bar_from_sand_array(): + inputs, expected, _out = prepare_vector_case( + CASES_CALC_PTF_LAL1979_GROUP_I_WATER_01BAR_FROM_SAND + ) + result = calc_ptf_lal1979_group_i_water_01bar_from_sand(**inputs, out=None) + assert_close( + result[0], + expected['water_01bar'], + absolute=0.001, + relative=0.0, + quantity='gravimetric_water_content', + unit='mass_fraction', + source='registry', + ) + + +def test_calc_ptf_lal1979_group_i_water_01bar_from_sand_out(): + inputs, expected, out = prepare_vector_case( + CASES_CALC_PTF_LAL1979_GROUP_I_WATER_01BAR_FROM_SAND + ) + result = calc_ptf_lal1979_group_i_water_01bar_from_sand(**inputs, out=out) + assert result is out + assert_close( + result[0], + expected['water_01bar'], + absolute=0.001, + relative=0.0, + quantity='gravimetric_water_content', + unit='mass_fraction', + source='registry', + ) + + +CASES_CALC_PTF_LAL1979_GROUP_I_WATER_03BAR_FROM_SAND = [ + ({'sand': 66.0}, {'water_03bar': 0.136}), +] +CASES_CALC_PTF_LAL1979_GROUP_I_WATER_03BAR_FROM_SAND_IDS = [ + 'published_predictor_mean', +] + + +@pytest.mark.parametrize( + ('inputs', 'expected'), + CASES_CALC_PTF_LAL1979_GROUP_I_WATER_03BAR_FROM_SAND, + ids=CASES_CALC_PTF_LAL1979_GROUP_I_WATER_03BAR_FROM_SAND_IDS, +) +def test_calc_ptf_lal1979_group_i_water_03bar_from_sand_verification( + inputs: dict[str, float], expected: dict[str, float] +): + result = calc_ptf_lal1979_group_i_water_03bar_from_sand(**inputs) + + assert_close( + result, + expected['water_03bar'], + absolute=0.001, + relative=0.0, + quantity='gravimetric_water_content', + unit='mass_fraction', + source='registry', + ) + + +def test_calc_ptf_lal1979_group_i_water_03bar_from_sand_array(): + inputs, expected, _out = prepare_vector_case( + CASES_CALC_PTF_LAL1979_GROUP_I_WATER_03BAR_FROM_SAND + ) + result = calc_ptf_lal1979_group_i_water_03bar_from_sand(**inputs, out=None) + assert_close( + result[0], + expected['water_03bar'], + absolute=0.001, + relative=0.0, + quantity='gravimetric_water_content', + unit='mass_fraction', + source='registry', + ) + + +def test_calc_ptf_lal1979_group_i_water_03bar_from_sand_out(): + inputs, expected, out = prepare_vector_case( + CASES_CALC_PTF_LAL1979_GROUP_I_WATER_03BAR_FROM_SAND + ) + result = calc_ptf_lal1979_group_i_water_03bar_from_sand(**inputs, out=out) + assert result is out + assert_close( + result[0], + expected['water_03bar'], + absolute=0.001, + relative=0.0, + quantity='gravimetric_water_content', + unit='mass_fraction', + source='registry', + ) + + +CASES_CALC_PTF_LAL1979_GROUP_II_WATER_01BAR_FROM_CLAY = [ + ({'clay': 38.0}, {'water_01bar': 0.194}), +] +CASES_CALC_PTF_LAL1979_GROUP_II_WATER_01BAR_FROM_CLAY_IDS = [ + 'published_predictor_mean', +] + + +@pytest.mark.parametrize( + ('inputs', 'expected'), + CASES_CALC_PTF_LAL1979_GROUP_II_WATER_01BAR_FROM_CLAY, + ids=CASES_CALC_PTF_LAL1979_GROUP_II_WATER_01BAR_FROM_CLAY_IDS, +) +def test_calc_ptf_lal1979_group_ii_water_01bar_from_clay_verification( + inputs: dict[str, float], expected: dict[str, float] +): + result = calc_ptf_lal1979_group_ii_water_01bar_from_clay(**inputs) + + assert_close( + result, + expected['water_01bar'], + absolute=0.001, + relative=0.0, + quantity='gravimetric_water_content', + unit='mass_fraction', + source='registry', + ) + + +def test_calc_ptf_lal1979_group_ii_water_01bar_from_clay_array(): + inputs, expected, _out = prepare_vector_case( + CASES_CALC_PTF_LAL1979_GROUP_II_WATER_01BAR_FROM_CLAY + ) + result = calc_ptf_lal1979_group_ii_water_01bar_from_clay(**inputs, out=None) + assert_close( + result[0], + expected['water_01bar'], + absolute=0.001, + relative=0.0, + quantity='gravimetric_water_content', + unit='mass_fraction', + source='registry', + ) + + +def test_calc_ptf_lal1979_group_ii_water_01bar_from_clay_out(): + inputs, expected, out = prepare_vector_case( + CASES_CALC_PTF_LAL1979_GROUP_II_WATER_01BAR_FROM_CLAY + ) + result = calc_ptf_lal1979_group_ii_water_01bar_from_clay(**inputs, out=out) + assert result is out + assert_close( + result[0], + expected['water_01bar'], + absolute=0.001, + relative=0.0, + quantity='gravimetric_water_content', + unit='mass_fraction', + source='registry', + ) + + +CASES_CALC_PTF_LAL1979_GROUP_II_WATER_03BAR_FROM_CLAY = [ + ({'clay': 38.0}, {'water_03bar': 0.161}), +] +CASES_CALC_PTF_LAL1979_GROUP_II_WATER_03BAR_FROM_CLAY_IDS = [ + 'published_predictor_mean', +] + + +@pytest.mark.parametrize( + ('inputs', 'expected'), + CASES_CALC_PTF_LAL1979_GROUP_II_WATER_03BAR_FROM_CLAY, + ids=CASES_CALC_PTF_LAL1979_GROUP_II_WATER_03BAR_FROM_CLAY_IDS, +) +def test_calc_ptf_lal1979_group_ii_water_03bar_from_clay_verification( + inputs: dict[str, float], expected: dict[str, float] +): + result = calc_ptf_lal1979_group_ii_water_03bar_from_clay(**inputs) + + assert_close( + result, + expected['water_03bar'], + absolute=0.001, + relative=0.0, + quantity='gravimetric_water_content', + unit='mass_fraction', + source='registry', + ) + + +def test_calc_ptf_lal1979_group_ii_water_03bar_from_clay_array(): + inputs, expected, _out = prepare_vector_case( + CASES_CALC_PTF_LAL1979_GROUP_II_WATER_03BAR_FROM_CLAY + ) + result = calc_ptf_lal1979_group_ii_water_03bar_from_clay(**inputs, out=None) + assert_close( + result[0], + expected['water_03bar'], + absolute=0.001, + relative=0.0, + quantity='gravimetric_water_content', + unit='mass_fraction', + source='registry', + ) + + +def test_calc_ptf_lal1979_group_ii_water_03bar_from_clay_out(): + inputs, expected, out = prepare_vector_case( + CASES_CALC_PTF_LAL1979_GROUP_II_WATER_03BAR_FROM_CLAY + ) + result = calc_ptf_lal1979_group_ii_water_03bar_from_clay(**inputs, out=out) + assert result is out + assert_close( + result[0], + expected['water_03bar'], + absolute=0.001, + relative=0.0, + quantity='gravimetric_water_content', + unit='mass_fraction', + source='registry', + ) + + +CASES_CALC_PTF_LAL1979_GROUP_II_WATER_01BAR_FROM_SAND = [ + ({'sand': 57.0}, {'water_01bar': 0.2065}), +] +CASES_CALC_PTF_LAL1979_GROUP_II_WATER_01BAR_FROM_SAND_IDS = [ + 'published_predictor_mean', +] + + +@pytest.mark.parametrize( + ('inputs', 'expected'), + CASES_CALC_PTF_LAL1979_GROUP_II_WATER_01BAR_FROM_SAND, + ids=CASES_CALC_PTF_LAL1979_GROUP_II_WATER_01BAR_FROM_SAND_IDS, +) +def test_calc_ptf_lal1979_group_ii_water_01bar_from_sand_verification( + inputs: dict[str, float], expected: dict[str, float] +): + result = calc_ptf_lal1979_group_ii_water_01bar_from_sand(**inputs) + + assert_close( + result, + expected['water_01bar'], + absolute=0.001, + relative=0.0, + quantity='gravimetric_water_content', + unit='mass_fraction', + source='registry', + ) + + +def test_calc_ptf_lal1979_group_ii_water_01bar_from_sand_array(): + inputs, expected, _out = prepare_vector_case( + CASES_CALC_PTF_LAL1979_GROUP_II_WATER_01BAR_FROM_SAND + ) + result = calc_ptf_lal1979_group_ii_water_01bar_from_sand(**inputs, out=None) + assert_close( + result[0], + expected['water_01bar'], + absolute=0.001, + relative=0.0, + quantity='gravimetric_water_content', + unit='mass_fraction', + source='registry', + ) + + +def test_calc_ptf_lal1979_group_ii_water_01bar_from_sand_out(): + inputs, expected, out = prepare_vector_case( + CASES_CALC_PTF_LAL1979_GROUP_II_WATER_01BAR_FROM_SAND + ) + result = calc_ptf_lal1979_group_ii_water_01bar_from_sand(**inputs, out=out) + assert result is out + assert_close( + result[0], + expected['water_01bar'], + absolute=0.001, + relative=0.0, + quantity='gravimetric_water_content', + unit='mass_fraction', + source='registry', + ) + + +CASES_CALC_PTF_LAL1979_GROUP_II_WATER_03BAR_FROM_SAND = [ + ({'sand': 57.0}, {'water_03bar': 0.178}), +] +CASES_CALC_PTF_LAL1979_GROUP_II_WATER_03BAR_FROM_SAND_IDS = [ + 'published_predictor_mean', +] + + +@pytest.mark.parametrize( + ('inputs', 'expected'), + CASES_CALC_PTF_LAL1979_GROUP_II_WATER_03BAR_FROM_SAND, + ids=CASES_CALC_PTF_LAL1979_GROUP_II_WATER_03BAR_FROM_SAND_IDS, +) +def test_calc_ptf_lal1979_group_ii_water_03bar_from_sand_verification( + inputs: dict[str, float], expected: dict[str, float] +): + result = calc_ptf_lal1979_group_ii_water_03bar_from_sand(**inputs) + + assert_close( + result, + expected['water_03bar'], + absolute=0.001, + relative=0.0, + quantity='gravimetric_water_content', + unit='mass_fraction', + source='registry', + ) + + +def test_calc_ptf_lal1979_group_ii_water_03bar_from_sand_array(): + inputs, expected, _out = prepare_vector_case( + CASES_CALC_PTF_LAL1979_GROUP_II_WATER_03BAR_FROM_SAND + ) + result = calc_ptf_lal1979_group_ii_water_03bar_from_sand(**inputs, out=None) + assert_close( + result[0], + expected['water_03bar'], + absolute=0.001, + relative=0.0, + quantity='gravimetric_water_content', + unit='mass_fraction', + source='registry', + ) + + +def test_calc_ptf_lal1979_group_ii_water_03bar_from_sand_out(): + inputs, expected, out = prepare_vector_case( + CASES_CALC_PTF_LAL1979_GROUP_II_WATER_03BAR_FROM_SAND + ) + result = calc_ptf_lal1979_group_ii_water_03bar_from_sand(**inputs, out=out) + assert result is out + assert_close( + result[0], + expected['water_03bar'], + absolute=0.001, + relative=0.0, + quantity='gravimetric_water_content', + unit='mass_fraction', + source='registry', + ) + + +CASES_CALC_PTF_LAL1979_GROUP_I_WATER_15BAR_FROM_CLAY = [ + ({'clay': 19.0}, {'water_15bar': 0.063}), +] +CASES_CALC_PTF_LAL1979_GROUP_I_WATER_15BAR_FROM_CLAY_IDS = [ + 'published_predictor_mean', +] + + +@pytest.mark.parametrize( + ('inputs', 'expected'), + CASES_CALC_PTF_LAL1979_GROUP_I_WATER_15BAR_FROM_CLAY, + ids=CASES_CALC_PTF_LAL1979_GROUP_I_WATER_15BAR_FROM_CLAY_IDS, +) +def test_calc_ptf_lal1979_group_i_water_15bar_from_clay_verification( + inputs: dict[str, float], expected: dict[str, float] +): + result = calc_ptf_lal1979_group_i_water_15bar_from_clay(**inputs) + + assert_close( + result, + expected['water_15bar'], + absolute=0.001, + relative=0.0, + quantity='gravimetric_water_content', + unit='mass_fraction', + source='registry', + ) + + +def test_calc_ptf_lal1979_group_i_water_15bar_from_clay_array(): + inputs, expected, _out = prepare_vector_case( + CASES_CALC_PTF_LAL1979_GROUP_I_WATER_15BAR_FROM_CLAY + ) + result = calc_ptf_lal1979_group_i_water_15bar_from_clay(**inputs, out=None) + assert_close( + result[0], + expected['water_15bar'], + absolute=0.001, + relative=0.0, + quantity='gravimetric_water_content', + unit='mass_fraction', + source='registry', + ) + + +def test_calc_ptf_lal1979_group_i_water_15bar_from_clay_out(): + inputs, expected, out = prepare_vector_case( + CASES_CALC_PTF_LAL1979_GROUP_I_WATER_15BAR_FROM_CLAY + ) + result = calc_ptf_lal1979_group_i_water_15bar_from_clay(**inputs, out=out) + assert result is out + assert_close( + result[0], + expected['water_15bar'], + absolute=0.001, + relative=0.0, + quantity='gravimetric_water_content', + unit='mass_fraction', + source='registry', + ) + + +CASES_CALC_PTF_LAL1979_GROUP_I_WATER_15BAR_FROM_SAND = [ + ({'sand': 66.0}, {'water_15bar': 0.049}), +] +CASES_CALC_PTF_LAL1979_GROUP_I_WATER_15BAR_FROM_SAND_IDS = [ + 'published_predictor_mean', +] + + +@pytest.mark.parametrize( + ('inputs', 'expected'), + CASES_CALC_PTF_LAL1979_GROUP_I_WATER_15BAR_FROM_SAND, + ids=CASES_CALC_PTF_LAL1979_GROUP_I_WATER_15BAR_FROM_SAND_IDS, +) +def test_calc_ptf_lal1979_group_i_water_15bar_from_sand_verification( + inputs: dict[str, float], expected: dict[str, float] +): + result = calc_ptf_lal1979_group_i_water_15bar_from_sand(**inputs) + + assert_close( + result, + expected['water_15bar'], + absolute=0.001, + relative=0.0, + quantity='gravimetric_water_content', + unit='mass_fraction', + source='registry', + ) + + +def test_calc_ptf_lal1979_group_i_water_15bar_from_sand_array(): + inputs, expected, _out = prepare_vector_case( + CASES_CALC_PTF_LAL1979_GROUP_I_WATER_15BAR_FROM_SAND + ) + result = calc_ptf_lal1979_group_i_water_15bar_from_sand(**inputs, out=None) + assert_close( + result[0], + expected['water_15bar'], + absolute=0.001, + relative=0.0, + quantity='gravimetric_water_content', + unit='mass_fraction', + source='registry', + ) + + +def test_calc_ptf_lal1979_group_i_water_15bar_from_sand_out(): + inputs, expected, out = prepare_vector_case( + CASES_CALC_PTF_LAL1979_GROUP_I_WATER_15BAR_FROM_SAND + ) + result = calc_ptf_lal1979_group_i_water_15bar_from_sand(**inputs, out=out) + assert result is out + assert_close( + result[0], + expected['water_15bar'], + absolute=0.001, + relative=0.0, + quantity='gravimetric_water_content', + unit='mass_fraction', + source='registry', + ) + + +CASES_CALC_PTF_LAL1979_GROUP_I_WATER_15BAR_FROM_SILT = [ + ({'silt': 15.0}, {'water_15bar': 0.128}), +] +CASES_CALC_PTF_LAL1979_GROUP_I_WATER_15BAR_FROM_SILT_IDS = [ + 'published_predictor_mean', +] + + +@pytest.mark.parametrize( + ('inputs', 'expected'), + CASES_CALC_PTF_LAL1979_GROUP_I_WATER_15BAR_FROM_SILT, + ids=CASES_CALC_PTF_LAL1979_GROUP_I_WATER_15BAR_FROM_SILT_IDS, +) +def test_calc_ptf_lal1979_group_i_water_15bar_from_silt_verification( + inputs: dict[str, float], expected: dict[str, float] +): + result = calc_ptf_lal1979_group_i_water_15bar_from_silt(**inputs) + + assert_close( + result, + expected['water_15bar'], + absolute=0.001, + relative=0.0, + quantity='gravimetric_water_content', + unit='mass_fraction', + source='registry', + ) + + +def test_calc_ptf_lal1979_group_i_water_15bar_from_silt_array(): + inputs, expected, _out = prepare_vector_case( + CASES_CALC_PTF_LAL1979_GROUP_I_WATER_15BAR_FROM_SILT + ) + result = calc_ptf_lal1979_group_i_water_15bar_from_silt(**inputs, out=None) + assert_close( + result[0], + expected['water_15bar'], + absolute=0.001, + relative=0.0, + quantity='gravimetric_water_content', + unit='mass_fraction', + source='registry', + ) + + +def test_calc_ptf_lal1979_group_i_water_15bar_from_silt_out(): + inputs, expected, out = prepare_vector_case( + CASES_CALC_PTF_LAL1979_GROUP_I_WATER_15BAR_FROM_SILT + ) + result = calc_ptf_lal1979_group_i_water_15bar_from_silt(**inputs, out=out) + assert result is out + assert_close( + result[0], + expected['water_15bar'], + absolute=0.001, + relative=0.0, + quantity='gravimetric_water_content', + unit='mass_fraction', + source='registry', + ) + + +CASES_CALC_PTF_LAL1979_GROUP_II_WATER_15BAR_FROM_CLAY = [ + ({'clay': 38.0}, {'water_15bar': 0.1086}), +] +CASES_CALC_PTF_LAL1979_GROUP_II_WATER_15BAR_FROM_CLAY_IDS = [ + 'published_predictor_mean', +] + + +@pytest.mark.parametrize( + ('inputs', 'expected'), + CASES_CALC_PTF_LAL1979_GROUP_II_WATER_15BAR_FROM_CLAY, + ids=CASES_CALC_PTF_LAL1979_GROUP_II_WATER_15BAR_FROM_CLAY_IDS, +) +def test_calc_ptf_lal1979_group_ii_water_15bar_from_clay_verification( + inputs: dict[str, float], expected: dict[str, float] +): + result = calc_ptf_lal1979_group_ii_water_15bar_from_clay(**inputs) + + assert_close( + result, + expected['water_15bar'], + absolute=0.001, + relative=0.0, + quantity='gravimetric_water_content', + unit='mass_fraction', + source='registry', + ) + + +def test_calc_ptf_lal1979_group_ii_water_15bar_from_clay_array(): + inputs, expected, _out = prepare_vector_case( + CASES_CALC_PTF_LAL1979_GROUP_II_WATER_15BAR_FROM_CLAY + ) + result = calc_ptf_lal1979_group_ii_water_15bar_from_clay(**inputs, out=None) + assert_close( + result[0], + expected['water_15bar'], + absolute=0.001, + relative=0.0, + quantity='gravimetric_water_content', + unit='mass_fraction', + source='registry', + ) + + +def test_calc_ptf_lal1979_group_ii_water_15bar_from_clay_out(): + inputs, expected, out = prepare_vector_case( + CASES_CALC_PTF_LAL1979_GROUP_II_WATER_15BAR_FROM_CLAY + ) + result = calc_ptf_lal1979_group_ii_water_15bar_from_clay(**inputs, out=out) + assert result is out + assert_close( + result[0], + expected['water_15bar'], + absolute=0.001, + relative=0.0, + quantity='gravimetric_water_content', + unit='mass_fraction', + source='registry', + ) + + +CASES_CALC_PTF_LAL1979_GROUP_II_WATER_15BAR_FROM_SAND = [ + ({'sand': 57.0}, {'water_15bar': 0.1472}), +] +CASES_CALC_PTF_LAL1979_GROUP_II_WATER_15BAR_FROM_SAND_IDS = [ + 'published_predictor_mean', +] + + +@pytest.mark.parametrize( + ('inputs', 'expected'), + CASES_CALC_PTF_LAL1979_GROUP_II_WATER_15BAR_FROM_SAND, + ids=CASES_CALC_PTF_LAL1979_GROUP_II_WATER_15BAR_FROM_SAND_IDS, +) +def test_calc_ptf_lal1979_group_ii_water_15bar_from_sand_verification( + inputs: dict[str, float], expected: dict[str, float] +): + result = calc_ptf_lal1979_group_ii_water_15bar_from_sand(**inputs) + + assert_close( + result, + expected['water_15bar'], + absolute=0.001, + relative=0.0, + quantity='gravimetric_water_content', + unit='mass_fraction', + source='registry', + ) + + +def test_calc_ptf_lal1979_group_ii_water_15bar_from_sand_array(): + inputs, expected, _out = prepare_vector_case( + CASES_CALC_PTF_LAL1979_GROUP_II_WATER_15BAR_FROM_SAND + ) + result = calc_ptf_lal1979_group_ii_water_15bar_from_sand(**inputs, out=None) + assert_close( + result[0], + expected['water_15bar'], + absolute=0.001, + relative=0.0, + quantity='gravimetric_water_content', + unit='mass_fraction', + source='registry', + ) + + +def test_calc_ptf_lal1979_group_ii_water_15bar_from_sand_out(): + inputs, expected, out = prepare_vector_case( + CASES_CALC_PTF_LAL1979_GROUP_II_WATER_15BAR_FROM_SAND + ) + result = calc_ptf_lal1979_group_ii_water_15bar_from_sand(**inputs, out=out) + assert result is out + assert_close( + result[0], + expected['water_15bar'], + absolute=0.001, + relative=0.0, + quantity='gravimetric_water_content', + unit='mass_fraction', + source='registry', + ) + + +CASES_CALC_PTF_LAL1979_GROUP_I_MOISTURE_EQUIVALENT_FROM_CLAY = [ + ({'clay': 19.0}, {'moisture_equivalent': 0.128}), +] +CASES_CALC_PTF_LAL1979_GROUP_I_MOISTURE_EQUIVALENT_FROM_CLAY_IDS = [ + 'published_predictor_mean', +] + + +@pytest.mark.parametrize( + ('inputs', 'expected'), + CASES_CALC_PTF_LAL1979_GROUP_I_MOISTURE_EQUIVALENT_FROM_CLAY, + ids=CASES_CALC_PTF_LAL1979_GROUP_I_MOISTURE_EQUIVALENT_FROM_CLAY_IDS, +) +def test_calc_ptf_lal1979_group_i_moisture_equivalent_from_clay_verification( + inputs: dict[str, float], expected: dict[str, float] +): + result = calc_ptf_lal1979_group_i_moisture_equivalent_from_clay(**inputs) + + assert_close( + result, + expected['moisture_equivalent'], + absolute=0.001, + relative=0.0, + quantity='gravimetric_water_content', + unit='mass_fraction', + source='registry', + ) + + +def test_calc_ptf_lal1979_group_i_moisture_equivalent_from_clay_array(): + inputs, expected, _out = prepare_vector_case( + CASES_CALC_PTF_LAL1979_GROUP_I_MOISTURE_EQUIVALENT_FROM_CLAY + ) + result = calc_ptf_lal1979_group_i_moisture_equivalent_from_clay(**inputs, out=None) + assert_close( + result[0], + expected['moisture_equivalent'], + absolute=0.001, + relative=0.0, + quantity='gravimetric_water_content', + unit='mass_fraction', + source='registry', + ) + + +def test_calc_ptf_lal1979_group_i_moisture_equivalent_from_clay_out(): + inputs, expected, out = prepare_vector_case( + CASES_CALC_PTF_LAL1979_GROUP_I_MOISTURE_EQUIVALENT_FROM_CLAY + ) + result = calc_ptf_lal1979_group_i_moisture_equivalent_from_clay(**inputs, out=out) + assert result is out + assert_close( + result[0], + expected['moisture_equivalent'], + absolute=0.001, + relative=0.0, + quantity='gravimetric_water_content', + unit='mass_fraction', + source='registry', + ) + + +CASES_CALC_PTF_LAL1979_GROUP_I_MOISTURE_EQUIVALENT_FROM_SAND = [ + ({'sand': 66.0}, {'moisture_equivalent': 0.141}), +] +CASES_CALC_PTF_LAL1979_GROUP_I_MOISTURE_EQUIVALENT_FROM_SAND_IDS = [ + 'published_predictor_mean', +] + + +@pytest.mark.parametrize( + ('inputs', 'expected'), + CASES_CALC_PTF_LAL1979_GROUP_I_MOISTURE_EQUIVALENT_FROM_SAND, + ids=CASES_CALC_PTF_LAL1979_GROUP_I_MOISTURE_EQUIVALENT_FROM_SAND_IDS, +) +def test_calc_ptf_lal1979_group_i_moisture_equivalent_from_sand_verification( + inputs: dict[str, float], expected: dict[str, float] +): + result = calc_ptf_lal1979_group_i_moisture_equivalent_from_sand(**inputs) + + assert_close( + result, + expected['moisture_equivalent'], + absolute=0.001, + relative=0.0, + quantity='gravimetric_water_content', + unit='mass_fraction', + source='registry', + ) + + +def test_calc_ptf_lal1979_group_i_moisture_equivalent_from_sand_array(): + inputs, expected, _out = prepare_vector_case( + CASES_CALC_PTF_LAL1979_GROUP_I_MOISTURE_EQUIVALENT_FROM_SAND + ) + result = calc_ptf_lal1979_group_i_moisture_equivalent_from_sand(**inputs, out=None) + assert_close( + result[0], + expected['moisture_equivalent'], + absolute=0.001, + relative=0.0, + quantity='gravimetric_water_content', + unit='mass_fraction', + source='registry', + ) + + +def test_calc_ptf_lal1979_group_i_moisture_equivalent_from_sand_out(): + inputs, expected, out = prepare_vector_case( + CASES_CALC_PTF_LAL1979_GROUP_I_MOISTURE_EQUIVALENT_FROM_SAND + ) + result = calc_ptf_lal1979_group_i_moisture_equivalent_from_sand(**inputs, out=out) + assert result is out + assert_close( + result[0], + expected['moisture_equivalent'], + absolute=0.001, + relative=0.0, + quantity='gravimetric_water_content', + unit='mass_fraction', + source='registry', + ) + + +CASES_CALC_PTF_LAL1979_GROUP_II_MOISTURE_EQUIVALENT_FROM_CLAY = [ + ({'clay': 38.0}, {'moisture_equivalent': 0.152}), +] +CASES_CALC_PTF_LAL1979_GROUP_II_MOISTURE_EQUIVALENT_FROM_CLAY_IDS = [ + 'published_predictor_mean', +] + + +@pytest.mark.parametrize( + ('inputs', 'expected'), + CASES_CALC_PTF_LAL1979_GROUP_II_MOISTURE_EQUIVALENT_FROM_CLAY, + ids=CASES_CALC_PTF_LAL1979_GROUP_II_MOISTURE_EQUIVALENT_FROM_CLAY_IDS, +) +def test_calc_ptf_lal1979_group_ii_moisture_equivalent_from_clay_verification( + inputs: dict[str, float], expected: dict[str, float] +): + result = calc_ptf_lal1979_group_ii_moisture_equivalent_from_clay(**inputs) + + assert_close( + result, + expected['moisture_equivalent'], + absolute=0.001, + relative=0.0, + quantity='gravimetric_water_content', + unit='mass_fraction', + source='registry', + ) + + +def test_calc_ptf_lal1979_group_ii_moisture_equivalent_from_clay_array(): + inputs, expected, _out = prepare_vector_case( + CASES_CALC_PTF_LAL1979_GROUP_II_MOISTURE_EQUIVALENT_FROM_CLAY + ) + result = calc_ptf_lal1979_group_ii_moisture_equivalent_from_clay(**inputs, out=None) + assert_close( + result[0], + expected['moisture_equivalent'], + absolute=0.001, + relative=0.0, + quantity='gravimetric_water_content', + unit='mass_fraction', + source='registry', + ) + + +def test_calc_ptf_lal1979_group_ii_moisture_equivalent_from_clay_out(): + inputs, expected, out = prepare_vector_case( + CASES_CALC_PTF_LAL1979_GROUP_II_MOISTURE_EQUIVALENT_FROM_CLAY + ) + result = calc_ptf_lal1979_group_ii_moisture_equivalent_from_clay(**inputs, out=out) + assert result is out + assert_close( + result[0], + expected['moisture_equivalent'], + absolute=0.001, + relative=0.0, + quantity='gravimetric_water_content', + unit='mass_fraction', + source='registry', + ) + + +CASES_CALC_PTF_LAL1979_GROUP_II_MOISTURE_EQUIVALENT_FROM_SAND = [ + ({'sand': 57.0}, {'moisture_equivalent': 0.17}), +] +CASES_CALC_PTF_LAL1979_GROUP_II_MOISTURE_EQUIVALENT_FROM_SAND_IDS = [ + 'published_predictor_mean', +] + + +@pytest.mark.parametrize( + ('inputs', 'expected'), + CASES_CALC_PTF_LAL1979_GROUP_II_MOISTURE_EQUIVALENT_FROM_SAND, + ids=CASES_CALC_PTF_LAL1979_GROUP_II_MOISTURE_EQUIVALENT_FROM_SAND_IDS, +) +def test_calc_ptf_lal1979_group_ii_moisture_equivalent_from_sand_verification( + inputs: dict[str, float], expected: dict[str, float] +): + result = calc_ptf_lal1979_group_ii_moisture_equivalent_from_sand(**inputs) + + assert_close( + result, + expected['moisture_equivalent'], + absolute=0.001, + relative=0.0, + quantity='gravimetric_water_content', + unit='mass_fraction', + source='registry', + ) + + +def test_calc_ptf_lal1979_group_ii_moisture_equivalent_from_sand_array(): + inputs, expected, _out = prepare_vector_case( + CASES_CALC_PTF_LAL1979_GROUP_II_MOISTURE_EQUIVALENT_FROM_SAND + ) + result = calc_ptf_lal1979_group_ii_moisture_equivalent_from_sand(**inputs, out=None) + assert_close( + result[0], + expected['moisture_equivalent'], + absolute=0.001, + relative=0.0, + quantity='gravimetric_water_content', + unit='mass_fraction', + source='registry', + ) + + +def test_calc_ptf_lal1979_group_ii_moisture_equivalent_from_sand_out(): + inputs, expected, out = prepare_vector_case( + CASES_CALC_PTF_LAL1979_GROUP_II_MOISTURE_EQUIVALENT_FROM_SAND + ) + result = calc_ptf_lal1979_group_ii_moisture_equivalent_from_sand(**inputs, out=out) + assert result is out + assert_close( + result[0], + expected['moisture_equivalent'], + absolute=0.001, + relative=0.0, + quantity='gravimetric_water_content', + unit='mass_fraction', + source='registry', + ) + + +CASES_CALC_PTF_LAL1979_GROUP_II_MOISTURE_EQUIVALENT_FROM_SILT = [ + ({'silt': 5.0}, {'moisture_equivalent': 0.15}), +] +CASES_CALC_PTF_LAL1979_GROUP_II_MOISTURE_EQUIVALENT_FROM_SILT_IDS = [ + 'published_predictor_mean', +] + + +@pytest.mark.parametrize( + ('inputs', 'expected'), + CASES_CALC_PTF_LAL1979_GROUP_II_MOISTURE_EQUIVALENT_FROM_SILT, + ids=CASES_CALC_PTF_LAL1979_GROUP_II_MOISTURE_EQUIVALENT_FROM_SILT_IDS, +) +def test_calc_ptf_lal1979_group_ii_moisture_equivalent_from_silt_verification( + inputs: dict[str, float], expected: dict[str, float] +): + result = calc_ptf_lal1979_group_ii_moisture_equivalent_from_silt(**inputs) + + assert_close( + result, + expected['moisture_equivalent'], + absolute=0.001, + relative=0.0, + quantity='gravimetric_water_content', + unit='mass_fraction', + source='registry', + ) + + +def test_calc_ptf_lal1979_group_ii_moisture_equivalent_from_silt_array(): + inputs, expected, _out = prepare_vector_case( + CASES_CALC_PTF_LAL1979_GROUP_II_MOISTURE_EQUIVALENT_FROM_SILT + ) + result = calc_ptf_lal1979_group_ii_moisture_equivalent_from_silt(**inputs, out=None) + assert_close( + result[0], + expected['moisture_equivalent'], + absolute=0.001, + relative=0.0, + quantity='gravimetric_water_content', + unit='mass_fraction', + source='registry', + ) + + +def test_calc_ptf_lal1979_group_ii_moisture_equivalent_from_silt_out(): + inputs, expected, out = prepare_vector_case( + CASES_CALC_PTF_LAL1979_GROUP_II_MOISTURE_EQUIVALENT_FROM_SILT + ) + result = calc_ptf_lal1979_group_ii_moisture_equivalent_from_silt(**inputs, out=out) + assert result is out + assert_close( + result[0], + expected['moisture_equivalent'], + absolute=0.001, + relative=0.0, + quantity='gravimetric_water_content', + unit='mass_fraction', + source='registry', + ) + + +CASES_CALC_PTF_LAL1979_GROUP_II_WATER_03BAR_FROM_WATER_01BAR = [ + ({'water_01bar': 0.17}, {'water_03bar': 0.1322}), +] +CASES_CALC_PTF_LAL1979_GROUP_II_WATER_03BAR_FROM_WATER_01BAR_IDS = [ + 'published_predictor_mean', +] + + +@pytest.mark.parametrize( + ('inputs', 'expected'), + CASES_CALC_PTF_LAL1979_GROUP_II_WATER_03BAR_FROM_WATER_01BAR, + ids=CASES_CALC_PTF_LAL1979_GROUP_II_WATER_03BAR_FROM_WATER_01BAR_IDS, +) +def test_calc_ptf_lal1979_group_ii_water_03bar_from_water_01bar_verification( + inputs: dict[str, float], expected: dict[str, float] +): + result = calc_ptf_lal1979_group_ii_water_03bar_from_water_01bar(**inputs) + + assert_close( + result, + expected['water_03bar'], + absolute=0.001, + relative=0.0, + quantity='gravimetric_water_content', + unit='mass_fraction', + source='registry', + ) + + +def test_calc_ptf_lal1979_group_ii_water_03bar_from_water_01bar_array(): + inputs, expected, _out = prepare_vector_case( + CASES_CALC_PTF_LAL1979_GROUP_II_WATER_03BAR_FROM_WATER_01BAR + ) + result = calc_ptf_lal1979_group_ii_water_03bar_from_water_01bar(**inputs, out=None) + assert_close( + result[0], + expected['water_03bar'], + absolute=0.001, + relative=0.0, + quantity='gravimetric_water_content', + unit='mass_fraction', + source='registry', + ) + + +def test_calc_ptf_lal1979_group_ii_water_03bar_from_water_01bar_out(): + inputs, expected, out = prepare_vector_case( + CASES_CALC_PTF_LAL1979_GROUP_II_WATER_03BAR_FROM_WATER_01BAR + ) + result = calc_ptf_lal1979_group_ii_water_03bar_from_water_01bar(**inputs, out=out) + assert result is out + assert_close( + result[0], + expected['water_03bar'], + absolute=0.001, + relative=0.0, + quantity='gravimetric_water_content', + unit='mass_fraction', + source='registry', + ) + + +CASES_CALC_PTF_LAL1979_GROUP_II_WATER_15BAR_FROM_WATER_01BAR = [ + ({'water_01bar': 0.17}, {'water_15bar': 0.0868}), +] +CASES_CALC_PTF_LAL1979_GROUP_II_WATER_15BAR_FROM_WATER_01BAR_IDS = [ + 'published_predictor_mean', +] + + +@pytest.mark.parametrize( + ('inputs', 'expected'), + CASES_CALC_PTF_LAL1979_GROUP_II_WATER_15BAR_FROM_WATER_01BAR, + ids=CASES_CALC_PTF_LAL1979_GROUP_II_WATER_15BAR_FROM_WATER_01BAR_IDS, +) +def test_calc_ptf_lal1979_group_ii_water_15bar_from_water_01bar_verification( + inputs: dict[str, float], expected: dict[str, float] +): + result = calc_ptf_lal1979_group_ii_water_15bar_from_water_01bar(**inputs) + + assert_close( + result, + expected['water_15bar'], + absolute=0.001, + relative=0.0, + quantity='gravimetric_water_content', + unit='mass_fraction', + source='registry', + ) + + +def test_calc_ptf_lal1979_group_ii_water_15bar_from_water_01bar_array(): + inputs, expected, _out = prepare_vector_case( + CASES_CALC_PTF_LAL1979_GROUP_II_WATER_15BAR_FROM_WATER_01BAR + ) + result = calc_ptf_lal1979_group_ii_water_15bar_from_water_01bar(**inputs, out=None) + assert_close( + result[0], + expected['water_15bar'], + absolute=0.001, + relative=0.0, + quantity='gravimetric_water_content', + unit='mass_fraction', + source='registry', + ) + + +def test_calc_ptf_lal1979_group_ii_water_15bar_from_water_01bar_out(): + inputs, expected, out = prepare_vector_case( + CASES_CALC_PTF_LAL1979_GROUP_II_WATER_15BAR_FROM_WATER_01BAR + ) + result = calc_ptf_lal1979_group_ii_water_15bar_from_water_01bar(**inputs, out=out) + assert result is out + assert_close( + result[0], + expected['water_15bar'], + absolute=0.001, + relative=0.0, + quantity='gravimetric_water_content', + unit='mass_fraction', + source='registry', + ) + + +CASES_CALC_PTF_LAL1979_GROUP_I_UPPER_PLASTIC_LIMIT_FROM_ORGANIC_CARBON = [ + ({'organic_carbon': 1.5}, {'upper_plastic_limit': 23.63}), +] +CASES_CALC_PTF_LAL1979_GROUP_I_UPPER_PLASTIC_LIMIT_FROM_ORGANIC_CARBON_IDS = [ + 'published_predictor_mean', +] + + +@pytest.mark.parametrize( + ('inputs', 'expected'), + CASES_CALC_PTF_LAL1979_GROUP_I_UPPER_PLASTIC_LIMIT_FROM_ORGANIC_CARBON, + ids=CASES_CALC_PTF_LAL1979_GROUP_I_UPPER_PLASTIC_LIMIT_FROM_ORGANIC_CARBON_IDS, +) +def test_calc_ptf_lal1979_group_i_upper_plastic_limit_from_organic_carbon_verification( + inputs: dict[str, float], expected: dict[str, float] +): + result = calc_ptf_lal1979_group_i_upper_plastic_limit_from_organic_carbon(**inputs) + + assert_close( + result, + expected['upper_plastic_limit'], + absolute=0.1, + relative=0.0, + quantity='gravimetric_water_content', + unit='mass_percent', + source='registry', + ) + + +def test_calc_ptf_lal1979_group_i_upper_plastic_limit_from_organic_carbon_array(): + inputs, expected, _out = prepare_vector_case( + CASES_CALC_PTF_LAL1979_GROUP_I_UPPER_PLASTIC_LIMIT_FROM_ORGANIC_CARBON + ) + result = calc_ptf_lal1979_group_i_upper_plastic_limit_from_organic_carbon(**inputs, out=None) + assert_close( + result[0], + expected['upper_plastic_limit'], + absolute=0.1, + relative=0.0, + quantity='gravimetric_water_content', + unit='mass_percent', + source='registry', + ) + + +def test_calc_ptf_lal1979_group_i_upper_plastic_limit_from_organic_carbon_out(): + inputs, expected, out = prepare_vector_case( + CASES_CALC_PTF_LAL1979_GROUP_I_UPPER_PLASTIC_LIMIT_FROM_ORGANIC_CARBON + ) + result = calc_ptf_lal1979_group_i_upper_plastic_limit_from_organic_carbon(**inputs, out=out) + assert result is out + assert_close( + result[0], + expected['upper_plastic_limit'], + absolute=0.1, + relative=0.0, + quantity='gravimetric_water_content', + unit='mass_percent', + source='registry', + ) + + +CASES_CALC_PTF_LAL1979_GROUP_I_LOWER_PLASTIC_LIMIT_FROM_ORGANIC_CARBON = [ + ({'organic_carbon': 1.5}, {'lower_plastic_limit': 18.37}), +] +CASES_CALC_PTF_LAL1979_GROUP_I_LOWER_PLASTIC_LIMIT_FROM_ORGANIC_CARBON_IDS = [ + 'published_predictor_mean', +] + + +@pytest.mark.parametrize( + ('inputs', 'expected'), + CASES_CALC_PTF_LAL1979_GROUP_I_LOWER_PLASTIC_LIMIT_FROM_ORGANIC_CARBON, + ids=CASES_CALC_PTF_LAL1979_GROUP_I_LOWER_PLASTIC_LIMIT_FROM_ORGANIC_CARBON_IDS, +) +def test_calc_ptf_lal1979_group_i_lower_plastic_limit_from_organic_carbon_verification( + inputs: dict[str, float], expected: dict[str, float] +): + result = calc_ptf_lal1979_group_i_lower_plastic_limit_from_organic_carbon(**inputs) + + assert_close( + result, + expected['lower_plastic_limit'], + absolute=0.1, + relative=0.0, + quantity='gravimetric_water_content', + unit='mass_percent', + source='registry', + ) + + +def test_calc_ptf_lal1979_group_i_lower_plastic_limit_from_organic_carbon_array(): + inputs, expected, _out = prepare_vector_case( + CASES_CALC_PTF_LAL1979_GROUP_I_LOWER_PLASTIC_LIMIT_FROM_ORGANIC_CARBON + ) + result = calc_ptf_lal1979_group_i_lower_plastic_limit_from_organic_carbon(**inputs, out=None) + assert_close( + result[0], + expected['lower_plastic_limit'], + absolute=0.1, + relative=0.0, + quantity='gravimetric_water_content', + unit='mass_percent', + source='registry', + ) + + +def test_calc_ptf_lal1979_group_i_lower_plastic_limit_from_organic_carbon_out(): + inputs, expected, out = prepare_vector_case( + CASES_CALC_PTF_LAL1979_GROUP_I_LOWER_PLASTIC_LIMIT_FROM_ORGANIC_CARBON + ) + result = calc_ptf_lal1979_group_i_lower_plastic_limit_from_organic_carbon(**inputs, out=out) + assert result is out + assert_close( + result[0], + expected['lower_plastic_limit'], + absolute=0.1, + relative=0.0, + quantity='gravimetric_water_content', + unit='mass_percent', + source='registry', + ) + + +CASES_CALC_PTF_LAL1979_GROUP_I_PLASTICITY_INDEX_FROM_ORGANIC_CARBON = [ + ({'organic_carbon': 1.5}, {'plasticity_index': 5.56}), +] +CASES_CALC_PTF_LAL1979_GROUP_I_PLASTICITY_INDEX_FROM_ORGANIC_CARBON_IDS = [ + 'published_predictor_mean', +] + + +@pytest.mark.parametrize( + ('inputs', 'expected'), + CASES_CALC_PTF_LAL1979_GROUP_I_PLASTICITY_INDEX_FROM_ORGANIC_CARBON, + ids=CASES_CALC_PTF_LAL1979_GROUP_I_PLASTICITY_INDEX_FROM_ORGANIC_CARBON_IDS, +) +def test_calc_ptf_lal1979_group_i_plasticity_index_from_organic_carbon_verification( + inputs: dict[str, float], expected: dict[str, float] +): + result = calc_ptf_lal1979_group_i_plasticity_index_from_organic_carbon(**inputs) + + assert_close( + result, + expected['plasticity_index'], + absolute=0.1, + relative=0.0, + quantity='gravimetric_water_content', + unit='mass_percent', + source='registry', + ) + + +def test_calc_ptf_lal1979_group_i_plasticity_index_from_organic_carbon_array(): + inputs, expected, _out = prepare_vector_case( + CASES_CALC_PTF_LAL1979_GROUP_I_PLASTICITY_INDEX_FROM_ORGANIC_CARBON + ) + result = calc_ptf_lal1979_group_i_plasticity_index_from_organic_carbon(**inputs, out=None) + assert_close( + result[0], + expected['plasticity_index'], + absolute=0.1, + relative=0.0, + quantity='gravimetric_water_content', + unit='mass_percent', + source='registry', + ) + + +def test_calc_ptf_lal1979_group_i_plasticity_index_from_organic_carbon_out(): + inputs, expected, out = prepare_vector_case( + CASES_CALC_PTF_LAL1979_GROUP_I_PLASTICITY_INDEX_FROM_ORGANIC_CARBON + ) + result = calc_ptf_lal1979_group_i_plasticity_index_from_organic_carbon(**inputs, out=out) + assert result is out + assert_close( + result[0], + expected['plasticity_index'], + absolute=0.1, + relative=0.0, + quantity='gravimetric_water_content', + unit='mass_percent', + source='registry', + ) + + +CASES_CALC_PTF_LAL1979_GROUP_I_UPPER_PLASTIC_LIMIT_FROM_CLAY = [ + ({'clay': 19.0}, {'upper_plastic_limit': 20.22}), +] +CASES_CALC_PTF_LAL1979_GROUP_I_UPPER_PLASTIC_LIMIT_FROM_CLAY_IDS = [ + 'published_predictor_mean', +] + + +@pytest.mark.parametrize( + ('inputs', 'expected'), + CASES_CALC_PTF_LAL1979_GROUP_I_UPPER_PLASTIC_LIMIT_FROM_CLAY, + ids=CASES_CALC_PTF_LAL1979_GROUP_I_UPPER_PLASTIC_LIMIT_FROM_CLAY_IDS, +) +def test_calc_ptf_lal1979_group_i_upper_plastic_limit_from_clay_verification( + inputs: dict[str, float], expected: dict[str, float] +): + result = calc_ptf_lal1979_group_i_upper_plastic_limit_from_clay(**inputs) + + assert_close( + result, + expected['upper_plastic_limit'], + absolute=0.1, + relative=0.0, + quantity='gravimetric_water_content', + unit='mass_percent', + source='registry', + ) + + +def test_calc_ptf_lal1979_group_i_upper_plastic_limit_from_clay_array(): + inputs, expected, _out = prepare_vector_case( + CASES_CALC_PTF_LAL1979_GROUP_I_UPPER_PLASTIC_LIMIT_FROM_CLAY + ) + result = calc_ptf_lal1979_group_i_upper_plastic_limit_from_clay(**inputs, out=None) + assert_close( + result[0], + expected['upper_plastic_limit'], + absolute=0.1, + relative=0.0, + quantity='gravimetric_water_content', + unit='mass_percent', + source='registry', + ) + + +def test_calc_ptf_lal1979_group_i_upper_plastic_limit_from_clay_out(): + inputs, expected, out = prepare_vector_case( + CASES_CALC_PTF_LAL1979_GROUP_I_UPPER_PLASTIC_LIMIT_FROM_CLAY + ) + result = calc_ptf_lal1979_group_i_upper_plastic_limit_from_clay(**inputs, out=out) + assert result is out + assert_close( + result[0], + expected['upper_plastic_limit'], + absolute=0.1, + relative=0.0, + quantity='gravimetric_water_content', + unit='mass_percent', + source='registry', + ) + + +CASES_CALC_PTF_LAL1979_GROUP_I_LOWER_PLASTIC_LIMIT_FROM_CLAY = [ + ({'clay': 19.0}, {'lower_plastic_limit': 15.96}), +] +CASES_CALC_PTF_LAL1979_GROUP_I_LOWER_PLASTIC_LIMIT_FROM_CLAY_IDS = [ + 'published_predictor_mean', +] + + +@pytest.mark.parametrize( + ('inputs', 'expected'), + CASES_CALC_PTF_LAL1979_GROUP_I_LOWER_PLASTIC_LIMIT_FROM_CLAY, + ids=CASES_CALC_PTF_LAL1979_GROUP_I_LOWER_PLASTIC_LIMIT_FROM_CLAY_IDS, +) +def test_calc_ptf_lal1979_group_i_lower_plastic_limit_from_clay_verification( + inputs: dict[str, float], expected: dict[str, float] +): + result = calc_ptf_lal1979_group_i_lower_plastic_limit_from_clay(**inputs) + + assert_close( + result, + expected['lower_plastic_limit'], + absolute=0.1, + relative=0.0, + quantity='gravimetric_water_content', + unit='mass_percent', + source='registry', + ) + + +def test_calc_ptf_lal1979_group_i_lower_plastic_limit_from_clay_array(): + inputs, expected, _out = prepare_vector_case( + CASES_CALC_PTF_LAL1979_GROUP_I_LOWER_PLASTIC_LIMIT_FROM_CLAY + ) + result = calc_ptf_lal1979_group_i_lower_plastic_limit_from_clay(**inputs, out=None) + assert_close( + result[0], + expected['lower_plastic_limit'], + absolute=0.1, + relative=0.0, + quantity='gravimetric_water_content', + unit='mass_percent', + source='registry', + ) + + +def test_calc_ptf_lal1979_group_i_lower_plastic_limit_from_clay_out(): + inputs, expected, out = prepare_vector_case( + CASES_CALC_PTF_LAL1979_GROUP_I_LOWER_PLASTIC_LIMIT_FROM_CLAY + ) + result = calc_ptf_lal1979_group_i_lower_plastic_limit_from_clay(**inputs, out=out) + assert result is out + assert_close( + result[0], + expected['lower_plastic_limit'], + absolute=0.1, + relative=0.0, + quantity='gravimetric_water_content', + unit='mass_percent', + source='registry', + ) + + +CASES_CALC_PTF_LAL1979_GROUP_I_PLASTICITY_INDEX_FROM_CLAY = [ + ({'clay': 19.0}, {'plasticity_index': 4.57}), +] +CASES_CALC_PTF_LAL1979_GROUP_I_PLASTICITY_INDEX_FROM_CLAY_IDS = [ + 'published_predictor_mean', +] + + +@pytest.mark.parametrize( + ('inputs', 'expected'), + CASES_CALC_PTF_LAL1979_GROUP_I_PLASTICITY_INDEX_FROM_CLAY, + ids=CASES_CALC_PTF_LAL1979_GROUP_I_PLASTICITY_INDEX_FROM_CLAY_IDS, +) +def test_calc_ptf_lal1979_group_i_plasticity_index_from_clay_verification( + inputs: dict[str, float], expected: dict[str, float] +): + result = calc_ptf_lal1979_group_i_plasticity_index_from_clay(**inputs) + + assert_close( + result, + expected['plasticity_index'], + absolute=0.1, + relative=0.0, + quantity='gravimetric_water_content', + unit='mass_percent', + source='registry', + ) + + +def test_calc_ptf_lal1979_group_i_plasticity_index_from_clay_array(): + inputs, expected, _out = prepare_vector_case( + CASES_CALC_PTF_LAL1979_GROUP_I_PLASTICITY_INDEX_FROM_CLAY + ) + result = calc_ptf_lal1979_group_i_plasticity_index_from_clay(**inputs, out=None) + assert_close( + result[0], + expected['plasticity_index'], + absolute=0.1, + relative=0.0, + quantity='gravimetric_water_content', + unit='mass_percent', + source='registry', + ) + + +def test_calc_ptf_lal1979_group_i_plasticity_index_from_clay_out(): + inputs, expected, out = prepare_vector_case( + CASES_CALC_PTF_LAL1979_GROUP_I_PLASTICITY_INDEX_FROM_CLAY + ) + result = calc_ptf_lal1979_group_i_plasticity_index_from_clay(**inputs, out=out) + assert result is out + assert_close( + result[0], + expected['plasticity_index'], + absolute=0.1, + relative=0.0, + quantity='gravimetric_water_content', + unit='mass_percent', + source='registry', + ) + + +CASES_CALC_PTF_LAL1979_GROUP_I_LOWER_PLASTIC_LIMIT_FROM_SAND = [ + ({'sand': 66.0}, {'lower_plastic_limit': 15.7}), +] +CASES_CALC_PTF_LAL1979_GROUP_I_LOWER_PLASTIC_LIMIT_FROM_SAND_IDS = [ + 'published_predictor_mean', +] + + +@pytest.mark.parametrize( + ('inputs', 'expected'), + CASES_CALC_PTF_LAL1979_GROUP_I_LOWER_PLASTIC_LIMIT_FROM_SAND, + ids=CASES_CALC_PTF_LAL1979_GROUP_I_LOWER_PLASTIC_LIMIT_FROM_SAND_IDS, +) +def test_calc_ptf_lal1979_group_i_lower_plastic_limit_from_sand_verification( + inputs: dict[str, float], expected: dict[str, float] +): + result = calc_ptf_lal1979_group_i_lower_plastic_limit_from_sand(**inputs) + + assert_close( + result, + expected['lower_plastic_limit'], + absolute=0.1, + relative=0.0, + quantity='gravimetric_water_content', + unit='mass_percent', + source='registry', + ) + + +def test_calc_ptf_lal1979_group_i_lower_plastic_limit_from_sand_array(): + inputs, expected, _out = prepare_vector_case( + CASES_CALC_PTF_LAL1979_GROUP_I_LOWER_PLASTIC_LIMIT_FROM_SAND + ) + result = calc_ptf_lal1979_group_i_lower_plastic_limit_from_sand(**inputs, out=None) + assert_close( + result[0], + expected['lower_plastic_limit'], + absolute=0.1, + relative=0.0, + quantity='gravimetric_water_content', + unit='mass_percent', + source='registry', + ) + + +def test_calc_ptf_lal1979_group_i_lower_plastic_limit_from_sand_out(): + inputs, expected, out = prepare_vector_case( + CASES_CALC_PTF_LAL1979_GROUP_I_LOWER_PLASTIC_LIMIT_FROM_SAND + ) + result = calc_ptf_lal1979_group_i_lower_plastic_limit_from_sand(**inputs, out=out) + assert result is out + assert_close( + result[0], + expected['lower_plastic_limit'], + absolute=0.1, + relative=0.0, + quantity='gravimetric_water_content', + unit='mass_percent', + source='registry', + ) + + +CASES_CALC_PTF_LAL1979_GROUP_I_PLASTICITY_INDEX_FROM_SAND = [ + ({'sand': 66.0}, {'plasticity_index': 4.4}), +] +CASES_CALC_PTF_LAL1979_GROUP_I_PLASTICITY_INDEX_FROM_SAND_IDS = [ + 'published_predictor_mean', +] + + +@pytest.mark.parametrize( + ('inputs', 'expected'), + CASES_CALC_PTF_LAL1979_GROUP_I_PLASTICITY_INDEX_FROM_SAND, + ids=CASES_CALC_PTF_LAL1979_GROUP_I_PLASTICITY_INDEX_FROM_SAND_IDS, +) +def test_calc_ptf_lal1979_group_i_plasticity_index_from_sand_verification( + inputs: dict[str, float], expected: dict[str, float] +): + result = calc_ptf_lal1979_group_i_plasticity_index_from_sand(**inputs) + + assert_close( + result, + expected['plasticity_index'], + absolute=0.1, + relative=0.0, + quantity='gravimetric_water_content', + unit='mass_percent', + source='registry', + ) + + +def test_calc_ptf_lal1979_group_i_plasticity_index_from_sand_array(): + inputs, expected, _out = prepare_vector_case( + CASES_CALC_PTF_LAL1979_GROUP_I_PLASTICITY_INDEX_FROM_SAND + ) + result = calc_ptf_lal1979_group_i_plasticity_index_from_sand(**inputs, out=None) + assert_close( + result[0], + expected['plasticity_index'], + absolute=0.1, + relative=0.0, + quantity='gravimetric_water_content', + unit='mass_percent', + source='registry', + ) + + +def test_calc_ptf_lal1979_group_i_plasticity_index_from_sand_out(): + inputs, expected, out = prepare_vector_case( + CASES_CALC_PTF_LAL1979_GROUP_I_PLASTICITY_INDEX_FROM_SAND + ) + result = calc_ptf_lal1979_group_i_plasticity_index_from_sand(**inputs, out=out) + assert result is out + assert_close( + result[0], + expected['plasticity_index'], + absolute=0.1, + relative=0.0, + quantity='gravimetric_water_content', + unit='mass_percent', + source='registry', + ) + + +CASES_CALC_PTF_LAL1979_GROUP_II_UPPER_PLASTIC_LIMIT_FROM_ORGANIC_CARBON = [ + ({'organic_carbon': 0.42}, {'upper_plastic_limit': 30.9358}), +] +CASES_CALC_PTF_LAL1979_GROUP_II_UPPER_PLASTIC_LIMIT_FROM_ORGANIC_CARBON_IDS = [ + 'published_predictor_mean', +] + + +@pytest.mark.parametrize( + ('inputs', 'expected'), + CASES_CALC_PTF_LAL1979_GROUP_II_UPPER_PLASTIC_LIMIT_FROM_ORGANIC_CARBON, + ids=CASES_CALC_PTF_LAL1979_GROUP_II_UPPER_PLASTIC_LIMIT_FROM_ORGANIC_CARBON_IDS, +) +def test_calc_ptf_lal1979_group_ii_upper_plastic_limit_from_organic_carbon_verification( + inputs: dict[str, float], expected: dict[str, float] +): + result = calc_ptf_lal1979_group_ii_upper_plastic_limit_from_organic_carbon(**inputs) + + assert_close( + result, + expected['upper_plastic_limit'], + absolute=0.1, + relative=0.0, + quantity='gravimetric_water_content', + unit='mass_percent', + source='registry', + ) + + +def test_calc_ptf_lal1979_group_ii_upper_plastic_limit_from_organic_carbon_array(): + inputs, expected, _out = prepare_vector_case( + CASES_CALC_PTF_LAL1979_GROUP_II_UPPER_PLASTIC_LIMIT_FROM_ORGANIC_CARBON + ) + result = calc_ptf_lal1979_group_ii_upper_plastic_limit_from_organic_carbon(**inputs, out=None) + assert_close( + result[0], + expected['upper_plastic_limit'], + absolute=0.1, + relative=0.0, + quantity='gravimetric_water_content', + unit='mass_percent', + source='registry', + ) + + +def test_calc_ptf_lal1979_group_ii_upper_plastic_limit_from_organic_carbon_out(): + inputs, expected, out = prepare_vector_case( + CASES_CALC_PTF_LAL1979_GROUP_II_UPPER_PLASTIC_LIMIT_FROM_ORGANIC_CARBON + ) + result = calc_ptf_lal1979_group_ii_upper_plastic_limit_from_organic_carbon(**inputs, out=out) + assert result is out + assert_close( + result[0], + expected['upper_plastic_limit'], + absolute=0.1, + relative=0.0, + quantity='gravimetric_water_content', + unit='mass_percent', + source='registry', + ) + + +CASES_CALC_PTF_LAL1979_GROUP_II_PLASTICITY_INDEX_FROM_ORGANIC_CARBON = [ + ({'organic_carbon': 0.42}, {'plasticity_index': 11.3476}), +] +CASES_CALC_PTF_LAL1979_GROUP_II_PLASTICITY_INDEX_FROM_ORGANIC_CARBON_IDS = [ + 'published_predictor_mean', +] + + +@pytest.mark.parametrize( + ('inputs', 'expected'), + CASES_CALC_PTF_LAL1979_GROUP_II_PLASTICITY_INDEX_FROM_ORGANIC_CARBON, + ids=CASES_CALC_PTF_LAL1979_GROUP_II_PLASTICITY_INDEX_FROM_ORGANIC_CARBON_IDS, +) +def test_calc_ptf_lal1979_group_ii_plasticity_index_from_organic_carbon_verification( + inputs: dict[str, float], expected: dict[str, float] +): + result = calc_ptf_lal1979_group_ii_plasticity_index_from_organic_carbon(**inputs) + + assert_close( + result, + expected['plasticity_index'], + absolute=0.1, + relative=0.0, + quantity='gravimetric_water_content', + unit='mass_percent', + source='registry', + ) + + +def test_calc_ptf_lal1979_group_ii_plasticity_index_from_organic_carbon_array(): + inputs, expected, _out = prepare_vector_case( + CASES_CALC_PTF_LAL1979_GROUP_II_PLASTICITY_INDEX_FROM_ORGANIC_CARBON + ) + result = calc_ptf_lal1979_group_ii_plasticity_index_from_organic_carbon(**inputs, out=None) + assert_close( + result[0], + expected['plasticity_index'], + absolute=0.1, + relative=0.0, + quantity='gravimetric_water_content', + unit='mass_percent', + source='registry', + ) + + +def test_calc_ptf_lal1979_group_ii_plasticity_index_from_organic_carbon_out(): + inputs, expected, out = prepare_vector_case( + CASES_CALC_PTF_LAL1979_GROUP_II_PLASTICITY_INDEX_FROM_ORGANIC_CARBON + ) + result = calc_ptf_lal1979_group_ii_plasticity_index_from_organic_carbon(**inputs, out=out) + assert result is out + assert_close( + result[0], + expected['plasticity_index'], + absolute=0.1, + relative=0.0, + quantity='gravimetric_water_content', + unit='mass_percent', + source='registry', + ) + + +CASES_CALC_PTF_LAL1979_GROUP_II_UPPER_PLASTIC_LIMIT_FROM_CLAY = [ + ({'clay': 38.0}, {'upper_plastic_limit': 30.67}), +] +CASES_CALC_PTF_LAL1979_GROUP_II_UPPER_PLASTIC_LIMIT_FROM_CLAY_IDS = [ + 'published_predictor_mean', +] + + +@pytest.mark.parametrize( + ('inputs', 'expected'), + CASES_CALC_PTF_LAL1979_GROUP_II_UPPER_PLASTIC_LIMIT_FROM_CLAY, + ids=CASES_CALC_PTF_LAL1979_GROUP_II_UPPER_PLASTIC_LIMIT_FROM_CLAY_IDS, +) +def test_calc_ptf_lal1979_group_ii_upper_plastic_limit_from_clay_verification( + inputs: dict[str, float], expected: dict[str, float] +): + result = calc_ptf_lal1979_group_ii_upper_plastic_limit_from_clay(**inputs) + + assert_close( + result, + expected['upper_plastic_limit'], + absolute=0.1, + relative=0.0, + quantity='gravimetric_water_content', + unit='mass_percent', + source='registry', + ) + + +def test_calc_ptf_lal1979_group_ii_upper_plastic_limit_from_clay_array(): + inputs, expected, _out = prepare_vector_case( + CASES_CALC_PTF_LAL1979_GROUP_II_UPPER_PLASTIC_LIMIT_FROM_CLAY + ) + result = calc_ptf_lal1979_group_ii_upper_plastic_limit_from_clay(**inputs, out=None) + assert_close( + result[0], + expected['upper_plastic_limit'], + absolute=0.1, + relative=0.0, + quantity='gravimetric_water_content', + unit='mass_percent', + source='registry', + ) + + +def test_calc_ptf_lal1979_group_ii_upper_plastic_limit_from_clay_out(): + inputs, expected, out = prepare_vector_case( + CASES_CALC_PTF_LAL1979_GROUP_II_UPPER_PLASTIC_LIMIT_FROM_CLAY + ) + result = calc_ptf_lal1979_group_ii_upper_plastic_limit_from_clay(**inputs, out=out) + assert result is out + assert_close( + result[0], + expected['upper_plastic_limit'], + absolute=0.1, + relative=0.0, + quantity='gravimetric_water_content', + unit='mass_percent', + source='registry', + ) + + +CASES_CALC_PTF_LAL1979_GROUP_II_LOWER_PLASTIC_LIMIT_FROM_CLAY = [ + ({'clay': 38.0}, {'lower_plastic_limit': 19.96}), +] +CASES_CALC_PTF_LAL1979_GROUP_II_LOWER_PLASTIC_LIMIT_FROM_CLAY_IDS = [ + 'published_predictor_mean', +] + + +@pytest.mark.parametrize( + ('inputs', 'expected'), + CASES_CALC_PTF_LAL1979_GROUP_II_LOWER_PLASTIC_LIMIT_FROM_CLAY, + ids=CASES_CALC_PTF_LAL1979_GROUP_II_LOWER_PLASTIC_LIMIT_FROM_CLAY_IDS, +) +def test_calc_ptf_lal1979_group_ii_lower_plastic_limit_from_clay_verification( + inputs: dict[str, float], expected: dict[str, float] +): + result = calc_ptf_lal1979_group_ii_lower_plastic_limit_from_clay(**inputs) + + assert_close( + result, + expected['lower_plastic_limit'], + absolute=0.1, + relative=0.0, + quantity='gravimetric_water_content', + unit='mass_percent', + source='registry', + ) + + +def test_calc_ptf_lal1979_group_ii_lower_plastic_limit_from_clay_array(): + inputs, expected, _out = prepare_vector_case( + CASES_CALC_PTF_LAL1979_GROUP_II_LOWER_PLASTIC_LIMIT_FROM_CLAY + ) + result = calc_ptf_lal1979_group_ii_lower_plastic_limit_from_clay(**inputs, out=None) + assert_close( + result[0], + expected['lower_plastic_limit'], + absolute=0.1, + relative=0.0, + quantity='gravimetric_water_content', + unit='mass_percent', + source='registry', + ) + + +def test_calc_ptf_lal1979_group_ii_lower_plastic_limit_from_clay_out(): + inputs, expected, out = prepare_vector_case( + CASES_CALC_PTF_LAL1979_GROUP_II_LOWER_PLASTIC_LIMIT_FROM_CLAY + ) + result = calc_ptf_lal1979_group_ii_lower_plastic_limit_from_clay(**inputs, out=out) + assert result is out + assert_close( + result[0], + expected['lower_plastic_limit'], + absolute=0.1, + relative=0.0, + quantity='gravimetric_water_content', + unit='mass_percent', + source='registry', + ) + + +CASES_CALC_PTF_LAL1979_GROUP_II_UPPER_PLASTIC_LIMIT_FROM_SAND = [ + ({'sand': 57.0}, {'upper_plastic_limit': 30.72}), +] +CASES_CALC_PTF_LAL1979_GROUP_II_UPPER_PLASTIC_LIMIT_FROM_SAND_IDS = [ + 'published_predictor_mean', +] + + +@pytest.mark.parametrize( + ('inputs', 'expected'), + CASES_CALC_PTF_LAL1979_GROUP_II_UPPER_PLASTIC_LIMIT_FROM_SAND, + ids=CASES_CALC_PTF_LAL1979_GROUP_II_UPPER_PLASTIC_LIMIT_FROM_SAND_IDS, +) +def test_calc_ptf_lal1979_group_ii_upper_plastic_limit_from_sand_verification( + inputs: dict[str, float], expected: dict[str, float] +): + result = calc_ptf_lal1979_group_ii_upper_plastic_limit_from_sand(**inputs) + + assert_close( + result, + expected['upper_plastic_limit'], + absolute=0.1, + relative=0.0, + quantity='gravimetric_water_content', + unit='mass_percent', + source='registry', + ) + + +def test_calc_ptf_lal1979_group_ii_upper_plastic_limit_from_sand_array(): + inputs, expected, _out = prepare_vector_case( + CASES_CALC_PTF_LAL1979_GROUP_II_UPPER_PLASTIC_LIMIT_FROM_SAND + ) + result = calc_ptf_lal1979_group_ii_upper_plastic_limit_from_sand(**inputs, out=None) + assert_close( + result[0], + expected['upper_plastic_limit'], + absolute=0.1, + relative=0.0, + quantity='gravimetric_water_content', + unit='mass_percent', + source='registry', + ) + + +def test_calc_ptf_lal1979_group_ii_upper_plastic_limit_from_sand_out(): + inputs, expected, out = prepare_vector_case( + CASES_CALC_PTF_LAL1979_GROUP_II_UPPER_PLASTIC_LIMIT_FROM_SAND + ) + result = calc_ptf_lal1979_group_ii_upper_plastic_limit_from_sand(**inputs, out=out) + assert result is out + assert_close( + result[0], + expected['upper_plastic_limit'], + absolute=0.1, + relative=0.0, + quantity='gravimetric_water_content', + unit='mass_percent', + source='registry', + ) + + +CASES_CALC_PTF_LAL1979_GROUP_II_LOWER_PLASTIC_LIMIT_FROM_SAND = [ + ({'sand': 57.0}, {'lower_plastic_limit': 20.19}), +] +CASES_CALC_PTF_LAL1979_GROUP_II_LOWER_PLASTIC_LIMIT_FROM_SAND_IDS = [ + 'published_predictor_mean', +] + + +@pytest.mark.parametrize( + ('inputs', 'expected'), + CASES_CALC_PTF_LAL1979_GROUP_II_LOWER_PLASTIC_LIMIT_FROM_SAND, + ids=CASES_CALC_PTF_LAL1979_GROUP_II_LOWER_PLASTIC_LIMIT_FROM_SAND_IDS, +) +def test_calc_ptf_lal1979_group_ii_lower_plastic_limit_from_sand_verification( + inputs: dict[str, float], expected: dict[str, float] +): + result = calc_ptf_lal1979_group_ii_lower_plastic_limit_from_sand(**inputs) + + assert_close( + result, + expected['lower_plastic_limit'], + absolute=0.1, + relative=0.0, + quantity='gravimetric_water_content', + unit='mass_percent', + source='registry', + ) + + +def test_calc_ptf_lal1979_group_ii_lower_plastic_limit_from_sand_array(): + inputs, expected, _out = prepare_vector_case( + CASES_CALC_PTF_LAL1979_GROUP_II_LOWER_PLASTIC_LIMIT_FROM_SAND + ) + result = calc_ptf_lal1979_group_ii_lower_plastic_limit_from_sand(**inputs, out=None) + assert_close( + result[0], + expected['lower_plastic_limit'], + absolute=0.1, + relative=0.0, + quantity='gravimetric_water_content', + unit='mass_percent', + source='registry', + ) + + +def test_calc_ptf_lal1979_group_ii_lower_plastic_limit_from_sand_out(): + inputs, expected, out = prepare_vector_case( + CASES_CALC_PTF_LAL1979_GROUP_II_LOWER_PLASTIC_LIMIT_FROM_SAND + ) + result = calc_ptf_lal1979_group_ii_lower_plastic_limit_from_sand(**inputs, out=out) + assert result is out + assert_close( + result[0], + expected['lower_plastic_limit'], + absolute=0.1, + relative=0.0, + quantity='gravimetric_water_content', + unit='mass_percent', + source='registry', + ) + + +CASES_CALC_PTF_LAL1979_GROUP_II_UPPER_PLASTIC_LIMIT_FROM_SILT = [ + ({'silt': 5.0}, {'upper_plastic_limit': 29.99}), +] +CASES_CALC_PTF_LAL1979_GROUP_II_UPPER_PLASTIC_LIMIT_FROM_SILT_IDS = [ + 'published_predictor_mean', +] + + +@pytest.mark.parametrize( + ('inputs', 'expected'), + CASES_CALC_PTF_LAL1979_GROUP_II_UPPER_PLASTIC_LIMIT_FROM_SILT, + ids=CASES_CALC_PTF_LAL1979_GROUP_II_UPPER_PLASTIC_LIMIT_FROM_SILT_IDS, +) +def test_calc_ptf_lal1979_group_ii_upper_plastic_limit_from_silt_verification( + inputs: dict[str, float], expected: dict[str, float] +): + result = calc_ptf_lal1979_group_ii_upper_plastic_limit_from_silt(**inputs) + + assert_close( + result, + expected['upper_plastic_limit'], + absolute=0.1, + relative=0.0, + quantity='gravimetric_water_content', + unit='mass_percent', + source='registry', + ) + + +def test_calc_ptf_lal1979_group_ii_upper_plastic_limit_from_silt_array(): + inputs, expected, _out = prepare_vector_case( + CASES_CALC_PTF_LAL1979_GROUP_II_UPPER_PLASTIC_LIMIT_FROM_SILT + ) + result = calc_ptf_lal1979_group_ii_upper_plastic_limit_from_silt(**inputs, out=None) + assert_close( + result[0], + expected['upper_plastic_limit'], + absolute=0.1, + relative=0.0, + quantity='gravimetric_water_content', + unit='mass_percent', + source='registry', + ) + + +def test_calc_ptf_lal1979_group_ii_upper_plastic_limit_from_silt_out(): + inputs, expected, out = prepare_vector_case( + CASES_CALC_PTF_LAL1979_GROUP_II_UPPER_PLASTIC_LIMIT_FROM_SILT + ) + result = calc_ptf_lal1979_group_ii_upper_plastic_limit_from_silt(**inputs, out=out) + assert result is out + assert_close( + result[0], + expected['upper_plastic_limit'], + absolute=0.1, + relative=0.0, + quantity='gravimetric_water_content', + unit='mass_percent', + source='registry', + ) + + +CASES_CALC_PTF_LAL1979_GROUP_II_LOWER_PLASTIC_LIMIT_FROM_SILT = [ + ({'silt': 5.0}, {'lower_plastic_limit': 19.51}), +] +CASES_CALC_PTF_LAL1979_GROUP_II_LOWER_PLASTIC_LIMIT_FROM_SILT_IDS = [ + 'published_predictor_mean', +] + + +@pytest.mark.parametrize( + ('inputs', 'expected'), + CASES_CALC_PTF_LAL1979_GROUP_II_LOWER_PLASTIC_LIMIT_FROM_SILT, + ids=CASES_CALC_PTF_LAL1979_GROUP_II_LOWER_PLASTIC_LIMIT_FROM_SILT_IDS, +) +def test_calc_ptf_lal1979_group_ii_lower_plastic_limit_from_silt_verification( + inputs: dict[str, float], expected: dict[str, float] +): + result = calc_ptf_lal1979_group_ii_lower_plastic_limit_from_silt(**inputs) + + assert_close( + result, + expected['lower_plastic_limit'], + absolute=0.1, + relative=0.0, + quantity='gravimetric_water_content', + unit='mass_percent', + source='registry', + ) + + +def test_calc_ptf_lal1979_group_ii_lower_plastic_limit_from_silt_array(): + inputs, expected, _out = prepare_vector_case( + CASES_CALC_PTF_LAL1979_GROUP_II_LOWER_PLASTIC_LIMIT_FROM_SILT + ) + result = calc_ptf_lal1979_group_ii_lower_plastic_limit_from_silt(**inputs, out=None) + assert_close( + result[0], + expected['lower_plastic_limit'], + absolute=0.1, + relative=0.0, + quantity='gravimetric_water_content', + unit='mass_percent', + source='registry', + ) + + +def test_calc_ptf_lal1979_group_ii_lower_plastic_limit_from_silt_out(): + inputs, expected, out = prepare_vector_case( + CASES_CALC_PTF_LAL1979_GROUP_II_LOWER_PLASTIC_LIMIT_FROM_SILT + ) + result = calc_ptf_lal1979_group_ii_lower_plastic_limit_from_silt(**inputs, out=out) + assert result is out + assert_close( + result[0], + expected['lower_plastic_limit'], + absolute=0.1, + relative=0.0, + quantity='gravimetric_water_content', + unit='mass_percent', + source='registry', + ) + + +CASES_CALC_PTF_LAL1979_GROUP_II_PLASTICITY_INDEX_FROM_SILT = [ + ({'silt': 5.0}, {'plasticity_index': 10.48}), +] +CASES_CALC_PTF_LAL1979_GROUP_II_PLASTICITY_INDEX_FROM_SILT_IDS = [ + 'published_predictor_mean', +] + + +@pytest.mark.parametrize( + ('inputs', 'expected'), + CASES_CALC_PTF_LAL1979_GROUP_II_PLASTICITY_INDEX_FROM_SILT, + ids=CASES_CALC_PTF_LAL1979_GROUP_II_PLASTICITY_INDEX_FROM_SILT_IDS, +) +def test_calc_ptf_lal1979_group_ii_plasticity_index_from_silt_verification( + inputs: dict[str, float], expected: dict[str, float] +): + result = calc_ptf_lal1979_group_ii_plasticity_index_from_silt(**inputs) + + assert_close( + result, + expected['plasticity_index'], + absolute=0.1, + relative=0.0, + quantity='gravimetric_water_content', + unit='mass_percent', + source='registry', + ) + + +def test_calc_ptf_lal1979_group_ii_plasticity_index_from_silt_array(): + inputs, expected, _out = prepare_vector_case( + CASES_CALC_PTF_LAL1979_GROUP_II_PLASTICITY_INDEX_FROM_SILT + ) + result = calc_ptf_lal1979_group_ii_plasticity_index_from_silt(**inputs, out=None) + assert_close( + result[0], + expected['plasticity_index'], + absolute=0.1, + relative=0.0, + quantity='gravimetric_water_content', + unit='mass_percent', + source='registry', + ) + + +def test_calc_ptf_lal1979_group_ii_plasticity_index_from_silt_out(): + inputs, expected, out = prepare_vector_case( + CASES_CALC_PTF_LAL1979_GROUP_II_PLASTICITY_INDEX_FROM_SILT + ) + result = calc_ptf_lal1979_group_ii_plasticity_index_from_silt(**inputs, out=out) + assert result is out + assert_close( + result[0], + expected['plasticity_index'], + absolute=0.1, + relative=0.0, + quantity='gravimetric_water_content', + unit='mass_percent', + source='registry', + ) diff --git a/targets/ptfkit-rs/src/lal1979.rs b/targets/ptfkit-rs/src/lal1979.rs new file mode 100644 index 0000000..9c9eb54 --- /dev/null +++ b/targets/ptfkit-rs/src/lal1979.rs @@ -0,0 +1,1814 @@ +// @generated by ptfkit-codegen; DO NOT EDIT. + +#![doc = r"Moisture retention and plasticity regressions for two groups of Nigerian soils. + +# Reference + +Lal, R. (1979). Physical properties and moisture retention characteristics of some Nigerian +soils. Geoderma, 21, 209-223. +DOI: 10.1016/0016-7061(78)90028-9 (https://doi.org/10.1016/0016-7061(78)90028-9) + +# Territory + +Nigeria + +# Dataset + +119 genetic-horizon samples from 23 profiles in two parent-material groups."] + +#[doc = r"Estimate gravimetric moisture retention at saturation for Group I. + +# Arguments + + * clay: Clay smaller than 0.002 mm; percentage of the fine earth. Full calibration bounds are + not reported. (%) + +# Returns + + * water_0bar: Gravimetric moisture retention at saturation expressed per unit dry soil mass. + (g g⁻¹) + +# Territory + +Group I: 11 well-drained upland profiles in western Nigeria developed over pre-Cambrian basement +complex rocks, mainly biotite-muscovite paragneisses. + +# Notes + +Prediction target: Gravimetric moisture retention at saturation +Table IV, Group I, clay predictor, water_0bar response."] +#[cfg_attr(feature = "inline", inline)] +#[must_use] +pub fn calc_ptf_lal1979_group_i_water_0bar_from_clay(clay: f64) -> f64 { + 0.004f64 * clay + 0.289f64 +} +#[cfg(test)] +mod calc_ptf_lal1979_group_i_water_0bar_from_clay_tests { + use super::*; + use crate::test_support::assert_close; + #[test] + fn published_predictor_mean() { + let result = calc_ptf_lal1979_group_i_water_0bar_from_clay(19f64); + assert_close( + result, + 0.365f64, + 0.001f64, + 0f64, + "gravimetric_water_content", + "mass_fraction", + "registry", + ); + } +} +#[doc = r"Estimate gravimetric moisture retention at saturation for Group I. + +# Arguments + + * sand: Sand from 0.02 to 2 mm; percentage of the fine earth. Full calibration bounds are not + reported. (%) + +# Returns + + * water_0bar: Gravimetric moisture retention at saturation expressed per unit dry soil mass. + (g g⁻¹) + +# Territory + +Group I: 11 well-drained upland profiles in western Nigeria developed over pre-Cambrian basement +complex rocks, mainly biotite-muscovite paragneisses. + +# Notes + +Prediction target: Gravimetric moisture retention at saturation +Table IV, Group I, sand predictor, water_0bar response."] +#[cfg_attr(feature = "inline", inline)] +#[must_use] +pub fn calc_ptf_lal1979_group_i_water_0bar_from_sand(sand: f64) -> f64 { + -0.003f64 * sand + 0.579f64 +} +#[cfg(test)] +mod calc_ptf_lal1979_group_i_water_0bar_from_sand_tests { + use super::*; + use crate::test_support::assert_close; + #[test] + fn published_predictor_mean() { + let result = calc_ptf_lal1979_group_i_water_0bar_from_sand(66f64); + assert_close( + result, + 0.381f64, + 0.001f64, + 0f64, + "gravimetric_water_content", + "mass_fraction", + "registry", + ); + } +} +#[doc = r"Estimate gravimetric moisture retention at saturation for Group II. + +# Arguments + + * clay: Clay smaller than 0.002 mm; percentage of the fine earth. Full calibration bounds are + not reported. (%) + +# Returns + + * water_0bar: Gravimetric moisture retention at saturation expressed per unit dry soil mass. + (g g⁻¹) + +# Territory + +Group II: 12 profiles in Nigeria developed from arenaceous sedimentary rocks, partly Cretaceous +and partly Lower Pleistocene. + +# Notes + +Prediction target: Gravimetric moisture retention at saturation +Table IV, Group II, clay predictor, water_0bar response."] +#[cfg_attr(feature = "inline", inline)] +#[must_use] +pub fn calc_ptf_lal1979_group_ii_water_0bar_from_clay(clay: f64) -> f64 { + 0.004f64 * clay + 0.296f64 +} +#[cfg(test)] +mod calc_ptf_lal1979_group_ii_water_0bar_from_clay_tests { + use super::*; + use crate::test_support::assert_close; + #[test] + fn published_predictor_mean() { + let result = calc_ptf_lal1979_group_ii_water_0bar_from_clay(38f64); + assert_close( + result, + 0.448f64, + 0.001f64, + 0f64, + "gravimetric_water_content", + "mass_fraction", + "registry", + ); + } +} +#[doc = r"Estimate gravimetric moisture retention at saturation for Group II. + +# Arguments + + * sand: Sand from 0.02 to 2 mm; percentage of the fine earth. Full calibration bounds are not + reported. (%) + +# Returns + + * water_0bar: Gravimetric moisture retention at saturation expressed per unit dry soil mass. + (g g⁻¹) + +# Territory + +Group II: 12 profiles in Nigeria developed from arenaceous sedimentary rocks, partly Cretaceous +and partly Lower Pleistocene. + +# Notes + +Prediction target: Gravimetric moisture retention at saturation +Table IV, Group II, sand predictor, water_0bar response."] +#[cfg_attr(feature = "inline", inline)] +#[must_use] +pub fn calc_ptf_lal1979_group_ii_water_0bar_from_sand(sand: f64) -> f64 { + -0.004f64 * sand + 0.645f64 +} +#[cfg(test)] +mod calc_ptf_lal1979_group_ii_water_0bar_from_sand_tests { + use super::*; + use crate::test_support::assert_close; + #[test] + fn published_predictor_mean() { + let result = calc_ptf_lal1979_group_ii_water_0bar_from_sand(57f64); + assert_close( + result, + 0.417f64, + 0.001f64, + 0f64, + "gravimetric_water_content", + "mass_fraction", + "registry", + ); + } +} +#[doc = r"Estimate gravimetric moisture retention at 0.1 bar suction for Group I. + +# Arguments + + * clay: Clay smaller than 0.002 mm; percentage of the fine earth. Full calibration bounds are + not reported. (%) + +# Returns + + * water_01bar: Gravimetric moisture retention at 0.1 bar suction expressed per unit dry soil + mass. (g g⁻¹) + +# Territory + +Group I: 11 well-drained upland profiles in western Nigeria developed over pre-Cambrian basement +complex rocks, mainly biotite-muscovite paragneisses. + +# Notes + +Prediction target: Gravimetric moisture retention at 0.1 bar suction +Table V, Group I, clay predictor, water_01bar response."] +#[cfg_attr(feature = "inline", inline)] +#[must_use] +pub fn calc_ptf_lal1979_group_i_water_01bar_from_clay(clay: f64) -> f64 { + 0.003f64 * clay + 0.102f64 +} +#[cfg(test)] +mod calc_ptf_lal1979_group_i_water_01bar_from_clay_tests { + use super::*; + use crate::test_support::assert_close; + #[test] + fn published_predictor_mean() { + let result = calc_ptf_lal1979_group_i_water_01bar_from_clay(19f64); + assert_close( + result, + 0.159f64, + 0.001f64, + 0f64, + "gravimetric_water_content", + "mass_fraction", + "registry", + ); + } +} +#[doc = r"Estimate gravimetric moisture retention at 0.3 bar suction for Group I. + +# Arguments + + * clay: Clay smaller than 0.002 mm; percentage of the fine earth. Full calibration bounds are + not reported. (%) + +# Returns + + * water_03bar: Gravimetric moisture retention at 0.3 bar suction expressed per unit dry soil + mass. (g g⁻¹) + +# Territory + +Group I: 11 well-drained upland profiles in western Nigeria developed over pre-Cambrian basement +complex rocks, mainly biotite-muscovite paragneisses. + +# Notes + +Prediction target: Gravimetric moisture retention at 0.3 bar suction +Table V, Group I, clay predictor, water_03bar response."] +#[cfg_attr(feature = "inline", inline)] +#[must_use] +pub fn calc_ptf_lal1979_group_i_water_03bar_from_clay(clay: f64) -> f64 { + 0.004f64 * clay + 0.065f64 +} +#[cfg(test)] +mod calc_ptf_lal1979_group_i_water_03bar_from_clay_tests { + use super::*; + use crate::test_support::assert_close; + #[test] + fn published_predictor_mean() { + let result = calc_ptf_lal1979_group_i_water_03bar_from_clay(19f64); + assert_close( + result, + 0.141f64, + 0.001f64, + 0f64, + "gravimetric_water_content", + "mass_fraction", + "registry", + ); + } +} +#[doc = r"Estimate gravimetric moisture retention at 0.1 bar suction for Group I. + +# Arguments + + * sand: Sand from 0.02 to 2 mm; percentage of the fine earth. Full calibration bounds are not + reported. (%) + +# Returns + + * water_01bar: Gravimetric moisture retention at 0.1 bar suction expressed per unit dry soil + mass. (g g⁻¹) + +# Territory + +Group I: 11 well-drained upland profiles in western Nigeria developed over pre-Cambrian basement +complex rocks, mainly biotite-muscovite paragneisses. + +# Notes + +Prediction target: Gravimetric moisture retention at 0.1 bar suction +Table V, Group I, sand predictor, water_01bar response."] +#[cfg_attr(feature = "inline", inline)] +#[must_use] +pub fn calc_ptf_lal1979_group_i_water_01bar_from_sand(sand: f64) -> f64 { + -0.003f64 * sand + 0.364f64 +} +#[cfg(test)] +mod calc_ptf_lal1979_group_i_water_01bar_from_sand_tests { + use super::*; + use crate::test_support::assert_close; + #[test] + fn published_predictor_mean() { + let result = calc_ptf_lal1979_group_i_water_01bar_from_sand(66f64); + assert_close( + result, + 0.166f64, + 0.001f64, + 0f64, + "gravimetric_water_content", + "mass_fraction", + "registry", + ); + } +} +#[doc = r"Estimate gravimetric moisture retention at 0.3 bar suction for Group I. + +# Arguments + + * sand: Sand from 0.02 to 2 mm; percentage of the fine earth. Full calibration bounds are not + reported. (%) + +# Returns + + * water_03bar: Gravimetric moisture retention at 0.3 bar suction expressed per unit dry soil + mass. (g g⁻¹) + +# Territory + +Group I: 11 well-drained upland profiles in western Nigeria developed over pre-Cambrian basement +complex rocks, mainly biotite-muscovite paragneisses. + +# Notes + +Prediction target: Gravimetric moisture retention at 0.3 bar suction +Table V, Group I, sand predictor, water_03bar response."] +#[cfg_attr(feature = "inline", inline)] +#[must_use] +pub fn calc_ptf_lal1979_group_i_water_03bar_from_sand(sand: f64) -> f64 { + -0.003f64 * sand + 0.334f64 +} +#[cfg(test)] +mod calc_ptf_lal1979_group_i_water_03bar_from_sand_tests { + use super::*; + use crate::test_support::assert_close; + #[test] + fn published_predictor_mean() { + let result = calc_ptf_lal1979_group_i_water_03bar_from_sand(66f64); + assert_close( + result, + 0.136f64, + 0.001f64, + 0f64, + "gravimetric_water_content", + "mass_fraction", + "registry", + ); + } +} +#[doc = r"Estimate gravimetric moisture retention at 0.1 bar suction for Group II. + +# Arguments + + * clay: Clay smaller than 0.002 mm; percentage of the fine earth. Full calibration bounds are + not reported. (%) + +# Returns + + * water_01bar: Gravimetric moisture retention at 0.1 bar suction expressed per unit dry soil + mass. (g g⁻¹) + +# Territory + +Group II: 12 profiles in Nigeria developed from arenaceous sedimentary rocks, partly Cretaceous +and partly Lower Pleistocene. + +# Notes + +Prediction target: Gravimetric moisture retention at 0.1 bar suction +Table V, Group II, clay predictor, water_01bar response."] +#[cfg_attr(feature = "inline", inline)] +#[must_use] +pub fn calc_ptf_lal1979_group_ii_water_01bar_from_clay(clay: f64) -> f64 { + 0.003f64 * clay + 0.080f64 +} +#[cfg(test)] +mod calc_ptf_lal1979_group_ii_water_01bar_from_clay_tests { + use super::*; + use crate::test_support::assert_close; + #[test] + fn published_predictor_mean() { + let result = calc_ptf_lal1979_group_ii_water_01bar_from_clay(38f64); + assert_close( + result, + 0.194f64, + 0.001f64, + 0f64, + "gravimetric_water_content", + "mass_fraction", + "registry", + ); + } +} +#[doc = r"Estimate gravimetric moisture retention at 0.3 bar suction for Group II. + +# Arguments + + * clay: Clay smaller than 0.002 mm; percentage of the fine earth. Full calibration bounds are + not reported. (%) + +# Returns + + * water_03bar: Gravimetric moisture retention at 0.3 bar suction expressed per unit dry soil + mass. (g g⁻¹) + +# Territory + +Group II: 12 profiles in Nigeria developed from arenaceous sedimentary rocks, partly Cretaceous +and partly Lower Pleistocene. + +# Notes + +Prediction target: Gravimetric moisture retention at 0.3 bar suction +Table V, Group II, clay predictor, water_03bar response."] +#[cfg_attr(feature = "inline", inline)] +#[must_use] +pub fn calc_ptf_lal1979_group_ii_water_03bar_from_clay(clay: f64) -> f64 { + 0.003f64 * clay + 0.047f64 +} +#[cfg(test)] +mod calc_ptf_lal1979_group_ii_water_03bar_from_clay_tests { + use super::*; + use crate::test_support::assert_close; + #[test] + fn published_predictor_mean() { + let result = calc_ptf_lal1979_group_ii_water_03bar_from_clay(38f64); + assert_close( + result, + 0.161f64, + 0.001f64, + 0f64, + "gravimetric_water_content", + "mass_fraction", + "registry", + ); + } +} +#[doc = r"Estimate gravimetric moisture retention at 0.1 bar suction for Group II. + +# Arguments + + * sand: Sand from 0.02 to 2 mm; percentage of the fine earth. Full calibration bounds are not + reported. (%) + +# Returns + + * water_01bar: Gravimetric moisture retention at 0.1 bar suction expressed per unit dry soil + mass. (g g⁻¹) + +# Territory + +Group II: 12 profiles in Nigeria developed from arenaceous sedimentary rocks, partly Cretaceous +and partly Lower Pleistocene. + +# Notes + +Prediction target: Gravimetric moisture retention at 0.1 bar suction +Table V, Group II, sand predictor, water_01bar response."] +#[cfg_attr(feature = "inline", inline)] +#[must_use] +pub fn calc_ptf_lal1979_group_ii_water_01bar_from_sand(sand: f64) -> f64 { + -0.0035f64 * sand + 0.406f64 +} +#[cfg(test)] +mod calc_ptf_lal1979_group_ii_water_01bar_from_sand_tests { + use super::*; + use crate::test_support::assert_close; + #[test] + fn published_predictor_mean() { + let result = calc_ptf_lal1979_group_ii_water_01bar_from_sand(57f64); + assert_close( + result, + 0.2065f64, + 0.001f64, + 0f64, + "gravimetric_water_content", + "mass_fraction", + "registry", + ); + } +} +#[doc = r"Estimate gravimetric moisture retention at 0.3 bar suction for Group II. + +# Arguments + + * sand: Sand from 0.02 to 2 mm; percentage of the fine earth. Full calibration bounds are not + reported. (%) + +# Returns + + * water_03bar: Gravimetric moisture retention at 0.3 bar suction expressed per unit dry soil + mass. (g g⁻¹) + +# Territory + +Group II: 12 profiles in Nigeria developed from arenaceous sedimentary rocks, partly Cretaceous +and partly Lower Pleistocene. + +# Notes + +Prediction target: Gravimetric moisture retention at 0.3 bar suction +Table V, Group II, sand predictor, water_03bar response."] +#[cfg_attr(feature = "inline", inline)] +#[must_use] +pub fn calc_ptf_lal1979_group_ii_water_03bar_from_sand(sand: f64) -> f64 { + -0.003f64 * sand + 0.349f64 +} +#[cfg(test)] +mod calc_ptf_lal1979_group_ii_water_03bar_from_sand_tests { + use super::*; + use crate::test_support::assert_close; + #[test] + fn published_predictor_mean() { + let result = calc_ptf_lal1979_group_ii_water_03bar_from_sand(57f64); + assert_close( + result, + 0.178f64, + 0.001f64, + 0f64, + "gravimetric_water_content", + "mass_fraction", + "registry", + ); + } +} +#[doc = r"Estimate gravimetric moisture retention at 15 bar suction for Group I. + +# Arguments + + * clay: Clay smaller than 0.002 mm; percentage of the fine earth. Full calibration bounds are + not reported. (%) + +# Returns + + * water_15bar: Gravimetric moisture retention at 15 bar suction expressed per unit dry soil + mass. (g g⁻¹) + +# Territory + +Group I: 11 well-drained upland profiles in western Nigeria developed over pre-Cambrian basement +complex rocks, mainly biotite-muscovite paragneisses. + +# Notes + +Prediction target: Gravimetric moisture retention at 15 bar suction +Table VI, Group I, clay predictor, water_15bar response."] +#[cfg_attr(feature = "inline", inline)] +#[must_use] +pub fn calc_ptf_lal1979_group_i_water_15bar_from_clay(clay: f64) -> f64 { + 0.003f64 * clay + 0.006f64 +} +#[cfg(test)] +mod calc_ptf_lal1979_group_i_water_15bar_from_clay_tests { + use super::*; + use crate::test_support::assert_close; + #[test] + fn published_predictor_mean() { + let result = calc_ptf_lal1979_group_i_water_15bar_from_clay(19f64); + assert_close( + result, + 0.063f64, + 0.001f64, + 0f64, + "gravimetric_water_content", + "mass_fraction", + "registry", + ); + } +} +#[doc = r"Estimate gravimetric moisture retention at 15 bar suction for Group I. + +# Arguments + + * sand: Sand from 0.02 to 2 mm; percentage of the fine earth. Full calibration bounds are not + reported. (%) + +# Returns + + * water_15bar: Gravimetric moisture retention at 15 bar suction expressed per unit dry soil + mass. (g g⁻¹) + +# Territory + +Group I: 11 well-drained upland profiles in western Nigeria developed over pre-Cambrian basement +complex rocks, mainly biotite-muscovite paragneisses. + +# Notes + +Prediction target: Gravimetric moisture retention at 15 bar suction +Table VI, Group I, sand predictor, water_15bar response."] +#[cfg_attr(feature = "inline", inline)] +#[must_use] +pub fn calc_ptf_lal1979_group_i_water_15bar_from_sand(sand: f64) -> f64 { + -0.003f64 * sand + 0.247f64 +} +#[cfg(test)] +mod calc_ptf_lal1979_group_i_water_15bar_from_sand_tests { + use super::*; + use crate::test_support::assert_close; + #[test] + fn published_predictor_mean() { + let result = calc_ptf_lal1979_group_i_water_15bar_from_sand(66f64); + assert_close( + result, + 0.049f64, + 0.001f64, + 0f64, + "gravimetric_water_content", + "mass_fraction", + "registry", + ); + } +} +#[doc = r"Estimate gravimetric moisture retention at 15 bar suction for Group I. + +# Arguments + + * silt: Silt from 0.002 to 0.02 mm; percentage of the fine earth. Full calibration bounds are + not reported. (%) + +# Returns + + * water_15bar: Gravimetric moisture retention at 15 bar suction expressed per unit dry soil + mass. (g g⁻¹) + +# Territory + +Group I: 11 well-drained upland profiles in western Nigeria developed over pre-Cambrian basement +complex rocks, mainly biotite-muscovite paragneisses. + +# Notes + +Prediction target: Gravimetric moisture retention at 15 bar suction +Table VI, Group I, silt predictor, water_15bar response."] +#[cfg_attr(feature = "inline", inline)] +#[must_use] +pub fn calc_ptf_lal1979_group_i_water_15bar_from_silt(silt: f64) -> f64 { + 0.005f64 * silt + 0.053f64 +} +#[cfg(test)] +mod calc_ptf_lal1979_group_i_water_15bar_from_silt_tests { + use super::*; + use crate::test_support::assert_close; + #[test] + fn published_predictor_mean() { + let result = calc_ptf_lal1979_group_i_water_15bar_from_silt(15f64); + assert_close( + result, + 0.128f64, + 0.001f64, + 0f64, + "gravimetric_water_content", + "mass_fraction", + "registry", + ); + } +} +#[doc = r"Estimate gravimetric moisture retention at 15 bar suction for Group II. + +# Arguments + + * clay: Clay smaller than 0.002 mm; percentage of the fine earth. Full calibration bounds are + not reported. (%) + +# Returns + + * water_15bar: Gravimetric moisture retention at 15 bar suction expressed per unit dry soil + mass. (g g⁻¹) + +# Territory + +Group II: 12 profiles in Nigeria developed from arenaceous sedimentary rocks, partly Cretaceous +and partly Lower Pleistocene. + +# Notes + +Prediction target: Gravimetric moisture retention at 15 bar suction +Table VI, Group II, clay predictor, water_15bar response."] +#[cfg_attr(feature = "inline", inline)] +#[must_use] +pub fn calc_ptf_lal1979_group_ii_water_15bar_from_clay(clay: f64) -> f64 { + 0.0022f64 * clay + 0.025f64 +} +#[cfg(test)] +mod calc_ptf_lal1979_group_ii_water_15bar_from_clay_tests { + use super::*; + use crate::test_support::assert_close; + #[test] + fn published_predictor_mean() { + let result = calc_ptf_lal1979_group_ii_water_15bar_from_clay(38f64); + assert_close( + result, + 0.1086f64, + 0.001f64, + 0f64, + "gravimetric_water_content", + "mass_fraction", + "registry", + ); + } +} +#[doc = r"Estimate gravimetric moisture retention at 15 bar suction for Group II. + +# Arguments + + * sand: Sand from 0.02 to 2 mm; percentage of the fine earth. Full calibration bounds are not + reported. (%) + +# Returns + + * water_15bar: Gravimetric moisture retention at 15 bar suction expressed per unit dry soil + mass. (g g⁻¹) + +# Territory + +Group II: 12 profiles in Nigeria developed from arenaceous sedimentary rocks, partly Cretaceous +and partly Lower Pleistocene. + +# Notes + +Prediction target: Gravimetric moisture retention at 15 bar suction +Table VI, Group II, sand predictor, water_15bar response."] +#[cfg_attr(feature = "inline", inline)] +#[must_use] +pub fn calc_ptf_lal1979_group_ii_water_15bar_from_sand(sand: f64) -> f64 { + -0.0024f64 * sand + 0.284f64 +} +#[cfg(test)] +mod calc_ptf_lal1979_group_ii_water_15bar_from_sand_tests { + use super::*; + use crate::test_support::assert_close; + #[test] + fn published_predictor_mean() { + let result = calc_ptf_lal1979_group_ii_water_15bar_from_sand(57f64); + assert_close( + result, + 0.1472f64, + 0.001f64, + 0f64, + "gravimetric_water_content", + "mass_fraction", + "registry", + ); + } +} +#[doc = r"Estimate gravimetric moisture equivalent measured at 1000 times gravity for Group I. + +# Arguments + + * clay: Clay smaller than 0.002 mm; percentage of the fine earth. Full calibration bounds are + not reported. (%) + +# Returns + + * moisture_equivalent: Gravimetric moisture equivalent measured at 1000 times gravity + expressed per unit dry soil mass. (g g⁻¹) + +# Territory + +Group I: 11 well-drained upland profiles in western Nigeria developed over pre-Cambrian basement +complex rocks, mainly biotite-muscovite paragneisses. + +# Notes + +Prediction target: Gravimetric moisture equivalent measured at 1000 times gravity +Table VII, Group I, clay predictor, moisture_equivalent response."] +#[cfg_attr(feature = "inline", inline)] +#[must_use] +pub fn calc_ptf_lal1979_group_i_moisture_equivalent_from_clay(clay: f64) -> f64 { + 0.004f64 * clay + 0.052f64 +} +#[cfg(test)] +mod calc_ptf_lal1979_group_i_moisture_equivalent_from_clay_tests { + use super::*; + use crate::test_support::assert_close; + #[test] + fn published_predictor_mean() { + let result = calc_ptf_lal1979_group_i_moisture_equivalent_from_clay(19f64); + assert_close( + result, + 0.128f64, + 0.001f64, + 0f64, + "gravimetric_water_content", + "mass_fraction", + "registry", + ); + } +} +#[doc = r"Estimate gravimetric moisture equivalent measured at 1000 times gravity for Group I. + +# Arguments + + * sand: Sand from 0.02 to 2 mm; percentage of the fine earth. Full calibration bounds are not + reported. (%) + +# Returns + + * moisture_equivalent: Gravimetric moisture equivalent measured at 1000 times gravity + expressed per unit dry soil mass. (g g⁻¹) + +# Territory + +Group I: 11 well-drained upland profiles in western Nigeria developed over pre-Cambrian basement +complex rocks, mainly biotite-muscovite paragneisses. + +# Notes + +Prediction target: Gravimetric moisture equivalent measured at 1000 times gravity +Table VII, Group I, sand predictor, moisture_equivalent response."] +#[cfg_attr(feature = "inline", inline)] +#[must_use] +pub fn calc_ptf_lal1979_group_i_moisture_equivalent_from_sand(sand: f64) -> f64 { + -0.003f64 * sand + 0.339f64 +} +#[cfg(test)] +mod calc_ptf_lal1979_group_i_moisture_equivalent_from_sand_tests { + use super::*; + use crate::test_support::assert_close; + #[test] + fn published_predictor_mean() { + let result = calc_ptf_lal1979_group_i_moisture_equivalent_from_sand(66f64); + assert_close( + result, + 0.141f64, + 0.001f64, + 0f64, + "gravimetric_water_content", + "mass_fraction", + "registry", + ); + } +} +#[doc = r"Estimate gravimetric moisture equivalent measured at 1000 times gravity for Group II. + +# Arguments + + * clay: Clay smaller than 0.002 mm; percentage of the fine earth. Full calibration bounds are + not reported. (%) + +# Returns + + * moisture_equivalent: Gravimetric moisture equivalent measured at 1000 times gravity + expressed per unit dry soil mass. (g g⁻¹) + +# Territory + +Group II: 12 profiles in Nigeria developed from arenaceous sedimentary rocks, partly Cretaceous +and partly Lower Pleistocene. + +# Notes + +Prediction target: Gravimetric moisture equivalent measured at 1000 times gravity +Table VII, Group II, clay predictor, moisture_equivalent response."] +#[cfg_attr(feature = "inline", inline)] +#[must_use] +pub fn calc_ptf_lal1979_group_ii_moisture_equivalent_from_clay(clay: f64) -> f64 { + 0.0025f64 * clay + 0.057f64 +} +#[cfg(test)] +mod calc_ptf_lal1979_group_ii_moisture_equivalent_from_clay_tests { + use super::*; + use crate::test_support::assert_close; + #[test] + fn published_predictor_mean() { + let result = calc_ptf_lal1979_group_ii_moisture_equivalent_from_clay(38f64); + assert_close( + result, + 0.152f64, + 0.001f64, + 0f64, + "gravimetric_water_content", + "mass_fraction", + "registry", + ); + } +} +#[doc = r"Estimate gravimetric moisture equivalent measured at 1000 times gravity for Group II. + +# Arguments + + * sand: Sand from 0.02 to 2 mm; percentage of the fine earth. Full calibration bounds are not + reported. (%) + +# Returns + + * moisture_equivalent: Gravimetric moisture equivalent measured at 1000 times gravity + expressed per unit dry soil mass. (g g⁻¹) + +# Territory + +Group II: 12 profiles in Nigeria developed from arenaceous sedimentary rocks, partly Cretaceous +and partly Lower Pleistocene. + +# Notes + +Prediction target: Gravimetric moisture equivalent measured at 1000 times gravity +Table VII, Group II, sand predictor, moisture_equivalent response."] +#[cfg_attr(feature = "inline", inline)] +#[must_use] +pub fn calc_ptf_lal1979_group_ii_moisture_equivalent_from_sand(sand: f64) -> f64 { + -0.002f64 * sand + 0.284f64 +} +#[cfg(test)] +mod calc_ptf_lal1979_group_ii_moisture_equivalent_from_sand_tests { + use super::*; + use crate::test_support::assert_close; + #[test] + fn published_predictor_mean() { + let result = calc_ptf_lal1979_group_ii_moisture_equivalent_from_sand(57f64); + assert_close( + result, + 0.17f64, + 0.001f64, + 0f64, + "gravimetric_water_content", + "mass_fraction", + "registry", + ); + } +} +#[doc = r"Estimate gravimetric moisture equivalent measured at 1000 times gravity for Group II. + +# Arguments + + * silt: Silt from 0.002 to 0.02 mm; percentage of the fine earth. Full calibration bounds are + not reported. (%) + +# Returns + + * moisture_equivalent: Gravimetric moisture equivalent measured at 1000 times gravity + expressed per unit dry soil mass. (g g⁻¹) + +# Territory + +Group II: 12 profiles in Nigeria developed from arenaceous sedimentary rocks, partly Cretaceous +and partly Lower Pleistocene. + +# Notes + +Prediction target: Gravimetric moisture equivalent measured at 1000 times gravity +Table VII, Group II, silt predictor, moisture_equivalent response."] +#[cfg_attr(feature = "inline", inline)] +#[must_use] +pub fn calc_ptf_lal1979_group_ii_moisture_equivalent_from_silt(silt: f64) -> f64 { + -0.005f64 * silt + 0.175f64 +} +#[cfg(test)] +mod calc_ptf_lal1979_group_ii_moisture_equivalent_from_silt_tests { + use super::*; + use crate::test_support::assert_close; + #[test] + fn published_predictor_mean() { + let result = calc_ptf_lal1979_group_ii_moisture_equivalent_from_silt(5f64); + assert_close( + result, + 0.15f64, + 0.001f64, + 0f64, + "gravimetric_water_content", + "mass_fraction", + "registry", + ); + } +} +#[doc = r"Estimate gravimetric moisture retention at 0.3 bar suction for Group II. + +# Arguments + + * water_01bar: Gravimetric moisture retention at 0.1 bar suction on disturbed soil. (g/g) + +# Returns + + * water_03bar: Gravimetric moisture retention at 0.3 bar suction expressed per unit dry soil + mass. (g g⁻¹) + +# Territory + +Group II: 12 profiles in Nigeria developed from arenaceous sedimentary rocks, partly Cretaceous +and partly Lower Pleistocene. + +# Notes + +Prediction target: Gravimetric moisture retention at 0.3 bar suction +Table VIII, Group II, water_01bar predictor, water_03bar response."] +#[cfg_attr(feature = "inline", inline)] +#[must_use] +pub fn calc_ptf_lal1979_group_ii_water_03bar_from_water_01bar(water_01bar: f64) -> f64 { + 0.86f64 * water_01bar + -0.014f64 +} +#[cfg(test)] +mod calc_ptf_lal1979_group_ii_water_03bar_from_water_01bar_tests { + use super::*; + use crate::test_support::assert_close; + #[test] + fn published_predictor_mean() { + let result = calc_ptf_lal1979_group_ii_water_03bar_from_water_01bar(0.17f64); + assert_close( + result, + 0.1322f64, + 0.001f64, + 0f64, + "gravimetric_water_content", + "mass_fraction", + "registry", + ); + } +} +#[doc = r"Estimate gravimetric moisture retention at 15 bar suction for Group II. + +# Arguments + + * water_01bar: Gravimetric moisture retention at 0.1 bar suction on disturbed soil. (g/g) + +# Returns + + * water_15bar: Gravimetric moisture retention at 15 bar suction expressed per unit dry soil + mass. (g g⁻¹) + +# Territory + +Group II: 12 profiles in Nigeria developed from arenaceous sedimentary rocks, partly Cretaceous +and partly Lower Pleistocene. + +# Notes + +Prediction target: Gravimetric moisture retention at 15 bar suction +Table VIII, Group II, water_01bar predictor, water_15bar response."] +#[cfg_attr(feature = "inline", inline)] +#[must_use] +pub fn calc_ptf_lal1979_group_ii_water_15bar_from_water_01bar(water_01bar: f64) -> f64 { + 0.54f64 * water_01bar + -0.005f64 +} +#[cfg(test)] +mod calc_ptf_lal1979_group_ii_water_15bar_from_water_01bar_tests { + use super::*; + use crate::test_support::assert_close; + #[test] + fn published_predictor_mean() { + let result = calc_ptf_lal1979_group_ii_water_15bar_from_water_01bar(0.17f64); + assert_close( + result, + 0.0868f64, + 0.001f64, + 0f64, + "gravimetric_water_content", + "mass_fraction", + "registry", + ); + } +} +#[doc = r"Estimate upper plastic limit for Group I. + +# Arguments + + * organic_carbon: Organic carbon measured by Walkley and Black wet combustion; percentage of + the fine earth. Full calibration bounds are not reported. (%) + +# Returns + + * upper_plastic_limit: Upper plastic limit expressed as percentage of oven-dry soil mass. (%) + +# Territory + +Group I: 11 well-drained upland profiles in western Nigeria developed over pre-Cambrian basement +complex rocks, mainly biotite-muscovite paragneisses. + +# Notes + +Prediction target: Upper plastic limit +Table IX, Group I, organic_carbon predictor, upper_plastic_limit response."] +#[cfg_attr(feature = "inline", inline)] +#[must_use] +pub fn calc_ptf_lal1979_group_i_upper_plastic_limit_from_organic_carbon( + organic_carbon: f64, +) -> f64 { + -5.40f64 * organic_carbon + 31.73f64 +} +#[cfg(test)] +mod calc_ptf_lal1979_group_i_upper_plastic_limit_from_organic_carbon_tests { + use super::*; + use crate::test_support::assert_close; + #[test] + fn published_predictor_mean() { + let result = calc_ptf_lal1979_group_i_upper_plastic_limit_from_organic_carbon(1.5f64); + assert_close( + result, + 23.63f64, + 0.1f64, + 0f64, + "gravimetric_water_content", + "mass_percent", + "registry", + ); + } +} +#[doc = r"Estimate lower plastic limit for Group I. + +# Arguments + + * organic_carbon: Organic carbon measured by Walkley and Black wet combustion; percentage of + the fine earth. Full calibration bounds are not reported. (%) + +# Returns + + * lower_plastic_limit: Lower plastic limit expressed as percentage of oven-dry soil mass. (%) + +# Territory + +Group I: 11 well-drained upland profiles in western Nigeria developed over pre-Cambrian basement +complex rocks, mainly biotite-muscovite paragneisses. + +# Notes + +Prediction target: Lower plastic limit +Table IX, Group I, organic_carbon predictor, lower_plastic_limit response."] +#[cfg_attr(feature = "inline", inline)] +#[must_use] +pub fn calc_ptf_lal1979_group_i_lower_plastic_limit_from_organic_carbon( + organic_carbon: f64, +) -> f64 { + -4.24f64 * organic_carbon + 24.73f64 +} +#[cfg(test)] +mod calc_ptf_lal1979_group_i_lower_plastic_limit_from_organic_carbon_tests { + use super::*; + use crate::test_support::assert_close; + #[test] + fn published_predictor_mean() { + let result = calc_ptf_lal1979_group_i_lower_plastic_limit_from_organic_carbon(1.5f64); + assert_close( + result, + 18.37f64, + 0.1f64, + 0f64, + "gravimetric_water_content", + "mass_percent", + "registry", + ); + } +} +#[doc = r"Estimate plasticity index (upper minus lower plastic limit) for Group I. + +# Arguments + + * organic_carbon: Organic carbon measured by Walkley and Black wet combustion; percentage of + the fine earth. Full calibration bounds are not reported. (%) + +# Returns + + * plasticity_index: Plasticity index (upper minus lower plastic limit) expressed as percentage + of oven-dry soil mass. (%) + +# Territory + +Group I: 11 well-drained upland profiles in western Nigeria developed over pre-Cambrian basement +complex rocks, mainly biotite-muscovite paragneisses. + +# Notes + +Prediction target: Plasticity index (upper minus lower plastic limit) +Table IX, Group I, organic_carbon predictor, plasticity_index response."] +#[cfg_attr(feature = "inline", inline)] +#[must_use] +pub fn calc_ptf_lal1979_group_i_plasticity_index_from_organic_carbon(organic_carbon: f64) -> f64 { + -1.24f64 * organic_carbon + 7.42f64 +} +#[cfg(test)] +mod calc_ptf_lal1979_group_i_plasticity_index_from_organic_carbon_tests { + use super::*; + use crate::test_support::assert_close; + #[test] + fn published_predictor_mean() { + let result = calc_ptf_lal1979_group_i_plasticity_index_from_organic_carbon(1.5f64); + assert_close( + result, + 5.56f64, + 0.1f64, + 0f64, + "gravimetric_water_content", + "mass_percent", + "registry", + ); + } +} +#[doc = r"Estimate upper plastic limit for Group I. + +# Arguments + + * clay: Clay smaller than 0.002 mm; percentage of the fine earth. Full calibration bounds are + not reported. (%) + +# Returns + + * upper_plastic_limit: Upper plastic limit expressed as percentage of oven-dry soil mass. (%) + +# Territory + +Group I: 11 well-drained upland profiles in western Nigeria developed over pre-Cambrian basement +complex rocks, mainly biotite-muscovite paragneisses. + +# Notes + +Prediction target: Upper plastic limit +Table IX, Group I, clay predictor, upper_plastic_limit response."] +#[cfg_attr(feature = "inline", inline)] +#[must_use] +pub fn calc_ptf_lal1979_group_i_upper_plastic_limit_from_clay(clay: f64) -> f64 { + 0.46f64 * clay + 11.48f64 +} +#[cfg(test)] +mod calc_ptf_lal1979_group_i_upper_plastic_limit_from_clay_tests { + use super::*; + use crate::test_support::assert_close; + #[test] + fn published_predictor_mean() { + let result = calc_ptf_lal1979_group_i_upper_plastic_limit_from_clay(19f64); + assert_close( + result, + 20.22f64, + 0.1f64, + 0f64, + "gravimetric_water_content", + "mass_percent", + "registry", + ); + } +} +#[doc = r"Estimate lower plastic limit for Group I. + +# Arguments + + * clay: Clay smaller than 0.002 mm; percentage of the fine earth. Full calibration bounds are + not reported. (%) + +# Returns + + * lower_plastic_limit: Lower plastic limit expressed as percentage of oven-dry soil mass. (%) + +# Territory + +Group I: 11 well-drained upland profiles in western Nigeria developed over pre-Cambrian basement +complex rocks, mainly biotite-muscovite paragneisses. + +# Notes + +Prediction target: Lower plastic limit +Table IX, Group I, clay predictor, lower_plastic_limit response."] +#[cfg_attr(feature = "inline", inline)] +#[must_use] +pub fn calc_ptf_lal1979_group_i_lower_plastic_limit_from_clay(clay: f64) -> f64 { + 0.34f64 * clay + 9.50f64 +} +#[cfg(test)] +mod calc_ptf_lal1979_group_i_lower_plastic_limit_from_clay_tests { + use super::*; + use crate::test_support::assert_close; + #[test] + fn published_predictor_mean() { + let result = calc_ptf_lal1979_group_i_lower_plastic_limit_from_clay(19f64); + assert_close( + result, + 15.96f64, + 0.1f64, + 0f64, + "gravimetric_water_content", + "mass_percent", + "registry", + ); + } +} +#[doc = r"Estimate plasticity index (upper minus lower plastic limit) for Group I. + +# Arguments + + * clay: Clay smaller than 0.002 mm; percentage of the fine earth. Full calibration bounds are + not reported. (%) + +# Returns + + * plasticity_index: Plasticity index (upper minus lower plastic limit) expressed as percentage + of oven-dry soil mass. (%) + +# Territory + +Group I: 11 well-drained upland profiles in western Nigeria developed over pre-Cambrian basement +complex rocks, mainly biotite-muscovite paragneisses. + +# Notes + +Prediction target: Plasticity index (upper minus lower plastic limit) +Table IX, Group I, clay predictor, plasticity_index response."] +#[cfg_attr(feature = "inline", inline)] +#[must_use] +pub fn calc_ptf_lal1979_group_i_plasticity_index_from_clay(clay: f64) -> f64 { + 0.11f64 * clay + 2.48f64 +} +#[cfg(test)] +mod calc_ptf_lal1979_group_i_plasticity_index_from_clay_tests { + use super::*; + use crate::test_support::assert_close; + #[test] + fn published_predictor_mean() { + let result = calc_ptf_lal1979_group_i_plasticity_index_from_clay(19f64); + assert_close( + result, + 4.57f64, + 0.1f64, + 0f64, + "gravimetric_water_content", + "mass_percent", + "registry", + ); + } +} +#[doc = r"Estimate lower plastic limit for Group I. + +# Arguments + + * sand: Sand from 0.02 to 2 mm; percentage of the fine earth. Full calibration bounds are not + reported. (%) + +# Returns + + * lower_plastic_limit: Lower plastic limit expressed as percentage of oven-dry soil mass. (%) + +# Territory + +Group I: 11 well-drained upland profiles in western Nigeria developed over pre-Cambrian basement +complex rocks, mainly biotite-muscovite paragneisses. + +# Notes + +Prediction target: Lower plastic limit +Table IX, Group I, sand predictor, lower_plastic_limit response."] +#[cfg_attr(feature = "inline", inline)] +#[must_use] +pub fn calc_ptf_lal1979_group_i_lower_plastic_limit_from_sand(sand: f64) -> f64 { + -0.30f64 * sand + 35.50f64 +} +#[cfg(test)] +mod calc_ptf_lal1979_group_i_lower_plastic_limit_from_sand_tests { + use super::*; + use crate::test_support::assert_close; + #[test] + fn published_predictor_mean() { + let result = calc_ptf_lal1979_group_i_lower_plastic_limit_from_sand(66f64); + assert_close( + result, + 15.7f64, + 0.1f64, + 0f64, + "gravimetric_water_content", + "mass_percent", + "registry", + ); + } +} +#[doc = r"Estimate plasticity index (upper minus lower plastic limit) for Group I. + +# Arguments + + * sand: Sand from 0.02 to 2 mm; percentage of the fine earth. Full calibration bounds are not + reported. (%) + +# Returns + + * plasticity_index: Plasticity index (upper minus lower plastic limit) expressed as percentage + of oven-dry soil mass. (%) + +# Territory + +Group I: 11 well-drained upland profiles in western Nigeria developed over pre-Cambrian basement +complex rocks, mainly biotite-muscovite paragneisses. + +# Notes + +Prediction target: Plasticity index (upper minus lower plastic limit) +Table IX, Group I, sand predictor, plasticity_index response."] +#[cfg_attr(feature = "inline", inline)] +#[must_use] +pub fn calc_ptf_lal1979_group_i_plasticity_index_from_sand(sand: f64) -> f64 { + -0.10f64 * sand + 11.00f64 +} +#[cfg(test)] +mod calc_ptf_lal1979_group_i_plasticity_index_from_sand_tests { + use super::*; + use crate::test_support::assert_close; + #[test] + fn published_predictor_mean() { + let result = calc_ptf_lal1979_group_i_plasticity_index_from_sand(66f64); + assert_close( + result, + 4.4f64, + 0.1f64, + 0f64, + "gravimetric_water_content", + "mass_percent", + "registry", + ); + } +} +#[doc = r"Estimate upper plastic limit for Group II. + +# Arguments + + * organic_carbon: Organic carbon measured by Walkley and Black wet combustion; percentage of + the fine earth. Full calibration bounds are not reported. (%) + +# Returns + + * upper_plastic_limit: Upper plastic limit expressed as percentage of oven-dry soil mass. (%) + +# Territory + +Group II: 12 profiles in Nigeria developed from arenaceous sedimentary rocks, partly Cretaceous +and partly Lower Pleistocene. + +# Notes + +Prediction target: Upper plastic limit +Table IX, Group II, organic_carbon predictor, upper_plastic_limit response."] +#[cfg_attr(feature = "inline", inline)] +#[must_use] +pub fn calc_ptf_lal1979_group_ii_upper_plastic_limit_from_organic_carbon( + organic_carbon: f64, +) -> f64 { + -3.01f64 * organic_carbon + 32.20f64 +} +#[cfg(test)] +mod calc_ptf_lal1979_group_ii_upper_plastic_limit_from_organic_carbon_tests { + use super::*; + use crate::test_support::assert_close; + #[test] + fn published_predictor_mean() { + let result = calc_ptf_lal1979_group_ii_upper_plastic_limit_from_organic_carbon(0.42f64); + assert_close( + result, + 30.9358f64, + 0.1f64, + 0f64, + "gravimetric_water_content", + "mass_percent", + "registry", + ); + } +} +#[doc = r"Estimate plasticity index (upper minus lower plastic limit) for Group II. + +# Arguments + + * organic_carbon: Organic carbon measured by Walkley and Black wet combustion; percentage of + the fine earth. Full calibration bounds are not reported. (%) + +# Returns + + * plasticity_index: Plasticity index (upper minus lower plastic limit) expressed as percentage + of oven-dry soil mass. (%) + +# Territory + +Group II: 12 profiles in Nigeria developed from arenaceous sedimentary rocks, partly Cretaceous +and partly Lower Pleistocene. + +# Notes + +Prediction target: Plasticity index (upper minus lower plastic limit) +Table IX, Group II, organic_carbon predictor, plasticity_index response."] +#[cfg_attr(feature = "inline", inline)] +#[must_use] +pub fn calc_ptf_lal1979_group_ii_plasticity_index_from_organic_carbon(organic_carbon: f64) -> f64 { + -3.22f64 * organic_carbon + 12.70f64 +} +#[cfg(test)] +mod calc_ptf_lal1979_group_ii_plasticity_index_from_organic_carbon_tests { + use super::*; + use crate::test_support::assert_close; + #[test] + fn published_predictor_mean() { + let result = calc_ptf_lal1979_group_ii_plasticity_index_from_organic_carbon(0.42f64); + assert_close( + result, + 11.3476f64, + 0.1f64, + 0f64, + "gravimetric_water_content", + "mass_percent", + "registry", + ); + } +} +#[doc = r"Estimate upper plastic limit for Group II. + +# Arguments + + * clay: Clay smaller than 0.002 mm; percentage of the fine earth. Full calibration bounds are + not reported. (%) + +# Returns + + * upper_plastic_limit: Upper plastic limit expressed as percentage of oven-dry soil mass. (%) + +# Territory + +Group II: 12 profiles in Nigeria developed from arenaceous sedimentary rocks, partly Cretaceous +and partly Lower Pleistocene. + +# Notes + +Prediction target: Upper plastic limit +Table IX, Group II, clay predictor, upper_plastic_limit response."] +#[cfg_attr(feature = "inline", inline)] +#[must_use] +pub fn calc_ptf_lal1979_group_ii_upper_plastic_limit_from_clay(clay: f64) -> f64 { + 0.16f64 * clay + 24.59f64 +} +#[cfg(test)] +mod calc_ptf_lal1979_group_ii_upper_plastic_limit_from_clay_tests { + use super::*; + use crate::test_support::assert_close; + #[test] + fn published_predictor_mean() { + let result = calc_ptf_lal1979_group_ii_upper_plastic_limit_from_clay(38f64); + assert_close( + result, + 30.67f64, + 0.1f64, + 0f64, + "gravimetric_water_content", + "mass_percent", + "registry", + ); + } +} +#[doc = r"Estimate lower plastic limit for Group II. + +# Arguments + + * clay: Clay smaller than 0.002 mm; percentage of the fine earth. Full calibration bounds are + not reported. (%) + +# Returns + + * lower_plastic_limit: Lower plastic limit expressed as percentage of oven-dry soil mass. (%) + +# Territory + +Group II: 12 profiles in Nigeria developed from arenaceous sedimentary rocks, partly Cretaceous +and partly Lower Pleistocene. + +# Notes + +Prediction target: Lower plastic limit +Table IX, Group II, clay predictor, lower_plastic_limit response."] +#[cfg_attr(feature = "inline", inline)] +#[must_use] +pub fn calc_ptf_lal1979_group_ii_lower_plastic_limit_from_clay(clay: f64) -> f64 { + 0.14f64 * clay + 14.64f64 +} +#[cfg(test)] +mod calc_ptf_lal1979_group_ii_lower_plastic_limit_from_clay_tests { + use super::*; + use crate::test_support::assert_close; + #[test] + fn published_predictor_mean() { + let result = calc_ptf_lal1979_group_ii_lower_plastic_limit_from_clay(38f64); + assert_close( + result, + 19.96f64, + 0.1f64, + 0f64, + "gravimetric_water_content", + "mass_percent", + "registry", + ); + } +} +#[doc = r"Estimate upper plastic limit for Group II. + +# Arguments + + * sand: Sand from 0.02 to 2 mm; percentage of the fine earth. Full calibration bounds are not + reported. (%) + +# Returns + + * upper_plastic_limit: Upper plastic limit expressed as percentage of oven-dry soil mass. (%) + +# Territory + +Group II: 12 profiles in Nigeria developed from arenaceous sedimentary rocks, partly Cretaceous +and partly Lower Pleistocene. + +# Notes + +Prediction target: Upper plastic limit +Table IX, Group II, sand predictor, upper_plastic_limit response."] +#[cfg_attr(feature = "inline", inline)] +#[must_use] +pub fn calc_ptf_lal1979_group_ii_upper_plastic_limit_from_sand(sand: f64) -> f64 { + -0.17f64 * sand + 40.41f64 +} +#[cfg(test)] +mod calc_ptf_lal1979_group_ii_upper_plastic_limit_from_sand_tests { + use super::*; + use crate::test_support::assert_close; + #[test] + fn published_predictor_mean() { + let result = calc_ptf_lal1979_group_ii_upper_plastic_limit_from_sand(57f64); + assert_close( + result, + 30.72f64, + 0.1f64, + 0f64, + "gravimetric_water_content", + "mass_percent", + "registry", + ); + } +} +#[doc = r"Estimate lower plastic limit for Group II. + +# Arguments + + * sand: Sand from 0.02 to 2 mm; percentage of the fine earth. Full calibration bounds are not + reported. (%) + +# Returns + + * lower_plastic_limit: Lower plastic limit expressed as percentage of oven-dry soil mass. (%) + +# Territory + +Group II: 12 profiles in Nigeria developed from arenaceous sedimentary rocks, partly Cretaceous +and partly Lower Pleistocene. + +# Notes + +Prediction target: Lower plastic limit +Table IX, Group II, sand predictor, lower_plastic_limit response."] +#[cfg_attr(feature = "inline", inline)] +#[must_use] +pub fn calc_ptf_lal1979_group_ii_lower_plastic_limit_from_sand(sand: f64) -> f64 { + -0.17f64 * sand + 29.88f64 +} +#[cfg(test)] +mod calc_ptf_lal1979_group_ii_lower_plastic_limit_from_sand_tests { + use super::*; + use crate::test_support::assert_close; + #[test] + fn published_predictor_mean() { + let result = calc_ptf_lal1979_group_ii_lower_plastic_limit_from_sand(57f64); + assert_close( + result, + 20.19f64, + 0.1f64, + 0f64, + "gravimetric_water_content", + "mass_percent", + "registry", + ); + } +} +#[doc = r"Estimate upper plastic limit for Group II. + +# Arguments + + * silt: Silt from 0.002 to 0.02 mm; percentage of the fine earth. Full calibration bounds are + not reported. (%) + +# Returns + + * upper_plastic_limit: Upper plastic limit expressed as percentage of oven-dry soil mass. (%) + +# Territory + +Group II: 12 profiles in Nigeria developed from arenaceous sedimentary rocks, partly Cretaceous +and partly Lower Pleistocene. + +# Notes + +Prediction target: Upper plastic limit +Table IX, Group II, silt predictor, upper_plastic_limit response."] +#[cfg_attr(feature = "inline", inline)] +#[must_use] +pub fn calc_ptf_lal1979_group_ii_upper_plastic_limit_from_silt(silt: f64) -> f64 { + 0.35f64 * silt + 28.24f64 +} +#[cfg(test)] +mod calc_ptf_lal1979_group_ii_upper_plastic_limit_from_silt_tests { + use super::*; + use crate::test_support::assert_close; + #[test] + fn published_predictor_mean() { + let result = calc_ptf_lal1979_group_ii_upper_plastic_limit_from_silt(5f64); + assert_close( + result, + 29.99f64, + 0.1f64, + 0f64, + "gravimetric_water_content", + "mass_percent", + "registry", + ); + } +} +#[doc = r"Estimate lower plastic limit for Group II. + +# Arguments + + * silt: Silt from 0.002 to 0.02 mm; percentage of the fine earth. Full calibration bounds are + not reported. (%) + +# Returns + + * lower_plastic_limit: Lower plastic limit expressed as percentage of oven-dry soil mass. (%) + +# Territory + +Group II: 12 profiles in Nigeria developed from arenaceous sedimentary rocks, partly Cretaceous +and partly Lower Pleistocene. + +# Notes + +Prediction target: Lower plastic limit +Table IX, Group II, silt predictor, lower_plastic_limit response."] +#[cfg_attr(feature = "inline", inline)] +#[must_use] +pub fn calc_ptf_lal1979_group_ii_lower_plastic_limit_from_silt(silt: f64) -> f64 { + 0.67f64 * silt + 16.16f64 +} +#[cfg(test)] +mod calc_ptf_lal1979_group_ii_lower_plastic_limit_from_silt_tests { + use super::*; + use crate::test_support::assert_close; + #[test] + fn published_predictor_mean() { + let result = calc_ptf_lal1979_group_ii_lower_plastic_limit_from_silt(5f64); + assert_close( + result, + 19.51f64, + 0.1f64, + 0f64, + "gravimetric_water_content", + "mass_percent", + "registry", + ); + } +} +#[doc = r"Estimate plasticity index (upper minus lower plastic limit) for Group II. + +# Arguments + + * silt: Silt from 0.002 to 0.02 mm; percentage of the fine earth. Full calibration bounds are + not reported. (%) + +# Returns + + * plasticity_index: Plasticity index (upper minus lower plastic limit) expressed as percentage + of oven-dry soil mass. (%) + +# Territory + +Group II: 12 profiles in Nigeria developed from arenaceous sedimentary rocks, partly Cretaceous +and partly Lower Pleistocene. + +# Notes + +Prediction target: Plasticity index (upper minus lower plastic limit) +Table IX, Group II, silt predictor, plasticity_index response."] +#[cfg_attr(feature = "inline", inline)] +#[must_use] +pub fn calc_ptf_lal1979_group_ii_plasticity_index_from_silt(silt: f64) -> f64 { + -0.32f64 * silt + 12.08f64 +} +#[cfg(test)] +mod calc_ptf_lal1979_group_ii_plasticity_index_from_silt_tests { + use super::*; + use crate::test_support::assert_close; + #[test] + fn published_predictor_mean() { + let result = calc_ptf_lal1979_group_ii_plasticity_index_from_silt(5f64); + assert_close( + result, + 10.48f64, + 0.1f64, + 0f64, + "gravimetric_water_content", + "mass_percent", + "registry", + ); + } +}