Skip to content

Climatic Indicators

Climatic indicators are statistical measures derived from climate variables that quantify specific aspects of climate behavior, trends, and extremes. These indicators translate raw meteorological data into meaningful metrics for climate impact assessment, risk evaluation and adaptation planning.

The clima-data library leverages the xclim library to compute a comprehensive suite of climatic indicators from CORDEX regional climate projections. These indicators range from basic statistics (e.g., annual mean temperature) to complex indices that capture extreme events (e.g., extreme precipitation return periods).

Use in Risk Analysis

Within the NATURE-DEMO project framework, these climatic indicators serve as hazard indices in the comprehensive risk analysis methodology developed to assess climate threats to critical infrastructure. By quantifying the frequency, intensity, and duration of climate extremes, these indicators enable the systematic evaluation of climate-related risks and inform the selection of nature-based solutions for infrastructure resilience.

The indicators below are automatically generated from the clima_data.indices module, which provides standardized calculations following established climatological practices.

List of climatic indicators

cdd(pr)

Maximum consecutive dry days

Maximum number of consecutive days with precipitation below 1 mm/day.

Metadata Value
Identifier cdd
Units days
Frequency YS
Standard Name number_of_days_with_lwe_thickness_of_precipitation_amount_below_threshold

Parameters:

Name Type Description Default
pr DataArray

Precipitation (as an xarray DataArray).

required

Returns:

Type Description
DataArray

xarray.DataArray: Maximum consecutive dry days.

Source code in clima_data/indices.py
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
def cdd(pr: xr.DataArray) -> xr.DataArray:
    """**Maximum consecutive dry days**

    Maximum number of consecutive days with precipitation below 1 mm/day.

    | Metadata      | Value                                                           |
    |-------------- |-----------------------------------------------------------------|
    | Identifier    | cdd                                                             |
    | Units         | days                                                            |
    | Frequency     | YS                                                              |
    | Standard Name | number_of_days_with_lwe_thickness_of_precipitation_amount_below_threshold |

    Args:
        pr: Precipitation (as an xarray DataArray).

    Returns:
        xarray.DataArray: Maximum consecutive dry days.
    """
    return xa.maximum_consecutive_dry_days(pr, thresh="1 mm/day", freq="YS")  # type: ignore

cwd(pr)

Maximum consecutive wet days

Maximum number of consecutive days with precipitation above 1 mm/day.

Metadata Value
Identifier cwd
Units days
Frequency YS
Standard Name number_of_days_with_lwe_thickness_of_precipitation_amount_at_or_above_threshold

Parameters:

Name Type Description Default
pr DataArray

Precipitation (as an xarray DataArray).

required

Returns:

Type Description
DataArray

xarray.DataArray: Maximum consecutive wet days.

Source code in clima_data/indices.py
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
def cwd(pr: xr.DataArray) -> xr.DataArray:
    """**Maximum consecutive wet days**

    Maximum number of consecutive days with precipitation above 1 mm/day.

    | Metadata      | Value                                                           |
    |-------------- |-----------------------------------------------------------------|
    | Identifier    | cwd                                                             |
    | Units         | days                                                            |
    | Frequency     | YS                                                              |
    | Standard Name | number_of_days_with_lwe_thickness_of_precipitation_amount_at_or_above_threshold |

    Args:
        pr: Precipitation (as an xarray DataArray).

    Returns:
        xarray.DataArray: Maximum consecutive wet days.
    """
    return xa.maximum_consecutive_wet_days(pr, thresh="1 mm/day", freq="YS")  # type: ignore

hi35(tas, hurs)

Yearly days with heat index > 35°C

Number of days per year with heat index (perceived temperature) > 35°C.

Metadata Value
Identifier hi35
Units days
Frequency YS
Standard Name number_of_days_with_air_temperature_above_threshold

Parameters:

Name Type Description Default
tas DataArray

Air temperature (as an xarray DataArray).

required
hurs DataArray

Relative humidity (as an xarray DataArray).

required

Returns:

Type Description
DataArray

xarray.DataArray: Number of days with heat index > 35°C.

