Skip to content

Forecast Entities

This section covers the 2 entities in the forecast_* domain.

Forecast

Represents a forecast run for a country, capturing the execution of climate prediction models.

Column Type Constraints Description
id BigInteger PK, Auto-increment Unique identifier
country_id Integer FK -> mng_country.id, NOT NULL Country for forecast
run_date Date NOT NULL Forecast run date
enable Boolean Default: true Soft delete flag
register DateTime(tz) NOT NULL Creation timestamp
updated DateTime(tz) NOT NULL Last update timestamp

Relationships: MngCountry (parent), ForecastAnalogue (children)


ForecastAnalogue

Analogue data associated with a forecast run. Stores the most similar historical years identified through climate index matching.

Column Type Constraints Description
id BigInteger PK, Auto-increment Unique identifier
forecast_id BigInteger FK -> forecast.id, NOT NULL Parent forecast
location_id BigInteger FK -> mng_location.id, NOT NULL Location
forecast_source String(100) NOT NULL Source model/system
indices_used String(255) ONI, MEI, SOI, NAO used
year Integer NOT NULL Matched historical year
similarity_score Float NOT NULL Similarity metric
rank Integer NOT NULL Ranking position

Relationships: Forecast (parent)