Skip to content

Commit 6f8b4ca

Browse files
fix typo and remove unused import from SST bias POD notebook
1 parent 95e02fb commit 6f8b4ca

File tree

1 file changed

+71
-20
lines changed

1 file changed

+71
-20
lines changed

diagnostics/mar/SST_bias_NOAA_OISSTv2/SST_bias_NOAA_OISSTv2.ipynb

Lines changed: 71 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,17 @@
1414
{
1515
"cell_type": "code",
1616
"id": "50093a3b-2193-4041-8409-de3dc594cf7d",
17-
"metadata": {},
17+
"metadata": {
18+
"ExecuteTime": {
19+
"end_time": "2025-04-24T15:27:45.368831Z",
20+
"start_time": "2025-04-24T15:27:45.362743Z"
21+
}
22+
},
1823
"source": [
1924
"\n",
2025
"\n",
2126
"# For testing and development purposes, enter a start year, end year, and\n",
22-
"# an dora id number to analyze. The value of dora_id can also be a direct\n",
27+
"# a dora id number to analyze. The value of dora_id can also be a direct\n",
2328
"# path to a /pp directory.\n",
2429
"\n",
2530
"config = {\n",
@@ -29,10 +34,15 @@
2934
"}"
3035
],
3136
"outputs": [],
32-
"execution_count": null
37+
"execution_count": 1
3338
},
3439
{
35-
"metadata": {},
40+
"metadata": {
41+
"ExecuteTime": {
42+
"end_time": "2025-04-24T15:27:47.535298Z",
43+
"start_time": "2025-04-24T15:27:47.530951Z"
44+
}
45+
},
3646
"cell_type": "code",
3747
"source": [
3848
"# Make sure this cell is active so that the workflow and Dora can update\n",
@@ -43,17 +53,30 @@
4353
],
4454
"id": "9b94e2fadf0ab2c6",
4555
"outputs": [],
46-
"execution_count": null
56+
"execution_count": 2
4757
},
4858
{
4959
"cell_type": "code",
5060
"id": "cae4343a-ced9-41be-9fa6-3a6b42188886",
51-
"metadata": {},
61+
"metadata": {
62+
"ExecuteTime": {
63+
"end_time": "2025-04-24T15:27:49.675915Z",
64+
"start_time": "2025-04-24T15:27:49.668710Z"
65+
}
66+
},
5267
"source": [
5368
"print(str(config))"
5469
],
55-
"outputs": [],
56-
"execution_count": null
70+
"outputs": [
71+
{
72+
"name": "stdout",
73+
"output_type": "stream",
74+
"text": [
75+
"{'startyr': None, 'endyr': None, 'dora_id': 'odiv-413'}\n"
76+
]
77+
}
78+
],
79+
"execution_count": 3
5780
},
5881
{
5982
"cell_type": "markdown",
@@ -64,12 +87,15 @@
6487
]
6588
},
6689
{
90+
"metadata": {
91+
"ExecuteTime": {
92+
"end_time": "2025-04-24T15:28:03.718328Z",
93+
"start_time": "2025-04-24T15:27:52.003735Z"
94+
}
95+
},
6796
"cell_type": "code",
68-
"id": "dfcdc828-ad45-4ef0-92bc-05df9c036270",
69-
"metadata": {},
7097
"source": [
7198
"import doralite\n",
72-
"import glob\n",
7399
"import momlevel\n",
74100
"import subprocess\n",
75101
"import os\n",
@@ -85,20 +111,26 @@
85111
"\n",
86112
"from matplotlib.colors import ListedColormap, BoundaryNorm"
87113
],
114+
"id": "c57e0f8b0c23ad83",
88115
"outputs": [],
89-
"execution_count": null
116+
"execution_count": 4
90117
},
91118
{
92119
"cell_type": "code",
93120
"id": "806241bd-ebea-4640-ab69-cea6edba62de",
94-
"metadata": {},
121+
"metadata": {
122+
"ExecuteTime": {
123+
"end_time": "2025-04-24T15:28:18.455386Z",
124+
"start_time": "2025-04-24T15:28:18.133552Z"
125+
}
126+
},
95127
"source": [
96128
"# momgrid will use a directory of pre-computed weights that is used for calculating basic area-weighted statistics later\n",
97129
"import momgrid\n",
98130
"os.environ[\"MOMGRID_WEIGHTS_DIR\"] = \"/nbhome/John.Krasting/grid_weights\""
99131
],
100132
"outputs": [],
101-
"execution_count": null
133+
"execution_count": 5
102134
},
103135
{
104136
"cell_type": "markdown",
@@ -111,7 +143,12 @@
111143
{
112144
"cell_type": "code",
113145
"id": "04229c22-3781-400f-a390-8c5eaaef5189",
114-
"metadata": {},
146+
"metadata": {
147+
"ExecuteTime": {
148+
"end_time": "2025-04-24T15:28:21.109929Z",
149+
"start_time": "2025-04-24T15:28:21.014072Z"
150+
}
151+
},
115152
"source": [
116153
"# Define some local variables. These are taken from the doralite object\n",
117154
"# or they can be defined locally\n",
@@ -136,7 +173,7 @@
136173
"end = int(end) if end is not None else 9999"
137174
],
138175
"outputs": [],
139-
"execution_count": null
176+
"execution_count": 6
140177
},
141178
{
142179
"cell_type": "markdown",
@@ -150,8 +187,9 @@
150187
"cell_type": "code",
151188
"id": "382835f3-a3d7-419f-a92f-e65808230c59",
152189
"metadata": {
153-
"jupyter": {
154-
"is_executing": true
190+
"ExecuteTime": {
191+
"end_time": "2025-04-24T15:28:28.100167Z",
192+
"start_time": "2025-04-24T15:28:27.611343Z"
155193
}
156194
},
157195
"source": [
@@ -198,8 +236,21 @@
198236
"\n",
199237
"#_ = [print(x) for x in filelist]"
200238
],
201-
"outputs": [],
202-
"execution_count": null
239+
"outputs": [
240+
{
241+
"ename": "KeyError",
242+
"evalue": "'CATALOG_FILE'",
243+
"output_type": "error",
244+
"traceback": [
245+
"\u001B[31m---------------------------------------------------------------------------\u001B[39m",
246+
"\u001B[31mKeyError\u001B[39m Traceback (most recent call last)",
247+
"\u001B[36mCell\u001B[39m\u001B[36m \u001B[39m\u001B[32mIn[7]\u001B[39m\u001B[32m, line 11\u001B[39m\n\u001B[32m 9\u001B[39m cat = intake.open_esm_datastore(os.environ[\u001B[33m'\u001B[39m\u001B[33mCATALOG_FILE\u001B[39m\u001B[33m'\u001B[39m])\n\u001B[32m 10\u001B[39m \u001B[38;5;28;01mexcept\u001B[39;00m \u001B[38;5;167;01mKeyError\u001B[39;00m:\n\u001B[32m---> \u001B[39m\u001B[32m11\u001B[39m \u001B[38;5;28mprint\u001B[39m(\u001B[33mf\u001B[39m\u001B[33m\"\u001B[39m\u001B[33mERROR: Could not load catalog file \u001B[39m\u001B[38;5;132;01m{\u001B[39;00m\u001B[43mos\u001B[49m\u001B[43m.\u001B[49m\u001B[43menviron\u001B[49m\u001B[43m[\u001B[49m\u001B[33;43m'\u001B[39;49m\u001B[33;43mCATALOG_FILE\u001B[39;49m\u001B[33;43m'\u001B[39;49m\u001B[43m]\u001B[49m\u001B[38;5;132;01m}\u001B[39;00m\u001B[33m\"\u001B[39m)\n\u001B[32m 13\u001B[39m tos_subset = cat.search(variable_id=\u001B[33m'\u001B[39m\u001B[33mtos\u001B[39m\u001B[33m'\u001B[39m, frequency=frequency)\n\u001B[32m 14\u001B[39m filelist = \u001B[38;5;28msorted\u001B[39m([path \u001B[38;5;28;01mfor\u001B[39;00m path \u001B[38;5;129;01min\u001B[39;00m tos_subset.df[\u001B[33m'\u001B[39m\u001B[33mpath\u001B[39m\u001B[33m'\u001B[39m]])\n",
248+
"\u001B[36mFile \u001B[39m\u001B[32m<frozen os>:714\u001B[39m, in \u001B[36m__getitem__\u001B[39m\u001B[34m(self, key)\u001B[39m\n",
249+
"\u001B[31mKeyError\u001B[39m: 'CATALOG_FILE'"
250+
]
251+
}
252+
],
253+
"execution_count": 7
203254
},
204255
{
205256
"cell_type": "markdown",

0 commit comments

Comments
 (0)