Skip to content
Updated Sep 26, 2026 by Barča Dvořáková · Owner: analysisactiveentityconfluence-migration Edit on GitHub

Entity: climateNormal ​

Entity: climateNormal

Description: Stores the long-term climate normal for a weather station — a set of 12 rows (one per calendar month) representing long-term reference averages of heating days and average temperature (period length and data source are not modelled or validated by the system). The normal is mutable: rows can be updated by a superadmin (for global stations) or by the client admin (for tenant-owned stations). Used together with climateData in the degree-day normalisation ratio calculation to produce normalised energy consumption figures. Additional reference parameters, if available, are stored in extraParameters.

Entity Type: database table

Data Attributes Table ​

Attribute NameDescriptionData TypeDefault ValueRequired (= Nullable)UniqueFormatValidationsIndexExample
idPrimary key of the entity.UUIDGenerated in code (app layer)YesYesUUID v7-Primary Key018ed0b3-c298-7c7a-96d5-8b36f5a7f8d2
tenantIdTenant this record belongs to. Mirrors the tenantId of the parent weather station. null for global ČHMÚ station normals.UUID-NoNoUUID v7 or nullForeign Key: tenant (when non-null); must existname: idx_climateNormal_tenantId, type: btree018fa51f-fda1-79f4-8461-2cb8f1cabc10
weatherStationIdThe weather station this normal row belongs to.UUID-YesNoUUID v7Foreign Key: weatherStation; must exist. Composite unique constraint: (weatherStationId, month)name: idx_climateNormal_weatherStationId, type: btree018ed0b3-c298-7c7a-96d5-8b36f5a7f8d2
monthCalendar month this normal row represents. Each station has exactly 12 rows, one per month.integer-YesNo1–12Range 1–12. Composite unique constraint: (weatherStationId, month)-1
heatingDays30-year average number of heating days for this month. Used in the normalisation formula.decimal-NoNoTwo decimal places≥ 0-21.30
avgTemp30-year average outdoor temperature for this month in °C. Used in the normalisation formula.decimal-NoNo°C, two decimal places---1.80
extraParametersAdditional optional long-term reference values beyond heatingDays/avgTemp, if a reference average is available for them. Free-form — keys and units are not enumerated or validated.JSONBnullNoNoJSON — free-form, no fixed shape (see note below)--{"precipitation": 45.0, "sunshineHours": 62.5}
createdAtTimestamp of when the record was created. Immutable after insert.timestamp with time zonenow() — set in codeYesNoISO 8601 — YYYY-MM-DDTHH:mm:ss.SSSZCannot be null; cannot be modified after creation-2025-03-16T18:00:00Z
updatedAtTimestamp of the last update to the record. Set on insert and updated on every change.timestamp with time zonenow() — set in codeYesNoISO 8601 — YYYY-MM-DDTHH:mm:ss.SSSZCannot be null-2025-03-16T18:00:00Z
deletedAtTimestamp of soft deletion. Null means the record is active. Once set, immutable.timestamp with time zone-NoNoISO 8601 — YYYY-MM-DDTHH:mm:ss.SSSZImmutable once set. Active records: WHERE deletedAt IS NULL-2025-06-01T09:00:00Z
createdByIdentifier of the actor who created the record.string-YesNotype:actor — e.g. user:uuid or system:migrationNon-empty-user:018ed0b3-c298-7c7a-96d5-8b36f5a7f8d2
updatedByIdentifier of the actor who last updated the record.string-YesNotype:actor — e.g. user:uuid or system:migrationNon-empty-system:migration-v25

Note — extraParameters JSON shape not documented. As with climateData.extraParameters, the source page describes this JSONB column as free-form with no enumerated keys/units. No sibling JSON-DAT was created; flagging for review (see the equivalent note on climateData).

Audited fields ​

Recorded on created (in full), updated (changed only) and deleted (in full) — unlike climateData, this entity is documented as mutable (superadmin or client admin can revise a normal directly): weatherStationId, month, heatingDays, avgTemp, extraParameters.

Excluded: none.

Every entry would carry subjectEntityType = weatherStation / subjectEntityId = weatherStationId — one row per calendar month, twelve per station, month on the entry disambiguates which.

Not registered for entityName resolution, and has no independent human-readable attribute to register — identified by its weatherStationId/month pair.