File size: 5,120 Bytes
711bc31
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
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
98
99
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

from climateqa.engine.talk_to_data.ui_config import PRECIPITATION_COLORSCALE, TEMPERATURE_COLORSCALE


DRIAS_TABLES = [
    "total_winter_precipitation",
    "total_summer_precipitation",
    "total_annual_precipitation",
    "total_remarkable_daily_precipitation",
    "frequency_of_remarkable_daily_precipitation",
    "extreme_precipitation_intensity",
    "mean_winter_temperature",
    "mean_summer_temperature",
    "mean_annual_temperature",
    "number_of_tropical_nights",
    "maximum_summer_temperature",
    "number_of_days_with_tx_above_30",
    "number_of_days_with_tx_above_35",
    "number_of_days_with_a_dry_ground",
]

DRIAS_INDICATOR_COLUMNS_PER_TABLE = {
    "total_winter_precipitation": "total_winter_precipitation",
    "total_summer_precipitation": "total_summer_precipitation",
    "total_annual_precipitation": "total_annual_precipitation",
    "total_remarkable_daily_precipitation": "total_remarkable_daily_precipitation",
    "frequency_of_remarkable_daily_precipitation": "frequency_of_remarkable_daily_precipitation",
    "extreme_precipitation_intensity": "extreme_precipitation_intensity",
    "mean_winter_temperature": "mean_winter_temperature",
    "mean_summer_temperature": "mean_summer_temperature",
    "mean_annual_temperature": "mean_annual_temperature",
    "number_of_tropical_nights": "number_tropical_nights",
    "maximum_summer_temperature": "maximum_summer_temperature",
    "number_of_days_with_tx_above_30": "number_of_days_with_tx_above_30",
    "number_of_days_with_tx_above_35": "number_of_days_with_tx_above_35",
    "number_of_days_with_a_dry_ground": "number_of_days_with_dry_ground"
}

DRIAS_MODELS = [
    'ALL',
    'RegCM4-6_MPI-ESM-LR',
    'RACMO22E_EC-EARTH',
    'RegCM4-6_HadGEM2-ES',
    'HadREM3-GA7_EC-EARTH',
    'HadREM3-GA7_CNRM-CM5',
    'REMO2015_NorESM1-M',
    'SMHI-RCA4_EC-EARTH',
    'WRF381P_NorESM1-M',
    'ALADIN63_CNRM-CM5',
    'CCLM4-8-17_MPI-ESM-LR',
    'HIRHAM5_IPSL-CM5A-MR',
    'HadREM3-GA7_HadGEM2-ES',
    'SMHI-RCA4_IPSL-CM5A-MR',
    'HIRHAM5_NorESM1-M',
    'REMO2009_MPI-ESM-LR',
    'CCLM4-8-17_HadGEM2-ES'
]
# Mapping between indicator columns and their units
DRIAS_INDICATOR_TO_UNIT = {
    "total_winter_precipitation": "mm",
    "total_summer_precipitation": "mm",
    "total_annual_precipitation": "mm",
    "total_remarkable_daily_precipitation": "mm",
    "frequency_of_remarkable_daily_precipitation": "days",
    "extreme_precipitation_intensity": "mm",
    "mean_winter_temperature": "°C",
    "mean_summer_temperature": "°C",
    "mean_annual_temperature": "°C",
    "number_tropical_nights": "days",
    "maximum_summer_temperature": "°C",
    "number_of_days_with_tx_above_30": "days",
    "number_of_days_with_tx_above_35": "days",
    "number_of_days_with_dry_ground": "days"
}

DRIAS_PLOT_PARAMETERS = [
    'year',
    'location'
]

DRIAS_INDICATOR_TO_COLORSCALE = {
    "total_winter_precipitation": PRECIPITATION_COLORSCALE,
    "total_summer_precipitation": PRECIPITATION_COLORSCALE,
    "total_annual_precipitation": PRECIPITATION_COLORSCALE,
    "total_remarkable_daily_precipitation": PRECIPITATION_COLORSCALE,
    "frequency_of_remarkable_daily_precipitation": PRECIPITATION_COLORSCALE,
    "extreme_precipitation_intensity": PRECIPITATION_COLORSCALE,
    "mean_winter_temperature":TEMPERATURE_COLORSCALE,
    "mean_summer_temperature":TEMPERATURE_COLORSCALE,
    "mean_annual_temperature":TEMPERATURE_COLORSCALE,
    "number_tropical_nights": TEMPERATURE_COLORSCALE,
    "maximum_summer_temperature":TEMPERATURE_COLORSCALE,
    "number_of_days_with_tx_above_30": TEMPERATURE_COLORSCALE,
    "number_of_days_with_tx_above_35": TEMPERATURE_COLORSCALE,
    "number_of_days_with_dry_ground": TEMPERATURE_COLORSCALE
}

DRIAS_UI_TEXT = """
Hi, I'm **Talk to Drias**, designed to answer your questions using [**DRIAS - TRACC 2023**](https://www.drias-climat.fr/accompagnement/sections/401) data.  
I'll answer by displaying a list of SQL queries, graphs and data most relevant to your question.

You can ask me anything about these climate indicators: **temperature**, **precipitation** or **drought**.  
You can specify **location** and/or **year**.  
You can choose from a list of climate models. By default, we take the **average of each model**.

For example, you can ask:  
- What will the temperature be like in Paris?  
- What will be the total rainfall in France in 2030?  
- How frequent will extreme events be in Lyon?  

**Example of indicators in the data**:  
- Mean temperature (annual, winter, summer)  
- Total precipitation (annual, winter, summer)  
- Number of days with remarkable precipitations, with dry ground, with temperature above 30°C  

⚠️ **Limitations**:  
- You can't ask anything that isn't related to **DRIAS - TRACC 2023** data.  
- You can only ask about **locations in France**.  
- If you specify a year, there may be **no data for that year for some models**.  
- You **cannot compare two models**.  

🛈 **Information**  
Please note that we **log your questions for meta-analysis purposes**, so avoid sharing any sensitive or personal information.
"""