Source code in clima_data/indices.py
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
def hi35(tas: xr.DataArray, hurs: xr.DataArray) -> xr.DataArray:
    """**Yearly days with heat index > 35°C**

    Number of days per year with heat index (perceived temperature) > 35°C.

    | Metadata      | Value                                         |
    |-------------- |-----------------------------------------------|
    | Identifier    | hi35                                          |
    | Units         | days                                          |
    | Frequency     | YS                                            |
    | Standard Name | number_of_days_with_air_temperature_above_threshold |

    Args:
        tas: Air temperature (as an xarray DataArray).
        hurs: Relative humidity (as an xarray DataArray).

    Returns:
        xarray.DataArray: Number of days with heat index > 35°C.
    """
    hi = xa.heat_index(tas=tas, hurs=hurs)
    return (hi > 35).resample(time="YS").sum(dim="time")  # type: ignore

hurs_year(hurs)

Annual mean relative humidity

Mean of daily relative humidity aggregated yearly.

Metadata Value
Identifier hurs
Units %
Frequency YS
Standard Name relative_humidity

Parameters:

Name Type Description Default
hurs DataArray

Relative humidity (as an xarray DataArray).

required

Returns:

Type Description
DataArray

xarray.DataArray: Annual mean relative humidity.

Source code in clima_data/indices.py
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
def hurs_year(hurs: xr.DataArray) -> xr.DataArray:
    """**Annual mean relative humidity**

    Mean of daily relative humidity aggregated yearly.

    | Metadata      | Value           |
    |-------------- |-----------------|
    | Identifier    | hurs            |
    | Units         | %               |
    | Frequency     | YS              |
    | Standard Name | relative_humidity|

    Args:
        hurs: Relative humidity (as an xarray DataArray).

    Returns:
        xarray.DataArray: Annual mean relative humidity.
    """
    return hurs.resample(time="YS").mean()

prcptot_year(pr)

Total yearly precipitation (solid and liquid)

Total yearly accumulated precipitation (solid and liquid).

Metadata Value
Identifier prcptot
Units mm year-1
Frequency YS
Standard Name lwe_thickness_of_precipitation_amount

Parameters:

Name Type Description Default
pr DataArray

Precipitation (as an xarray DataArray).

required

Returns:

Type Description
DataArray

xarray.DataArray: Total yearly accumulated precipitation.

Source code in clima_data/indices.py
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
def prcptot_year(pr: xr.DataArray) -> xr.DataArray:
    """**Total yearly precipitation (solid and liquid)**

    Total yearly accumulated precipitation (solid and liquid).

    | Metadata      | Value                                   |
    |-------------- |-----------------------------------------|
    | Identifier    | prcptot                                 |
    | Units         | mm year-1                               |
    | Frequency     | YS                                      |
    | Standard Name | lwe_thickness_of_precipitation_amount   |

    Args:
        pr: Precipitation (as an xarray DataArray).

    Returns:
        xarray.DataArray: Total yearly accumulated precipitation.
    """
    return xa.precip_accumulation(pr=pr, freq="YS")  # type: ignore

rx1day(pr)

Maximum 1-day precipitation amount

Maximum precipitation amount over a single day.

Metadata Value
Identifier rx1day
Units mm day-1
Frequency YS
Standard Name maximum_1_day_precipitation_amount

Parameters:

Name Type Description Default
pr DataArray

Precipitation (as an xarray DataArray).

required

Returns:

Type Description
DataArray

xarray.DataArray: Maximum 1-day precipitation amount.

Source code in clima_data/indices.py
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
def rx1day(pr: xr.DataArray) -> xr.DataArray:
    """**Maximum 1-day precipitation amount**

    Maximum precipitation amount over a single day.

    | Metadata      | Value                                   |
    |-------------- |-----------------------------------------|
    | Identifier    | rx1day                                  |
    | Units         | mm day-1                                |
    | Frequency     | YS                                      |
    | Standard Name | maximum_1_day_precipitation_amount      |

    Args:
        pr: Precipitation (as an xarray DataArray).

    Returns:
        xarray.DataArray: Maximum 1-day precipitation amount.
    """
    return xa.max_1day_precipitation_amount(pr, freq="YS")  # type: ignore

rx1day_rp(pr)

100-year return level of rx1day

Return level of maximum 1-day precipitation for periods of 2 to 100 years.

Metadata Value
Identifier rx1day_rp
Units mm day-1
Standard Name maximum_1_day_precipitation_amount_X_year_return_period

Parameters:

Name Type Description Default
pr DataArray

Precipitation (as an xarray DataArray).

required

Returns:

Type Description
DataArray

Computed return levels as an xarray.DataArray.

