4 "cell_type": "markdown",
5 "id": "f1f4cc18-d23f-48ea-84dc-b0328a65e8e5",
8 "# Collect RAWS Data with SynopticPy"
12 "cell_type": "markdown",
13 "id": "84ed774d-7bef-48e7-b9a6-8f4ba4e17d81",
21 "execution_count": null,
22 "id": "509b32fd-9d6b-4582-b724-4d2a094a6832",
26 "import matplotlib.pyplot as plt\n",
27 "from datetime import datetime\n",
29 "from synoptic.services import stations_timeseries"
33 "cell_type": "markdown",
34 "id": "4fbefa25-ac25-4164-adbc-187f9740b6b8",
37 "## Station Time Series"
42 "execution_count": null,
43 "id": "8f05be2b-0120-4637-b5d2-a258211b2650",
48 " stid=[\"PLFI1\"],\n",
49 " vars=[\"air_temp\", \"relative_humidity\", \"precip_accum\", \"fuel_moisture\", \"wind_speed\", \"solar_radiation\", \"soil_moisture\"],\n",
50 " start=datetime(2024, 1, 1),\n",
51 " end=datetime(2024, 6, 1),\n",
54 "a = stations_timeseries(verbose=\"HIDE\", **params)\n",
61 "execution_count": null,
62 "id": "8ce7b02c-4149-443e-b29d-da8cdf12583e",
71 "execution_count": null,
72 "id": "880122b3-f947-4d0f-b391-841db74c8eef",
76 "import numpy as np\n",
77 "np.diff(a.precip_accum, 1)"
82 "execution_count": null,
83 "id": "7068d270-d6e8-4afc-9bfe-881e8d7d4c6f",
92 "execution_count": null,
93 "id": "e711774a-f8be-4f60-ac8c-8908f5c192ec",
97 "print(f'Station Elevation: {a.attrs[\"ELEVATION\"]}')\n",
98 "print(f'Lat: {a.attrs[\"latitude\"]}')\n",
99 "print(f'Lon: {a.attrs[\"longitude\"]}')\n",
100 "print(f'Temp Units: {a.attrs[\"UNITS\"][\"air_temp\"]}')\n",
101 "print(f'Wind Units: {a.attrs[\"UNITS\"][\"wind_speed\"]}')\n",
102 "# print(f'Solar Rad. Units: {a.attrs[\"UNITS\"][\"solar_radiation\"]}')"
107 "execution_count": null,
108 "id": "2058d705-a2d3-48d9-9151-a4536512057e",
117 "execution_count": null,
118 "id": "ccddffba-f785-4fb8-a053-b87ad648ef9c",
122 "plt.plot(a.fuel_moisture)"
127 "execution_count": null,
128 "id": "6901c78a-8f6f-4af7-8fbe-e0e15dea0b6c",
136 "display_name": "Python 3 (ipykernel)",
137 "language": "python",
145 "file_extension": ".py",
146 "mimetype": "text/x-python",
148 "nbconvert_exporter": "python",
149 "pygments_lexer": "ipython3",