Google Earth Engine and Python workflows for Length of Growing Period (LGP) mapping and climate-soil water balance analysis in Libya.
# Libya Length of Growing Period (LGP) Mapping
A reproducible geospatial workflow for mapping Length of Growing Period (LGP) in Libya using Google Earth Engine and Python. The workflow combines rainfall, evaporative demand, temperature, and soil-water storage in a sequential monthly water balance.
## Project status
The repository contains:
- the complete reference Google Earth Engine JavaScript application;
- a Python Earth Engine analysis engine reproducing the core LGP calculations;
- an interactive Google Colab notebook;
- a minimal Earth Engine connection test;
- credential-free static repository tests and GitHub Actions.
## Main inputs
**Rainfall**
- CHIRPS v2 Daily
- TerraClimate precipitation
- ERA5-Land precipitation
**Evaporative demand / ET**
- TerraClimate PET
- ERA5-Land potential evaporation (sign-corrected open-water potential evaporation; not described as FAO-56 ET0)
**Temperature**
- TerraClimate monthly temperature
- ERA5-Land 2-m temperature
**Soil-water storage**
- fixed reference storage of 100 mm
- user-defined uniform storage from 5 to 150 mm
- SoilGrids-derived spatial water reserve for 0-60 cm
## LGP methods
The application implements two selectable calculation paths:
1. **FAO reference LGP** — a temperature condition above 5 °C and a moisture condition based on `P + previous UWR > 0.5 × ET`, with TerraClimate PET required in this implementation.
2. **Gintzburger and Saidi method** — a sequential monthly water balance `Mwb = P - ET + previous UWR`, with a growing month requiring temperature above 5 °C and `Mwb > 0`.
Each named growing year runs from **November of the previous calendar year through October of the named year**. Annual qualifying months are calculated independently; the final multi-year product is the **pixel-wise median annual LGP**. Median months are multiplied by 30 to obtain approximate LGP days before classification.
## LGP classes
| Class | Working interpretation |
|---|---|
| 1 | 0 days — Permanently not …