5 "execution_count": null,
6 "id": "9ddd1d89-abdb-4627-a0ca-23db006b62f4",
12 "import os.path as osp\n",
13 "import subprocess\n",
14 "from datetime import timedelta\n",
15 "from urllib.parse import urlparse\n",
16 "import numpy as np\n",
17 "import matplotlib.pyplot as plt\n",
18 "from moisture_rnn_pkl import pkl2train\n",
20 "from data_funcs import build_train_dict\n",
21 "from utils import time_intp, str2time, filter_nan_values, read_pkl, read_yml, retrieve_url"
25 "cell_type": "markdown",
26 "id": "609ea544-ed92-40a6-892b-1943e9f6f620",
34 "execution_count": null,
35 "id": "41b0d403-7d6b-44f4-963f-8dc492ae0126",
39 "retrieve_url(\"https://demo.openwfm.org/web/data/fmda/dicts/fmda_nw_202401-05_f05.pkl\", \"data/fmda_nw_202401-05_f05.pkl\")"
44 "execution_count": null,
45 "id": "e69e37b9-73ef-45a1-9738-844f26dc3323",
49 "params_data = read_yml(\"params_data.yaml\")\n",
50 "params_data.update({'hours': 168})"
55 "execution_count": null,
56 "id": "6b5c3c82-84ba-426c-b8d9-f540b5026158",
60 "# dat = read_pkl(\"data/test_CA_202401.pkl\")\n",
61 "dat = read_pkl(\"data/fmda_nw_202401-05_f05.pkl\")"
65 "cell_type": "markdown",
66 "id": "8afeae74-217e-41e5-a140-fd4df30e8148",
69 "## Format and Filter"
74 "execution_count": null,
75 "id": "4003ced7-f08c-4cd3-a785-458c3588b235",
81 "train_h = build_train_dict([\"data/test_CA_202401.pkl\"], atm_source=\"HRRR\", params_data=params_data)"
86 "execution_count": null,
87 "id": "7c47b87d-9d1d-4d85-aeb9-7248384ed16f",
93 "train_r = build_train_dict([\"data/test_CA_202401.pkl\"], atm_source=\"RAWS\", params_data=params_data, features_subset=['Ed', 'rain', 'wind'])"
98 "execution_count": null,
99 "id": "cf33ee50-1b05-4f11-90fb-9cccf355fdd6",
105 "# Should Produce Informative Error\n",
106 "train_r = build_train_dict([\"data/test_CA_202401.pkl\"], atm_source=\"RAWS\", params_data=params_data)"
111 "execution_count": null,
112 "id": "aa0eb65f-a680-4630-beff-c01dabca32aa",
119 "execution_count": null,
120 "id": "c2f20f9c-9d9a-488e-81ae-9aef54253541",
128 "display_name": "Python 3 (ipykernel)",
129 "language": "python",
137 "file_extension": ".py",
138 "mimetype": "text/x-python",
140 "nbconvert_exporter": "python",
141 "pygments_lexer": "ipython3",