TempEst 2
TempEst 2/SCHEMA is "TEMPerature ESTimation, version 2, using Seasonal Conditions Historical Expectation with Modeled daily Anomaly". It estimates stream water temperature, for streams of any size, using a data-driven model based on satellite remote sensing data. This is the Python implementation with some additional data processing features.
Note that the geostatistical implementation is similar but not identical to the original (R) impementation described in Philippus et al., 2025 because PyKrige does not have the same spatial covariance functions available as fields and does not have MLE-based covariance function parameter estimation.
Usage Guide
Full documentation is available at RiverTempest.org.
Generating Predictions
TempEst 2 will return:
- temp.mod (modeled daily mean temperature; Celsius)
- temp.doy (modeled day-of-year mean temperature; Celsius)
- temp.anom (modeled temperature anomaly relative to day-of-year mean; Celsius)
temp.mod = temp.doy + temp.anom.
These three variables are the final output, and can be used to assess actual estimated temperature (temp.mod); typical seasonal conditions (temp.doy), such as to assess general long-term behavior; and departure from typical seasonal conditions (temp.anom), such as to assess heat waves or other extremes.
- Install TempEst 2:
pip install TempEst2 - Download pre-trained model pickle from GitHub Releases as
model.pkl - Download prediction data by any suitable means, such as the reference implementation's Google Earth Engine data retrieval script, as
data.csv. Required columns: id, date, lst, humidity, lat, lon, elevation, grassland, shrubland, barren, water. predictions = tempest2.predict('model.pkl', 'data.csv')
Relevant Functionality
The above-described predict function handles the entire prediction process. There are several key functions that may be relevant on their own and to fitting a model:
- Spatial prediction:
tempest2.spatial.to_pickleand.from_pickle: store and retrieve geospatial models in Pickle format.tempest2.build_model: train a geospatial model from timeseries data.tempest2.predict_coefsand.predict_timeseries: predict site coefficients and full timeseries, respectively.predict_coefsrequires summarized inputs, while.predict_timeseriesuses a full timeseries input.
- Single site:
tempest2.full_fit: fit TempEst 2 coefficients from a site timeseries. Unlike the reference implementation, this begins with a direct solution, then iteratively optimizes.tempest2.timeseries: predict a timeseries for a single site using a timeseries input and specified coefficients.tempest2.Model: LibSCHEMA model implementation
tempest2.full_summary: generate prediction data from an input timeseries.
Citation and More Information
If you use this model in your research, please cite TempEst 2 (Philippus et al., 2025).
Reference implementation in R and data retrieval tools for Google Earth Engine: https://github.com/mines-ciroh/tempest2
The model design is based on Philippus, Corona, Schneider, Rust, and Hogue, 2025, "Satellite-Based Spatial-Statistical Modeling of Daily Stream Water Temperatures at the CONUS Scale", Journal of Hydrology, https://doi.org/10.1016/j.jhydrol.2025.133321. This paper also contains a detailed description of model design and performance characteristics.
The seasonality component is based on the "three-sine" stream annual temperature cycle function described in: Philippus, Corona, and Hogue, 2024, "Improved annual temperature cycle function for stream seasonal thermal regimes", JAWRA, https://doi.org/10.1111/1752-1688.13228.
Full training datasets, pre-trained models, and a knitted model validation notebook PDF are available in CUAHSI HydroShare: TempEst 2 Development Data: Observed Stream Temperature, Covariates, Performance Data, and Analysis Notebooks.
Metadata
Release files for TempEst2 0.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| tempest2-0.1.3.tar.gz | 26.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| tempest2-0.1.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 55.7 kB
Release files / tempest2-0.1.3.tar.gz
| Download URL | tempest2-0.1.3.tar.gz |
|---|---|
| Size | 26.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
cb194008bc91ec68e09e5a00081d1426acdd111728ca9bc7737a24023e9f2595
|
|
BLAKE2b-256 checksum How to use checksums |
91ad84a6aeba57f835a4e97c17d19122f3f68304ac7fdf4c0745e301f3013802
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.3
|
Release files / tempest2-0.1.3-py3-none-any.whl
| Download URL | tempest2-0.1.3-py3-none-any.whl |
|---|---|
| Size | 29.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
bb01a0b70b744e739709c8ec677743ed05a30b12d21cac03e3f1a4fbc9792546
|
|
BLAKE2b-256 checksum How to use checksums |
4b38ffcb661174bbb290a5163f878ef3fb57a1e760737c7a60b3edce588985e0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.3
|