aris_lite package

Implementation of the ARIS(_lite) phenology model

This package provides functions for simulating crop phenology, water budget, and yield expectation using environmental and crop-specific data.

aris_lite.aris_1go(ds: Dataset, crops: list['winter wheat' | 'spring barley' | 'maize' | 'grassland' | 'wofost potato very early' | 'wofost potato mid' | 'wofost potato late'])[source]

Run the full ARIS-lite workflow on a single dataset.

This function sequentially applies snow calculation, phenology computation, soil water calculation, water stress, combined stress, and yield estimation to the input dataset. It is intended for small datasets and returns a merged xarray.Dataset with all computed variables.

Parameters:
ds : xr.Dataset

Input dataset containing meteorological and crop data.

Returns:

Dataset with all ARIS-lite output variables.

Return type:

xr.Dataset

aris_lite.extract_point_data(ds, locations)[source]

Extract data for specific point locations from a dataset.

For each location provided, selects the nearest grid point in the dataset and concatenates the results along a new ‘location’ dimension.

Parameters:
ds : xr.Dataset

Input xarray.Dataset.

locations : pd.DataFrame

DataFrame with location names and coordinates.

Returns:

Dataset with data for each specified location.

Return type:

xr.Dataset

Submodules

aris_lite.phenology module

Phenology module

This module computes the crop coefficients (Kc) and plant heights for different crops based on temperature and crop-specific phenological rules. These variables are essential for modeling crop growth, water use, and yield.

aris_lite.phenology.compute_phenology_variables(temperature: DataArray, crops: Iterable['winter wheat' | 'spring barley' | 'maize' | 'grassland' | 'wofost potato very early' | 'wofost potato mid' | 'wofost potato late'] = ('winter wheat', 'spring barley', 'maize', 'grassland'), grass_cut_mask: DataArray | None = None) Dataset[source]

Compute crop coefficients (Kc) and plant heights for specified crops.

Uses temperature data and crop-specific rules to determine phenological stages, then assigns Kc and plant height values accordingly.

Parameters:
temperature : xr.DataArray

Daily surface air temperature average for one year.

crops : Iterable[str], optional

List of crops to compute phenology for.

Returns:

Dataset containing Kc_factor and plant_height for each crop.

Return type:

xr.Dataset

Notes

The current implementation draws on the three references below (basic idea: [All00], parameters and specifications: [EDK+24], grass cut days: [Sch11]).

[All00]

Richard G. Allen, editor. Crop Evapotranspiration: Guidelines for Computing Crop Water Requirements. Number 56 in FAO Irrigation and Drainage Paper. Food and Agriculture Organization of the United Nations, Rome, repr edition, 2000. ISBN 978-92-5-104219-9.

[EDK+24]

Josef Eitzinger, Voiko Daneu, Gerhard Kubu, Sabina Thaler, Mirek Trnka, Andreas Schaumberger, Stefan Schneider, and Thi Mai Anh Tran. Grid based monitoring and forecasting system of cropping conditions and risks by agrometeorological indicators in Austria – Agricultural Risk Information System ARIS. Climate Services, 34:100478, April 2024. doi:10.1016/j.cliser.2024.100478.

[Sch11]

Andreas Schaumberger. Räumliche Modelle zur Vegetations- und Ertragsdynamik im Wirtschaftsgrünland. PhD thesis, Graz University of Technology, Graz, Austria, September 2011.

aris_lite.phenology.main(years: Iterable[int], crops: Iterable['winter wheat' | 'spring barley' | 'maize' | 'grassland' | 'wofost potato very early' | 'wofost potato mid' | 'wofost potato late'] = ('winter wheat', 'spring barley', 'maize', 'grassland'))[source]

Load data, compute phenology variables, and save output for specified years.

For each year, loads temperature data, computes phenology variables for the given crops, and writes the results to a Zarr store.

Parameters:
years : Iterable[int]

List of years to compute.

crops : Iterable, optional

List of crops to compute, defaults to (“winter wheat”, “spring barley”, “maize”, “grassland”).

