soil_heat.storage_calculations
Functions
|
Calculate the soil heat storage flux (S) in W/m² using a change-in-storage |
|
Calculate the energy storage flux of a plant canopy (S_canopy) in W/m². |
Module Contents
- soil_heat.storage_calculations.compute_soil_storage_integrated(df: pandas.DataFrame, col_T5: str = 'T5cm', col_VWC5: str = 'VWC5cm', col_IRT: str = None, depth: float = 0.05, bulk_density: float = 1300.0, specific_heat_dry: float = 870.0, specific_heat_water: float = 4218.0) pandas.Series[source]
Calculate the soil heat storage flux (S) in W/m² using a change-in-storage approach.
This function estimates the energy stored or released in the upper soil layer by accounting for the heat capacity of both the dry soil minerals and the stored liquid water. It supports an integrated temperature approach if infrared surface temperature (IRT) is available. In the slab approach, you assume the estimate at the given depth applies to the whole slab above the depth, whereas the IRT approach takes the mean between surface temperature and temperature at depth.
Note that this method is the same as the method use to calculate soil heat storage flux in the Campbell Scientific programs, though that progrmam uses higher-frequency data for the calculations.
- Parameters:
df (pd.DataFrame) – Input dataframe with a DatetimeIndex.
col_T5 (str, default "T5cm") – Column name for soil temperature at 5cm depth [°C].
col_VWC5 (str, default "VWC5cm") – Column name for Volumetric Water Content at 5cm depth [m³/m³].
col_IRT (str, optional) – Column name for surface infrared temperature [°C]. If provided, the layer temperature is the average of surface and 5cm temps. Note that this must be surface temperature, not canopy temperature
depth (float, default 0.05) – The thickness of the soil layer being measured [m].
bulk_density (float, default 1300.0) – Dry bulk density of the soil [kg/m³].
specific_heat_dry (float, default 870.0) – Specific heat capacity of dry soil minerals [J/(kg·K)].
specific_heat_water (float, default 4218.0) – Specific heat capacity of water [J/(kg·K)].
- Returns:
The calculated soil heat storage flux [W/m²]. Positive values indicate energy moving into storage (warming).
- Return type:
pd.Series
Notes
The canopy storage flux is calculated as: $$S_{canopy} = frac{m_{veg} cdot C_{p} cdot Delta T}{Delta t}$$
Where: - $m_{veg}$ = Fresh biomass ($kg/m^2$), calculated as $(height / 100) cdot density_factor$ - $C_{p}$ = Specific heat of fresh vegetation ($approx 3900 text{ J/kg}cdottext{K}$) - $Delta T$ = Change in canopy temperature between time steps - $Delta t$ = Time step in seconds
- soil_heat.storage_calculations.compute_canopy_storage(df: pandas.DataFrame, col_irt: str = 'T_CANOPY', crop_type: str = 'alfalfa', height_cm: str | float = None, density_factor: float = None) pandas.Series[source]
Calculate the energy storage flux of a plant canopy (S_canopy) in W/m².
This function estimates heat storage within biomass. It can handle dynamic vegetation growth if a height column is provided, otherwise it falls back to static heights. Height and density values can be entered by the user or taken from a dictionary within the function.
Care should be taken to examine the crop default values and the specific heat of the vegetation.
- Parameters:
df (pd.DataFrame) – Input dataframe with a DatetimeIndex.
col_irt (str, default "T_CANOPY") – Column name for the canopy surface temperature [°C].
crop_type (str, default "alfalfa") – Options: ‘alfalfa’, ‘corn’, ‘hay’, ‘wetland’. Used to determine defaults for height and density.
height_cm (str or float, optional) – If str: The column name in df containing canopy height [cm] over time. If float: A static height value [cm]. If None: Uses default height for the specified crop_type.
density_factor (float, optional) – Biomass density [kg/m² per meter height]. If None, uses default for the specified crop_type.
- Returns:
Energy storage flux [W/m²].
- Return type:
pd.Series