Source code in clima_data/indices.py
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
def rx1day_rp(pr: xr.DataArray) -> xr.DataArray:
    """**100-year return level of rx1day**

    Return level of maximum 1-day precipitation for periods of 2 to 100 years.

    | Metadata      | Value                                                   |
    |-------------- |---------------------------------------------------------|
    | Identifier    | rx1day_rp                                               |
    | Units         | mm day-1                                                |
    | Standard Name | maximum_1_day_precipitation_amount_X_year_return_period |

    Args:
        pr: Precipitation (as an xarray DataArray).

    Returns:
        Computed return levels as an xarray.DataArray.
    """
    rx1day_ = rx1day(pr)
    results = frequency_analysis(
        rx1day_,
        mode="max",
        t=[2, 5, 10, 25, 50, 100, 200, 500],
        dist="genextreme",
        freq="YS",
        method="ML",
    )
    return results  # type: ignore

rx5day(pr)

Maximum 5-day precipitation amount

Maximum precipitation amount over a single day.

Metadata Value
Identifier rx5day
Units mm day-1
Frequency YS
Standard Name maximum_5_day_precipitation_amount

Parameters:

Name Type Description Default
pr DataArray

Precipitation (as an xarray DataArray).

required

Returns:

Type Description
DataArray

xarray.DataArray: Maximum 5-day precipitation amount.

Source code in clima_data/indices.py
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
def rx5day(pr: xr.DataArray) -> xr.DataArray:
    """**Maximum 5-day precipitation amount**

    Maximum precipitation amount over a single day.

    | Metadata      | Value                                   |
    |-------------- |-----------------------------------------|
    | Identifier    | rx5day                                  |
    | Units         | mm day-1                                |
    | Frequency     | YS                                      |
    | Standard Name | maximum_5_day_precipitation_amount      |

    Args:
        pr: Precipitation (as an xarray DataArray).

    Returns:
        xarray.DataArray: Maximum 5-day precipitation amount.
    """
    return xa.max_n_day_precipitation_amount(pr, window=5, freq="YS")  # type: ignore

rx5day_rp(pr)

100-year return level of rx1day

Return level of maximum 5-day precipitation for periods of 2 to 100 years.

Metadata Value
Identifier rx5day_rp
Units mm day-1
Standard Name maximum_1_day_precipitation_amount_X_year_return_period

Parameters:

Name Type Description Default
pr DataArray

Precipitation (as an xarray DataArray).

required

Returns:

Type Description
DataArray

Computed return levels as an xarray.DataArray.

Source code in clima_data/indices.py
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
def rx5day_rp(pr: xr.DataArray) -> xr.DataArray:
    """**100-year return level of rx1day**

    Return level of maximum 5-day precipitation for periods of 2 to 100 years.

    | Metadata      | Value                                                   |
    |-------------- |---------------------------------------------------------|
    | Identifier    | rx5day_rp                                               |
    | Units         | mm day-1                                                |
    | Standard Name | maximum_1_day_precipitation_amount_X_year_return_period |

    Args:
        pr: Precipitation (as an xarray DataArray).

    Returns:
        Computed return levels as an xarray.DataArray.
    """
    rx5day_ = rx5day(pr)
    results = frequency_analysis(
        rx5day_,
        mode="max",
        t=[2, 5, 10, 25, 50, 100, 200, 500],
        dist="genextreme",
        freq="YS",
        method="ML",
    )
    return results  # type: ignore

solidprcptot_winter(pr, tas)

Winter months accumulated solid precipitation (DJF)

Total accumulated solid precipitation during winter months (Dec-Jan-Feb).

Metadata Value
Identifier solidprcptot
Units mm season-1
Frequency QS-DEC
Standard Name lwe_thickness_of_snowfall_amount

Parameters:

Name Type Description Default
pr DataArray

Precipitation (as an xarray DataArray).

required
tas DataArray

Air temperature (as an xarray DataArray).

required

Returns:

Type Description
DataArray

xarray.DataArray: Accumulated solid precipitation during winter months.

