historical_location_etl¶
Processes historical climate data from weather stations and location-specific sources.
Data Management¶
The data_managment/ module handles data ingestion and persistence:
| Component | Description |
|---|---|
| csv_client.py | Reads station observations from CSV files |
| data_validator.py | Validates data integrity, checks ranges and completeness |
| database_manager.py | Handles database operations (read/write) using ORM services |
| geoserver_client.py | Uploads processed data to GeoServer for spatial visualization |
Climate Processing¶
The climate_processing/ module handles data transformation:
| Component | Description |
|---|---|
| data_aggregator.py | Aggregates daily station data to monthly and annual values |
| climatology_calculator.py | Computes long-term climatological normals per station |
| indicators_processor.py | Orchestrates calculation of point-based indicators per country |
Point Indicators¶
Calculated using the same plugin-based CalculatorLoader pattern. Currently supports 4 indicators for station-level data:
| Code | Indicator | Description |
|---|---|---|
| CANIC | Canícula | Intra-seasonal drought period detection. Identifies dry spells within the rainy season that can affect crop development. |
| IELL | Índice de Estrés Hídrico | Water stress index. Evaluates excess or deficit of precipitation relative to crop water requirements. |
| IELS | Índice de Estrés Hídrico Simplificado | Simplified water stress index. Streamlined version for rapid assessment. |
| PRCD | Precipitación Acumulada | Accumulated precipitation. Total rainfall over a defined period for crop water balance analysis. |
Indicators are configured per country through the MngCountryIndicator ORM model. Each indicator has associated criteria (e.g., temporality) stored in the database.
Tools¶
| Tool | Description |
|---|---|
| logging_manager | Centralized logging with component and error tracking |
| tools.py | General utility functions |