Skip to content

Commit 02b586d

Browse files
author
cuadradot
committed
refactor: move climate indicators to atmos sub-package and update notebook imports
1 parent 03c8861 commit 02b586d

9 files changed

Lines changed: 79 additions & 74 deletions

docs/notebooks/era5_decadal_warming.ipynb

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
},
3131
{
3232
"cell_type": "code",
33-
"execution_count": 1,
33+
"execution_count": null,
3434
"id": "imports",
3535
"metadata": {},
3636
"outputs": [],
@@ -40,7 +40,7 @@
4040
"import matplotlib.pyplot as plt\n",
4141
"import pandas as pd\n",
4242
"\n",
43-
"from earthkit.climate.indicators.temperature import tn_days_above, tx_days_above"
43+
"from earthkit.climate.indicators.atmos.temperature import tn_days_above, tx_days_above"
4444
]
4545
},
4646
{
@@ -55,7 +55,7 @@
5555
},
5656
{
5757
"cell_type": "code",
58-
"execution_count": 2,
58+
"execution_count": null,
5959
"id": "download_code",
6060
"metadata": {},
6161
"outputs": [
@@ -98,7 +98,7 @@
9898
},
9999
{
100100
"cell_type": "code",
101-
"execution_count": 3,
101+
"execution_count": null,
102102
"id": "processing_code",
103103
"metadata": {},
104104
"outputs": [],
@@ -135,7 +135,7 @@
135135
},
136136
{
137137
"cell_type": "code",
138-
"execution_count": 4,
138+
"execution_count": null,
139139
"id": "indicators_code",
140140
"metadata": {},
141141
"outputs": [],
@@ -159,7 +159,7 @@
159159
},
160160
{
161161
"cell_type": "code",
162-
"execution_count": 7,
162+
"execution_count": null,
163163
"id": "visualization_code",
164164
"metadata": {},
165165
"outputs": [
@@ -249,7 +249,7 @@
249249
},
250250
{
251251
"cell_type": "code",
252-
"execution_count": 6,
252+
"execution_count": null,
253253
"id": "decadal_code",
254254
"metadata": {},
255255
"outputs": [

docs/notebooks/frost_days_pyrenees.ipynb

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,17 +37,29 @@
3737
},
3838
{
3939
"cell_type": "code",
40-
"execution_count": null,
40+
"execution_count": 1,
4141
"id": "imports",
4242
"metadata": {},
43-
"outputs": [],
43+
"outputs": [
44+
{
45+
"ename": "ModuleNotFoundError",
46+
"evalue": "No module named 'earhtki'",
47+
"output_type": "error",
48+
"traceback": [
49+
"\u001b[31m---------------------------------------------------------------------------\u001b[39m",
50+
"\u001b[31mModuleNotFoundError\u001b[39m Traceback (most recent call last)",
51+
"\u001b[36mCell\u001b[39m\u001b[36m \u001b[39m\u001b[32mIn[1]\u001b[39m\u001b[32m, line 1\u001b[39m\n\u001b[32m----> \u001b[39m\u001b[32m1\u001b[39m \u001b[38;5;28;01mimport\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[34;01mearhtki\u001b[39;00m\u001b[34;01m.\u001b[39;00m\u001b[34;01mtransforms\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[38;5;28;01mas\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[34;01mekt\u001b[39;00m\n\u001b[32m 2\u001b[39m \u001b[38;5;28;01mimport\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[34;01mearthkit\u001b[39;00m\u001b[34;01m.\u001b[39;00m\u001b[34;01mdata\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[38;5;28;01mas\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[34;01mekd\u001b[39;00m\n\u001b[32m 3\u001b[39m \u001b[38;5;28;01mimport\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[34;01mearthkit\u001b[39;00m\u001b[34;01m.\u001b[39;00m\u001b[34;01mplots\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[38;5;28;01mas\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[34;01mekp\u001b[39;00m\n",
52+
"\u001b[31mModuleNotFoundError\u001b[39m: No module named 'earhtki'"
53+
]
54+
}
55+
],
4456
"source": [
4557
"import earhtki.transforms as ekt\n",
4658
"import earthkit.data as ekd\n",
4759
"import earthkit.plots as ekp\n",
4860
"import numpy as np\n",
4961
"\n",
50-
"from earthkit.climate.indicators.temperature import frost_days"
62+
"from earthkit.climate.indicators.atmos.temperature import frost_days"
5163
]
5264
},
5365
{
@@ -66,7 +78,7 @@
6678
},
6779
{
6880
"cell_type": "code",
69-
"execution_count": 4,
81+
"execution_count": null,
7082
"id": "download_code",
7183
"metadata": {},
7284
"outputs": [
@@ -129,7 +141,7 @@
129141
},
130142
{
131143
"cell_type": "code",
132-
"execution_count": 16,
144+
"execution_count": null,
133145
"id": "processing_code",
134146
"metadata": {},
135147
"outputs": [],
@@ -180,7 +192,7 @@
180192
},
181193
{
182194
"cell_type": "code",
183-
"execution_count": 5,
195+
"execution_count": null,
184196
"id": "visualize_code",
185197
"metadata": {},
186198
"outputs": [

docs/notebooks/heatwave_evolution.ipynb

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,7 @@
3030
"execution_count": 1,
3131
"id": "46d7c451",
3232
"metadata": {},
33-
"outputs": [
34-
{
35-
"name": "stderr",
36-
"output_type": "stream",
37-
"text": [
38-
" \r"
39-
]
40-
}
41-
],
33+
"outputs": [],
4234
"source": [
4335
"import warnings\n",
4436
"\n",
@@ -47,7 +39,7 @@
4739
"import xarray\n",
4840
"\n",
4941
"from earthkit.climate.datasets import load_sample_datasets\n",
50-
"from earthkit.climate.indicators.temperature import (\n",
42+
"from earthkit.climate.indicators.atmos.temperature import (\n",
5143
" heat_wave_frequency,\n",
5244
" heat_wave_total_length,\n",
5345
")\n",

docs/notebooks/intro_precipitation_indices.ipynb

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
},
2323
{
2424
"cell_type": "code",
25-
"execution_count": 14,
25+
"execution_count": null,
2626
"id": "1b36bd42f74117db",
2727
"metadata": {},
2828
"outputs": [],
@@ -36,7 +36,7 @@
3636
"import xarray as xr\n",
3737
"\n",
3838
"from earthkit.climate.datasets import load_sample_datasets\n",
39-
"from earthkit.climate.indicators.precipitation import (\n",
39+
"from earthkit.climate.indicators.atmos.precipitation import (\n",
4040
" daily_pr_intensity,\n",
4141
" maximum_consecutive_wet_days,\n",
4242
")\n",
@@ -104,7 +104,7 @@
104104
},
105105
{
106106
"cell_type": "code",
107-
"execution_count": 15,
107+
"execution_count": null,
108108
"id": "5c6692d99197d4af",
109109
"metadata": {},
110110
"outputs": [],
@@ -126,7 +126,7 @@
126126
},
127127
{
128128
"cell_type": "code",
129-
"execution_count": 16,
129+
"execution_count": null,
130130
"id": "51a81669f2d9f6fd",
131131
"metadata": {},
132132
"outputs": [
@@ -169,7 +169,7 @@
169169
},
170170
{
171171
"cell_type": "code",
172-
"execution_count": 17,
172+
"execution_count": null,
173173
"id": "4d1d91636c7a72d7",
174174
"metadata": {},
175175
"outputs": [
@@ -922,7 +922,7 @@
922922
},
923923
{
924924
"cell_type": "code",
925-
"execution_count": 18,
925+
"execution_count": null,
926926
"id": "e963ee8391584c3",
927927
"metadata": {},
928928
"outputs": [
@@ -1691,7 +1691,7 @@
16911691
},
16921692
{
16931693
"cell_type": "code",
1694-
"execution_count": 19,
1694+
"execution_count": null,
16951695
"id": "89b94098923a139a",
16961696
"metadata": {},
16971697
"outputs": [

0 commit comments

Comments
 (0)