Source code in clima_data/indices.py
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
def solidprcptot_winter(pr: xr.DataArray, tas: xr.DataArray) -> xr.DataArray:
    """**Winter months accumulated solid precipitation (DJF)**

    Total accumulated solid precipitation during winter months (Dec-Jan-Feb).

    | Metadata      | Value                           |
    |-------------- |---------------------------------|
    | Identifier    | solidprcptot                    |
    | Units         | mm season-1                    |
    | Frequency     | QS-DEC                         |
    | Standard Name | lwe_thickness_of_snowfall_amount |

    Args:
        pr: Precipitation (as an xarray DataArray).
        tas: Air temperature (as an xarray DataArray).

    Returns:
        xarray.DataArray: Accumulated solid precipitation during winter months.
    """
    return xa.solid_precip_accumulation(pr=pr, tas=tas, thresh="0 degC", freq="QS-DEC")  # type: ignore

solidprcptot_year(pr, tas)

Annual accumulated solid precipitation

Total accumulated solid precipitation per year.

Metadata Value
Identifier solidprcptot
Units mm year-1
Frequency YS
Standard Name lwe_thickness_of_snowfall_amount

Parameters:

Name Type Description Default
pr DataArray

Precipitation (as an xarray DataArray).

required
tas DataArray

Air temperature (as an xarray DataArray).

required

Returns:

Type Description
DataArray

xarray.DataArray: Annual accumulated solid precipitation.

Source code in clima_data/indices.py
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
def solidprcptot_year(pr: xr.DataArray, tas: xr.DataArray) -> xr.DataArray:
    """**Annual accumulated solid precipitation**

    Total accumulated solid precipitation per year.

    | Metadata      | Value                           |
    |-------------- |---------------------------------|
    | Identifier    | solidprcptot                    |
    | Units         | mm year-1                      |
    | Frequency     | YS                             |
    | Standard Name | lwe_thickness_of_snowfall_amount |

    Args:
        pr: Precipitation (as an xarray DataArray).
        tas: Air temperature (as an xarray DataArray).

    Returns:
        xarray.DataArray: Annual accumulated solid precipitation.
    """
    return xa.solid_precip_accumulation(pr=pr, tas=tas, thresh="0 degC", freq="YS")  # type: ignore

tg_year(tas)

Annual mean average temperature

Mean of daily mean temperature aggregated yearly.

Metadata Value
Identifier tg
Units K
Frequency YS
Standard Name air_temperature

Parameters:

Name Type Description Default
tas DataArray

Air temperature (as an xarray DataArray).

required

Returns:

Type Description
DataArray

xarray.DataArray: Annual mean temperature.

Source code in clima_data/indices.py
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
def tg_year(tas: xr.DataArray) -> xr.DataArray:
    """**Annual mean average temperature**

    Mean of daily mean temperature aggregated yearly.

    | Metadata      | Value           |
    |-------------- |-----------------|
    | Identifier    | tg              |
    | Units         | K               |
    | Frequency     | YS              |
    | Standard Name | air_temperature |

    Args:
        tas: Air temperature (as an xarray DataArray).

    Returns:
        xarray.DataArray: Annual mean temperature.
    """
    return xa.tg_mean(tas=tas, freq="YS")  # type: ignore

tn20(tasmin)

Days with minimum temperature < -20°C

Average number of days per year with daily minimum temperature < -20°C.

Metadata Value
Identifier tn20
Units days
Frequency YS
Standard Name number_of_days_with_air_temperature_below_threshold

Parameters:

Name Type Description Default
tasmin DataArray

Daily minimum temperature (as an xarray DataArray).

required

Returns:

Type Description
DataArray

xarray.DataArray: Number of days per year with min temp < -20°C.

Source code in clima_data/indices.py
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
def tn20(tasmin: xr.DataArray) -> xr.DataArray:
    """**Days with minimum temperature < -20°C**

    Average number of days per year with daily minimum temperature < -20°C.

    | Metadata      | Value                                         |
    |-------------- |-----------------------------------------------|
    | Identifier    | tn20                                          |
    | Units         | days                                          |
    | Frequency     | YS                                            |
    | Standard Name | number_of_days_with_air_temperature_below_threshold |

    Args:
        tasmin: Daily minimum temperature (as an xarray DataArray).

    Returns:
        xarray.DataArray: Number of days per year with min temp < -20°C.
    """
    return xa.tn_days_below(tasmin, thresh="-20.0 degC", freq="YS")  # type: ignore

tn_year(tasmin)

Annual mean minimum temperature

Mean of daily minimum temperature aggregated yearly.

Metadata Value
Identifier tn
Units K
Frequency YS
Standard Name air_temperature

Parameters:

Name Type Description Default
tasmin DataArray

