4 "cell_type": "markdown",
5 "id": "244c2fb0-4339-476c-a2db-a641e124e25a",
8 "# v2.1 exploration trying to make it work better"
14 "id": "e6cc7920-e380-4b81-bac0-cd6840450e9a",
20 "import os.path as osp\n",
21 "import numpy as np\n",
22 "import pandas as pd\n",
23 "import tensorflow as tf\n",
24 "import matplotlib.pyplot as plt\n",
27 "sys.path.append('..')\n",
28 "import reproducibility\n",
29 "import pandas as pd\n",
30 "from utils import print_dict_summary\n",
31 "from data_funcs import rmse, process_train_dict\n",
32 "from moisture_rnn import RNNParams, RNNData, RNN, RNN_LSTM\n",
33 "from moisture_rnn_pkl import pkl2train\n",
34 "from tensorflow.keras.callbacks import Callback\n",
35 "from utils import hash2\n",
39 "from utils import logging_setup, read_yml, read_pkl, hash_ndarray, hash_weights\n",
47 "id": "f58e8839-bf0e-4995-b966-c09e4df001ce",
55 "cell_type": "markdown",
56 "id": "fae67b50-f916-45a7-bcc7-61995ba39449",
65 "id": "c7336361-ae76-47be-9123-0d55905b71a5",
70 "output_type": "stream",
72 "Target data already exists at data/fmda_rocky_202403-05_f05.pkl\n"
77 "filename=\"fmda_rocky_202403-05_f05.pkl\"\n",
78 "from utils import retrieve_url\n",
80 " url = f\"https://demo.openwfm.org/web/data/fmda/dicts/{filename}\", \n",
81 " dest_path = f\"data/{filename}\")"
87 "id": "576ff6f7-dd4b-41c5-93c7-3bbcb129f1bd",
91 "input_file_path = f\"data/{filename}\""
97 "id": "fc61f0b1-0131-468e-bc2e-b1914bc7a3ba",
101 "import importlib\n",
102 "import data_funcs\n",
103 "importlib.reload(data_funcs)\n",
104 "from data_funcs import build_train_dict"
109 "execution_count": null,
110 "id": "52084c3d-e930-4dd0-b1c6-3ef197238c4e",
116 "train = build_train_dict('data/test_CA_202401.pkl', \n",
117 " features_all=['Ed', 'Ew', 'solar', 'wind', 'elev', 'lon', 'lat', 'doy', 'hod', 'rain'])"
122 "execution_count": null,
123 "id": "60ff65db-9482-4728-9f34-a1998b4804a1",
129 "train = build_train_dict('data/test_CA_202401.pkl', \n",
130 " features_all=['Ed', 'Ew', 'solar', 'wind', 'elev', 'lon', 'lat', 'doy', 'hod', 'rain'])"
135 "execution_count": null,
136 "id": "4b6ee3cc-f877-4815-99b2-6dbd64fa7652",
143 "execution_count": null,
144 "id": "9cfd67b5-8fca-49d9-974e-47090338c6e0",
151 "execution_count": null,
152 "id": "8e7d5054-d954-4f9d-b2e6-df56cd81db94",
159 "execution_count": 6,
160 "id": "68dc8c7a-664e-44d2-991e-0110306e9a60",
165 "output_type": "stream",
167 "loading file data/test_CA_202401.pkl\n"
172 "dat = read_pkl('data/test_CA_202401.pkl')"
177 "execution_count": 7,
178 "id": "dc278c61-0a2f-42d0-8e21-0edb219ee2df",
182 "feature_types = {\n",
183 " # Static features are based on physical location, e.g. location of RAWS site\n",
184 " 'static': ['elev', 'lon', 'lat'],\n",
185 " # Atmospheric weather features come from either RAWS subdict or HRRR\n",
186 " 'atm': ['temp', 'rh', 'wind', 'solar', 'soilm', 'canopyw', 'groundflux', 'Ed', 'Ew'],\n",
187 " # Features that require calculation. NOTE: rain only calculated in HRRR, not RAWS\n",
188 " 'engineered': ['doy', 'hod', 'rain']\n",
194 "execution_count": null,
195 "id": "c7fdba86-1a25-4a81-8f45-a400dd9e2edb",
199 "subdict = dat['CNFC1_202401']"
204 "execution_count": null,
205 "id": "7ea443f4-a665-4920-b8da-8af79d922e74",
211 "subdict['HRRR']['time']"
216 "execution_count": 15,
217 "id": "b4847a87-c341-41d3-8a78-e17ab27314b5",
221 "from utils import str2time, check_increment"
226 "execution_count": 16,
227 "id": "28a5c3b1-f561-4c39-a791-398e0535de8c",
232 "output_type": "stream",
234 "loading file data/test_CA_202401.pkl\n"
239 "dat = read_pkl('data/test_CA_202401.pkl')"
244 "execution_count": 17,
245 "id": "b1ffd6e8-ac1c-41d4-94e6-69802d53dcfe",
251 "dict_keys(['loc', 'RAWS', 'HRRR'])"
254 "execution_count": 17,
256 "output_type": "execute_result"
260 "key = 'CRVC1_202401'\n",
261 "subdict = dat[key]\n",
267 "execution_count": 18,
268 "id": "e8cd1198-affc-4db0-a943-541c69dc250f",
272 "def check_feat(feat, d):\n",
273 " if feat not in d:\n",
274 " raise ValueError(f\"Feature {feat} not found\")"
279 "execution_count": 19,
280 "id": "a0284ec9-c43a-4009-aff4-66e3abfab86b",
284 "def get_time(d, atm=\"HRRR\"):\n",
285 " check_feat('time', d[atm])\n",
286 " time = str2time(d[atm]['time'])\n",
292 "execution_count": 20,
293 "id": "b0eea7b9-81d0-454d-85fa-2046f9b57774",
297 "time = get_time(subdict)\n",
303 "execution_count": 21,
304 "id": "846495e4-e1f9-4b3e-b226-1d0c2f4f7fa8",
309 "output_type": "stream",
311 "2024-10-02 14:47:22,924 - INFO - CRVC1_202401 HRRR.time time array increments are 1.0 hours\n"
316 "hrrr_increment = check_increment(time,id=key+f' {\"HRRR\"}.time')\n",
317 "if hrrr_increment < 1:\n",
318 " # logging.critical('HRRR increment is %s h must be at least 1 h',hrrr_increment)\n",
324 "execution_count": 22,
325 "id": "774da197-239c-4d72-b827-8e7d6e6fa077",
331 "['elev', 'lon', 'lat']"
334 "execution_count": 22,
336 "output_type": "execute_result"
340 "feature_types['static']"
345 "execution_count": 23,
346 "id": "3d1147f6-c616-4591-aada-b75a629cc4bd",
350 "def get_static(d, hours):\n",
352 " # Use all static vars, don't allow for missing \n",
353 " names = feature_types['static']\n",
354 " for feat in names:\n",
355 " check_feat(feat, d['loc'])\n",
356 " cols.append(np.full(hours,d['loc'][feat]))\n",
357 " return cols, names"
362 "execution_count": 33,
363 "id": "98da4a2d-dce1-4cf5-9175-4fb9aa44f7bf",
367 "static_vars, static_names = get_static(subdict, hours)"
372 "execution_count": 34,
373 "id": "0e5d270f-21de-4481-874f-9c159e46bf41",
382 "execution_count": 34,
384 "output_type": "execute_result"
393 "execution_count": 35,
394 "id": "3fe92659-ba04-43a2-9423-8cc2d6b4dfba",
404 "execution_count": 36,
405 "id": "0ddb6cf5-63e6-4f7e-9e69-7fa6b34bfe9c",
409 "cols.append(time)\n",
410 "names.append('time')"
415 "execution_count": 37,
416 "id": "be4db59e-d006-4f01-ae65-5da73cf31de8",
420 "cols.extend(static_vars)\n",
421 "names.extend(static_names)"
426 "execution_count": 38,
427 "id": "71d014a6-0952-4590-8529-47f90fd0e9f7",
436 "execution_count": 38,
438 "output_type": "execute_result"
447 "execution_count": 39,
448 "id": "f64865a1-c08e-4ab2-a1a4-0ad3bee32bc7",
457 "execution_count": 39,
459 "output_type": "execute_result"
468 "execution_count": 40,
469 "id": "b0d89547-750b-40d7-8e8d-fe3f2bd84db4",
473 "def get_hrrr_atm(d, fstep):\n",
475 " # Use all names, don't allow for missing \n",
476 " names = feature_types['atm'].copy()\n",
477 " for feat in names:\n",
478 " check_feat(feat, d[\"HRRR\"][fstep])\n",
479 " v = d[\"HRRR\"][fstep][feat] \n",
481 " return cols, names"
486 "execution_count": 41,
487 "id": "781d129d-ee92-4389-a40c-5a558bde6c6b",
496 "execution_count": 42,
497 "id": "7c9c799c-4dac-4682-8ec7-9375f43f2099",
501 "if forecast_step > 0 and forecast_step < 100 and forecast_step == int(forecast_step):\n",
502 " fstep='f'+str(forecast_step).zfill(2)\n",
503 " fprev='f'+str(forecast_step-1).zfill(2)\n",
504 " # logging.info('Using data from step %s',fstep)\n",
505 " # logging.info('Using rain as the difference of accumulated precipitation between %s and %s',fstep,fprev)\n",
507 " # logging.critical('forecast_step must be integer between 1 and 99')\n",
508 " raise ValueError('bad forecast_step')"
513 "execution_count": 45,
514 "id": "7a331b19-57ae-4acb-9a11-d19126c4b167",
518 "atm_cols, atm_names = get_hrrr_atm(subdict, fstep)"
523 "execution_count": 46,
524 "id": "a1768ebf-6cd6-421c-a10c-92fb7b48efba",
533 "execution_count": 46,
535 "output_type": "execute_result"
544 "execution_count": 48,
545 "id": "f2687911-3391-4e54-972a-d9653120303d",
549 "cols.extend(atm_cols)\n",
550 "names.extend(atm_names)"
555 "execution_count": 49,
556 "id": "944109f3-ad20-4879-a9f3-e1672e7c66b5",
565 "execution_count": 49,
567 "output_type": "execute_result"
576 "execution_count": 50,
577 "id": "22d15be2-cb93-424a-ae49-8159d071c24d",
586 "execution_count": 50,
588 "output_type": "execute_result"
597 "execution_count": 51,
598 "id": "11d4a584-cb1c-4a68-bbb9-f64dfd604eca",
602 "def calc_time_features(time):\n",
603 " names = ['doy', 'hod']\n",
604 " doy = np.array([dt.timetuple().tm_yday - 1 for dt in time])\n",
605 " hod = time.astype('datetime64[h]').astype(int) % 24\n",
606 " cols = [doy, hod]\n",
607 " return cols, names"
612 "execution_count": 58,
613 "id": "51fa8495-652f-411f-9ab0-95787eff6666",
617 "tvars, tnames = calc_time_features(time)"
622 "execution_count": 59,
623 "id": "23cf97b8-e23b-467f-8bd1-9c9880c66f6e",
632 "execution_count": 59,
634 "output_type": "execute_result"
643 "execution_count": 60,
644 "id": "a02a8753-7c40-477e-a7e4-3939b72216b4",
653 "execution_count": 60,
655 "output_type": "execute_result"
664 "execution_count": 62,
665 "id": "1e21bcf6-f437-4960-83ab-3407123aaf7c",
669 "cols.extend(tvars)\n",
670 "names.extend(tnames)"
675 "execution_count": 63,
676 "id": "327144ac-fe46-4514-b42e-a16ddd7f3655",
685 "execution_count": 63,
687 "output_type": "execute_result"
696 "execution_count": 64,
697 "id": "92376d54-02a3-4a92-8203-511c912c2192",
706 "execution_count": 64,
708 "output_type": "execute_result"
717 "execution_count": 65,
718 "id": "17bc5704-4bbf-4de3-8bc7-719a5f8e4326",
722 "def calc_hrrr_rain(d, fstep):\n",
723 " rain = d[\"HRRR\"][fstep]['precip_accum']- d[\"HRRR\"][fprev]['precip_accum']\n",
729 "execution_count": 66,
730 "id": "a0646009-99a9-4c40-a138-b87cbd13c421",
734 "rain = calc_hrrr_rain(subdict, fstep)"
739 "execution_count": 67,
740 "id": "647ae5d1-d061-41f1-90ea-bb8a9b899fc3",
744 "cols.append(rain)\n",
745 "names.append(\"rain\")"
750 "execution_count": 68,
751 "id": "1e77b860-6537-4079-bc5f-2adf914759ae",
760 "execution_count": 68,
762 "output_type": "execute_result"
771 "execution_count": 69,
772 "id": "de7b003d-c0b1-4a6c-b6f7-769df198041f",
781 "execution_count": 69,
783 "output_type": "execute_result"
792 "execution_count": 70,
793 "id": "bcf623ba-662e-4d9d-9f9d-eb61d6afdcef",
817 "execution_count": 70,
819 "output_type": "execute_result"
828 "execution_count": 72,
829 "id": "0b6789c3-9d79-415c-97ad-037901a394f9",
838 "execution_count": 72,
840 "output_type": "execute_result"
844 "X = np.column_stack(cols)\n",
850 "execution_count": 73,
851 "id": "585ad4ba-220b-4106-b086-c14051c7e446",
855 "from utils import time_intp"
860 "execution_count": 74,
861 "id": "cbf72ba0-151e-4618-9444-712f36a8537b",
867 "['temp', 'rh', 'wind', 'solar', 'soilm', 'canopyw', 'groundflux', 'Ed', 'Ew']"
870 "execution_count": 74,
872 "output_type": "execute_result"
876 "feature_types['atm']"
881 "execution_count": 75,
882 "id": "9cb60fae-0bf0-4dfa-bc5a-0188f67835aa",
886 "def get_raws_atm(d, time):\n",
887 " # may not be the same as requested time vector, used to interpolate to input time\n",
888 " time_raws=str2time(d['RAWS']['time_raws']) \n",
893 " # Loop through all features, including rain\n",
894 " for feat in feature_types['atm']+['rain']:\n",
895 " if feat in d['RAWS']:\n",
896 " v = d['RAWS'][feat]\n",
897 " v = time_intp(time_raws, v, time)\n",
898 " assert len(v)==len(time), f\"RAWS feature {feat} not equal length to input time: {len(v)} vs {len(time)}\"\n",
900 " names.append(feat)\n",
901 " return cols, names"
906 "execution_count": 76,
907 "id": "46654c6b-91b2-44f5-a971-b4cb8f0a9f5f",
913 "['temp', 'rh', 'wind', 'solar', 'soilm', 'canopyw', 'groundflux', 'Ed', 'Ew']"
916 "execution_count": 76,
918 "output_type": "execute_result"
922 "feature_types['atm']"
927 "execution_count": 77,
928 "id": "ea198b64-9f07-41fd-a6f5-e19299dbe9ba",
946 "execution_count": 77,
948 "output_type": "execute_result"
952 "feature_types['atm']+['rain']"
957 "execution_count": 86,
958 "id": "89171317-b4c5-4826-97d0-32c062441e4f",
962 "cols2, names2 = get_raws_atm(subdict, time)"
967 "execution_count": 87,
968 "id": "7c547ccb-8a9b-45a8-ae6d-e7d4df06a0e5",
977 "execution_count": 87,
979 "output_type": "execute_result"
988 "execution_count": 88,
989 "id": "ad887759-add2-43c8-8198-acb7308bd58c",
995 "['temp', 'rh', 'wind', 'solar', 'Ed', 'Ew', 'rain']"
998 "execution_count": 88,
1000 "output_type": "execute_result"
1008 "cell_type": "code",
1009 "execution_count": null,
1010 "id": "94f24707-11e5-4d00-b6ec-01849320ff51",
1016 "cell_type": "code",
1017 "execution_count": 90,
1018 "id": "421d92d6-1547-4e6e-9f7b-2a58139475c1",
1022 "def build_single_case(subdict, atm =\"HRRR\"):\n",
1025 " # Get Time variable\n",
1026 " time = get_time(subdict)\n",
1027 " # Calculate derived time variables\n",
1028 " tvars, tnames = calc_time_features(time)\n",
1029 " # Get Static Features, extends to hours\n",
1030 " static_vars, static_names = get_static(subdict, hours = len(time))\n",
1031 " # Get atmospheric variables based on data source. HRRR requires rain calculation\n",
1032 " if atm == \"HRRR\":\n",
1033 " atm_vars, atm_names = get_hrrr_atm(subdict, fstep)\n",
1034 " rain = calc_hrrr_rain(subdict, fstep)\n",
1035 " atm_vars.append(rain)\n",
1036 " atm_names.append(\"rain\")\n",
1037 " elif atm == \"RAWS\":\n",
1038 " atm_vars, atm_names = get_raws_atm(subdict, time)\n",
1040 " raise ValueError(f\"Unrecognized atmospheric data source: {atm}\")\n",
1041 " # Put everything together and stack\n",
1042 " cols = [time] + tvars + static_vars + atm_vars\n",
1043 " X = np.column_stack(cols)\n",
1044 " names = ['time'] + tnames + static_names + atm_names\n",
1050 "cell_type": "code",
1051 "execution_count": 91,
1052 "id": "ba0a0ee5-21bc-48d3-9312-515d80561332",
1058 "dict_keys(['loc', 'RAWS', 'HRRR'])"
1061 "execution_count": 91,
1063 "output_type": "execute_result"
1071 "cell_type": "code",
1072 "execution_count": 110,
1073 "id": "d596a010-732e-423f-accb-7a9cbcf0e8c0",
1077 "X, ns = build_single_case(subdict, atm=\"RAWS\")"
1081 "cell_type": "code",
1082 "execution_count": 111,
1083 "id": "e1da40cc-dae1-432e-a383-151b5aa32fe4",
1092 "execution_count": 111,
1094 "output_type": "execute_result"
1102 "cell_type": "code",
1103 "execution_count": 112,
1104 "id": "95c24e8e-3280-4ac1-b6b6-764333bbfac9",
1113 "execution_count": 112,
1115 "output_type": "execute_result"
1123 "cell_type": "code",
1124 "execution_count": 113,
1125 "id": "37dd60eb-1909-41c5-a964-4ed87aed55ef",
1146 "execution_count": 113,
1148 "output_type": "execute_result"
1156 "cell_type": "code",
1157 "execution_count": null,
1158 "id": "51524f01-6c40-43ef-9f38-c0005adabef0",
1164 "cell_type": "code",
1165 "execution_count": null,
1166 "id": "0e596f5d-e8ad-485e-819f-1d08e4f729d7",
1172 "cell_type": "code",
1173 "execution_count": 114,
1174 "id": "c2981454-b2f7-4611-a180-00443aefa9ce",
1183 "execution_count": 114,
1185 "output_type": "execute_result"
1193 "cell_type": "code",
1194 "execution_count": 115,
1195 "id": "e995704a-abb9-4b96-b8f2-a9f733fb0a29",
1204 "execution_count": 115,
1206 "output_type": "execute_result"
1214 "cell_type": "code",
1215 "execution_count": 116,
1216 "id": "551ff987-41f2-4f38-a6a1-fab857dc054c",
1225 "execution_count": 116,
1227 "output_type": "execute_result"
1235 "cell_type": "code",
1236 "execution_count": null,
1237 "id": "531e61ea-7e45-4f6a-b247-ec4719b88489",
1243 "cell_type": "code",
1244 "execution_count": 117,
1245 "id": "2cf1fa09-709b-4f6d-9cc0-2433b030b0e2",
1254 "execution_count": 117,
1256 "output_type": "execute_result"
1260 "len([time] + static_vars + atm_cols)"
1264 "cell_type": "code",
1265 "execution_count": 118,
1266 "id": "a9d73e82-49b3-47f3-9442-6012437d4cb2",
1270 "def get_fm(d, time):\n",
1271 " fm = d['RAWS']['fm']\n",
1272 " time_raws = str2time(d['RAWS']['time_raws'])\n",
1273 " return time_intp(time_raws,fm,time)"
1277 "cell_type": "code",
1278 "execution_count": 119,
1279 "id": "2cdbc36e-a362-4279-8d74-9712fa784c8d",
1287 "array([12.5 , 12.48833333, 12.42333333, 12.62333333, 12.84666667,\n",
1288 " 13.24666667, 13.69333333, 14.48166667, 15.18166667, 15.88166667,\n",
1289 " 16.54666667, 16.92333333, 17.17 , 17.74666667, 18.135 ,\n",
1290 " 18.42916667, 18.67916667, 18.97 , 19.68666667, 20.52833333,\n",
1291 " 15.99 , 14.02666667, 11.235 , 11.45333333, 11.00666667,\n",
1292 " 10.23 , 9.72333333, 9.99333333, 10.72333333, 10.95833333,\n",
1293 " 11.47 , 12.035 , 12.35833333, 12.85833333, 13.37 ,\n",
1294 " 13.94666667, 14.34666667, 14.68833333, 14.72833333, 15.72333333,\n",
1295 " 15.935 , 16.38666667, 17.60166667, 15.90166667, 14.225 ,\n",
1296 " 12.74833333, 11.53 , 10.94166667, 10.465 , 10.14166667,\n",
1297 " 9.77 , 10.3 , 10.32333333, 10.535 , 10.8 ,\n",
1298 " 10.82333333, 11.05833333, 11.59333333, 12.41666667, 13.41666667,\n",
1299 " 14.405 , 15.27 , 15.84666667, 16.165 , 16.04 ,\n",
1300 " 17.15833333, 17.53 , 16.81333333, 15.24833333, 14.065 ,\n",
1301 " 13.77666667, 13.51833333, 12.95833333, 13.34166667, 12.92333333,\n",
1302 " 13.205 , 14.315 , 16.68833333, 16.62333333, 16.78833333,\n",
1303 " 16.60666667, 16.005 , 16.73 , 16.375 , 17.71166667,\n",
1304 " 17.695 , 16.865 , 16.58833333, 16.61666667, 17.66333333,\n",
1305 " 19.05166667, 19.68666667, 15.765 , 14.99833333, 11.19416667,\n",
1306 " 11.14416667, 11.01833333, 10.41166667, 10.41833333, 9.81166667,\n",
1307 " 10.01666667, 10.9 , 10.935 , 11.22916667, 11.47916667,\n",
1308 " 11.75833333, 12.27 , 12.89333333, 13.65833333, 14.17 ,\n",
1309 " 14.77 , 15.39333333, 16.135 , 16.505 , 17.38166667,\n",
1310 " 17.46333333, 13.30666667, 12.355 , 10.52333333, 10.665 ,\n",
1311 " 10.37666667, 10.13 , 9.53 , 9.035 , 9.28833333,\n",
1312 " 9.2 , 9.24666667, 9.62333333, 9.81166667, 9.935 ,\n",
1313 " 10.28166667, 10.92333333, 11.12333333, 11.37 , 11.9175 ,\n",
1314 " 12.0675 , 12.14166667, 11.77 , 12.23 , 11.54833333,\n",
1315 " 10.4 , 10.31833333, 9.64166667, 9.17666667, 9.02333333,\n",
1316 " 9.24666667, 9.71666667, 10.64666667, 11.05833333, 11.55833333,\n",
1317 " 12.07 , 12.635 , 12.935 , 13.095 , 12.27666667,\n",
1318 " 12.15833333, 12.57666667, 12.365 , 12.11166667, 12.21166667,\n",
1319 " 12.28833333, 12.36333333, 13.81 , 15.14333333, 13.15333333,\n",
1320 " 12.57833333, 10.9 , 10.87666667])"
1323 "execution_count": 119,
1325 "output_type": "execute_result"
1329 "get_fm(subdict, time)"
1333 "cell_type": "code",
1334 "execution_count": 120,
1335 "id": "4b3143af-3d71-4ec6-b221-acb8b687e174",
1339 "from data_funcs import combine_nested\n",
1340 "from utils import Dict"
1344 "cell_type": "code",
1345 "execution_count": 121,
1346 "id": "dc2df65a-9db2-4196-8e66-be833c732e48",
1350 "def build_train_dict(input_file_paths, spatial=True, atm=\"HRRR\", forecast_step=1, verbose=True):\n",
1352 " for input_file_path in input_file_paths:\n",
1353 " dict0 = read_pkl(input_file_path)\n",
1354 " for key in dict0:\n",
1356 " print(\"~\"*50)\n",
1357 " print(f\"Processing case {key}\")\n",
1358 " X, names = build_single_case(dict0[key], atm=atm)\n",
1359 " time = str2time(dict0[key]['HRRR']['time'])\n",
1360 " hrrr_increment = check_increment(time,id=key+f' {\"HRRR\"}.time')\n",
1361 " if hrrr_increment < 1:\n",
1362 " # logging.critical('HRRR increment is %s h must be at least 1 h',hrrr_increment)\n",
1363 " raise(ValueError)\n",
1364 " new_dict[key] = {\n",
1367 " 'filename': input_file_path,\n",
1368 " 'loc': dict0[key]['loc'],\n",
1371 " 'y': get_fm(dict0[key], time),\n",
1372 " 'features_list': names\n",
1375 " new_dict = combine_nested(new_dict)\n",
1377 " return Dict(new_dict)\n"
1381 "cell_type": "code",
1382 "execution_count": 122,
1383 "id": "863b6172-67c2-4c49-bd7a-def26473d7dd",
1390 "output_type": "stream",
1392 "loading file data/test_CA_202401.pkl\n",
1393 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1394 "Processing case CNFC1_202401\n",
1395 "2024-10-02 14:50:31,030 - INFO - CNFC1_202401 HRRR.time time array increments are 1.0 hours\n",
1396 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1397 "Processing case CRVC1_202401\n",
1398 "2024-10-02 14:50:31,038 - INFO - CRVC1_202401 HRRR.time time array increments are 1.0 hours\n",
1399 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1400 "Processing case FCHC1_202401\n",
1401 "2024-10-02 14:50:31,046 - INFO - FCHC1_202401 HRRR.time time array increments are 1.0 hours\n",
1402 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1403 "Processing case FTNC1_202401\n",
1404 "2024-10-02 14:50:31,054 - INFO - FTNC1_202401 HRRR.time time array increments are 1.0 hours\n",
1405 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1406 "Processing case HTRC1_202401\n",
1407 "2024-10-02 14:50:31,061 - INFO - HTRC1_202401 HRRR.time time array increments are 1.0 hours\n",
1408 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1409 "Processing case KRNC1_202401\n",
1410 "2024-10-02 14:50:31,069 - INFO - KRNC1_202401 HRRR.time time array increments are 1.0 hours\n",
1411 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1412 "Processing case MPOC1_202401\n",
1413 "2024-10-02 14:50:31,078 - INFO - MPOC1_202401 HRRR.time time array increments are 1.0 hours\n",
1414 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1415 "Processing case MKEC1_202401\n",
1416 "2024-10-02 14:50:31,086 - INFO - MKEC1_202401 HRRR.time time array increments are 1.0 hours\n",
1417 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1418 "Processing case MCFC1_202401\n",
1419 "2024-10-02 14:50:31,094 - INFO - MCFC1_202401 HRRR.time time array increments are 1.0 hours\n",
1420 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1421 "Processing case PRGC1_202401\n",
1422 "2024-10-02 14:50:31,104 - INFO - PRGC1_202401 HRRR.time time array increments are 1.0 hours\n",
1423 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1424 "Processing case SHQC1_202401\n",
1425 "2024-10-02 14:50:31,112 - INFO - SHQC1_202401 HRRR.time time array increments are 1.0 hours\n",
1426 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1427 "Processing case WVTC1_202401\n",
1428 "2024-10-02 14:50:31,121 - INFO - WVTC1_202401 HRRR.time time array increments are 1.0 hours\n",
1429 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1430 "Processing case WWRC1_202401\n",
1431 "2024-10-02 14:50:31,128 - INFO - WWRC1_202401 HRRR.time time array increments are 1.0 hours\n",
1432 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1433 "Processing case KYCN2_202401\n",
1434 "2024-10-02 14:50:31,137 - INFO - KYCN2_202401 HRRR.time time array increments are 1.0 hours\n",
1435 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1436 "Processing case MTSN2_202401\n",
1437 "2024-10-02 14:50:31,144 - INFO - MTSN2_202401 HRRR.time time array increments are 1.0 hours\n",
1438 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1439 "Processing case MTTC1_202401\n",
1440 "2024-10-02 14:50:31,153 - INFO - MTTC1_202401 HRRR.time time array increments are 1.0 hours\n",
1441 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1442 "Processing case BKRC1_202401\n",
1443 "2024-10-02 14:50:31,160 - INFO - BKRC1_202401 HRRR.time time array increments are 1.0 hours\n",
1444 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1445 "Processing case JSNC1_202401\n",
1446 "2024-10-02 14:50:31,169 - INFO - JSNC1_202401 HRRR.time time array increments are 1.0 hours\n",
1447 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1448 "Processing case MTQC1_202401\n",
1449 "2024-10-02 14:50:31,173 - INFO - MTQC1_202401 HRRR.time time array increments are 1.0 hours\n",
1450 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1451 "Processing case NFRC1_202401\n",
1452 "2024-10-02 14:50:31,186 - INFO - NFRC1_202401 HRRR.time time array increments are 1.0 hours\n",
1453 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1454 "Processing case OORC1_202401\n",
1455 "2024-10-02 14:50:31,194 - INFO - OORC1_202401 HRRR.time time array increments are 1.0 hours\n",
1456 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1457 "Processing case UHLC1_202401\n",
1458 "2024-10-02 14:50:31,204 - INFO - UHLC1_202401 HRRR.time time array increments are 1.0 hours\n",
1459 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1460 "Processing case PHRC1_202401\n",
1461 "2024-10-02 14:50:31,212 - INFO - PHRC1_202401 HRRR.time time array increments are 1.0 hours\n",
1462 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1463 "Processing case WALC1_202401\n",
1464 "2024-10-02 14:50:31,220 - INFO - WALC1_202401 HRRR.time time array increments are 1.0 hours\n",
1465 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1466 "Processing case UBCC1_202401\n",
1467 "2024-10-02 14:50:31,225 - INFO - UBCC1_202401 HRRR.time time array increments are 1.0 hours\n",
1468 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1469 "Processing case BSNC1_202401\n",
1470 "2024-10-02 14:50:31,236 - INFO - BSNC1_202401 HRRR.time time array increments are 1.0 hours\n",
1471 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1472 "Processing case CGVC1_202401\n",
1473 "2024-10-02 14:50:31,243 - INFO - CGVC1_202401 HRRR.time time array increments are 1.0 hours\n",
1474 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1475 "Processing case DKYC1_202401\n",
1476 "2024-10-02 14:50:31,251 - INFO - DKYC1_202401 HRRR.time time array increments are 1.0 hours\n",
1477 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1478 "Processing case FNWC1_202401\n",
1479 "2024-10-02 14:50:31,257 - INFO - FNWC1_202401 HRRR.time time array increments are 1.0 hours\n",
1480 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1481 "Processing case PRHC1_202401\n",
1482 "2024-10-02 14:50:31,267 - INFO - PRHC1_202401 HRRR.time time array increments are 1.0 hours\n",
1483 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1484 "Processing case MMTC1_202401\n",
1485 "2024-10-02 14:50:31,275 - INFO - MMTC1_202401 HRRR.time time array increments are 1.0 hours\n",
1486 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1487 "Processing case TR172_202401\n",
1488 "2024-10-02 14:50:31,282 - INFO - TR172_202401 HRRR.time time array increments are 1.0 hours\n",
1489 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1490 "Processing case OVRC1_202401\n",
1491 "2024-10-02 14:50:31,291 - INFO - OVRC1_202401 HRRR.time time array increments are 1.0 hours\n",
1492 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1493 "Processing case RCEC1_202401\n",
1494 "2024-10-02 14:50:31,298 - INFO - RCEC1_202401 HRRR.time time array increments are 1.0 hours\n",
1495 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1496 "Processing case SHVC1_202401\n",
1497 "2024-10-02 14:50:31,306 - INFO - SHVC1_202401 HRRR.time time array increments are 1.0 hours\n",
1498 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1499 "Processing case TRMC1_202401\n",
1500 "2024-10-02 14:50:31,314 - INFO - TRMC1_202401 HRRR.time time array increments are 1.0 hours\n",
1501 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1502 "Processing case MIAC1_202401\n",
1503 "2024-10-02 14:50:31,323 - INFO - MIAC1_202401 HRRR.time time array increments are 1.0 hours\n",
1504 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1505 "Processing case HSQC1_202401\n",
1506 "2024-10-02 14:50:31,333 - INFO - HSQC1_202401 HRRR.time time array increments are 1.0 hours\n",
1507 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1508 "Processing case MOLC1_202401\n",
1509 "2024-10-02 14:50:31,340 - INFO - MOLC1_202401 HRRR.time time array increments are 1.0 hours\n",
1510 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1511 "Processing case DEMC1_202401\n",
1512 "2024-10-02 14:50:31,351 - INFO - DEMC1_202401 HRRR.time time array increments are 1.0 hours\n",
1513 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1514 "Processing case DWRN2_202401\n",
1515 "2024-10-02 14:50:31,359 - INFO - DWRN2_202401 HRRR.time time array increments are 1.0 hours\n",
1516 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1517 "Processing case JSDC1_202401\n",
1518 "2024-10-02 14:50:31,366 - INFO - JSDC1_202401 HRRR.time time array increments are 1.0 hours\n",
1519 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1520 "Processing case BPOC1_202401\n",
1521 "2024-10-02 14:50:31,374 - INFO - BPOC1_202401 HRRR.time time array increments are 1.0 hours\n",
1522 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1523 "Processing case GALN2_202401\n",
1524 "2024-10-02 14:50:31,383 - INFO - GALN2_202401 HRRR.time time array increments are 1.0 hours\n",
1525 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1526 "Processing case BKGC1_202401\n",
1527 "2024-10-02 14:50:31,391 - INFO - BKGC1_202401 HRRR.time time array increments are 1.0 hours\n",
1528 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1529 "Processing case YCGN2_202401\n",
1530 "2024-10-02 14:50:31,399 - INFO - YCGN2_202401 HRRR.time time array increments are 1.0 hours\n",
1531 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1532 "Processing case PIVC1_202401\n",
1533 "2024-10-02 14:50:31,407 - INFO - PIVC1_202401 HRRR.time time array increments are 1.0 hours\n",
1534 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1535 "Processing case TS566_202401\n",
1536 "2024-10-02 14:50:31,415 - INFO - TS566_202401 HRRR.time time array increments are 1.0 hours\n",
1537 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1538 "Processing case TSHC1_202401\n",
1539 "2024-10-02 14:50:31,421 - INFO - TSHC1_202401 HRRR.time time array increments are 1.0 hours\n",
1540 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1541 "Processing case PEPC1_202401\n",
1542 "2024-10-02 14:50:31,425 - INFO - PEPC1_202401 HRRR.time time array increments are 1.0 hours\n",
1543 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1544 "Processing case EPWC1_202401\n",
1545 "2024-10-02 14:50:31,440 - INFO - EPWC1_202401 HRRR.time time array increments are 1.0 hours\n",
1546 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1547 "Processing case WWNC1_202401\n",
1548 "2024-10-02 14:50:31,455 - INFO - WWNC1_202401 HRRR.time time array increments are 1.0 hours\n",
1549 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1550 "Processing case TMNC1_202401\n",
1551 "2024-10-02 14:50:31,461 - INFO - TMNC1_202401 HRRR.time time array increments are 1.0 hours\n",
1552 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1553 "Processing case DEXC1_202401\n",
1554 "2024-10-02 14:50:31,471 - INFO - DEXC1_202401 HRRR.time time array increments are 1.0 hours\n",
1555 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1556 "Processing case TWMC1_202401\n",
1557 "2024-10-02 14:50:31,478 - INFO - TWMC1_202401 HRRR.time time array increments are 1.0 hours\n",
1558 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1559 "Processing case WOCC1_202401\n",
1560 "2024-10-02 14:50:31,486 - INFO - WOCC1_202401 HRRR.time time array increments are 1.0 hours\n",
1561 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1562 "Processing case KNXN2_202401\n",
1563 "2024-10-02 14:50:31,494 - INFO - KNXN2_202401 HRRR.time time array increments are 1.0 hours\n",
1564 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1565 "Processing case YNWC1_202401\n",
1566 "2024-10-02 14:50:31,502 - INFO - YNWC1_202401 HRRR.time time array increments are 1.0 hours\n",
1567 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1568 "Processing case SKYN2_202401\n",
1569 "2024-10-02 14:50:31,511 - INFO - SKYN2_202401 HRRR.time time array increments are 1.0 hours\n",
1570 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1571 "Processing case TT336_202401\n",
1572 "2024-10-02 14:50:31,519 - INFO - TT336_202401 HRRR.time time array increments are 1.0 hours\n",
1573 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1574 "Processing case MNMC1_202401\n",
1575 "2024-10-02 14:50:31,526 - INFO - MNMC1_202401 HRRR.time time array increments are 1.0 hours\n",
1576 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1577 "Processing case LIB03_202401\n",
1578 "2024-10-02 14:50:31,536 - INFO - LIB03_202401 HRRR.time time array increments are 1.0 hours\n",
1579 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1580 "Processing case LIB05_202401\n",
1581 "2024-10-02 14:50:31,555 - INFO - LIB05_202401 HRRR.time time array increments are 1.0 hours\n",
1582 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1583 "Processing case LIB06_202401\n",
1584 "2024-10-02 14:50:31,574 - INFO - LIB06_202401 HRRR.time time array increments are 1.0 hours\n",
1585 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1586 "Processing case TT625_202401\n",
1587 "2024-10-02 14:50:31,592 - INFO - TT625_202401 HRRR.time time array increments are 1.0 hours\n",
1588 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1589 "Processing case NV001_202401\n",
1590 "2024-10-02 14:50:31,599 - INFO - NV001_202401 HRRR.time time array increments are 1.0 hours\n",
1591 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1592 "Processing case NV003_202401\n",
1593 "2024-10-02 14:50:31,617 - INFO - NV003_202401 HRRR.time time array increments are 1.0 hours\n",
1594 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1595 "Processing case NV004_202401\n",
1596 "2024-10-02 14:50:31,636 - INFO - NV004_202401 HRRR.time time array increments are 1.0 hours\n",
1597 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1598 "Processing case NV005_202401\n",
1599 "2024-10-02 14:50:31,654 - INFO - NV005_202401 HRRR.time time array increments are 1.0 hours\n",
1600 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1601 "Processing case NV006_202401\n",
1602 "2024-10-02 14:50:31,669 - INFO - NV006_202401 HRRR.time time array increments are 1.0 hours\n",
1603 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1604 "Processing case NV011_202401\n",
1605 "2024-10-02 14:50:31,690 - INFO - NV011_202401 HRRR.time time array increments are 1.0 hours\n",
1606 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1607 "Processing case NV019_202401\n",
1608 "2024-10-02 14:50:31,708 - INFO - NV019_202401 HRRR.time time array increments are 1.0 hours\n",
1609 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1610 "Processing case NV020_202401\n",
1611 "2024-10-02 14:50:31,727 - INFO - NV020_202401 HRRR.time time array increments are 1.0 hours\n",
1612 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1613 "Processing case NV021_202401\n",
1614 "2024-10-02 14:50:31,746 - INFO - NV021_202401 HRRR.time time array increments are 1.0 hours\n",
1615 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1616 "Processing case NV022_202401\n",
1617 "2024-10-02 14:50:31,752 - INFO - NV022_202401 HRRR.time time array increments are 1.0 hours\n",
1618 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1619 "Processing case NV023_202401\n",
1620 "2024-10-02 14:50:31,783 - INFO - NV023_202401 HRRR.time time array increments are 1.0 hours\n",
1621 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1622 "Processing case NV024_202401\n",
1623 "2024-10-02 14:50:31,790 - INFO - NV024_202401 HRRR.time time array increments are 1.0 hours\n",
1624 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1625 "Processing case NV026_202401\n",
1626 "2024-10-02 14:50:31,812 - INFO - NV026_202401 HRRR.time time array increments are 1.0 hours\n",
1627 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1628 "Processing case NV027_202401\n",
1629 "2024-10-02 14:50:31,833 - INFO - NV027_202401 HRRR.time time array increments are 1.0 hours\n",
1630 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1631 "Processing case TT646_202401\n",
1632 "2024-10-02 14:50:31,850 - INFO - TT646_202401 HRRR.time time array increments are 1.0 hours\n",
1633 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1634 "Processing case LIB19_202401\n",
1635 "2024-10-02 14:50:31,851 - INFO - LIB19_202401 HRRR.time time array increments are 1.0 hours\n",
1636 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1637 "Processing case LIB26_202401\n",
1638 "2024-10-02 14:50:31,874 - INFO - LIB26_202401 HRRR.time time array increments are 1.0 hours\n",
1639 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1640 "Processing case NV031_202401\n",
1641 "2024-10-02 14:50:31,893 - INFO - NV031_202401 HRRR.time time array increments are 1.0 hours\n",
1642 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1643 "Processing case NV032_202401\n",
1644 "2024-10-02 14:50:31,911 - INFO - NV032_202401 HRRR.time time array increments are 1.0 hours\n",
1645 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1646 "Processing case NV033_202401\n",
1647 "2024-10-02 14:50:31,928 - INFO - NV033_202401 HRRR.time time array increments are 1.0 hours\n",
1648 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1649 "Processing case NV034_202401\n",
1650 "2024-10-02 14:50:31,944 - INFO - NV034_202401 HRRR.time time array increments are 1.0 hours\n",
1651 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1652 "Processing case NV038_202401\n",
1653 "2024-10-02 14:50:31,965 - INFO - NV038_202401 HRRR.time time array increments are 1.0 hours\n",
1654 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1655 "Processing case NV039_202401\n",
1656 "2024-10-02 14:50:31,985 - INFO - NV039_202401 HRRR.time time array increments are 1.0 hours\n",
1657 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1658 "Processing case NV040_202401\n",
1659 "2024-10-02 14:50:32,003 - INFO - NV040_202401 HRRR.time time array increments are 1.0 hours\n",
1660 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1661 "Processing case NV041_202401\n",
1662 "2024-10-02 14:50:32,012 - INFO - NV041_202401 HRRR.time time array increments are 1.0 hours\n",
1663 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1664 "Processing case XMPC1_202401\n",
1665 "2024-10-02 14:50:32,023 - INFO - XMPC1_202401 HRRR.time time array increments are 1.0 hours\n",
1666 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1667 "Processing case XMLC1_202401\n",
1668 "2024-10-02 14:50:32,038 - INFO - XMLC1_202401 HRRR.time time array increments are 1.0 hours\n",
1669 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1670 "Processing case NV051_202401\n",
1671 "2024-10-02 14:50:32,047 - INFO - NV051_202401 HRRR.time time array increments are 1.0 hours\n",
1672 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1673 "Processing case NV052_202401\n",
1674 "2024-10-02 14:50:32,063 - INFO - NV052_202401 HRRR.time time array increments are 1.0 hours\n",
1675 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1676 "Processing case NV053_202401\n",
1677 "2024-10-02 14:50:32,082 - INFO - NV053_202401 HRRR.time time array increments are 1.0 hours\n",
1678 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1679 "Processing case NV054_202401\n",
1680 "2024-10-02 14:50:32,102 - INFO - NV054_202401 HRRR.time time array increments are 1.0 hours\n",
1681 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1682 "Processing case NV055_202401\n",
1683 "2024-10-02 14:50:32,122 - INFO - NV055_202401 HRRR.time time array increments are 1.0 hours\n",
1684 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1685 "Processing case NV058_202401\n",
1686 "2024-10-02 14:50:32,141 - INFO - NV058_202401 HRRR.time time array increments are 1.0 hours\n",
1687 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1688 "Processing case NV059_202401\n",
1689 "2024-10-02 14:50:32,160 - INFO - NV059_202401 HRRR.time time array increments are 1.0 hours\n",
1690 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1691 "Processing case NV060_202401\n",
1692 "2024-10-02 14:50:32,180 - INFO - NV060_202401 HRRR.time time array increments are 1.0 hours\n",
1693 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1694 "Processing case NV061_202401\n",
1695 "2024-10-02 14:50:32,198 - INFO - NV061_202401 HRRR.time time array increments are 1.0 hours\n",
1696 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1697 "Processing case NV062_202401\n",
1698 "2024-10-02 14:50:32,217 - INFO - NV062_202401 HRRR.time time array increments are 1.0 hours\n",
1699 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1700 "Processing case NV063_202401\n",
1701 "2024-10-02 14:50:32,236 - INFO - NV063_202401 HRRR.time time array increments are 1.0 hours\n",
1702 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1703 "Processing case NV064_202401\n",
1704 "2024-10-02 14:50:32,251 - INFO - NV064_202401 HRRR.time time array increments are 1.0 hours\n",
1705 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1706 "Processing case NV065_202401\n",
1707 "2024-10-02 14:50:32,273 - INFO - NV065_202401 HRRR.time time array increments are 1.0 hours\n",
1708 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1709 "Processing case NV066_202401\n",
1710 "2024-10-02 14:50:32,291 - INFO - NV066_202401 HRRR.time time array increments are 1.0 hours\n",
1711 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1712 "Processing case NV067_202401\n",
1713 "2024-10-02 14:50:32,309 - INFO - NV067_202401 HRRR.time time array increments are 1.0 hours\n",
1714 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1715 "Processing case TT753_202401\n",
1716 "2024-10-02 14:50:32,327 - INFO - TT753_202401 HRRR.time time array increments are 1.0 hours\n",
1717 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1718 "Processing case LIB31_202401\n",
1719 "2024-10-02 14:50:32,336 - INFO - LIB31_202401 HRRR.time time array increments are 1.0 hours\n",
1720 "loading file data/test_NW_202401.pkl\n",
1721 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1722 "Processing case LGFO3_202401\n",
1723 "2024-10-02 14:50:32,556 - INFO - LGFO3_202401 HRRR.time time array increments are 1.0 hours\n",
1724 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1725 "Processing case PYFO3_202401\n",
1726 "2024-10-02 14:50:32,562 - INFO - PYFO3_202401 HRRR.time time array increments are 1.0 hours\n",
1727 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1728 "Processing case RXFO3_202401\n",
1729 "2024-10-02 14:50:32,571 - INFO - RXFO3_202401 HRRR.time time array increments are 1.0 hours\n",
1730 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1731 "Processing case WMFO3_202401\n",
1732 "2024-10-02 14:50:32,580 - INFO - WMFO3_202401 HRRR.time time array increments are 1.0 hours\n",
1733 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1734 "Processing case CMFW1_202401\n",
1735 "2024-10-02 14:50:32,589 - INFO - CMFW1_202401 HRRR.time time array increments are 1.0 hours\n",
1736 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1737 "Processing case CYFW1_202401\n",
1738 "2024-10-02 14:50:32,597 - INFO - CYFW1_202401 HRRR.time time array increments are 1.0 hours\n",
1739 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1740 "Processing case CGFW1_202401\n",
1741 "2024-10-02 14:50:32,603 - INFO - CGFW1_202401 HRRR.time time array increments are 1.0 hours\n",
1742 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1743 "Processing case DIFW1_202401\n",
1744 "2024-10-02 14:50:32,607 - INFO - DIFW1_202401 HRRR.time time array increments are 1.0 hours\n",
1745 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1746 "Processing case DRYW1_202401\n",
1747 "2024-10-02 14:50:32,620 - INFO - DRYW1_202401 HRRR.time time array increments are 1.0 hours\n",
1748 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1749 "Processing case FIFW1_202401\n",
1750 "2024-10-02 14:50:32,628 - INFO - FIFW1_202401 HRRR.time time array increments are 1.0 hours\n",
1751 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1752 "Processing case FBFW1_202401\n",
1753 "2024-10-02 14:50:32,636 - INFO - FBFW1_202401 HRRR.time time array increments are 1.0 hours\n",
1754 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1755 "Processing case GHFW1_202401\n",
1756 "2024-10-02 14:50:32,645 - INFO - GHFW1_202401 HRRR.time time array increments are 1.0 hours\n",
1757 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1758 "Processing case HGFW1_202401\n",
1759 "2024-10-02 14:50:32,653 - INFO - HGFW1_202401 HRRR.time time array increments are 1.0 hours\n",
1760 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1761 "Processing case JEFW1_202401\n",
1762 "2024-10-02 14:50:32,656 - INFO - JEFW1_202401 HRRR.time time array increments are 1.0 hours\n",
1763 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1764 "Processing case SKKW1_202401\n",
1765 "2024-10-02 14:50:32,672 - INFO - SKKW1_202401 HRRR.time time array increments are 1.0 hours\n",
1766 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1767 "Processing case KCFW1_202401\n",
1768 "2024-10-02 14:50:32,680 - INFO - KCFW1_202401 HRRR.time time array increments are 1.0 hours\n",
1769 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1770 "Processing case LEFW1_202401\n",
1771 "2024-10-02 14:50:32,687 - INFO - LEFW1_202401 HRRR.time time array increments are 1.0 hours\n",
1772 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1773 "Processing case LSFW1_202401\n",
1774 "2024-10-02 14:50:32,694 - INFO - LSFW1_202401 HRRR.time time array increments are 1.0 hours\n",
1775 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1776 "Processing case NCSW1_202401\n",
1777 "2024-10-02 14:50:32,702 - INFO - NCSW1_202401 HRRR.time time array increments are 1.0 hours\n",
1778 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1779 "Processing case OCFW1_202401\n",
1780 "2024-10-02 14:50:32,710 - INFO - OCFW1_202401 HRRR.time time array increments are 1.0 hours\n",
1781 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1782 "Processing case QCNW1_202401\n",
1783 "2024-10-02 14:50:32,717 - INFO - QCNW1_202401 HRRR.time time array increments are 1.0 hours\n",
1784 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1785 "Processing case MEFW1_202401\n",
1786 "2024-10-02 14:50:32,725 - INFO - MEFW1_202401 HRRR.time time array increments are 1.0 hours\n",
1787 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1788 "Processing case FWFW1_202401\n",
1789 "2024-10-02 14:50:32,728 - INFO - FWFW1_202401 HRRR.time time array increments are 1.0 hours\n",
1790 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1791 "Processing case FTAW1_202401\n",
1792 "2024-10-02 14:50:32,740 - INFO - FTAW1_202401 HRRR.time time array increments are 1.0 hours\n",
1793 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1794 "Processing case BKRW1_202401\n",
1795 "2024-10-02 14:50:32,748 - INFO - BKRW1_202401 HRRR.time time array increments are 1.0 hours\n",
1796 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1797 "Processing case VPFW1_202401\n",
1798 "2024-10-02 14:50:32,755 - INFO - VPFW1_202401 HRRR.time time array increments are 1.0 hours\n",
1799 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1800 "Processing case WPKO3_202401\n",
1801 "2024-10-02 14:50:32,765 - INFO - WPKO3_202401 HRRR.time time array increments are 1.0 hours\n",
1802 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1803 "Processing case STRW1_202401\n",
1804 "2024-10-02 14:50:32,773 - INFO - STRW1_202401 HRRR.time time array increments are 1.0 hours\n",
1805 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1806 "Processing case TOFW1_202401\n",
1807 "2024-10-02 14:50:32,780 - INFO - TOFW1_202401 HRRR.time time array increments are 1.0 hours\n",
1808 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1809 "Processing case DCCW1_202401\n",
1810 "2024-10-02 14:50:32,788 - INFO - DCCW1_202401 HRRR.time time array increments are 1.0 hours\n",
1811 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1812 "Processing case OHAW1_202401\n",
1813 "2024-10-02 14:50:32,792 - INFO - OHAW1_202401 HRRR.time time array increments are 1.0 hours\n",
1814 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1815 "Processing case EGKO3_202401\n",
1816 "2024-10-02 14:50:32,805 - INFO - EGKO3_202401 HRRR.time time array increments are 1.0 hours\n",
1817 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1818 "Processing case MMRO3_202401\n",
1819 "2024-10-02 14:50:32,813 - INFO - MMRO3_202401 HRRR.time time array increments are 1.0 hours\n",
1820 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1821 "Processing case MLLO3_202401\n",
1822 "2024-10-02 14:50:32,821 - INFO - MLLO3_202401 HRRR.time time array increments are 1.0 hours\n",
1823 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1824 "Processing case TWRO3_202401\n",
1825 "2024-10-02 14:50:32,829 - INFO - TWRO3_202401 HRRR.time time array increments are 1.0 hours\n",
1826 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1827 "Processing case SFKO3_202401\n",
1828 "2024-10-02 14:50:32,837 - INFO - SFKO3_202401 HRRR.time time array increments are 1.0 hours\n",
1829 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1830 "Processing case TMKO3_202401\n",
1831 "2024-10-02 14:50:32,846 - INFO - TMKO3_202401 HRRR.time time array increments are 1.0 hours\n",
1832 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1833 "Processing case WSBO3_202401\n",
1834 "2024-10-02 14:50:32,853 - INFO - WSBO3_202401 HRRR.time time array increments are 1.0 hours\n",
1835 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1836 "Processing case YTCW1_202401\n",
1837 "2024-10-02 14:50:32,862 - INFO - YTCW1_202401 HRRR.time time array increments are 1.0 hours\n",
1838 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1839 "Processing case TT246_202401\n",
1840 "2024-10-02 14:50:32,871 - INFO - TT246_202401 HRRR.time time array increments are 1.0 hours\n",
1841 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1842 "Processing case RDSPN_202401\n",
1843 "2024-10-02 14:50:32,877 - INFO - RDSPN_202401 HRRR.time time array increments are 1.0 hours\n",
1844 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1845 "Processing case MTOPN_202401\n",
1846 "2024-10-02 14:50:32,896 - INFO - MTOPN_202401 HRRR.time time array increments are 1.0 hours\n",
1847 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1848 "Processing case TT705_202401\n",
1849 "2024-10-02 14:50:32,914 - INFO - TT705_202401 HRRR.time time array increments are 1.0 hours\n",
1850 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1851 "Processing case EACPN_202401\n",
1852 "2024-10-02 14:50:32,923 - INFO - EACPN_202401 HRRR.time time array increments are 1.0 hours\n",
1853 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1854 "Processing case SHRPN_202401\n",
1855 "2024-10-02 14:50:32,942 - INFO - SHRPN_202401 HRRR.time time array increments are 1.0 hours\n",
1856 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1857 "Processing case NPJPN_202401\n",
1858 "2024-10-02 14:50:32,960 - INFO - NPJPN_202401 HRRR.time time array increments are 1.0 hours\n",
1859 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1860 "Processing case NPPPN_202401\n",
1861 "2024-10-02 14:50:32,977 - INFO - NPPPN_202401 HRRR.time time array increments are 1.0 hours\n",
1862 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1863 "Processing case FLZPN_202401\n",
1864 "2024-10-02 14:50:32,998 - INFO - FLZPN_202401 HRRR.time time array increments are 1.0 hours\n",
1865 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1866 "Processing case SPRPN_202401\n",
1867 "2024-10-02 14:50:33,016 - INFO - SPRPN_202401 HRRR.time time array increments are 1.0 hours\n",
1868 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1869 "Processing case HDRPN_202401\n",
1870 "2024-10-02 14:50:33,033 - INFO - HDRPN_202401 HRRR.time time array increments are 1.0 hours\n",
1871 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1872 "Processing case HLVPN_202401\n",
1873 "2024-10-02 14:50:33,051 - INFO - HLVPN_202401 HRRR.time time array increments are 1.0 hours\n",
1874 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1875 "Processing case SKYPN_202401\n",
1876 "2024-10-02 14:50:33,070 - INFO - SKYPN_202401 HRRR.time time array increments are 1.0 hours\n",
1877 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1878 "Processing case ESCPN_202401\n",
1879 "2024-10-02 14:50:33,087 - INFO - ESCPN_202401 HRRR.time time array increments are 1.0 hours\n",
1880 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1881 "Processing case BDRPN_202401\n",
1882 "2024-10-02 14:50:33,106 - INFO - BDRPN_202401 HRRR.time time array increments are 1.0 hours\n",
1883 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1884 "Processing case LARPN_202401\n",
1885 "2024-10-02 14:50:33,124 - INFO - LARPN_202401 HRRR.time time array increments are 1.0 hours\n",
1886 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1887 "Processing case ESBPN_202401\n",
1888 "2024-10-02 14:50:33,142 - INFO - ESBPN_202401 HRRR.time time array increments are 1.0 hours\n",
1889 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1890 "Processing case SCHPN_202401\n",
1891 "2024-10-02 14:50:33,161 - INFO - SCHPN_202401 HRRR.time time array increments are 1.0 hours\n",
1892 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1893 "Processing case ESEPN_202401\n",
1894 "2024-10-02 14:50:33,179 - INFO - ESEPN_202401 HRRR.time time array increments are 1.0 hours\n",
1895 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1896 "Processing case MRTPN_202401\n",
1897 "2024-10-02 14:50:33,204 - INFO - MRTPN_202401 HRRR.time time array increments are 1.0 hours\n",
1898 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1899 "Processing case KELPN_202401\n",
1900 "2024-10-02 14:50:33,234 - INFO - KELPN_202401 HRRR.time time array increments are 1.0 hours\n",
1901 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1902 "Processing case HOWPN_202401\n",
1903 "2024-10-02 14:50:33,274 - INFO - HOWPN_202401 HRRR.time time array increments are 1.0 hours\n",
1904 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1905 "Processing case EVNPN_202401\n",
1906 "2024-10-02 14:50:33,306 - INFO - EVNPN_202401 HRRR.time time array increments are 1.0 hours\n",
1907 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1908 "Processing case FWRPN_202401\n",
1909 "2024-10-02 14:50:33,338 - INFO - FWRPN_202401 HRRR.time time array increments are 1.0 hours\n",
1910 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1911 "Processing case LEEPN_202401\n",
1912 "2024-10-02 14:50:33,370 - INFO - LEEPN_202401 HRRR.time time array increments are 1.0 hours\n",
1913 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1914 "Processing case MTSPN_202401\n",
1915 "2024-10-02 14:50:33,400 - INFO - MTSPN_202401 HRRR.time time array increments are 1.0 hours\n",
1916 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1917 "Processing case GDNPN_202401\n",
1918 "2024-10-02 14:50:33,432 - INFO - GDNPN_202401 HRRR.time time array increments are 1.0 hours\n",
1919 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1920 "Processing case RDGPN_202401\n",
1921 "2024-10-02 14:50:33,464 - INFO - RDGPN_202401 HRRR.time time array increments are 1.0 hours\n",
1922 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1923 "Processing case DCRPN_202401\n",
1924 "2024-10-02 14:50:33,495 - INFO - DCRPN_202401 HRRR.time time array increments are 1.0 hours\n",
1925 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1926 "Processing case MDWPN_202401\n",
1927 "2024-10-02 14:50:33,520 - INFO - MDWPN_202401 HRRR.time time array increments are 1.0 hours\n",
1928 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1929 "Processing case KNRPN_202401\n",
1930 "2024-10-02 14:50:33,552 - INFO - KNRPN_202401 HRRR.time time array increments are 1.0 hours\n",
1931 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1932 "Processing case BMPPN_202401\n",
1933 "2024-10-02 14:50:33,585 - INFO - BMPPN_202401 HRRR.time time array increments are 1.0 hours\n",
1934 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1935 "Processing case PHRPN_202401\n",
1936 "2024-10-02 14:50:33,609 - INFO - PHRPN_202401 HRRR.time time array increments are 1.0 hours\n",
1937 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1938 "Processing case QRDPN_202401\n",
1939 "2024-10-02 14:50:33,633 - INFO - QRDPN_202401 HRRR.time time array increments are 1.0 hours\n",
1940 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1941 "Processing case TRNPN_202401\n",
1942 "2024-10-02 14:50:33,652 - INFO - TRNPN_202401 HRRR.time time array increments are 1.0 hours\n",
1943 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1944 "Processing case SDSPN_202401\n",
1945 "2024-10-02 14:50:33,670 - INFO - SDSPN_202401 HRRR.time time array increments are 1.0 hours\n",
1946 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1947 "Processing case MSNPN_202401\n",
1948 "2024-10-02 14:50:33,688 - INFO - MSNPN_202401 HRRR.time time array increments are 1.0 hours\n",
1949 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1950 "Processing case PTVPN_202401\n",
1951 "2024-10-02 14:50:33,706 - INFO - PTVPN_202401 HRRR.time time array increments are 1.0 hours\n",
1952 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1953 "Processing case GOSPN_202401\n",
1954 "2024-10-02 14:50:33,727 - INFO - GOSPN_202401 HRRR.time time array increments are 1.0 hours\n",
1955 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1956 "Processing case GRNPN_202401\n",
1957 "2024-10-02 14:50:33,752 - INFO - GRNPN_202401 HRRR.time time array increments are 1.0 hours\n",
1958 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1959 "Processing case LTHPN_202401\n",
1960 "2024-10-02 14:50:33,770 - INFO - LTHPN_202401 HRRR.time time array increments are 1.0 hours\n",
1961 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1962 "Processing case ANDPN_202401\n",
1963 "2024-10-02 14:50:33,794 - INFO - ANDPN_202401 HRRR.time time array increments are 1.0 hours\n",
1964 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1965 "Processing case THMPN_202401\n",
1966 "2024-10-02 14:50:33,814 - INFO - THMPN_202401 HRRR.time time array increments are 1.0 hours\n",
1967 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1968 "Processing case O22PN_202401\n",
1969 "2024-10-02 14:50:33,832 - INFO - O22PN_202401 HRRR.time time array increments are 1.0 hours\n",
1970 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1971 "Processing case WLSPN_202401\n",
1972 "2024-10-02 14:50:33,851 - INFO - WLSPN_202401 HRRR.time time array increments are 1.0 hours\n",
1973 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1974 "Processing case TT775_202401\n",
1975 "2024-10-02 14:50:33,869 - INFO - TT775_202401 HRRR.time time array increments are 1.0 hours\n",
1976 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1977 "Processing case OXDPN_202401\n",
1978 "2024-10-02 14:50:33,876 - INFO - OXDPN_202401 HRRR.time time array increments are 1.0 hours\n",
1979 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1980 "Processing case GRUPN_202401\n",
1981 "2024-10-02 14:50:33,893 - INFO - GRUPN_202401 HRRR.time time array increments are 1.0 hours\n",
1982 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1983 "Processing case RAMPN_202401\n",
1984 "2024-10-02 14:50:33,912 - INFO - RAMPN_202401 HRRR.time time array increments are 1.0 hours\n",
1985 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1986 "Processing case HILPN_202401\n",
1987 "2024-10-02 14:50:33,932 - INFO - HILPN_202401 HRRR.time time array increments are 1.0 hours\n",
1988 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1989 "Processing case SBCPN_202401\n",
1990 "2024-10-02 14:50:33,952 - INFO - SBCPN_202401 HRRR.time time array increments are 1.0 hours\n",
1991 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1992 "Processing case RCRPN_202401\n",
1993 "2024-10-02 14:50:33,969 - INFO - RCRPN_202401 HRRR.time time array increments are 1.0 hours\n",
1994 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1995 "Processing case BLUPN_202401\n",
1996 "2024-10-02 14:50:33,987 - INFO - BLUPN_202401 HRRR.time time array increments are 1.0 hours\n",
1997 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
1998 "Processing case LAMPN_202401\n",
1999 "2024-10-02 14:50:34,007 - INFO - LAMPN_202401 HRRR.time time array increments are 1.0 hours\n",
2000 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
2001 "Processing case NMRPN_202401\n",
2002 "2024-10-02 14:50:34,024 - INFO - NMRPN_202401 HRRR.time time array increments are 1.0 hours\n",
2003 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
2004 "Processing case NWFPN_202401\n",
2005 "2024-10-02 14:50:34,044 - INFO - NWFPN_202401 HRRR.time time array increments are 1.0 hours\n",
2006 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
2007 "Processing case SHDPN_202401\n",
2008 "2024-10-02 14:50:34,062 - INFO - SHDPN_202401 HRRR.time time array increments are 1.0 hours\n",
2009 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
2010 "Processing case TNCPN_202401\n",
2011 "2024-10-02 14:50:34,081 - INFO - TNCPN_202401 HRRR.time time array increments are 1.0 hours\n",
2012 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
2013 "Processing case BATPN_202401\n",
2014 "2024-10-02 14:50:34,099 - INFO - BATPN_202401 HRRR.time time array increments are 1.0 hours\n",
2015 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
2016 "Processing case STLPN_202401\n",
2017 "2024-10-02 14:50:34,117 - INFO - STLPN_202401 HRRR.time time array increments are 1.0 hours\n",
2018 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
2019 "Processing case RCKPN_202401\n",
2020 "2024-10-02 14:50:34,129 - INFO - RCKPN_202401 HRRR.time time array increments are 1.0 hours\n",
2021 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
2022 "Processing case WSNPN_202401\n",
2023 "2024-10-02 14:50:34,147 - INFO - WSNPN_202401 HRRR.time time array increments are 1.0 hours\n",
2024 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
2025 "Processing case FSMPN_202401\n",
2026 "2024-10-02 14:50:34,166 - INFO - FSMPN_202401 HRRR.time time array increments are 1.0 hours\n",
2027 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
2028 "Processing case ZENPN_202401\n",
2029 "2024-10-02 14:50:34,184 - INFO - ZENPN_202401 HRRR.time time array increments are 1.0 hours\n",
2030 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
2031 "Processing case FRGPN_202401\n",
2032 "2024-10-02 14:50:34,203 - INFO - FRGPN_202401 HRRR.time time array increments are 1.0 hours\n",
2033 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
2034 "Processing case BPLPN_202401\n",
2035 "2024-10-02 14:50:34,213 - INFO - BPLPN_202401 HRRR.time time array increments are 1.0 hours\n",
2036 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
2037 "Processing case BLFPN_202401\n",
2038 "2024-10-02 14:50:34,230 - INFO - BLFPN_202401 HRRR.time time array increments are 1.0 hours\n",
2039 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
2040 "Processing case PWLPN_202401\n",
2041 "2024-10-02 14:50:34,250 - INFO - PWLPN_202401 HRRR.time time array increments are 1.0 hours\n",
2042 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
2043 "Processing case PVRPN_202401\n",
2044 "2024-10-02 14:50:34,270 - INFO - PVRPN_202401 HRRR.time time array increments are 1.0 hours\n",
2045 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
2046 "Processing case WDLPN_202401\n",
2047 "2024-10-02 14:50:34,288 - INFO - WDLPN_202401 HRRR.time time array increments are 1.0 hours\n",
2048 "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
2049 "Processing case BNSPN_202401\n",
2050 "2024-10-02 14:50:34,306 - INFO - BNSPN_202401 HRRR.time time array increments are 1.0 hours\n"
2055 "train_test = build_train_dict([\"data/test_CA_202401.pkl\", \"data/test_NW_202401.pkl\"])"
2059 "cell_type": "code",
2060 "execution_count": 123,
2061 "id": "0c5ec095-f19d-41dc-8186-f01af8a7c5ef",
2067 "dict_keys(['id', 'case', 'filename', 'time', 'X', 'y', 'loc', 'features_list'])"
2070 "execution_count": 123,
2072 "output_type": "execute_result"
2080 "cell_type": "code",
2081 "execution_count": 125,
2082 "id": "c5952a06-1f3b-40f4-b632-34c9812c3ea4",
2093 "execution_count": 125,
2095 "output_type": "execute_result"
2099 "train_test.X[1].shape"
2103 "cell_type": "code",
2104 "execution_count": null,
2105 "id": "34f3ae52-9bb2-469e-9190-990be0cbe57c",
2111 "cell_type": "markdown",
2112 "id": "6322f0bc-107d-40a5-96dc-804495085a99",
2114 "jp-MarkdownHeadingCollapsed": true
2121 "cell_type": "code",
2122 "execution_count": null,
2123 "id": "12992b9a-407f-4131-ac61-e1dc338386bf",
2127 "params = read_yml(\"params.yaml\", subkey='xgb')\n",
2132 "cell_type": "code",
2133 "execution_count": null,
2134 "id": "f214fdf8-bb76-4912-8f8c-5d0c8c1230c2",
2138 "dat = read_pkl(\"data/train.pkl\")"
2142 "cell_type": "code",
2143 "execution_count": null,
2144 "id": "888b7805-15f6-4c09-a05b-7aed7d253f6e",
2148 "cases = [*dat.keys()]"
2152 "cell_type": "code",
2153 "execution_count": null,
2154 "id": "375055d8-c070-4639-9561-e47d3f21f1f8",
2158 "rnn_dat = RNNData(dat[cases[10]], params['scaler'], params['features_list'])\n",
2159 "rnn_dat.train_test_split(\n",
2160 " time_fracs = [.8, .1, .1]\n",
2162 "rnn_dat.scale_data()"
2166 "cell_type": "code",
2167 "execution_count": null,
2168 "id": "e79f8dc8-5cf8-4190-b4ff-e640f61bd78b",
2172 "from moisture_models import XGB, RF, LM"
2176 "cell_type": "code",
2177 "execution_count": null,
2178 "id": "b3aeb47f-261e-4e29-9eeb-67215e5628f6",
2186 "cell_type": "code",
2187 "execution_count": null,
2188 "id": "cae9a20d-1caf-45aa-a9c4-aef21b65d9c8",
2196 "cell_type": "code",
2197 "execution_count": null,
2198 "id": "68a07b25-c586-4fc4-a3d5-c857354e7a2c",
2202 "mod.fit(rnn_dat.X_train, rnn_dat.y_train)"
2206 "cell_type": "code",
2207 "execution_count": null,
2208 "id": "c8f88819-0a7a-4420-abb9-56a47015a4de",
2212 "preds = mod.predict(rnn_dat.X_test)"
2216 "cell_type": "code",
2217 "execution_count": null,
2218 "id": "cb7cdf14-74d6-45e4-bc1b-7d4d47dd41ac",
2222 "rmse(preds, rnn_dat.y_test)"
2226 "cell_type": "code",
2227 "execution_count": null,
2228 "id": "74d478c7-8c01-448e-9a00-dd0e1ee8e325",
2232 "plt.plot(rnn_dat.y_test)\n",
2237 "cell_type": "code",
2238 "execution_count": null,
2239 "id": "c5441014-c39a-4414-a779-95b81e1ed6a8",
2243 "params = read_yml(\"params.yaml\", subkey='rf')\n",
2244 "rnn_dat = RNNData(dat[cases[10]], features_list = ['Ed', 'Ew', 'solar', 'wind', 'rain'])\n",
2245 "rnn_dat.train_test_split(\n",
2246 " time_fracs = [.8, .1, .1]\n",
2251 "cell_type": "code",
2252 "execution_count": null,
2253 "id": "cafe711a-20cb-4bd3-a4bc-4995a843a021",
2257 "import importlib\n",
2258 "import moisture_models\n",
2259 "importlib.reload(moisture_models)"
2263 "cell_type": "code",
2264 "execution_count": null,
2265 "id": "ee45f7d6-f57f-4ff6-995a-527565565f94",
2273 "cell_type": "code",
2274 "execution_count": null,
2275 "id": "fafe76e5-0212-4bd1-a058-535935a08780",
2279 "mod2 = RF(params)\n",
2280 "mod2.fit(rnn_dat.X_train, rnn_dat.y_train.flatten())\n",
2281 "preds2 = mod2.predict(rnn_dat.X_test)\n",
2282 "print(rmse(preds2, rnn_dat.y_test.flatten()))\n",
2283 "plt.plot(rnn_dat.y_test)\n",
2288 "cell_type": "code",
2289 "execution_count": null,
2290 "id": "c0ab4244-996c-49af-bf4a-8b0c47b0b6db",
2294 "from moisture_models import RF\n",
2299 "cell_type": "code",
2300 "execution_count": null,
2301 "id": "aa6c33fd-db35-4c77-9eee-fdb39a934959",
2307 "cell_type": "code",
2308 "execution_count": null,
2309 "id": "c5598bfe-2d87-4d23-869e-aff127782462",
2313 "params = read_yml(\"params.yaml\", subkey='lm')\n",
2314 "rnn_dat = RNNData(dat[cases[10]], features_list = ['Ed', 'Ew', 'solar', 'wind', 'rain'])\n",
2315 "rnn_dat.train_test_split(\n",
2316 " time_fracs = [.8, .1, .1]\n",
2322 "cell_type": "code",
2323 "execution_count": null,
2324 "id": "d828c15c-4078-4967-abff-c1fd15d4696d",
2328 "mod.fit(rnn_dat.X_train, rnn_dat.y_train)\n",
2329 "preds = mod.predict(rnn_dat.X_test)\n",
2330 "print(rmse(preds2, rnn_dat.y_test.flatten()))"
2334 "cell_type": "code",
2335 "execution_count": null,
2336 "id": "8496a32a-8269-4d6b-953e-7f33fe626789",
2342 "cell_type": "code",
2343 "execution_count": null,
2344 "id": "75ce8bf3-6efb-4dc7-b895-def92f6ce6b4",
2350 "cell_type": "markdown",
2351 "id": "282cb651-b21f-401d-94c5-9e07530a9ba8",
2358 "cell_type": "code",
2359 "execution_count": null,
2360 "id": "fa38f35a-d367-4df8-b2d3-7691ff4b0cf4",
2366 "cell_type": "markdown",
2367 "id": "5ef092ff-8af1-491a-b0bf-cc3e674330e0",
2370 "## Phys Initialized"
2374 "cell_type": "code",
2375 "execution_count": null,
2376 "id": "5488628e-4552-4909-83e9-413fd6878bdd",
2380 "params.update({\n",
2382 " 'dense_layers': 0,\n",
2383 " 'activation': ['relu', 'relu'],\n",
2384 " 'phys_initialize': False,\n",
2385 " 'dropout': [0,0]\n",
2390 "cell_type": "code",
2391 "execution_count": null,
2392 "id": "56bdf26c-07e7-4e4a-a567-af7dd0f564d9",
2396 "reproducibility.set_seed()\n",
2397 "rnn = RNN(params)\n",
2398 "m, errs = rnn.run_model(rnn_dat)"
2402 "cell_type": "code",
2403 "execution_count": null,
2404 "id": "01227b79-98f3-4931-bdfc-ff08afa8be5f",
2408 "rnn.model_train.summary()"
2412 "cell_type": "code",
2413 "execution_count": null,
2414 "id": "918a8bf0-638b-4b4b-82fe-c6a1965a72dd",
2420 "cell_type": "code",
2421 "execution_count": null,
2422 "id": "0aab34c7-8a09-480a-9d3e-619f7cf82b34",
2426 "params.update({\n",
2427 " 'phys_initialize': True,\n",
2428 " 'scaler': None, # TODO\n",
2429 " 'dense_layers': 0, # NOT including single Dense output layer which is hard-coded\n",
2430 " 'activation': ['linear', 'linear'], # TODO tanh, relu the same\n",
2431 " 'batch_schedule_type': None # Hopefully this isn't a necessity like before, but maybe it will help\n",
2436 "cell_type": "code",
2437 "execution_count": null,
2438 "id": "ab549075-f71f-42ad-b36f-3d1e90247e33",
2442 "rnn_dat2 = RNNData(dat[cases[10]], params['scaler'], params['features_list'])\n",
2443 "rnn_dat2.train_test_split(\n",
2444 " time_fracs = [.8, .1, .1]\n",
2446 "rnn_dat2.batch_reshape(timesteps = params['timesteps'], batch_size = params['batch_size'])"
2450 "cell_type": "code",
2451 "execution_count": null,
2452 "id": "195f337a-ac8a-4471-8226-94863b9385e2",
2456 "import importlib\n",
2457 "import moisture_rnn\n",
2458 "importlib.reload(moisture_rnn)\n",
2459 "from moisture_rnn import RNN, RNNData"
2463 "cell_type": "code",
2464 "execution_count": null,
2465 "id": "9395d147-17a5-44ba-aaa2-a213ffde062b",
2471 "reproducibility.set_seed()\n",
2477 "cell_type": "code",
2478 "execution_count": null,
2479 "id": "d3eebe8a-ff12-454b-81b6-6a138924f127",
2483 "m, errs = rnn.run_model(rnn_dat2)"
2487 "cell_type": "code",
2488 "execution_count": null,
2489 "id": "bcbb0159-74c5-4f56-9d69-d85a58ddbd1a",
2493 "rnn.model_predict.get_weights()"
2497 "cell_type": "code",
2498 "execution_count": null,
2499 "id": "c25f741a-6280-4cf2-8017-e56672236fdb",
2505 "cell_type": "code",
2506 "execution_count": null,
2507 "id": "e8ed2b03-6123-4bdf-9e26-ef2ce4951663",
2511 "params['rnn_units']"
2515 "cell_type": "code",
2516 "execution_count": null,
2517 "id": "e44302bf-af49-4140-ae31-54f7c88a6735",
2521 "params.update({\n",
2522 " 'phys_initialize': True,\n",
2523 " 'scaler': None, # TODO\n",
2524 " 'dense_layers': 0, # NOT including single Dense output layer which is hard-coded\n",
2525 " 'activation': ['relu', 'relu'], # TODO tanh, relu the same\n",
2526 " 'batch_schedule_type': None # Hopefully this isn't a necessity like before, but maybe it will help\n",
2531 "cell_type": "code",
2532 "execution_count": null,
2533 "id": "9a8ac32d-551c-43e8-988e-a3b13e6d9cd9",
2537 "rnn_dat2 = RNNData(dat[cases[10]], params['scaler'], params['features_list'])\n",
2538 "rnn_dat2.train_test_split(\n",
2539 " time_fracs = [.8, .1, .1]\n",
2541 "rnn_dat2.batch_reshape(timesteps = params['timesteps'], batch_size = params['batch_size'])"
2545 "cell_type": "code",
2546 "execution_count": null,
2547 "id": "ff727da8-38fb-4fda-999b-f712b98de0df",
2553 "reproducibility.set_seed()\n",
2555 "rnn = RNN(params)\n",
2556 "m, errs = rnn.run_model(rnn_dat2)"
2560 "cell_type": "code",
2561 "execution_count": null,
2562 "id": "b165074c-ea88-4b4d-8e41-6b6f22b4d221",
2568 "cell_type": "code",
2569 "execution_count": null,
2570 "id": "aa5cd4e6-4441-4c77-a086-e9edefbeb83b",
2576 "cell_type": "code",
2577 "execution_count": null,
2578 "id": "7bd1e05b-5cd8-48b4-8469-4842313d6097",
2584 "cell_type": "code",
2585 "execution_count": null,
2586 "id": "b399346d-20b8-4c97-898a-606a4be98065",
2592 "cell_type": "code",
2593 "execution_count": null,
2594 "id": "521285e6-6b6a-4d23-b688-9eb84b8eab68",
2600 "cell_type": "code",
2601 "execution_count": null,
2602 "id": "12c66af1-54fd-4398-8ee2-36eeb937c40d",
2608 "cell_type": "code",
2609 "execution_count": null,
2610 "id": "eb21fb8e-05c6-4a39-bdf1-4a57067c786d",
2616 "cell_type": "code",
2617 "execution_count": null,
2618 "id": "628a9105-ca06-44c4-ad00-13808e2f4773",
2624 "cell_type": "code",
2625 "execution_count": null,
2626 "id": "37fdbb3a-3e83-4541-93b2-982b6d4cbe93",
2632 "cell_type": "code",
2633 "execution_count": null,
2634 "id": "a592a4c9-cb3b-4174-8eaa-02afd00a1897",
2640 "cell_type": "code",
2641 "execution_count": null,
2642 "id": "3832fb05-417c-4648-8e2e-7748c06b3768",
2648 "cell_type": "markdown",
2649 "id": "d2360aef-e9c4-4a71-922d-336e53b82537",
2658 "cell_type": "code",
2659 "execution_count": null,
2660 "id": "71d4e441-9bf1-4d57-bb37-091553e23212",
2664 "import importlib \n",
2665 "import moisture_rnn\n",
2666 "importlib.reload(moisture_rnn)\n",
2667 "from moisture_rnn import RNN_LSTM"
2671 "cell_type": "code",
2672 "execution_count": null,
2673 "id": "0f6ba896-e3be-4a9f-8a42-3df64aff7d63",
2677 "params = read_yml(\"params.yaml\", subkey=\"lstm\")\n",
2678 "params = RNNParams(params)"
2682 "cell_type": "code",
2683 "execution_count": null,
2684 "id": "a4cf567e-d623-4e14-b578-eed88b80d04e",
2688 "rnn_dat = RNNData(dat[cases[10]], params['scaler'], params['features_list'])\n",
2689 "rnn_dat.train_test_split(\n",
2690 " time_fracs = [.8, .1, .1]\n",
2692 "rnn_dat.scale_data()\n",
2693 "rnn_dat.batch_reshape(timesteps = params['timesteps'], batch_size = params['batch_size'])"
2697 "cell_type": "code",
2698 "execution_count": null,
2699 "id": "0157a6bc-3a99-4b87-a42c-ab770d19ae37",
2703 "from moisture_rnn import ResetStatesCallback, EarlyStoppingCallback\n",
2704 "params.update({'epochs': 50, 'learning_rate': 0.001, 'verbose_fit': True, 'rnn_layers': 2, 'rnn_units': 20, 'dense_layers': 1, 'dense_units': 10,\n",
2705 " 'activation': ['tanh', 'tanh'], 'features_list': rnn_dat.features_list,\n",
2706 " 'batch_schedule_type':'exp', 'bmin': 10, 'bmax':rnn_dat.hours})\n",
2707 "reproducibility.set_seed(123)\n",
2708 "lstm = RNN_LSTM(params)\n",
2710 "history = lstm.model_train.fit(rnn_dat.X_train, rnn_dat.y_train, \n",
2711 " batch_size = params['batch_size'], epochs=params['epochs'], \n",
2712 " callbacks = [ResetStatesCallback(params),\n",
2713 " EarlyStoppingCallback(patience = 15)],\n",
2714 " validation_data = (rnn_dat.X_val, rnn_dat.y_val))\n",
2719 "cell_type": "code",
2720 "execution_count": null,
2721 "id": "ec95e7d4-6d57-441b-b673-f10625ee5dec",
2727 "cell_type": "code",
2728 "execution_count": null,
2729 "id": "9b3c8d8d-ea50-44ea-8c0c-414e07cd01ac",
2735 "cell_type": "code",
2736 "execution_count": null,
2737 "id": "03063e3c-e8f4-451d-b0cf-25bd965cd9d6",
2741 "params.update({'epochs': 50, 'learning_rate': 0.001, 'verbose_fit': True, 'rnn_layers': 2, 'rnn_units': 20, 'dense_layers': 1, 'dense_units': 10,\n",
2742 " 'activation': ['tanh', 'tanh'], 'features_list': rnn_dat.features_list,\n",
2743 " 'batch_schedule_type':'exp', 'bmin': 10, 'bmax':rnn_dat.hours,\n",
2744 " 'early_stopping_patience': 25})\n",
2745 "reproducibility.set_seed(123)\n",
2746 "lstm = RNN_LSTM(params)\n",
2747 "m, errs = lstm.run_model(rnn_dat)"
2751 "cell_type": "code",
2752 "execution_count": null,
2753 "id": "f60a24c6-9a67-45aa-bc5c-8818aa0ca049",
2759 "cell_type": "code",
2760 "execution_count": null,
2761 "id": "00910bd2-f050-438c-ab3b-c793b83cb5f5",
2769 "cell_type": "code",
2770 "execution_count": null,
2771 "id": "236b33e3-e864-4453-be16-cf07338c4105",
2775 "params = RNNParams(read_yml(\"params.yaml\", subkey='lstm'))\n",
2780 "cell_type": "code",
2781 "execution_count": null,
2782 "id": "fe2a484c-dc99-45a9-89fc-2f451bd719b5",
2786 "train = read_pkl(\"data/train.pkl\")"
2790 "cell_type": "code",
2791 "execution_count": null,
2792 "id": "07bfac87-a6d4-4dcc-8d11-adf83eafab76",
2796 "from itertools import islice\n",
2797 "train = {k: train[k] for k in islice(train, 100)}"
2801 "cell_type": "code",
2802 "execution_count": null,
2803 "id": "4e26099b-f760-4047-afec-9e751d24b7a6",
2807 "from data_funcs import combine_nested\n",
2808 "rnn_dat_sp = RNNData(\n",
2809 " combine_nested(train), # input dictionary\n",
2810 " scaler=\"standard\", # data scaling type\n",
2811 " features_list = params['features_list'] # features for predicting outcome\n",
2815 "rnn_dat_sp.train_test_split( \n",
2816 " time_fracs = [.8, .1, .1], # Percent of total time steps used for train/val/test\n",
2817 " space_fracs = [.8, .1, .1] # Percent of total timeseries used for train/val/test\n",
2819 "rnn_dat_sp.scale_data()\n",
2821 "rnn_dat_sp.batch_reshape(\n",
2822 " timesteps = params['timesteps'], # Timesteps aka sequence length for RNN input data. \n",
2823 " batch_size = params['batch_size'] # Number of samples of length timesteps for a single round of grad. descent\n",
2828 "cell_type": "code",
2829 "execution_count": null,
2830 "id": "10738795-c83b-4da3-88ba-09278caa35f8",
2834 "params.update({\n",
2835 " 'loc_batch_reset': rnn_dat_sp.n_seqs # Used to reset hidden state when location changes for a given batch\n",
2840 "cell_type": "code",
2841 "execution_count": null,
2842 "id": "9c5d45cc-bcf0-4b6c-9c51-c4c790a2d9a5",
2846 "rnn_sp = RNN_LSTM(params)\n",
2847 "m_sp, errs = rnn_sp.run_model(rnn_dat_sp)"
2851 "cell_type": "code",
2852 "execution_count": null,
2853 "id": "ee332ccf-4e4a-4f66-b4d6-c079dbdb1411",
2861 "cell_type": "code",
2862 "execution_count": null,
2863 "id": "739d4b26-641e-47b2-a90a-67cd32215d05",
2871 "display_name": "Python 3 (ipykernel)",
2872 "language": "python",
2876 "codemirror_mode": {
2880 "file_extension": ".py",
2881 "mimetype": "text/x-python",
2883 "nbconvert_exporter": "python",
2884 "pygments_lexer": "ipython3",