pedophysics package

Subpackages

Submodules

pedophysics.instruments module

pedophysics.instruments.Inst2FreqEC(soil)[source]

Set missing values of soil.df.frequency_ec and return

This function iterates over each state in the ‘soil’ object, checking the type of instrument associated with the ‘soil’ object (‘EMI Dualem’ or ‘EMI EM38-DD’). If the current ‘frequency_ec’ value is NaN, the function sets a default frequency value (9e3 Hz for ‘EMI Dualem’ and 16e3 Hz for ‘EMI EM38-DD’) in both the ‘info’ attribute and the ‘df’ dataframe. If the ‘frequency_ec’ value is already set or the instrument type does not match, the function retains the existing value.

Parameters:

soil (object) –

A custom soil object that contains:

  • dfDataFrame

    Data Frame containing all the quantitative information of soil array-like attributes for each state

Returns:

Array containing the updated frequency of electric conductivity measurement values

Return type:

np.ndarray

Notes

This function modifies the soil object in-place by updating the df and info dataframes.

pedophysics.instruments.Inst2FreqP(soil)[source]

Set missing values of soil.df.frequency_perm and return

This function iterates over each state in the ‘soil’ object. It checks the instrument type associated with the soil (‘GPR’, ‘TDR’, or ‘HydraProbe’). If the current ‘frequency_perm’ value is NaN, the function sets a default frequency value specific to the instrument type (1e9 Hz for ‘GPR’, 200e6 Hz for ‘TDR’, and 50e6 Hz for ‘HydraProbe’) in both the ‘info’ attribute and the ‘df’ DataFrame. If the ‘frequency_perm’ value is already set or the instrument type does not match any specified case, the function retains the existing value.

Parameters:

soil (object) –

A custom soil object that contains:

  • dfDataFrame

    Data Frame containing all the quantitative information of soil array-like attributes for each state

Returns:

Array containing the updated frequency of dielectric permittivity measurement values

Return type:

np.ndarray

Notes

This function modifies the soil object in-place by updating the df and info dataframes.

pedophysics.main module

pedophysics.simulate module

class pedophysics.simulate.Soil(**kwargs)[source]

Bases: object

A class to represent a soil sample with its characteristics.

temperature

Soil bulk temperature [K]

Type:

array-like

water

Soil volumetric water content [m**3/m**3]

Type:

array-like

salinity

Soil salinity (NaCl) of the bulk pore fluid [mol/L]

Type:

array-like

sand

Soil sand content [g/g]*100

Type:

array-like

silt

Soil silt content [g/g]*100

Type:

array-like

clay

Soil clay content [g/g]*100

Type:

array-like

porosity

Soil porosity [m**3/m**3]

Type:

array-like

bulk_density

Soil bulk density [kg/m**3]

Type:

array-like

particle_density

Soil particle density [kg/m**3]

Type:

array-like

CEC

Soil cation exchange capacity [meq/100g]

Type:

array-like

orgm

Soil organic matter [g/g]*100

Type:

array-like

bulk_perm

Soil bulk real relative dielectric permittivity [-]

Type:

array-like

bulk_perm_inf

Soil bulk real relative permittivity at infinite frequency [-]

Type:

array-like

water_perm

Soil water phase real dielectric permittivity [-]

Type:

array-like

solid_perm

Soil solid real relative dielectric permittivity phase [-]

Type:

array-like

air_perm

Soil air real relative dielectric permittivity phase [-]

Type:

array-like

offset_perm

Soil bulk real relative dielectric permittivity when soil bulk real electrical conductivity is zero [-]

Type:

array-like

bulk_ec

Soil bulk real electrical conductivity [S/m]

Type:

array-like

bulk_ec_tc

Soil bulk real electrical conductivity temperature corrected (298.15 K) [S/m]

Type:

array-like

bulk_ec_dc

Soil bulk real electrical conductivity direct current [S/m]

Type:

array-like

bulk_ec_dc_tc

Soil bulk real electrical conductivity direct current (0 Hz) temperature corrected (298.15 K) [S/m]

Type:

array-like

water_ec

Soil water real electrical conductivity [S/m]

Type:

array-like

s_ec

Soil bulk real surface electrical conductivity [S/m]

Type:

array-like

solid_ec

Soil solid real electrical conductivity [S/m]

Type:

array-like

dry_ec

Soil bulk real electrical conductivity at zero water content [S/m]

Type:

array-like

sat_ec

Soil bulk real electrical conductivity at saturation water content [S/m]

Type:

array-like

frequency_perm

Frequency of dielectric permittivity measurement [Hz]

Type:

array-like

frequency_ec

Frequency of electric conductivity measurement [Hz]

Type:

array-like

L

Soil scalar depolarization factor of solid particles (effective medium theory) [-]

Type:

single-value

Lw

Soil scalar depolarization factor of water aggregates (effective medium theory) [-]

Type:

single-value

m

Soil cementation factor as defined in Archie law [-]

Type:

single-value

n

Soil saturation factor as defined in Archie second law [-]

Type:

single-value

alpha

Soil alpha exponent as defined in volumetric mixing theory [-]

Type:

single-value

texture

Soil texture according to USDA convention: “Sand”, “Loamy sand”, “Sandy loam”, “Loam”, “Silt loam”, “Silt”, “Sandy clay loam”, “Clay loam”, “Silty clay loam”, “Sandy clay”, “Clay”, “Silty clay”

Type:

str

instrument

Instrument utilized: ‘HydraProbe’, ‘TDR’, ‘GPR’, ‘Miller 400D’, ‘Dualem’

Type:

str

info

Data Frame containing descriptive information about how each array-like attribute was determined or modified.

Type:

DataFrame

df

Data Frame containing the quantitative information of all soil array-like attributes for each state.

Type:

DataFrame

E

Empirical constant as in Rohades model [-]

Type:

single-value

F

Empirical constant as in Rohades model [-]

Type:

single-value

roundn

Number of decimal places to round results.

Type:

int

range_ratio

Factor for extending extrapolation domain during fitting modelling

Type:

single-value

n_states

Number of soil states

Type:

int

Notes

Attributes provided by the user that do not match the expected types or values will raise a ValueError.

Module contents