Daily minimum temperature (as an xarray DataArray).

required

Returns:

Type Description
DataArray

xarray.DataArray: Annual mean minimum temperature.

Source code in clima_data/indices.py
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
def tn_year(tasmin: xr.DataArray) -> xr.DataArray:
    """**Annual mean minimum temperature**

    Mean of daily minimum temperature aggregated yearly.

    | Metadata      | Value           |
    |-------------- |-----------------|
    | Identifier    | tn              |
    | Units         | K               |
    | Frequency     | YS              |
    | Standard Name | air_temperature |

    Args:
        tasmin: Daily minimum temperature (as an xarray DataArray).

    Returns:
        xarray.DataArray: Annual mean minimum temperature.
    """
    return xa.tn_mean(tasmin=tasmin, freq="YS")  # type: ignore

tx40(tasmax)

Annual days with maximum temperature > 40°C

Average number of days per year with daily maximum temperature > 40°C.

Metadata Value
Identifier tx40
Units days
Frequenc y YS
Standard Name number_of_days_with_air_temperature_above_threshold

Parameters:

Name Type Description Default
tasmax DataArray

Daily maximum temperature (as an xarray DataArray).

required

Returns:

Type Description
DataArray

xarray.DataArray: Number of days per year with max temp > 40°C.

Source code in clima_data/indices.py
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
def tx40(tasmax: xr.DataArray) -> xr.DataArray:
    """**Annual days with maximum temperature > 40°C**

    Average number of days per year with daily maximum temperature > 40°C.

    | Metadata      | Value                                         |
    |-------------- |-----------------------------------------------|
    | Identifier    | tx40                                          |
    | Units         | days                                          |
    | Frequenc y    | YS                                            |
    | Standard Name | number_of_days_with_air_temperature_above_threshold |

    Args:
        tasmax: Daily maximum temperature (as an xarray DataArray).

    Returns:
        xarray.DataArray: Number of days per year with max temp > 40°C.
    """
    return xa.tx_days_above(tasmax, thresh="40.0 degC", freq="YS")  # type: ignore

tx_year(tasmax)

Annual mean maximum temperature

Mean of daily maximum temperature aggregated yearly.

Metadata Value
Identifier tx
Units K
Frequency YS
Standard Name air_temperature

Parameters:

Name Type Description Default
tasmax DataArray

Daily maximum temperature (as an xarray DataArray).

required

Returns:

Type Description
DataArray

xarray.DataArray: Annual mean maximum temperature.

Source code in clima_data/indices.py
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
def tx_year(tasmax: xr.DataArray) -> xr.DataArray:
    """**Annual mean maximum temperature**

    Mean of daily maximum temperature aggregated yearly.

    | Metadata      | Value           |
    |-------------- |-----------------|
    | Identifier    | tx              |
    | Units         | K               |
    | Frequency     | YS              |
    | Standard Name | air_temperature |

    Args:
        tasmax: Daily maximum temperature (as an xarray DataArray).

    Returns:
        xarray.DataArray: Annual mean maximum temperature.
    """
    return xa.tx_mean(tasmax=tasmax, freq="YS")  # type: ignore

vpd(tas, hurs)

Vapor pressure deficit

Annual vapor pressure deficit.

Metadata Value
Identifier vpd
Units Pa
Frequency YS
Standard Name vapor_pressure_deficit

Parameters:

Name Type Description Default
tas DataArray

Air temperature (as an xarray DataArray).

required
hurs DataArray

Relative humidity (as an xarray DataArray).

required

Returns:

Type Description
DataArray

xarray.DataArray: Vapor pressure deficit.

Source code in clima_data/indices.py
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
def vpd(tas: xr.DataArray, hurs: xr.DataArray) -> xr.DataArray:
    """**Vapor pressure deficit**

    Annual vapor pressure deficit.

    | Metadata      | Value           |
    |-------------- |-----------------|
    | Identifier    | vpd             |
    | Units         | Pa              |
    | Frequency     | YS              |
    | Standard Name | vapor_pressure_deficit |

    Args:
        tas: Air temperature (as an xarray DataArray).
        hurs: Relative humidity (as an xarray DataArray).

    Returns:
        xarray.DataArray: Vapor pressure deficit.
    """
    return xa.vapor_pressure_deficit(tas=tas, hurs=hurs).resample(time="YS").mean()  # type: ignore