TelcoTemp is a CLI application for generating hourly air-temperature maps from:
- CML data from microwave links
- meteorological station data
- or both together in combined mode
The repository contains the full runtime pipeline: data fetch, metadata enrichment, feature preparation, neural-network inference for CML, spatial interpolation, PNG export, optional InfluxDB write-back, and logging/diagnostics.
At a high level, TelcoTemp turns time-series measurements into hourly interpolared temperature maps over the Czech Republic.
- In
cmlmode, TelcoTemp fetches microwave-link measurements, enriches them with link metadata, predicts air temperature with a PyTorch LSTM, merges nearby endpoints into roof-level interpolation points, and renders hourly maps. - In
meteomode, it fetches station temperatures directly and interpolates them into maps. - In
combinedmode, it runs both pipelines side by side.
The default output is a transparent PNG map per processed hour. Optional diagnostics and optional InfluxDB write-back are also supported.
- Read CML measurements from InfluxDB.
- Load link metadata from MariaDB/MySQL.
- Build runtime features such as daylight flag, hour/day features, coordinates, and altitude/elevation.
- Create rolling sequences for each CML endpoint or
cml_idgroup. - Run the configured PyTorch LSTM checkpoint.
- Merge nearby endpoints into roof-level interpolation points.
- Deduplicate nearly identical coordinates.
- Interpolate temperature over the output grid.
- Save the map and optionally write predicted point values back to InfluxDB.
- Read station measurements from InfluxDB.
- Enrich with station metadata.
- Transform coordinates.
- Interpolate temperature over the output grid.
- Save the map.
The current runtime is self-contained inside this repository. It does not need the training repository at inference time.
- Model inference is implemented in
telcotemp/neural/pytorch_sequence.py. - Runtime model settings are read from
[ml]inconfigs/config.ini. - The model checkpoint and scaler bundle are loaded from
telcotemp/neural/artifacts/. - Technology labels are configured in
[ml]and matched against CML metadata.
See telcotemp/neural/artifacts/README.md for the expected artifact layout.
Important directories:
telcotemp/core/- configuration, logging, initializationtelcotemp/data_sources/- Influx readers and metadata-backed preprocessing for CML and meteotelcotemp/processing/- main orchestration and ML prediction entrypointstelcotemp/neural/- PyTorch sequence runtime and local model artifactstelcotemp/geo/- interpolation and geographic helperstelcotemp/storage/- file saving and optional InfluxDB write-backtelcotemp/visualization/- map renderingtelcotemp/utils/- diagnostics, cleanup, time helpersconfigs/- runtime configurationenv_info/- dependency definitions for pip/conda
The main runtime configuration is configs/config.ini.
Key sections:
[ml]- CML model artifact path, technologies, sequence length, model hyperparameters, roof merge settings[influx_read]/[influx_write]- CML data source and optional output sink[influx]- meteo data source[mysql]- CML and station metadata database[grid]- interpolation grid resolution[interpolation]- kriging/regression settings[visualization]- color scale behavior[logging]-app.loglocation and format[diagnostics]- bias-report output
Copy configs/config.ini.dist to configs/config.ini and fill in the environment-specific values before running.
Install dependencies with either env_info/requirements.txt or one of the conda environment files in env_info/.
pip install -r env_info/requirements.txtExamples:
# Combined mode, continuous processing
python run.py
# Combined mode, process the last week
python run.py --first_run
# Combined mode, explicit time range
python run.py --start_time "2026-01-01 00:00" --end_time "2026-01-02 00:00"
# CML only
python run.py --mode cml --start_time "2026-01-01 00:00" --end_time "2026-01-02 00:00"
# Meteo only
python run.py --mode meteo --start_time "2026-01-01 00:00" --end_time "2026-01-02 00:00"
# Combined mode with source filters
python run.py --cml_filter_ids "123,456" --meteo_filter_ids "LKCB,LKKV"Typical outputs are:
outputs_cml/- CML-based hourly PNG mapsoutputs_meteo/- meteo-based hourly PNG mapssaved_grids/- optional saved grid arrays when enabledoutputs_diagnostics/- bias CSVs and plots when diagnostics are enabledapp.log- backend runtime log
In CML mode, predicted point values can also be written to InfluxDB if [influx_write] enable_write = true.
The CML neural-network path is sensitive to consistency between:
- checkpoint architecture
- scaler bundle
- configured technologies
- sequence grouping
- sampling interval
- temporal readout strategy
The runtime currently supports group_col = cml_id, where cml_id is interpreted as Link_ID + "_" + Side, matching the dataset-preparation pipeline used for training.
For map rendering, [visualization] scale_mode = static_cz_adaptive is the recommended default when you want to keep the Czech absolute palette but still improve contrast on narrow-range days. Use static_cz when strict day-to-day color comparability matters more than per-map contrast.
- The main runtime log is
app.log. - CML runs log both prepared-row counts and predicted-row counts before interpolation.
- Diagnostics can export per-hour bias reports when enabled in
[diagnostics].
This work was financed through the project "Spatial Air Temperature Monitoring Using Microwave Links Data" (SS07020434), which is co-funded with state support from the Technology Agency of the Czech Republic under the Environment for Life Programme and further funded within the National Recovery Plan from the European Recovery and Resilience Facility.