aris_lite.water_budget module

Water budget module

This module computes the snow/rain fraction, snow cover, evapotranspiration, and soil water availability for crop modeling. It provides functions to process meteorological and crop data to estimate water-related variables critical for crop growth and yield estimation.

aris_lite.water_budget.calc_snow(ds: Dataset) Dataset[source]

Calculate snowfall, meltwater production, and snow cover over time.

This function simulates the snow accumulation and melting process based on precipitation and temperature data. It returns a dataset with snowfall, meltwater production, and snow cover for each time step.

Parameters:
ds : xr.Dataset

Dataset containing variables “precipitation”, “min_air_temp”, “max_air_temp”, and “initial_snowcover”.

Returns:

Dataset with variables “snowfall”, “meltwater_production”, and “snowcover”.

Return type:

xr.Dataset

aris_lite.water_budget.calc_soil_water(ds: Dataset) Dataset[source]

Calculate evapotranspiration and soil water depletion for crops.

This function estimates the actual evapotranspiration, crop evapotranspiration (ETC), and soil water depletion in different soil layers, based on crop coefficients, meteorological data, and soil properties.

Parameters:
ds : xr.Dataset

Dataset containing variables “Kc_factor”, “plant_height”, “precipitation”, “wind_speed”, “rel_humidity”, “pot_evapotransp”, “snowfall”, and “meltwater_production”.

Returns:

Dataset with variables “evapotranspiration”, “evapo_ETC”, and “soil_depletion”.

Return type:

xr.Dataset

aris_lite.water_budget.main_snow(years: Iterable[int])[source]

Load input data and write snow-related results to Zarr store.

For each year, this function loads meteorological data, initializes snow cover, computes snowfall and meltwater production, and saves the results.

Parameters:
years : Iterable[int]

List of years to compute.

aris_lite.water_budget.main_soil_water(years: Iterable[int])[source]

Load input data and write soil water and evapotranspiration results to Zarr store.

For each year, this function loads the necessary datasets, computes soil water depletion and evapotranspiration, and saves the results.

Parameters:
years : Iterable[int]

List of years to compute.

aris_lite.yield_expectation module

Yield module

Estimates yield based on stress indices. This module provides functions to calculate combined crop stress indices and expected yield based on environmental and crop-specific factors, such as water stress and temperature.

aris_lite.yield_expectation.calc_combined_stress(ds: Dataset, threshold_temperature=None) DataArray[source]

Calculate the combined stress index for crops.

The combined stress index integrates water/drought stress and heat stress for each crop, applying crop-specific logic and temperature thresholds. The function processes each crop and time step, applying different rules for winter wheat, spring barley, maize, potato, and grassland.

Parameters:
ds : xr.Dataset

Dataset containing variables “waterstress”, “max_air_temp”, and “Kc_factor”.

threshold_temperature : float, optional

Optional temperature threshold for potato crops.

Returns:

Combined stress index as a DataArray.

Return type:

xr.DataArray

aris_lite.yield_expectation.calc_yield(csi: DataArray) DataArray[source]

Estimate expected crop yield based on the combined stress index.

This function uses crop-specific constants and trends to estimate yield as a function of the maximum combined stress index over the time dimension.

Parameters:
csi : xr.DataArray

Combined stress index DataArray.

Returns:

DataArray of expected yield for each crop.

Return type:

xr.DataArray

aris_lite.yield_expectation.main_combined_stress(years: Iterable[int])[source]

Load input data and write combined stress index to Zarr store for specified years.

For each year, this function loads the necessary input datasets, computes the water stress, merges relevant variables, calculates the combined stress index, and saves the result.

Parameters:
years : Iterable[int]

List of years to compute combined stress for.

aris_lite.yield_expectation.main_yield(years: Iterable[int])[source]

Load input data and write yield expectations to Zarr store for specified years.

For each year, this function loads the combined stress index, computes the expected yield, and saves the result to the output directory.

Parameters:
years : Iterable[int]

List of years to compute yield expectations for.