Skip to main content

Custom time-series export of LAIe/FAPAR/FCOVER with YAML params.

Project description

gee-biophys

Custom temporal exports of biophysical variable retrievals (LAIe, FAPAR, FCOVER) from Sentinel-2 imagery.

This tool enables users to define custom time windows, temporal frequency, regions, and export settings for Sentinel-2–based biophysical variable retrievals using a simple YAML configuration file. It provides both:

  • a Python API, and
  • a Command-Line Interface (CLI): gee-biophys.

Overview

gee-biophys enables flexible and reproducible export of time-series vegetation biophysical maps, addressing the need for user-defined temporal aggregation of Sentinel-2–derived biophysical variable retrievals.

The tool builds on the PROSAIL-based s2biophys retrieval framework, producing consistent global estimates of:

  • Effective Leaf Area Index (LAIe)
  • Fraction of Absorbed Photosynthetically Active Radiation (FAPAR)
  • Fractional Vegetation Cover (FCOVER)

Each export includes:

  • mean — aggregated trait value
  • stdDev — within-period variability
  • count — number of valid observations

Features

  • Flexible temporal definitions: fixed (e.g. monthly, quarterly) or custom seasonal windows
  • Spatial inputs via bounding box or GeoJSON geometry
  • Modular YAML configuration for reproducibility
  • Exports directly to Google Earth Engine assets, Google Drive, or Google Cloud Storage
  • Available as both a Python package and CLI tool
  • Supports two models: s2biophys and SL2P models

Installation

Using pip

Create a clean virtual environment (e.g. using conda or venv). Recommended Python version 3.12:

conda create -n [ENV_NAME] python=3.12
conda activate [ENV_NAME]
pip install gee-biophys

Alternative installation — Install from source

conda create -n [ENV_NAME] python=3.12
conda activate [ENV_NAME]

git clone https://github.com/speckerf/gee_biophys.git
cd gee_biophys

pip install -e .

Usage

Start Exports

1. Command-line interface

gee-biophys --config path_to_yaml.yaml

The --config (or -c) argument is required and must point to a valid YAML configuration file.

2. Python interface

from gee_biophys.cli import run_pipeline

run_pipeline(config='path_to_yaml.yaml')

Wait for exports to finish:

The tool will start an Earth Engine export task for each exported time period. So the temporal frequency and the total time window determine the number of export tasks to execute.

image-20251111110226984

Check the progress of the exports in the code editor directly:

image-20251111110601338

Visualize results

To visualize results, please use the following earth-engine app: here


Example Configuration

Example configuration files are provided in https://github.com/speckerf/gee_biophys/tree/main/example_configs.

Minimal Example Config

# ============     GEE-Biophys  ================
# Minimal Example (small exports for testing)
# ==============================================

spatial:
  type: bbox
  bbox: [7.1, 46.1, 7.2, 46.2]
  region_name: my-region

temporal:
  start: "2020-01-01"
  end:   "2023-01-01"
  cadence:
    type: fixed
    interval: quarterly

variables:
  model: s2biophys
  variable: fapar

export:
  destination: asset
  collection_path: "projects/ee-speckerfelix/assets/custom-exports/test" # CHANGE
  project_id: "ee-speckerfelix" # CHANGE
  crs: "EPSG:4326" # EPSG code or LOCAL_UTM (automatic)
  scale: 100
  max_pixels: 100_000_000_000

options:
  max_cloud_cover: 50
  csplus_band: cs
  cs_plus_threshold: 0.70

version: "v02"

Reference Template

A fully commented reference configuration file is available here. A minimal example can be found here. Please check some example configuration files available here.


Configuration Structure

Section Purpose Example
spatial Defines the area of interest (bbox or GeoJSON) [minLon, minLat, maxLon, maxLat]
temporal Sets start/end dates and cadence (fixed or seasonal) quarterly, monthly, yearly
variables Selects the biophysical variable and retrieval model fapar, laie, fcover
export Configures export target and GEE project, CRS, spatial resolution, etc. e.g. projects/ee-user/assets/...
options Controls cloud masking and thresholds max cloud cover, CS+ threshold
version Records model version for reproducibility "v02"

Note: If you want to find a good balance between strict cloud masking and having enough cloud-free pixels for analysis, you can use the following script to explore and tune the three key parameters—CloudScore+ band, CloudScore+ threshold, and maximum CLOUDY_PIXEL_PERCENTAGE from the Sentinel-2 metadata: https://code.earthengine.google.com/716bee247685008f34b49c63d32b8447


File Naming Convention

Each exported asset or file follows a standardized and descriptive naming scheme generated automatically from the configuration parameters. The convention ensures reproducibility, traceability, and easy identification of spatial, temporal, and model settings.

The filename (or system:index in GEE) is constructed as:

{variable}_{model}_{bands}_{scale}m_s_{start}_{end}_{region-name}_{crs}_{version}

Example

fapar_s2biophys_mean-stdDev-count_100m_s_20200101_20201231_my-region_epsg-4326_v02

Note that exports with the same system:index will fail when writing to Earth Engine assets, as each asset ID must be unique, whereas they will overwrite existing files when exporting to Google Drive or Google Cloud Storage.


Citation

If you use gee-biophys in your research, please cite the associated publication (forthcoming):

Felix Specker, Anna K. Schweiger, Jean-Baptiste Féret et al. Advancing Ecosystem Monitoring with Global High-Resolution Maps of Vegetation Biophysical Properties, 01 April 2025, PREPRINT (Version 1) available at Research Square [https://doi.org/10.21203/rs.3.rs-6343364/v1]

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gee_biophys-1.1.1.tar.gz (269.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

gee_biophys-1.1.1-py3-none-any.whl (317.0 kB view details)

Uploaded Python 3

File details

Details for the file gee_biophys-1.1.1.tar.gz.

File metadata

  • Download URL: gee_biophys-1.1.1.tar.gz
  • Upload date:
  • Size: 269.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.7

File hashes

Hashes for gee_biophys-1.1.1.tar.gz
Algorithm Hash digest
SHA256 d3b293725c2cc1045bc0aa81d106a480ac5a11b3bafefda8bcf0fb56a4e5d33b
MD5 7a8a3a667e1688560c57177d344a02b1
BLAKE2b-256 d5ece1187a14d3157da62de80dcf8c73d95373b1b15208f9059b5b145b1a6dee

See more details on using hashes here.

File details

Details for the file gee_biophys-1.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for gee_biophys-1.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 2bafade45e0eca8f9fbbdea2879e492332d9f20dd6e216e6ac1abd4c79d28c2b
MD5 27cdd710a8c808c69dda0a0bbeb4d2d8
BLAKE2b-256 49ae5118945d955a1dd146a13f81e82283f5b56ee8884774ca9734fb716573a6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page